Technical method for automated construction of gold mine macro knowledge system

By automatically building a knowledge map in the gold mine field, using the domain fine-tuning model for triple extraction, the problem of inefficiency of traditional mineral exploration methods is solved, and higher-precision gold mine resource understanding and exploration support is achieved.

CN119739870APending Publication Date: 2025-04-01CHINA GEOLOGICAL LIBRARY (GEOLOGICAL LITERATURE CENT OF CHINA GEOLOGICAL SURVEY)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411791915.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

Traditional mineral exploration methods are inefficient and difficult to adapt to the needs of modern mineral exploration. In addition, gold mine resources are complex, the types of deposits are diverse, and exploration is difficult. How to build a knowledge map in the gold mine field has become an important technical challenge.

Method used

A technical method for automatic construction of macro knowledge system of gold mines is proposed. By obtaining literature data sets in the gold mine field, the target corpus is extracted, and a pre-trained model based on the text data of the gold mine field is used for triple extraction, combining the domain attention layer and attention weight layer, the accuracy of entity and relationship extraction is improved.

Benefits of technology

It improves the accuracy and construction efficiency of the knowledge map in the gold mine field, can better identify key entities and relationships, enhances the understanding of the distribution and types of gold mine resources, and supports more accurate exploration and development work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739870A_ABST
    Figure CN119739870A_ABST
Patent Text Reader

Abstract

The present application provides a technical method for automatically constructing a gold mine macro knowledge system, the method comprising: obtaining a literature data set in the gold mine field, and extracting a target corpus from the literature data set; inputting the target corpus into a target model, performing triple extraction on the target corpus, and obtaining an initial triple corresponding to the target corpus; wherein the pre-trained model in the target model is fine-tuned based on the gold mine field text data, and the joint extraction model also includes a domain attention layer and an attention weight layer; ablating the entities in the initial triples to obtain target triples, and publishing and transferring the target triples into a graph database to form a knowledge graph in the gold mine field. Through the method and device, the accuracy of entity and relationship extraction is improved, and the accuracy of the constructed gold mine field knowledge graph is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and more specifically, to a technical method for automatically constructing a gold mine macro knowledge system. Background Art

[0002] With the continuous development and utilization of global mineral resources, the complexity and challenges of gold exploration and development are also increasing. Traditional prospecting methods mainly rely on geological exploration and experience accumulation, which are not only inefficient but also difficult to adapt to the needs of modern prospecting. In recent years, information technology and data-driven methods have gradually emerged in the field of prospecting and have become a hot topic of current research. By using technologies such as big data, artificial intelligence, and knowledge graphs, researchers can explore and develop mineral resources more accurately.

[0003] As an important mineral resource, the exploration and development of gold mines have extremely high economic value and strategic significance. However, the distribution of gold mine resources is complex, the types of deposits are diverse, and exploration is difficult. As a semantic knowledge representation method, knowledge graphs can present complex professional knowledge in a structured and systematic manner, thereby providing the public with a comprehensive and intuitive knowledge platform. Therefore, how to construct a knowledge graph in the field of gold mines has become a technical issue that cannot be underestimated. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a technical method for automatically constructing a gold mine macro knowledge system. For texts in the gold mine field, the target model can better identify key entities and relationships, thereby improving the accuracy of entity and relationship extraction and improving the accuracy of the constructed gold mine field knowledge graph.

[0005] In a first aspect, an embodiment of the present application provides a technical method for automatically constructing a gold mine macro knowledge system, the method comprising:

[0006] Obtaining a literature data set in the field of gold mining, and extracting a target corpus from the literature data set;

[0007] The target corpus is input into the target model, and triples are extracted from the target corpus to obtain initial triples corresponding to the target corpus; wherein the initial triples include entities, attributes and relationships in the gold mining field, the pre-trained model in the target model is fine-tuned based on the gold mining field text data, and the joint extraction model in the target model includes a field attention layer and an attention weight layer;

[0008] The entities in the initial triples are dissolved to obtain target triples, and the target triples are published and transferred to a graph database to form a knowledge graph in the gold mining field.

[0009] Furthermore, extracting the target corpus from the document dataset includes:

[0010] Using preset screening conditions to screen the document data set to determine multiple candidate documents;

[0011] For each candidate document, content extraction is performed on the candidate document to obtain text content corresponding to the candidate document, and text processing is performed on the text content to obtain the target corpus corresponding to the candidate document.

[0012] Furthermore, the pre-trained model in the target model is fine-tuned in the domain through the following steps:

[0013] Acquire the gold mine field text data, define a fine-tuning task for the original pre-trained model, and fine-tune the original pre-trained model based on the text data and the fine-tuning task to obtain the pre-trained model;

[0014] or,

[0015] Using the gold mining field text data to train a word embedding model in the gold mining field, and concatenating or weighted averaging the word embedding model with the original pre-training model to obtain the pre-training model;

[0016] or,

[0017] Using the gold mining field text data to build a custom vocabulary, and adding the custom vocabulary to the word segmenter of the original pre-trained model to obtain the pre-trained model;

[0018] or,

[0019] The original pre-trained model is further pre-trained using the gold mining field text data to obtain the pre-trained model.

[0020] Furthermore, the step of inputting the target corpus into the target model, extracting triples from the target corpus, and obtaining initial triples corresponding to the target corpus includes:

[0021] Inputting the target corpus into the pre-trained model of the target model, encoding multiple target corpora to obtain text features;

[0022] Inputting the text features into the domain attention layer and the attention weight layer of the joint extraction model respectively to adjust the weight of each text feature to obtain weighted text features;

[0023] Inputting the weighted text features into the partition layer of the target model to generate a first feature of an entity partition, a second feature of a relationship partition, and a third feature of a shared partition;

[0024] Inputting the first feature, the second feature and the third feature into the entity memory, the relationship memory and the shared memory of the target model respectively to obtain the entity feature, the relationship feature and the shared feature, and jointly encoding the entity feature, the relationship feature and the shared feature to obtain the target feature;

[0025] The target features are respectively input into the named entity recognition processing layer and the relationship extraction processing layer of the target model to perform initial triples corresponding to the target corpus.

[0026] Furthermore, the entities in the initial triples are eliminated by the following steps:

[0027] For each entity in the initial triple, extract a candidate entity matching the entity from the knowledge base, and extract corresponding entity features for each candidate entity;

[0028] Each candidate entity and the entity features corresponding to each candidate entity are input into the score prediction model to obtain the entity score corresponding to each entity feature, and the candidate entity with the highest entity score among multiple candidate entities is used as the ablation result of the entity to obtain the target triplet.

[0029] In a second aspect, the present application also provides a device for automatically constructing a gold mine macro knowledge system, the device comprising:

[0030] A corpus extraction module is used to obtain a literature data set in the field of gold mining and extract target corpus from the literature data set;

[0031] A triple extraction module is used to input the target corpus into the target model, perform triple extraction on the target corpus, and obtain initial triples corresponding to the target corpus; wherein the initial triples include entities, entity types and relationships in the gold mining field, the pre-trained model in the target model is fine-tuned based on the gold mining field text data, and the joint extraction model in the target model also includes a field attention layer and an attention weight layer;

[0032] The knowledge graph generation module is used to eliminate the entities in the initial triples to obtain target triples, and publish the target triples and transfer them to the graph database to form a knowledge graph in the gold mining field.

[0033] Furthermore, when the corpus extraction module is used to extract the target corpus from the document data set, the corpus extraction module is also used to:

[0034] Using preset screening conditions to screen the document data set to determine multiple candidate documents;

[0035] For each candidate document, content extraction is performed on the candidate document to obtain text content corresponding to the candidate document, and text processing is performed on the text content to obtain the target corpus corresponding to the candidate document.

[0036] Furthermore, the construction device also includes a model fine-tuning module, which is used to perform domain fine-tuning on the pre-trained model in the target model through the following steps:

[0037] Acquire the gold mine field text data, define a fine-tuning task for the original pre-trained model, and fine-tune the original pre-trained model based on the text data and the fine-tuning task to obtain the pre-trained model;

[0038] or,

[0039] Using the gold mining field text data to train a word embedding model in the gold mining field, and concatenating or weighted averaging the word embedding model with the original pre-training model to obtain the pre-training model;

[0040] or,

[0041] Using the gold mining field text data to build a custom vocabulary, and adding the custom vocabulary to the word segmenter of the original pre-trained model to obtain the pre-trained model;

[0042] or,

[0043] The original pre-trained model is further pre-trained using the gold mining field text data to obtain the pre-trained model.

[0044] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the technical method for automatically constructing a gold mine macro knowledge system are performed as described above.

[0045] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the technical method for automatically constructing a gold mine macro knowledge system as described above are executed.

[0046] A technical method for automatically constructing a gold mine macro knowledge system is provided in an embodiment of the present application. First, a literature data set in the gold mine field is obtained, and a target corpus is extracted from the literature data set; then, the target corpus is input into a target model, and triples are extracted from the target corpus to obtain an initial triplet corresponding to the target corpus; wherein the initial triplet includes entities, entity types and relationships in the gold mine field, the pre-trained model in the target model is fine-tuned based on the gold mine field text data, and the joint extraction model in the target model includes a domain attention layer and an attention weight layer; finally, the entities in the initial triplet are ablated to obtain a target triplet, and the target triplet is published and transferred to a graph database to form a knowledge graph in the gold mine field.

[0047] The method provided in the embodiment of the present application first obtains a gold mine literature dataset for constructing a knowledge graph, extracts the corresponding target corpus, then uses the target model to extract triples from the target corpus, and then ablates the extracted entities, and finally constructs a gold mine knowledge graph. The target model used in this application is fine-tuned based on the gold mine field text data to enhance the adaptability of the target model to field-specific tasks. In addition, a domain attention layer and an attention weight layer are introduced into the joint extraction model of entities and relationships. For texts in the gold mine field, the target model can better identify key entities and relationships, thereby improving the accuracy of entity and relationship extraction and improving the accuracy of the constructed gold mine field knowledge graph.

[0048] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 A flowchart of a technical method for automatically constructing a gold mine macro knowledge system provided in an embodiment of the present application;

[0051] Figure 2 A schematic diagram of a process for constructing a knowledge graph in the gold mining field provided in an embodiment of the present application;

[0052] Figure 3A schematic diagram of the structure of a device for automatically constructing a gold mine macro knowledge system provided in an embodiment of the present application;

[0053] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0055] First, the application scenarios to which the present application is applicable are introduced. The present application can be applied in the field of natural language processing technology.

[0056] With the continuous development and utilization of global mineral resources, the complexity and challenges of gold exploration and development are also increasing. Traditional prospecting methods mainly rely on geological exploration and experience accumulation, which are not only inefficient but also difficult to adapt to the needs of modern prospecting. In recent years, information technology and data-driven methods have gradually emerged in the field of prospecting and have become a hot topic of current research. By using technologies such as big data, artificial intelligence, and knowledge graphs, researchers can explore and develop mineral resources more accurately.

[0057] Research has found that gold mines, as an important mineral resource, have extremely high economic value and strategic significance in their exploration and development. However, the distribution of gold resources is complex, the types of deposits are diverse, and exploration is difficult. As a semantic knowledge representation method, knowledge graphs can present complex professional knowledge in a structured and systematic manner, thereby providing the public with a comprehensive and intuitive knowledge platform. Therefore, how to construct a knowledge graph in the field of gold mines has become a technical issue that cannot be underestimated.

[0058] Based on this, the embodiment of the present application provides a technical method for automatically constructing a gold mine macro knowledge system, which improves the accuracy of entity and relationship extraction and improves the accuracy of the constructed gold mine field knowledge graph.

[0059] See also Figure 1 , Figure 1This is a flow chart of a technical method for automatically constructing a gold mine macro knowledge system provided in an embodiment of the present application. Figure 1 As shown in , the method provided in the embodiment of the present application includes:

[0060] S101, obtaining a literature dataset in the field of gold mining, and extracting a target corpus from the literature dataset.

[0061] Here, the text datasets in the gold mining field usually include academic papers, research articles, books and other literature data. The target corpus refers to the corpus extracted from the literature dataset and subsequently used to construct the knowledge graph.

[0062] For the above step S101, in the specific implementation, first obtain the literature data set in the field of gold mines. Specifically, you can use "gold mine / gold deposit" as a keyword search on the Internet to obtain three types of documents including degree theses, journal articles, and e-books, and screen high-quality documents with high citation rates, published in well-known journals or published by well-known research institutions. At the same time, select documents published in recent years to ensure the timeliness of the information obtained and the cutting-edge nature of the research. Obtain the bibliographic information and crawl and collect key information so that the final document list can be screened based on the crawled information. The crawled information includes title, author, author unit, journal name, year, volume number, issue number, page number, ISSN, keywords, classification number, subject number, abstract, fund, important collection, document type, and acquisition method. Then extract the target corpus from the acquired literature data set.

[0063] As an optional embodiment, with respect to the above step S101, extracting the target corpus from the document dataset includes:

[0064] Step 1011, screening the document data set using preset screening conditions to determine a plurality of candidate documents.

[0065] In the specific implementation of step 1011, the obtained document data set is screened using preset screening conditions. Here, the preset screening conditions may include screening keywords, abstracts, journal types, publication time and other information to retain a high-quality document list and obtain multiple candidate documents.

[0066] Step 1012: for each candidate document, extract the content of the candidate document to obtain the text content corresponding to the candidate document, and perform text processing on the text content to obtain the target corpus corresponding to the candidate document.

[0067] For the above step 1012, in the specific implementation, the article PDF of each candidate document is automatically downloaded in batches. Then the MinerU intelligent data extraction tool is used to extract the content of the PDF file to obtain the text content corresponding to the candidate document. The MinerU intelligent data extraction tool focuses on the efficient parsing and extraction of complex PDF documents. It can convert multimodal PDF documents containing elements such as pictures, formulas, tables, etc. into Markdown format that is easy to analyze. It supports extracting content from web pages and e-books. During the conversion process, the structure and format of the original document, such as titles, paragraphs, and lists, are retained to improve the efficiency of AI corpus preparation. MinerU has a high-precision PDF model parsing tool chain that supports multiple input models, automatically identifies garbled characters, and retains document structure. Especially for mathematical formulas, it can recognize and convert them into LaTeX format, which is convenient for academic exchanges and technical documents. Then, in-depth preprocessing of the text content is a key step to ensure the quality and accuracy of the research. By observing the text content initially obtained, it is found that the operations that need to be performed on the text include but are not limited to the following operations: converting full-width characters to half-width characters, optimizing latex formula display, deleting image tags referenced by md files, deleting blank lines, deleting extra spaces between English letters, deleting extra spaces between Chinese, removing reference lists, etc., processing and extracting data from the obtained text content to obtain the final target corpus.

[0068] S102, inputting the target corpus into a target model, performing triple extraction on the target corpus, and obtaining initial triples corresponding to the target corpus.

[0069] Here, the extracted initial triples include entities, entity types, and relationships in the gold mining field.

[0070] Regarding the above step S102, in a specific implementation, the target corpus obtained in step S101 is input into the target model, and triples are extracted from multiple target corpora to obtain initial triples corresponding to the target corpus.

[0071] Specifically, according to the embodiments provided in this application, the expression model of gold mine field knowledge is determined by adopting the mode of "people-things-objects-time-space-methods-institutes" in several dimensions, emphasizing the comprehensive and systematic description of field knowledge from multiple dimensions. People: Involving relevant personnel such as authoritative researchers to ensure the credibility of the knowledge source. Things: Including tectonic events, mineralization mechanisms, element zoning, alteration zoning, etc., covering the key phenomena and processes in the formation of ore deposits. Things: Covering the name of the ore deposit, reserves, ore minerals, gangue minerals, gold-bearing minerals, occurrence state, structural type, ore-bearing surrounding rocks, surrounding rock alteration, alteration, ore deposit type, geophysical information, remote sensing information, geochemical information and mineralization type, etc., these contents describe the material composition and properties of the ore deposit in detail. Time: Describes the ore-forming era, provides background information in the time dimension, and helps understand the time relationship of the formation of the ore deposit. Space: Including the geographical location of the mining area, the tectonic background, the gold mine cluster area, etc., highlighting the importance of spatial location and geological background. Method: covers test analysis methods, exploration methods, etc., to ensure the scientificity and reliability of data acquisition and analysis methods. Institute: refers to institutions such as enterprises and research institutes, reflecting the actual application background and supporting institutions of knowledge. This description mode of "people-things-objects-time-space-methods-institutes" ensures the comprehensiveness and systematicness of knowledge in the gold mining field, and helps to build a semantic expression model that can reflect the complex relationships and knowledge structure in this field.

[0072] In the embodiment provided in the present application, the pre-trained model in the target model is domain fine-tuned based on gold mining domain text data, and the joint extraction model of entities and relationships in the target model also includes a domain attention layer and an attention weight layer.

[0073] In this application, the target model adopts the PFN model, which consists of a partition filter encoder and two task units, namely the NER unit and the RE unit. Formally, given an input sequence s = {ω 1 ,…,ω L}, with L markers, ω i represents the i-th token in the sequence s. For NER, our goal is to extract all types of entities whose set is represented as S, where (ω i ,e,ω j )∈S represents the label ω i and ω j are the start and end markers of an entity of type e∈ε. ε represents the set of entity types. Regarding RE, the goal is to identify all head triples, whose set is denoted as T. Each triple (ω i ,r,ω j )∈T represents the label ω i and ω jare the start tokens corresponding to the subject and object entities of the relation r∈R. R represents the set of relation types. By combining the results of NER and RE, it is possible to extract relation triples with complete entity spans. The partition filter encoder is used to generate task-specific features, which will be sent to the task unit as the input joint encoding of entity and relation prediction. The encoder first sorts and partitions each neuron according to its contribution to the respective tasks with entity and relation gates. In this process, two task partitions and one shared partition are formed. The separate task partitions and the shared partition are then combined to generate task-specific features, filtering out irrelevant information stored in the opposite task partition. Task interaction in the encoder is achieved in two ways: first, partitions, especially task-specific partitions, are formed through the joint efforts of entity gates and relation gates, allowing the interaction between the formation of entity and relation features determined by these partitions. Second, the shared partition represents information useful to both tasks, and the formation of both task-specific features can be equally accessed, thus ensuring a balanced two-way interaction.

[0074] In the PFN model, the pre-trained model for Chinese, bert-base-chinese, plays a core role in word embedding and text encoding, and is responsible for converting raw Chinese text into context-dependent vector representations as input features for subsequent named entity recognition (NER) and relation extraction (RE) tasks. This part is critical because BERT provides context-aware embeddings, which are very effective in dealing with polysemous words in sentences or context-dependent understanding. bert-base-chinese is a pre-trained BERT model that has been pre-trained on large-scale Chinese text and has strong Chinese understanding capabilities. It generates context-sensitive vector representations for each word through a self-attention mechanism (i.e., the embedding of each word depends on the context of the entire sentence). These embedded vectors are then input into the 'feature_extractor' part of the PFN model to provide input features for named entity recognition and relation extraction. bert-base-chinese provides a general, domain-independent text representation that can be used by subsequent parts of the PFN model to perform different tasks, such as NER and RE. BERT's embeddings are used as shared representations (h_share) to provide information for downstream tasks. Although BERT-base-chinese has good Chinese understanding ability, in the gold mining field, in order to make the target model have good Chinese understanding ability in the gold mining field, it is also necessary to use the proprietary data in the gold mining field to fine-tune BERT-base-chinese.

[0075] At the same time, in the embodiments provided in the present application, the PFN model introduces a domain attention layer and an attention weight layer.

[0076] First, the introduction of the domain attention mechanism is introduced: by adding the domain_attention layer, the model can adjust the information flow in the network according to the input feature weights of the gold mining field, ensuring that the information in the specific field is processed more efficiently. That is, add: self.domain_attention = nn.Linear(args.hidden_size,args.hidden_size). As a fully connected layer, domain_attention is used to generate attention weights, which are specifically used to enhance the important parts of the input features. Here, the basic idea of ​​the attention mechanism is to enable the model to dynamically "pay attention" to the important parts of the input. By introducing the domain_attention layer, the model can generate a weight matrix (through nn.Linear transformation) based on the information of the hidden state h_in. These weights reflect the importance of different dimensions in the input features to the current task. For gold mining field text, some features (such as keywords, specific field terms) are more important than other features. Through the attention mechanism, the model can dynamically adjust the weights of these features, strengthen important information, and make it more influential in subsequent processing. This method can effectively filter out irrelevant noise and enhance important features specific to the field.

[0077] The following is an introduction to the optimization of the gating mechanism: By introducing attention_weights, domain-related information will be further strengthened. Redesign the accumulation control of eg_cin and rg_cin so that domain-related features are more easily retained and irrelevant information is filtered out. That is, add: attention_weights = torch.sigmoid(self.domain_attention(h_in)); x_weighted = x_transformed*attention_weights; combined_x = torch.cat((x,x_weighted), dim = -1). The above code dynamically adjusts the weight of the input feature by calculating attention_weights and combining it with the original input x. First, the weight of the hidden state h_in and the input feature is calculated by self.domain_attention(h_in). This weight is generated by a fully connected layer and then compressed to the [0,1] interval by the sigmoid function. This weight reflects the domain-specific attention, that is, the importance of each input feature. Then, the input x is combined with attention_weights to adjust the strength of the input feature. This adjustment amplifies important domain-related features and weakens domain-irrelevant or noise features. For text in the gold mining field, the model can better identify key entities (such as "gold mine", "reserves", etc.) and relationships (such as "mining", "exploration"), thereby improving the accuracy of entity and relationship extraction.

[0078] In this way, by introducing domain_attention and attention_weights, the PFN model can dynamically adjust the weight of each input feature according to the current domain. In this way, specific terms and concepts in the gold mining field will be given higher weights, enhancing the model's ability to capture key entities and relationships. At the same time, the robustness of the model is improved. In different types of texts, the model can adaptively adjust the weights according to the characteristics of the domain and reduce the impact of noise features, thereby enhancing the focus on important information and improving model performance. In addition, the new gating mechanism can better distinguish important fine-grained information through attention adjustment, allowing the model to be more accurate when extracting complex relationships.

[0079] As an optional embodiment, according to the method provided in the embodiment of the present application, the pre-trained model in the target model can be domain fine-tuned in the following four ways:

[0080] Method 1: Acquire the gold mining field text data, define a fine-tuning task for the original pre-trained model, and fine-tune the original pre-trained model based on the text data and the fine-tuning task to obtain the pre-trained model.

[0081] For the above method 1, in order to make bert-base-chinese better adapt to the vocabulary, syntactic structure and context of the gold mining field, the model can be fine-tuned. Using the domain text of the gold mining field for fine-tuning can make bert-base-chinese better adapt to the vocabulary, syntactic structure and context of the specific field, thereby improving the performance of the model in the gold mining field. In the specific implementation, first prepare the gold mining field text data, and define the fine-tuning task of the original pre-trained model. Fine-tune the original pre-trained model based on the text data and fine-tuning tasks, and save the fine-tuned model to obtain the pre-trained model. In this way, the fine-tuned BERT model can better understand the terms, concepts and context related to the gold mining field, thereby improving the accuracy of named entity recognition and relationship extraction.

[0082] Method 2: Use the gold mining field text data to train a word embedding model in the gold mining field, and concatenate or weighted average the word embedding model with the original pre-training model to obtain the pre-training model.

[0083] For the above method 2, add domain-specific word embedding (Embedding Augmentation). In specific implementation, use gold mining field text data (such as gold mining field papers, technical documents, etc.) to train gold mining field word embedding models (such as Word2Vec), and combine these word embeddings with BERT embeddings. Through concatenation or weighted averaging, combine domain-specific word embeddings with BERT context embeddings to obtain a pre-trained model to enhance the representation capabilities of specific fields.

[0084] Method three: construct a custom vocabulary using the gold mining field text data, and add the custom vocabulary to the word segmenter of the original pre-trained model to obtain the pre-trained model.

[0085] For the above method 3, the default word segmenter of bert-base-chinese may not be able to fully cover the special terms and vocabulary in the gold mining field. In the above method 3, you can improve the word segmentation effect by building a custom vocabulary (tokenizer) and adding professional vocabulary in the gold mining field. In the specific implementation, use the gold mining field text data to build a custom vocabulary (Custom Tokenizer), and add the custom vocabulary to the word segmenter of the original pre-trained model to obtain the pre-trained model. In this way, using a custom vocabulary, the processing ability of field-specific terms is enhanced to avoid the word segmenter from incorrectly segmenting field terms.

[0086] Method 4: Use the gold mining field text data to continue pre-training the original pre-training model to obtain the pre-training model.

[0087] For the above method 4, through continued pre-training, we use gold mine domain text data (such as technical documents, reports, etc.) to continue pre-training bert-base-chinese so that the model can better adapt to the domain text.

[0088] In the PFN model, bert-base-chinese mainly undertakes the tasks of text embedding and context modeling, providing a strong foundation for entity recognition and relationship extraction. For specific gold mining fields, through the above four methods, the model can be improved through field fine-tuning, word embedding enhancement, custom word segmentation, and continued pre-training to enhance its adaptability to field-specific tasks.

[0089] Specifically, with respect to the above step S102, the target corpus is input into the target model, triples are extracted from the target corpus, and initial triples corresponding to the target corpus are obtained, including:

[0090] Step 1021, input the target corpus into the pre-trained model of the target model, encode multiple target corpora, and obtain text features.

[0091] Regarding the above step 1021, in a specific implementation, the target corpus is input into a pre-trained model of the target model, and multiple target corpora are encoded to obtain text features.

[0092] Step 1022, input the text features into the domain attention layer and the attention weight layer of the joint extraction model respectively to adjust the weight of each text feature to obtain weighted text features.

[0093] Regarding the above step 1022, in the specific implementation, the text features obtained in step 1021 are respectively input into the domain attention layer and the attention weight layer of the joint extraction model to adjust the weight of each text feature to obtain the weighted text features.

[0094] Step 1023: input the weighted text features into the partition layer of the target model to generate a first feature of an entity partition, a second feature of a relationship partition, and a third feature of a shared partition.

[0095] Regarding the above step 1023, in a specific implementation, the weighted text features obtained in step 1022 are input into the partition layer of the target model to generate the first feature of the entity partition, the second feature of the relationship partition and the third feature of the shared partition.

[0096] Similar to LSTM, the partitioned filter encoder is a recurrent feature encoder whose information is stored in an intermediate memory. At each time step, the encoder first divides neurons into three partitions: entity partition, relation partition, and shared partition. Then, it generates task-specific features by selecting and combining these partitions, filtering out information that is not relevant to each task. This module is specially designed to jointly extract task-specific features, strictly following two steps: partitioning and filtering.

[0097] Partitioning: This step performs neuron partitioning, dividing the cell neurons into three partitions: two task partitions that store information within a task, namely the entity partition and the relationship partition, and a shared partition that stores information between tasks. The neurons to be divided are candidate units that represent the current information. and the previous unit c representing historical information t-1 .c t-1 is the direct input of the last time step, The calculation method is the same as LSTM:

[0098]

[0099] Among them, Linear represents the operation of linear transformation.

[0100] The PFN model uses a physical gate and relationship gate Each gate representing a specific task will divide the neuron into two parts according to its usefulness for the specified task. For example, the entity gate The neurons are divided into two parts: NER-related and NER-irrelevant. The shared partition is formed by combining the partition results of the two gates. The neurons in the shared partition can be regarded as information that is valuable to both tasks. In order to correctly model the bidirectional interaction, the inter-task information in the shared partition can be accessed evenly by both tasks (this will be discussed in the filter subsection). In addition, information that is only valuable to one task is invisible to the other task and will be stored in a separate task partition. Using the cummax activation function, its output can be seen as an approximation of a binary gate of the form (0,…,0,1,…,1):

[0101]

[0102] The neurons are divided into three partitions: entity partition ρ e , relation partition ρ r and shared partition ρ s . Previous cell c t-1 The partition formula is as follows:

[0103]

[0104] The partition information from the two target cells is then aggregated, resulting in three partitions. For all three partitions, all relevant information from the two cells is summed:

[0105]

[0106] Step 1024, input the first feature, the second feature and the third feature into the entity memory, the relationship memory and the shared memory of the target model respectively to obtain the entity feature, the relationship feature and the shared feature, and jointly encode the entity feature, the relationship feature and the shared feature to obtain the target feature.

[0107] For the above step 1024, in the specific implementation, the first feature, the second feature and the third feature are respectively input into the entity memory, the relationship memory and the shared memory of the target model to obtain the entity feature, the relationship feature and the shared feature, and the entity feature, the relationship feature and the shared feature are jointly encoded to obtain the target feature.

[0108] Specifically, the PFN model proposes three types of memory blocks: entity memory, relational memory, and shared memory. e Represented as physical memory, μ r Represented as a relational memory, μ s Represents shared memory. eIn contrast, information in the relation partition (assumed to be irrelevant or even harmful to the named entity recognition task) is filtered out. The same logic applies to μ r , filter out the information in the physical partition and keep the rest. In addition, the information in the shared partition will be S For unit storage:

[0109] μ e =ρ e +ρ s ;μ r =ρ r +ρ s ;μ s =ρ s

[0110] The inter-task information in the shared partition is accessible by both entity memory and relation memory, allowing a balanced interaction between NER and RE. While in both sequential and parallel encoding, relation features have no direct influence on the formation of entity features.

[0111] After updating the information in each memory, the entity feature h is generated with the corresponding memory e , relationship feature h r and shared features h s :

[0112] h e =tanh(μ e )

[0113] h r =tanh(μ r )

[0114] h s =tanh(μ s )

[0115] After the partitioning and filtering steps, the information in all three memories is used to form the cell state c t , which is then used to generate the hidden state h t (The hidden state and cell state at time step t are input to the next time step):

[0116] c t =Linear([μ e,t ;μ r,t ;μ s,t ])

[0117] h t =tanh(c t )

[0118] In the PFN model, a unidirectional encoder is used for feature encoding. The backward encoder in the bidirectional setting is replaced by a task-specific global representation to capture the semantics of future context. Empirically, this is shown to be more effective. For each task, the global representation is a combination of task-specific features and shared features, calculated as:

[0119]

[0120]

[0121] Step 1025, input the target features into the named entity recognition processing layer and the relationship extraction processing layer of the target model respectively, and perform initial triples corresponding to the target corpus.

[0122] Specifically, the named entity recognition processing layer and the relation extraction processing layer need to be trained using a given training data set before use. The loss function L guiding the model during training consists of two parts: L of the NER unit ner and L of RE unit re :

[0123]

[0124] in, and are the true labels of the entity table and relationship table respectively. and is the predicted value. We use BCELoss for each task. The training goal is to minimize the loss function L, which is calculated as L ner +L re .

[0125] During inference, we extract relation triplets by combining the results of NER and RE units. For each legal triple prediction Where l is the relationship label, k and k′ are entity type labels, and indexes i, j and m, n are the start and end indices of subject entity s and object entity o, respectively, and should satisfy the following conditions:

[0126]

[0127] Among them, λ e and λ r are the threshold hyperparameters for entity and relation predictions, both set to 0.5 without further fine-tuning.

[0128] In the NER unit, the goal is to identify and classify all entity scopes in a given sentence. More specifically, the task is viewed as a table filling problem of a certain type. Given a set of entity types ε, for each type k, we fill in a table whose elements Represents word w i and the word w j is the probability of the start and end positions of an entity of type k. For each word pair (w i ,w j ), we concatenate word-level entity features and And sentence-level global features It is then fed into a fully connected layer with ELU activation to obtain the entity span representation

[0129]

[0130] With the span representation, we can predict whether the span is an entity of type k by feeding it into a feed-forward neural layer:

[0131]

[0132] The computation of the RE unit is mostly symmetric to that of the NER unit. Given a set of golden relation triplets denoted as T, the unit aims to identify all triples in a sentence. Only the start word of each entity in this unit is predicted, since entity span prediction is already included in the NER unit. Similar to NER, relation extraction is treated as a relation-specific table filling problem. Given a set of relation labels R, for each relation l∈R, we fill in a table whose elements Represents word w i and the word w j The probability of being the starting word of the subject and object entities. In this way, we can use a relation table to extract all triples around the relation l. For each triple (w i ,l,w j ), similar to NER units, triples represent and relationship score The calculation is as follows:

[0133]

[0134] In this way, an improved partition filtering network is used in the target model provided by the present application for the extraction of joint entities and relations. The intelligent extraction process of entities and their relations in the gold mining field can be optimized by combining a small amount of labeled samples, a partition filter encoder and two task units (i.e., named entity recognition and relationship extraction units). In addition, in order to better capture the dependencies between words and the internal semantic information of sentences, the target model also introduces an attention mechanism. On this basis, the target model also combines the word embedding specific to the gold mining field with the context embedding of BERT, further enhancing the processing capability of field-specific information. Through this joint strategy, the target model can capture global semantic information more accurately and show stronger adaptability and accuracy in document processing in the gold mining field.

[0135] S103, ablating entities in the initial triples to obtain target triples, and publishing the target triples and transferring them into a graph database to form a knowledge graph in the gold mining field.

[0136] Here, entity disambiguation, also known as entity linking, is a natural language processing technique used to resolve the ambiguity of entities in context. This process involves matching and linking mentions in text with unique entities in a predefined knowledge base to clarify the specific object each mention refers to.

[0137] For the above step S103, in the specific implementation, the entities in the initial triples are dissolved to obtain the target triples, and the target triples are published and transferred to the graph database to form a knowledge graph in the field of gold mines. In this way, the extracted entities and relationships are organized into a knowledge graph, and this information is structured and stored in the graph database, and presented through a graph visualization web page to provide a clear and comprehensive gold mine knowledge framework. In this way, it can not only help users understand the knowledge in the field of gold mines at a macro level, but also provide accurate entity relationship expressions, and provide professionals with in-depth insights and analysis tools. In the graph SPO (Subject-Predicate-Object) filling stage, SPO triples are generated from the extracted entities and relationships, such as: "Deposit A-located-somewhere", "Company B-exploration-Deposit A". A rule engine is designed to automatically generate SPO triples according to predefined rules, and store them in the graph database to form a complete knowledge graph. The generated triples are automatically verified to ensure their accuracy and rationality. Finally, a gold mine knowledge graph for macro knowledge acquisition is constructed. Integrate all extracted entities, relationships, and triples into a unified knowledge graph, and continuously improve the quality and performance of the graph through iterative optimization and user feedback. Specifically, you can also use visualization tools (such as Graphviz, D3.js, VUE) to generate a graph visualization page, provide a user-friendly interface, and implement the interactive function of the graph. Users can click on nodes to view detailed information and explore different entities and relationships. Apply knowledge graphs in scenarios such as geological research, mineral exploration, and academic research to provide knowledge query and decision support.

[0138] As an optional embodiment, with respect to the above step S103, the entities in the initial triplet are ablated by the following steps:

[0139] Step 1031 , for each entity in the initial triplet, extract candidate entities matching the entity from the knowledge base, and extract corresponding entity features for each candidate entity.

[0140] For the above step 1031, in the specific implementation, for each entity in the initial triple, a candidate entity matching the entity is extracted from the knowledge base, and the corresponding entity features are extracted for each candidate entity. Specifically, the entity is obtained by the joint entity relationship extraction method, and this step is to generate a list of candidate entities for each mention. These candidate entities are a set of entities in the knowledge base that may match the mention. For example, for the mention of "Jobs", the candidate entities may include "Steve Jobs", "John Jobs", etc. Candidate entity generation usually depends on the index and entity alias information in the knowledge base. By querying these indexes, a list of entities similar to the mentioned text can be obtained. After generating the candidate entities, features need to be extracted for each candidate entity, and these features are used to describe the degree of match between the mention and the candidate entity. Features can be divided into context features, string similarity features, knowledge base features, etc. Context features refer to the semantic information of the sentence or paragraph in which the mention is located, string similarity features refer to the similarity between the mentioned text and the candidate entity name, and knowledge base features refer to the attributes and relationship information of the candidate entity in the knowledge base.

[0141] Step 1032, input each candidate entity and the entity features corresponding to each candidate entity into the score prediction model to obtain the entity score corresponding to each entity feature, and use the candidate entity with the highest entity score among multiple candidate entities as the ablation result of the entity to obtain the target triplet.

[0142] For the above step 1032, in the specific implementation, each candidate entity and the entity features corresponding to each candidate entity are input into the score prediction model to obtain the entity score corresponding to each entity feature, and the candidate entity with the highest entity score among multiple candidate entities is used as the ablation result of the entity to obtain the target triple. Specifically, the extracted features are used to score and sort the candidate entities through machine learning or deep learning models, and the entity with the highest score is selected as the mentioned ablation result. Commonly used models include traditional classification models based on feature engineering (such as SVM, logistic regression) and deep learning models based on neural networks (such as BERT, LSTM). These models learn how to accurately sort candidate entities according to features through training data.

[0143] One of the main challenges of entity ablation is the ambiguity and sparsity of entity names. Ambiguity means that the same name may correspond to multiple different entities, for example, "Jobs" may refer to "Steve Jobs" or other people with similar names. Sparsity means that some entities appear infrequently in the knowledge base and lack sufficient contextual information. To address these problems, contextual information can be used to enhance the discriminative ability of the model, and by combining contextual features and semantic information, the model can be helped to match entities more accurately. The coverage of the knowledge base also has an important impact on the effect of entity ablation. If the entity coverage in the knowledge base is incomplete or not updated in time, the accuracy of entity ablation will be limited. In order to expand the coverage of the knowledge base, multi-source data fusion technology can be used to extract entities and relations from multiple data sources and update the knowledge base regularly. In addition, entity ablation systems built on open source knowledge bases (such as Wikipedia and DBpedia) can take advantage of the wide coverage and rich content of these knowledge bases to improve the ablation effect. The application of entity ablation in multilingual and multi-domain scenarios also faces challenges. Texts in different languages ​​and fields have different language characteristics and knowledge backgrounds, which leads to inconsistent results of entity ablation models when applied across languages ​​and fields. To address this problem, transfer learning and cross-domain learning methods can be used to migrate models trained in one language or field to other languages ​​or fields, and fine-tune them with a small amount of annotated data to improve the adaptability of the model.

[0144] Specifically, after the knowledge graph in the gold mining field is constructed, knowledge graph quality assessment is an important step to ensure its accuracy, completeness and practicality. The following are some common knowledge graph quality assessment methods:

[0145] (1) Accuracy: Accuracy measures whether the knowledge in the knowledge graph correctly reflects the information in the real world. This can be evaluated in the following ways: Manual evaluation: Experts or domain-related personnel manually check whether the triples (i.e., entity-relationship-entity) in the knowledge graph are correct. Cross-validation: Compare with known high-quality datasets to calculate the correct proportion of knowledge in the knowledge graph. Consistency check: Use logical rules and constraints to detect whether there is contradictory or erroneous knowledge in the knowledge graph.

[0146] (2) Coverage: Coverage measures the scope and breadth of knowledge contained in the knowledge graph. Coverage evaluation can be performed through the following methods: Number of entities and relationships: Count the number of entities and relationships contained in the knowledge graph and compare them with the expected number of the target domain. Domain coverage: Check whether the knowledge graph covers all important entities and relationships in the target domain. New knowledge discovery: Evaluate whether the knowledge graph can effectively discover and integrate new knowledge.

[0147] (3) Completeness: Completeness measures whether important information is missing in the knowledge graph. Evaluation methods include: Missing value analysis: Detecting whether there are a large number of missing attributes or relationships in the knowledge graph. Redundancy check: Identifying and removing duplicate entities and relationships to ensure that each knowledge point is accurately recorded only once. Connectivity: Evaluating the degree of connectivity between entities in the knowledge graph and checking whether there are isolated entities or subgraphs.

[0148] See also Figure 2 , Figure 2 A schematic diagram of a process for constructing a knowledge graph in the gold mining field provided in an embodiment of the present application. Figure 2 As shown in the figure, firstly, data collection and preparation are carried out to obtain text data in the field of gold mining, and then the data is cleaned. The cleaned data is used to train the target model, and a systematic knowledge semantic expression model covering the entity categories of "people-things-objects-time-space-law-place" is proposed. Then, the target model is used to jointly extract entities and relationships, and the extracted entities are ablated to obtain the target triples. The extracted entities and relationships are organized into a knowledge graph, and this information is structured and stored in the graph database, and presented through a graph visualization web page, providing a clear and comprehensive gold mining knowledge framework. At the same time, after the knowledge graph is constructed, it is evaluated and optimized through practical applications and user feedback.

[0149] The technical method for automatically constructing a gold mine macro knowledge system provided in an embodiment of the present application comprises the following steps: first, obtaining a literature data set in the gold mine field, and extracting a target corpus from the literature data set; then, inputting the target corpus into a target model, performing triple extraction on the target corpus, and obtaining an initial triple corresponding to the target corpus; wherein the initial triple includes entities, entity types, and relationships in the gold mine field, the pre-trained model in the target model is fine-tuned based on the gold mine field text data, and the joint extraction model in the target model includes a domain attention layer and an attention weight layer; finally, the entities in the initial triple are ablated to obtain a target triple, and the target triple is published and transferred to a graph database to form a knowledge graph in the gold mine field.

[0150] The method provided in the embodiment of the present application first obtains a gold mine literature dataset for constructing a knowledge graph, extracts the corresponding target corpus, then uses the target model to extract triples from the target corpus, and then ablates the extracted entities, and finally constructs a gold mine knowledge graph. The target model used in this application is fine-tuned based on the gold mine field text data to enhance the adaptability of the target model to field-specific tasks. In addition, a domain attention layer and an attention weight layer are introduced into the joint extraction model of entities and relationships. For texts in the gold mine field, the target model can better identify key entities and relationships, thereby improving the accuracy of entity and relationship extraction and improving the accuracy of the constructed gold mine field knowledge graph.

[0151] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a device for automatically constructing a gold mine macro knowledge system provided in an embodiment of the present application. Figure 3 As shown in , the construction device 300 includes:

[0152] Corpus extraction module 301, used to obtain a literature data set in the field of gold mining, and extract target corpus from the literature data set;

[0153] A triple extraction module 303 is used to input the target corpus into the target model, perform triple extraction on the target corpus, and obtain initial triples corresponding to the target corpus; wherein the initial triples include entities, entity types and relationships in the gold mining field, the pre-trained model in the target model is fine-tuned based on the gold mining field text data, and the joint extraction model in the target model also includes a field attention layer and an attention weight layer;

[0154] The knowledge graph generation module 303 is used to eliminate the entities in the initial triples to obtain target triples, and publish the target triples and transfer them to the graph database to form a knowledge graph in the gold mining field.

[0155] Furthermore, when the corpus extraction module 301 is used to extract the target corpus from the document data set, the corpus extraction module 301 is also used to:

[0156] Using preset screening conditions to screen the document data set to determine multiple candidate documents;

[0157] For each candidate document, content extraction is performed on the candidate document to obtain text content corresponding to the candidate document, and text processing is performed on the text content to obtain the target corpus corresponding to the candidate document.

[0158] Furthermore, the construction device 300 also includes a model fine-tuning module, which is used to perform domain fine-tuning on the pre-trained model in the target model through the following steps:

[0159] Acquire the gold mine field text data, define a fine-tuning task for the original pre-trained model, and fine-tune the original pre-trained model based on the text data and the fine-tuning task to obtain the pre-trained model;

[0160] or,

[0161] Using the gold mining field text data to train a word embedding model in the gold mining field, and concatenating or weighted averaging the word embedding model with the original pre-training model to obtain the pre-training model;

[0162] or,

[0163] Using the gold mining field text data to build a custom vocabulary, and adding the custom vocabulary to the word segmenter of the original pre-trained model to obtain the pre-trained model;

[0164] or,

[0165] The original pre-trained model is further pre-trained using the gold mining field text data to obtain the pre-trained model.

[0166] Furthermore, when the triple extraction module 302 is used to input the target corpus into the target model, extract triples from the target corpus, and obtain initial triples corresponding to the target corpus, the triple extraction module 302 is also used to:

[0167] Inputting the target corpus into the pre-trained model of the target model, encoding multiple target corpora to obtain text features;

[0168] Inputting the text features into the domain attention layer and the attention weight layer of the joint extraction model respectively to adjust the weight of each text feature to obtain weighted text features;

[0169] Inputting the weighted text features into the partition layer of the target model to generate a first feature of an entity partition, a second feature of a relationship partition, and a third feature of a shared partition;

[0170] Inputting the first feature, the second feature and the third feature into the entity memory, the relationship memory and the shared memory of the target model respectively to obtain the entity feature, the relationship feature and the shared feature, and jointly encoding the entity feature, the relationship feature and the shared feature to obtain the target feature;

[0171] The target features are respectively input into the named entity recognition processing layer and the relationship extraction processing layer of the target model to perform initial triples corresponding to the target corpus.

[0172] Furthermore, the knowledge graph generation module 303 is used to ablate the entities in the initial triples through the following steps:

[0173] For each entity in the initial triple, extract a candidate entity matching the entity from the knowledge base, and extract corresponding entity features for each candidate entity;

[0174] Each candidate entity and the entity features corresponding to each candidate entity are input into the score prediction model to obtain the entity score corresponding to each entity feature, and the candidate entity with the highest entity score among multiple candidate entities is used as the ablation result of the entity to obtain the target triplet.

[0175] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in , the electronic device 400 includes a processor 410 , a memory 420 and a bus 440 .

[0176] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 440. When the machine-readable instructions are executed by the processor 410, the above-mentioned Figure 1 The steps of the technical method for automatically constructing the gold mine macro knowledge system in the method embodiment shown, and the specific implementation method can be found in the method embodiment, which will not be repeated here.

[0177] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The steps of the technical method for automatically constructing the gold mine macro knowledge system in the method embodiment shown, and the specific implementation method can be found in the method embodiment, which will not be repeated here.

[0178] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0179] In the several embodiments provided in the present 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 schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0180] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0181] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0182] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0183] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0184] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A technical method for automatically constructing a gold mine macro knowledge system, characterized in that: The method comprises: Obtaining a literature data set in the field of gold mining, and extracting a target corpus from the literature data set; The target corpus is input into the target model, and triples are extracted from the target corpus to obtain initial triples corresponding to the target corpus; wherein the initial triples include entities, entity types and relationships in the gold mining field, the pre-trained model in the target model is fine-tuned based on the gold mining field text data, and the joint extraction model in the target model includes a domain attention layer and an attention weight layer; The entities in the initial triples are dissolved to obtain target triples, and the target triples are published and transferred to a graph database to form a knowledge graph in the gold mining field.

2. The method according to claim 1, characterized in that: The step of extracting the target corpus from the document data set includes: Using preset screening conditions to screen the document data set to determine multiple candidate documents; For each candidate document, content extraction is performed on the candidate document to obtain text content corresponding to the candidate document, and text processing is performed on the text content to obtain the target corpus corresponding to the candidate document.

3. The method according to claim 1, characterized in that The pre-trained model in the target model is fine-tuned in the domain by the following steps: Acquire the gold mine field text data, define a fine-tuning task for the original pre-trained model, and fine-tune the original pre-trained model based on the text data and the fine-tuning task to obtain the pre-trained model; or, Using the gold mining field text data to train a word embedding model in the gold mining field, and concatenating or weighted averaging the word embedding model with the original pre-training model to obtain the pre-training model; or, Using the gold mining field text data to build a custom vocabulary, and adding the custom vocabulary to the word segmenter of the original pre-trained model to obtain the pre-trained model; or, The original pre-trained model is further pre-trained using the gold mining field text data to obtain the pre-trained model.

4. The method according to claim 1, characterized in that: The step of inputting the target corpus into the target model, extracting triples from the target corpus, and obtaining initial triples corresponding to the target corpus includes: Inputting the target corpus into the pre-trained model of the target model, encoding multiple target corpora to obtain text features; Inputting the text features into the domain attention layer and the attention weight layer of the joint extraction model respectively to adjust the weight of each text feature to obtain weighted text features; Inputting the weighted text features into the partition layer of the target model to generate a first feature of an entity partition, a second feature of a relationship partition, and a third feature of a shared partition; Inputting the first feature, the second feature and the third feature into the entity memory, the relationship memory and the shared memory of the target model respectively to obtain the entity feature, the relationship feature and the shared feature, and jointly encoding the entity feature, the relationship feature and the shared feature to obtain the target feature; The target features are respectively input into the named entity recognition processing layer and the relationship extraction processing layer of the target model to perform initial triples corresponding to the target corpus.

5. The method according to claim 1, characterized in that The entities in the initial triples are ablated by the following steps: For each entity in the initial triple, extract a candidate entity matching the entity from the knowledge base, and extract corresponding entity features for each candidate entity; Each candidate entity and the entity features corresponding to each candidate entity are input into the score prediction model to obtain the entity score corresponding to each entity feature, and the candidate entity with the highest entity score among multiple candidate entities is used as the ablation result of the entity to obtain the target triplet.

6. An automatic construction device for a gold mine macro knowledge system, characterized in that: The construction device comprises: A corpus extraction module is used to obtain a literature data set in the field of gold mining and extract target corpus from the literature data set; A triple extraction module is used to input the target corpus into the target model, perform triple extraction on the target corpus, and obtain initial triples corresponding to the target corpus; wherein the initial triples include entities, entity types and relationships in the gold mining field, the pre-trained model in the target model is fine-tuned based on the gold mining field text data, and the joint extraction model in the target model also includes a field attention layer and an attention weight layer; The knowledge graph generation module is used to eliminate the entities in the initial triples to obtain target triples, and publish the target triples and transfer them to the graph database to form a knowledge graph in the gold mining field.

7. The construction device according to claim 6, characterized in that When the corpus extraction module is used to extract the target corpus from the document data set, the corpus extraction module is also used to: Using preset screening conditions to screen the document data set to determine multiple candidate documents; For each candidate document, content extraction is performed on the candidate document to obtain text content corresponding to the candidate document, and text processing is performed on the text content to obtain the target corpus corresponding to the candidate document.

8. The construction device according to claim 6, characterized in that The construction device further includes a model fine-tuning module, which is used to perform domain fine-tuning on the pre-trained model in the target model through the following steps: Acquire the gold mine field text data, define a fine-tuning task for the original pre-trained model, and fine-tune the original pre-trained model based on the text data and the fine-tuning task to obtain the pre-trained model; or, Using the gold mining field text data to train a word embedding model in the gold mining field, and concatenating or weighted averaging the word embedding model with the original pre-training model to obtain the pre-training model; or, Using the gold mining field text data to build a custom vocabulary, and adding the custom vocabulary to the word segmenter of the original pre-trained model to obtain the pre-trained model; or, The original pre-trained model is further pre-trained using the gold mining field text data to obtain the pre-trained model.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate via the bus. When the processor is running, the machine-readable instructions execute the steps of the technical method for automatically constructing the gold mine macro knowledge system as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the technical method for automatically constructing a gold mine macro knowledge system as described in any one of claims 1 to 5 are executed.

Citation Information

Cited By

  • Project knowledge base construction method and system based on knowledge graph

    CN121072700A