Natural resource map completion method based on large model

By combining the structured information of the large language model and the natural resource knowledge graph, knowledge prompts and structured embedding are used to solve the problem of insufficient long-tail entity completion ability in the natural resource knowledge graph, and more efficient knowledge graph completion effect and stronger adaptability are achieved.

CN119647571AActive Publication Date: 2025-03-18SUN YAT SEN UNIV +1

Patent Information

Application Number
CN202411646856.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-18
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The prior art lacks the ability to complete long-tail entities in the natural resource knowledge graph, and text-based methods are time-consuming and complex in the fine-tuning process, limiting their promotion and application.

Method used

The natural resource map completion method based on large models is adopted, and the ability to complete long-tail entities and complex relationships is improved by combining the reasoning ability of large language models and structured information of natural resource knowledge graphs, and using knowledge hints and structured embeddings.

Benefits of technology

It significantly improves the completion effect of the natural resource knowledge graph, especially in resource scenarios with sparse data, enhances the ability to adapt to diversified natural resource scenarios and reduces the resource consumption of fine-tuning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647571A_ABST
    Figure CN119647571A_ABST
Patent Text Reader

Abstract

The invention provides a natural resource map completion method based on a large model, which relates to the technical field of natural resources, and comprises the following steps: firstly, inputting a query triple, and carrying out retrieval in a natural resource knowledge map according to the query triple to obtain ordered candidate entities; secondly, performing knowledge prompt processing on the query triad to obtain a prompt text; extracting structure information of the natural resource knowledge graph, and performing knowledge prefix adapter processing on the structure information to obtain a virtual knowledge mark; and finally, taking the virtual knowledge mark and the prompt text as an input prompt, reordering the candidate entities by utilizing a preset large language model, and generating reply content for complementing the natural resource knowledge graph. According to the method, the capability of complementing the long-tail entity is effectively enhanced, the resource consumption of fine adjustment is reduced, and the knowledge graph complementing effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural resources, and in particular to a natural resource map completion method based on a large model. Background Art

[0002] As the digitalization of global natural resource management accelerates, natural resource management faces increasingly complex challenges. Knowledge graph technology, as an emerging intelligent information management tool, realizes the semantic connection of natural resource entities, attributes and their relationships through structured modeling, which helps to improve the systematization, intelligence and efficiency of natural resource management.

[0003] Natural resource information can be extracted from structured, semi-structured and unstructured data to form triplets, namely head entity-relationship-tail entity, thereby constructing a natural resource knowledge graph. Traditional knowledge graph completion methods are mainly divided into two categories: triple-based methods and text-based methods. Triple-based methods directly use entity and relationship triplets in knowledge graphs for reasoning and completion. However, due to the uneven distribution of entities in knowledge graphs and very limited structural information of long-tail entities, this method is difficult to perform effective reasoning in the absence of sufficient feature information, and the completion performance is significantly reduced. Even by introducing mechanisms such as relational attribute perception or temporal graph convolutional networks, the reasoning effect is still poor when facing long-tail entities due to data scarcity. To solve the above problems, text-based methods propose to enhance the model's ability to understand entities by introducing text descriptions of entities as an additional source of information. However, this method has two limitations. On the one hand, the fine-tuning process consumes a lot of computing resources. The specific adjustment for each task, especially in diverse knowledge graph scenarios, is time-consuming and complicated. On the other hand, the specificity of the task requires re-fine-tuning every time a new task is applied, which not only increases the complexity of the application, but also limits the promotion and large-scale application of this type of method. In addition, the prior art also discloses a method for completing the natural resource knowledge graph, which mainly focuses on the completion of high-frequency entities, such as common mining areas, lakes and forest resources. However, due to the scarcity of long-tail entity data and low frequency of occurrence, the method has poor reasoning effect and difficulty in completion when dealing with long-tail entities, which affects the overall natural resource management. Summary of the invention

[0004] In order to solve the problems in the above-mentioned prior art that it is difficult to complete long-tail entities, the fine-tuning process is time-consuming and complicated, resulting in poor knowledge graph completion effect, the present invention proposes a natural resource graph completion method based on a large model, which effectively enhances the long-tail entity completion ability, reduces the resource consumption of fine-tuning, and improves the knowledge graph completion effect.

[0005] In order to achieve the above technical effects, the technical solution of the present invention is as follows:

[0006] A natural resource map completion method based on a large model includes the following steps:

[0007] S1. Input a query triple, search the natural resource knowledge graph according to the query triple, and obtain ordered candidate entities;

[0008] S2. Perform knowledge prompt processing on the query triple to obtain prompt text; extract structural information of the natural resource knowledge graph, perform knowledge prefix adapter processing on the structural information to obtain virtual knowledge tags;

[0009] S3. Use the virtual knowledge tag and the prompt text as input prompts, use a preset large language model to reorder the candidate entities, and generate reply content for completing the natural resource knowledge graph.

[0010] Preferably, the natural resource knowledge graph is defined as G = {(e1, r, e2)}, and the query triple is (e1, r, A) or (A, r, e2), wherein e1∈E represents a head entity, e2∈E represents a tail entity, E represents a set of natural resource entities, r∈R represents the relationship between the head entity and the tail entity, R represents the set of relationships between the entities of natural resources, and A represents a missing entity; the retrieval in the natural resource knowledge graph according to the query triple includes: obtaining a knowledge graph retriever, the knowledge graph retriever searches for entities related to the head entity e1 or the tail entity e2 in the query triple in the natural resource knowledge graph G = {(e1, r, e2)} according to the query triple (e1, r, A) or (A, r, e2), scoring each entity e∈E according to the relationship between the found entities, and sorting the entities e∈E according to the scores to obtain ordered candidate entities R 检索器 =[e1,e2,e3,...,e E ].

[0011] Preferably, the performing knowledge prompt processing on the query triple to obtain a prompt text includes:

[0012] S211. Constructing an example pool associated with the query triplet;

[0013] S212. Sort the triples in the example pool to obtain a sorting result;

[0014] S213. Use a unified prompt template to convert the sorting results into prompt texts.

[0015] Preferably, the example pool includes an analogy pool and a supplementary pool, the analogy pool includes examples similar to the current query triple, and the supplementary pool includes triple information related to a known head entity or a known tail entity in the query triple.

[0016] Preferably, the sorting of the triples in the example pool includes: performing similarity sorting on the triples in the analogy pool that share the same relationship to obtain a sorting result for the triples in the analogy pool; and performing text relevance scoring on the triples in the supplementary pool, sorting the supplementary pool according to the text relevance scoring result to obtain a sorting result for the triples in the supplementary pool.

[0017] Preferably, extracting the structural information of the natural resource knowledge graph, performing knowledge prefix adapter processing on the structural information, and obtaining virtual knowledge tags include:

[0018] S221. Extracting structural information of entities and relations in natural resource knowledge graphs through self-supervised structured embedding pre-training;

[0019] S222. Encode the structural information into the embedding layer to obtain a structured embedding of the triple (e1, r, e2);

[0020] S223. Use the knowledge prefix adapter to convert the structured embedding into a virtual knowledge tag.

[0021] Preferably, during the self-supervised structured embedding pre-training process, the loss function L is used. pre The calculation expression is as follows:

[0022]

[0023] Among them, T represents all the extracted triple information, δ represents the sigmoid activation function, F(e1,r,e2) represents the scoring function, (e' 1i ,r' i ,e' 2i ) represents the i-th negative sampling of (e1,r,e2), p i represents the self-adversarial weight, and k represents the number of negative samples.

[0024] Preferably, the computational expression for converting the structured embedding into a virtual knowledge tag is as follows:

[0025] K=Ρ(e1)⊕Ρ(r)⊕Ρ(e2)

[0026] Among them, K represents the virtual knowledge tag and P represents the knowledge prefix adapter.

[0027] Preferably, the reordering of the candidate entities by using a preset large language model includes:

[0028] S311. Let the large language model output the first m entities as an ordered list R 大模型 , the ordered list R 大模型 The specific expression is as follows:

[0029] R 大模型 =[e'1,e'2,e'3,...,e' m ]

[0030] Among them, e′ m Represents the first m entities output by the large language model;

[0031] S312. The candidate entity R output by the knowledge graph searcher 检索器 =[e1,e2,e3,...,e E ], using the ordered list R 大模型 Replace, and the calculation expression of the final sorted list R is as follows:

[0032] R=[e'1,e'2,e'3,...,e' m ,e m+1 ,...,e E ]

[0033] S313. Use the final sorted list R as the reply content.

[0034] The present invention also proposes a natural resource atlas completion system based on a large model, comprising:

[0035] A retrieval module, used to input a query triple, search the natural resource knowledge graph according to the query triple, and obtain ordered candidate entities;

[0036] A processing module is used to perform knowledge prompt processing on the query triple to obtain a prompt text; and extract the structural information of the natural resource knowledge graph, perform knowledge prefix adapter processing on the structural information, and obtain a virtual knowledge tag;

[0037] A generation module is used to use the virtual knowledge mark and the prompt text as input prompts, use a preset large language model to reorder the candidate entities, and generate reply content for completing the natural resource knowledge graph.

[0038] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0039] The present invention proposes a natural resource graph completion method based on a large model. Firstly, by combining the reasoning ability of a large language model and the structured information of a natural resource knowledge graph, the completion ability of long-tail entities is effectively improved, and the performance is superior in resource scenarios with sparse data; secondly, by performing knowledge prompt processing on query triples and extracting structural information of the natural resource knowledge graph, the completion ability of complex natural resource relationships is greatly enhanced; then, the rich semantic understanding and reasoning ability of the large language model is fully utilized, and the structural information in the knowledge graph is integrated into the large language model in combination with a knowledge prefix adapter, which can not only process complex text information, but also efficiently process the structural information in the natural resource knowledge graph, significantly improving the accuracy and efficiency of reasoning, thereby improving the knowledge graph completion effect; further, by combining the structural information embedding of the natural resource knowledge graph with the large language model, the resource consumption of fine-tuning is effectively reduced, the adaptability to diversified natural resource scenarios is enhanced, and the prospect of practical application is expanded. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A flowchart of a natural resource atlas completion method based on a large model proposed in an embodiment of the present invention is shown;

[0041] Figure 2 A logical principle diagram showing a natural resource map completion method based on a large model proposed in an embodiment of the present invention;

[0042] Figure 3 A block diagram of a natural resource map completion system based on a large model proposed in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0043] The accompanying drawings are only used for illustrative purposes and are not to be construed as limiting the present invention;

[0044] It is understandable to those skilled in the art that some well-known contents may be omitted in the drawings;

[0045] In order to facilitate understanding of this embodiment, first, the prior art information of this embodiment is introduced as follows:

[0046] As the digitalization of global natural resource management accelerates, land and resource management faces increasingly complex challenges. Natural resources such as minerals, lakes, and forests play an important role in national development and ecological balance, and accurate identification and efficient management of these resources have become one of the core issues of modern land management. However, traditional resource data management methods often have problems with information fragmentation and delayed updates, making it difficult to cope with the rapidly changing management needs of the moment, especially in the face of complex resource dynamics, spatial distribution, and environmental changes. Its limitations are even more obvious. As an emerging intelligent information management tool, knowledge graph technology realizes the semantic connection of natural resource entities, attributes, and their relationships through structured modeling, which helps to improve the systematization, intelligence, and efficiency of natural resource management. Information can be extracted from structured, semi-structured, and unstructured data to form triples (such as "head entity-relationship-tail entity"), thereby constructing a natural resource knowledge graph. For example, the triple (Taklimakan Desert, located in, Xinjiang) describes the fact that the Taklimakan Desert is located in Xinjiang, represents natural resource entities as nodes, and represents relationships as edges between two nodes, thereby constructing a graph describing the semantic relationship of natural resources. Since natural resources are subject to change, such as being added or renamed, the graph needs to be updated. This type of maintenance generally encounters several challenges that need to be addressed, including automatic identification of new concepts, attributes, and relationships, precise alignment of related entities, and optimization of graph expression and storage structure. In addition, we also have to deal with the problem of long-tail entities, that is, some natural resource entities (such as small mining areas, remote lakes, etc.) have a low frequency of occurrence, resulting in data scarcity, making it difficult for the model to obtain significant statistical features from limited samples and making accurate decisions. This "long-tail distribution" phenomenon is common in natural resource data sets, usually manifested as a few important resource entities (such as large mining areas, forests, etc.) appearing frequently, while most uncommon resource entities have insignificant statistical features, making completion and prediction difficult.

[0047] One feasible solution is to use large language models (such as GPT-4, ALBERT, etc.), which contain a lot of knowledge, have strong generalization ability, are good at small sample learning, and can alleviate the problem of scarcity of long-tail entity data in natural resource management. However, large language models still have limitations in capturing and processing refined factual knowledge, and are prone to "hallucination" phenomena, such as generating wrong entities and noisy relationships; and due to the length limit of the input text, the complex multidimensional attributes of natural resources (such as spatial distribution and environmental dynamics) are difficult to fully express. In addition, due to the lack of domain-related contextual cue learning, the completion potential of large models is limited.

[0048] In order to solve the above problems, the present invention proposes a natural resource graph completion method based on a large model, which combines a large language model with structure-aware natural resource knowledge graph retrieval to improve the efficiency of knowledge graph completion in land and natural resource management; by combining the large language model with the traditional structure-aware knowledge graph retrieval, and designing knowledge prompts to optimize the reasoning ability of the large language model; in addition, the present invention proposes a knowledge prefix adapter, which captures the structural information of complex entities and relationships in the knowledge graph through pre-training of structured embeddings, and converts these structured embeddings into prefixes of the input sequence through the knowledge prefix adapter, thereby effectively guiding the model to perform more accurate reasoning and completion, thereby improving the completion efficiency of the natural resource knowledge graph.

[0049] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0050] Example 1

[0051] like Figure 1 and Figure 2 As shown, the present invention proposes a natural resource map completion method based on a large model, comprising the following steps:

[0052] S1. Input a query triple, search the natural resource knowledge graph according to the query triple, and obtain ordered candidate entities;

[0053] In S1, the natural resource knowledge graph is defined as G = {(e1, r, e2)}, and the query triple is (e1, r, A) or (A, r, e2), where e1∈E represents a head entity, including a mining area, lake or forest, etc., e2∈E represents a tail entity, including the attributes, location or type of the natural resource, etc., E represents a set of natural resource entities, r∈R represents the relationship between the head entity and the tail entity, such as "located in", "contains" or "associated", R represents the relationship set between the entities of natural resources, and A represents a missing entity; the goal of this embodiment is to complete the missing resource information in the natural resource knowledge graph through the known partial information, given the query triple is (e1, r, A) or (A, r, e2), aiming to predict the missing entity A. For example, if the relationship r between a mining area e1 and the region to which it belongs is known, but the specific name of the region e2 is missing, the model needs to automatically predict the missing region name. This usually requires scoring all possible entities (such as different mining areas or lakes) as missing entities, and arranging the possible entities in descending order according to these scores to determine the most appropriate missing entity. In order to simplify the expression, this embodiment mainly focuses on queries with missing tail entities, i.e. (e1, r, A). For example, queries such as "a mining area is located in A" require prediction of the missing geographical location or area. Similarly, for queries with missing head entities, i.e. (A, r, e2), such as "Which mining area is located in Xinjiang?", the natural resource knowledge graph completion method proposed in this embodiment can be used to process and predict the head entity that best matches the relationship. This capability has important practical application value in resource exploration, resource management and optimization.

[0054] The method of searching in the natural resource knowledge graph according to the query triple comprises: obtaining a knowledge graph retriever, wherein the knowledge graph retriever searches for entities related to the head entity e1 or the tail entity e2 in the query triple in the natural resource knowledge graph G={(e1,r,e2)} according to the query triple (e1,r,A) or (A,r,e2), scores each entity e∈E according to the relationship between the found entities, and sorts the entities e∈E in descending order according to the scores to obtain ordered candidate entities R 检索器 =[e1,e2,e3,...,e E ], these candidate entities are obtained through the existing entities and relationships between entities in the natural resource knowledge graph.

[0055] S2. Perform knowledge prompt processing on the query triple to obtain prompt text; extract structural information of the natural resource knowledge graph, perform knowledge prefix adapter processing on the structural information to obtain virtual knowledge tags;

[0056] In S2, the query triple is processed with knowledge prompts to obtain prompt texts, including:

[0057] S211. Constructing an example pool associated with the query triplet;

[0058] In S211, a specially designed contextual learning strategy is proposed for the task of completing complex knowledge graphs related to natural resources. The core idea of ​​this strategy is to provide the large language model with structural information and examples of relevant natural resource knowledge graphs to help the large language model better understand the semantic connotation of the query, thereby achieving more accurate entity completion and link prediction. The knowledge hint constructs an example pool related to the query triples, which includes an analogy pool and a supplement pool, and encodes these as contextual hints for the large language model to help it reorder in the task.

[0059] The analogy pool includes examples similar to the current query triples. Specifically, for a given query, the triples in the analogy pool are those triples that have the same relationship as the current query. For example, assuming the query is (Beijing, located in, A), the analogy pool may contain (Shanghai, located in, China) (Paris, located in, France). The structures of the head entity, relationship, and tail entity in these examples are similar to the current query, which can help the large language model understand the semantics in the query.

[0060] The supplementary pool includes triple information related to the known head entity or known tail entity in the query triple. For example, for the query (Beijing, located in, A), the supplementary pool may contain (Beijing, has, the Forbidden City) (Beijing, is, the capital of China) These supplementary examples can provide more background information about the head entity to the large language model, helping it to better reason during the link prediction process. Knowledge hints are not simply providing triplets from the analogy pool and the supplementary pool, but also need to sort the triplets from the analogy pool and the supplementary pool according to the importance of the query.

[0061] Because the triplets in the analogy pool share the same relationship, they are sorted according to entity diversity so that the large language model can better understand the semantics of the query; the triplets in the supplementary pool are sorted using the BM25 score, which is a metric for evaluating text relevance, so that the large language model can prioritize examples that are most relevant to the current query entity.

[0062] S212. Sort the triples in the example pool to obtain a sorting result;

[0063] In S212, the triplets in the example pool are sorted, including: similarity sorting of the triplets in the analogy pool that share the same relationship, so that the large language model can better understand the semantics of the query therefrom, and obtaining the sorting result of the triplets in the analogy pool; and BM25 text relevance scoring of the triplets in the supplementary pool, sorting the supplementary pool according to the text relevance scoring result, and obtaining the sorting result of the triplets in the supplementary pool, wherein BM25 is a metric for evaluating text relevance, so that the large language model can prioritize the examples that are most relevant to the current query entity.

[0064] S213. Use a unified prompt template to convert the sorting results into prompt texts.

[0065] S3. Use the virtual knowledge tag and the prompt text as input prompts, use a preset large language model to reorder the candidate entities, and generate reply content for completing the natural resource knowledge graph.

[0066] In this embodiment, firstly, by combining the reasoning ability of the large language model and the structural information of the natural resource knowledge graph, the completion ability of long-tail entities is effectively improved, and it performs superiorly in resource scenarios with sparse data; secondly, by performing knowledge prompt processing on query triples and extracting structural information of the natural resource knowledge graph, the completion ability of complex natural resource relationships is greatly enhanced; then, the rich semantic understanding and reasoning ability of the large language model is fully utilized, and the structural information in the knowledge graph is integrated into the large language model in combination with the knowledge prefix adapter, which can not only process complex text information, but also efficiently process the structural information in the natural resource knowledge graph, significantly improving the accuracy and efficiency of reasoning, thereby improving the knowledge graph completion effect; further, by combining the structural information embedding of the natural resource knowledge graph with the large language model, the resource consumption of fine-tuning is effectively reduced, the adaptability to diversified natural resource scenarios is enhanced, and the prospects for practical application are expanded.

[0067] In order to reasonably incorporate non-textual structured information and improve the understanding and representation capabilities of the large language model on the knowledge graph, this embodiment introduces a knowledge prefix adapter in step S2, which captures the structural information in the natural resource knowledge graph by pre-training the structured embedding, and converts the structured embedding into virtual knowledge tags through the knowledge prefix adapter. These tags serve as prefixes in the input prompt sequence to guide the large language model to process triple reasoning. Specifically, see Figure 2 , S2 extracts the structural information of the natural resource knowledge graph, performs knowledge prefix adapter processing on the structural information, and obtains virtual knowledge tags, including:

[0068] S221. Extracting structural information of entities and relations in natural resource knowledge graphs through self-supervised structured embedding pre-training;

[0069] In S221, instead of directly adding neighborhood information text to the input sequence, the structural information of entities and relations in the natural resource knowledge graph is extracted through self-supervised structured embedding pre-training; for each entity e∈E and each relation r∈R, a structural embedding is learned where d e and d r is the embedding dimension. Later, the structural information is encoded into the embedding layer to further adapt it to the text representation space of the large language model. Here, a scoring function F(e1,r,e2) is defined to measure the rationality of the triple (e1,r,e2). In the process of self-supervised structured embedding pre-training, negative sampling is used to minimize L pre , the loss function L used pre The calculation expression is as follows:

[0070]

[0071] Among them, T represents all the extracted triple information, δ represents the sigmoid activation function, F(e1,r,e2) represents the scoring function, (e' 1i ,r' i ,e' 2i ) represents the i-th negative sampling of (e1,r,e2), p i represents the self-adversarial weight, and k represents the number of negative samples. By minimizing the loss function, the structured embeddings of entities and relations are optimized to fit all relevant triples, thereby capturing the structural information (such as subgraph structure and relation pattern) in the natural resource knowledge graph.

[0072] S222. Encode the structural information into the embedding layer to obtain a structured embedding of the triple (e1, r, e2);

[0073] After pre-training the structured embedding, the structured embedding of the triple (e1, r, e2) is obtained, which encodes the structural information of the natural resource knowledge graph. These structured embeddings are then learned in different representation spaces of the large language model text unit space, so the subsequent step applies the knowledge prefix adapter to project these structured embeddings into the text unit representation space of the large language model.

[0074] S223. Use the knowledge prefix adapter to convert the structured embedding into a virtual knowledge tag.

[0075] The computational expression for converting the structured embedding into virtual knowledge tags is as follows:

[0076] K=Ρ(e1)⊕Ρ(r)⊕Ρ(e2)

[0077] Among them, K represents the virtual knowledge token and P represents the knowledge prefix adapter, which is a simple projection layer. K is then placed in front of the original input sequence as an instruction and triplet hint. In this way, during fine-tuning and inference, the use of structured-aware hints will further improve the generalization ability of structured embeddings for triples, thereby making more accurate predictions.

[0078] See also Figure 2 , this embodiment further explains step S3. S3 uses the preset large language model to reorder the candidate entities, which is guided by multiple rounds of interaction with the large language model to reorder. The prompt text and some instructions are organized as prompt input, and the virtual knowledge tag K obtained in the above embodiment is placed in front of the original input sequence. For each query (e1, r, ?), an independent conversation prompt is created for interaction. The whole interaction process includes four stages: responsibility description, problem and example description, example provision, and final query.

[0079] The job description tells the big language model that its job is to rank candidate answers based on plausibility and then check its feedback to make sure the big language model understands the task correctly.

[0080] Question and Example Description Input a query to the large language model and inform it that two types of examples will be provided next: examples from the analogy pool and examples from the supplementary pool;

[0081] Provide examples to the large language model step by step, by providing examples selected from the analogy pool and the supplementary pool until the limit length of the input text unit is reached;

[0082] The final query uses a preset large language model to re-rank the candidate entities, including:

[0083] S311. Let the large language model output the first m entities as an ordered list R 大模型 , the ordered list R 大模型 The specific expression is as follows:

[0084] R 大模型 =[e'1,e'2,e'3,...,e' m ]

[0085] Among them, e′ m Represents the first m entities output by the large language model;

[0086] S312. The candidate entity R output by the knowledge graph searcher 检索器 =[e1,e2,e3,...,eE ], using the ordered list R 大模型 Replace, and the calculation expression of the final sorted list R is as follows:

[0087] R=[e'1,e'2,e'3,...,e' m ,e m+1 ,...,e E ]

[0088] S313. Use the final sorted list R as the reply content.

[0089] In this embodiment, we use the knowledge graph retrieval tool RotatE. For each query triple (e1, r, ?), the knowledge graph retrieval tool searches for entities related to e1 in the natural resource knowledge graph based on the query triple, and generates a score for each entity e∈E based on the structural relationship between the entities. The scores of all entities are sorted in descending order, and finally an ordered candidate entity R is generated. 检索器 =[e1,e2,e3,…,e |E| ], these candidate entities are obtained through the existing associated entities and relations in the natural resource knowledge graph; then a large language model (such as GPT) is used to further re-rank the first m candidate entities through the knowledge prompt module, and the large language model is used to perform semantic analysis on the text description of the target entity. The re-ranked result is represented as R 大模型 =[e′1,e′2,e′3,…,e′ m ], by replacing the re-ranked result with the first m candidates output by the retriever, we get the final sorted list R = [e′1, e′2, e′3, …, e′ m ,e m+1 ,…,e |E| ].

[0090] Example 2

[0091] This embodiment further experimentally evaluates a large-model-based natural resource graph completion method proposed in the above embodiment on two benchmark datasets in the field of natural resources. The first dataset P is a subset of the knowledge graph containing natural resource information, covering common sense knowledge in the fields of mineral resources, forests, lakes and wetlands. The dataset includes multiple relationships between natural resource entities, such as "located in", "contains" and "belongs to", etc., containing 36,244 entities and 9 different relationships. The second dataset Q is a subset of the knowledge graph of global ecosystem and biodiversity information, involving the distribution of natural resources, environmental impacts and ecosystem dynamics, covering 13,374 entities and 218 different relationships. Both datasets remove redundant inverse relationships to avoid information leakage. Compared with dataset P, the data in dataset Q is sparser.

[0092] The method proposed in the above embodiment was compared with a variety of baseline methods, including triple-based, text-based and large language model-based models. Specifically, RotatE was used as the knowledge retriever and ChatGPT (gpt-4.0) was used as the large language model in the experiment. The link prediction task generates a ranked list for all entities in the natural resource knowledge graph. The model performance is evaluated by the scores of Hits@1, 3 and 10. The results show that the large model-based natural resource graph completion method proposed in the above embodiment performs significantly better than other baseline methods on both datasets P and Q.

[0093] In addition, the performance of traditional embedding models (such as embedding models, tensor decomposition models, and complex embedding models) on the two data sets is relatively backward, which shows the limitations of these traditional models in processing complex natural resource knowledge graphs. The natural resource graph completion method based on a large model proposed in the above embodiment combines the advantages of a large language model and a structure-aware knowledge graph, and enhances the ability to complete extremely complex relationships between natural resource entities by introducing structured information and knowledge prompts.

[0094] In general, the large-model-based natural resource graph completion method proposed in the above embodiment shows a strong completion capability for long-tail entities and complex relationships on two data sets, especially in terms of Hits@1 performance, which is better than all other methods, indicating that the large-model-based natural resource graph completion method proposed in the above embodiment is more reliable in accurate prediction and provides higher accuracy and reliability for land and natural resource management. This verifies the potential of the large-model-based natural resource graph completion method proposed in the above embodiment in handling the natural resource knowledge graph completion task.

[0095] It should be noted that the natural resource graph completion method based on a large model proposed in the above embodiment is an innovative method that combines a large language model with a structure-aware knowledge graph model, which is specifically aimed at the knowledge graph completion problem in the field of land and natural resources, especially in the task of processing long-tail entities and complex relationships. The effectiveness of this method is verified on two benchmark data sets in the field of natural resources. Compared with the prior art, the proposed natural resource graph completion method based on a large model shows obvious advantages in many aspects. First, the prior art often performs poorly when processing long-tail entities in natural resource management due to data scarcity; the method proposed in the present invention effectively improves the model's ability to complete long-tail entities by combining the reasoning ability of the large language model and structured knowledge graph information, especially in resource scenarios with sparse data. Secondly, the method proposed in the present invention makes full use of the rich semantic understanding and reasoning ability of the large language model, combines the knowledge prefix adapter, and integrates the structured information in the knowledge graph into the large language model. This method can not only process complex text information, but also efficiently process the structural relationships in the natural resource knowledge graph, significantly improving the accuracy and efficiency of reasoning. In addition, the method proposed in the present invention greatly enhances the ability to complete complex natural resource relationships through structure-aware embedding pre-training and knowledge prompts. Whether it is the completion of the spatial position relationship between entities or the dynamic information of the ecosystem, the present invention can provide more accurate and comprehensive results, making up for the shortcomings of existing technologies in processing complex natural resource knowledge graphs. At the same time, compared with traditional text-based methods, the method proposed in the present invention reduces the resource consumption of fine-tuning and improves the flexibility of application; traditional methods often require a lot of resources for fine-tuning, and the method proposed in the present invention reduces the cost of fine-tuning through the combination of structured embedding and large language models, enhances the adaptability to diversified natural resource scenarios, and expands the prospects for practical applications.

[0096] Example 3

[0097] See also Figure 3 This embodiment proposes a natural resource atlas completion system based on a large model, including:

[0098] A retrieval module, used to input a query triple, search the natural resource knowledge graph according to the query triple, and obtain ordered candidate entities;

[0099] A processing module is used to perform knowledge prompt processing on the query triple to obtain a prompt text; and extract the structural information of the natural resource knowledge graph, perform knowledge prefix adapter processing on the structural information, and obtain a virtual knowledge tag;

[0100] A generation module is used to use the virtual knowledge mark and the prompt text as input prompts, use a preset large language model to reorder the candidate entities, and generate reply content for completing the natural resource knowledge graph.

[0101] In this embodiment, firstly, by combining the reasoning ability of the large language model and the structural information of the natural resource knowledge graph, the completion ability of long-tail entities is effectively improved, and it performs superiorly in resource scenarios with sparse data; secondly, by performing knowledge prompt processing on query triples and extracting structural information of the natural resource knowledge graph, the completion ability of complex natural resource relationships is greatly enhanced; then, the rich semantic understanding and reasoning ability of the large language model is fully utilized, and the structural information in the knowledge graph is integrated into the large language model in combination with the knowledge prefix adapter, which can not only process complex text information, but also efficiently process the structural information in the natural resource knowledge graph, significantly improving the accuracy and efficiency of reasoning, thereby improving the knowledge graph completion effect; further, by combining the structural information embedding of the natural resource knowledge graph with the large language model, the resource consumption of fine-tuning is effectively reduced, the adaptability to diversified natural resource scenarios is enhanced, and the prospects for practical application are expanded.

[0102] Obviously, the above embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the implementation methods of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all implementation methods here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A natural resource map completion method based on a large model, characterized in that: The following steps are involved: S1. Input a query triple, search the natural resource knowledge graph according to the query triple, and obtain ordered candidate entities; S2. Perform knowledge prompt processing on the query triple to obtain a prompt text; and extracting structural information of the natural resource knowledge graph, performing knowledge prefix adapter processing on the structural information to obtain virtual knowledge tags; S3. Use the virtual knowledge tag and the prompt text as input prompts, use a preset large language model to reorder the candidate entities, and generate reply content for completing the natural resource knowledge graph.

2. The natural resource map completion method based on a large model according to claim 1 is characterized in that: The natural resource knowledge graph is defined as G = {(e1, r, e2)}, and the query triple is (e1, r, A) or (A, r, e2), wherein e1∈E represents a head entity, e2∈E represents a tail entity, E represents a set of natural resource entities, r∈R represents the relationship between the head entity and the tail entity, R represents the set of relationships between the entities of natural resources, and A represents a missing entity; the retrieval in the natural resource knowledge graph according to the query triple includes: obtaining a knowledge graph retriever, the knowledge graph retriever searches for entities related to the head entity e1 or the tail entity e2 in the query triple in the natural resource knowledge graph G = {(e1, r, e2)} according to the query triple (e1, r, A) or (A, r, e2), scoring each entity e∈E according to the relationship between the found entities, and sorting the entities e∈E according to the scores to obtain ordered candidate entities R 检索器 =[e1,e2,e3,...,e |E| ].

3. The natural resource map completion method based on a large model according to claim 2 is characterized in that: The performing knowledge prompt processing on the query triple to obtain a prompt text includes: S211. Constructing an example pool associated with the query triplet; S212. Sort the triples in the example pool to obtain a sorting result; S213. Use a unified prompt template to convert the sorting results into prompt texts.

4. The natural resource map completion method based on a large model according to claim 3 is characterized in that: The example pool includes an analogy pool and a supplementary pool, the analogy pool includes examples similar to the current query triple, and the supplementary pool includes triple information related to a known head entity or a known tail entity in the query triple.

5. The natural resource map completion method based on a large model according to claim 4 is characterized in that: The sorting of the triples in the example pool includes: performing similarity sorting on the triples in the analogy pool that share the same relationship to obtain a sorting result of the triples in the analogy pool; and performing text relevance scoring on the triples in the supplementary pool, sorting the supplementary pool according to the text relevance scoring result to obtain a sorting result of the triples in the supplementary pool.

6. The natural resource map completion method based on a large model according to claim 2 is characterized in that: The extracting the structural information of the natural resource knowledge graph and performing knowledge prefix adapter processing on the structural information to obtain a virtual knowledge tag includes: S221. Extracting structural information of entities and relations in natural resource knowledge graphs through self-supervised structured embedding pre-training; S222. Encode the structural information into the embedding layer to obtain a structured embedding of the triple (e1, r, e2); S223. Use the knowledge prefix adapter to convert the structured embedding into a virtual knowledge tag.

7. The natural resource map completion method based on a large model according to claim 6 is characterized in that: In the process of self-supervised structured embedding pre-training, the loss function L is used pre The calculation expression is as follows: Among them, T represents all the extracted triple information, δ represents the sigmoid activation function, F(e1,r,e2) represents the scoring function, (e' 1i ,r' i ,e' 2i ) represents the i-th negative sampling of (e1,r,e2), p i represents the self-adversarial weight, and k represents the number of negative samples.

8. The natural resource map completion method based on a large model according to claim 6 is characterized in that: The computational expression for converting the structured embedding into virtual knowledge tags is as follows: Among them, K represents the virtual knowledge tag and P represents the knowledge prefix adapter.

9. According to the large model-based natural resource map completion method of claim 2, the reordering of the candidate entities using a preset large language model comprises: S311. Let the large language model output the first m entities as an ordered list R 大模型 , the ordered list R 大模型 The specific expression is as follows: R 大模型 =[e'1,e'2,e'3,...,e' m ] Among them, e′ m Represents the first m entities output by the large language model; S312. The candidate entity R output by the knowledge graph searcher 检索器 =[e1,e2,e3,...,e E ], using the ordered list R 大模型 Replace, and the calculation expression of the final sorted list R is as follows: R=[e'1,e'2,e'3,...,e' m ,And m+1 ,...,And E ] S313. Use the final sorted list R as the reply content.

10. A natural resource map completion method system based on a large model, characterized in that: include: A retrieval module, used to input a query triple, search the natural resource knowledge graph according to the query triple, and obtain ordered candidate entities; A processing module, used for performing knowledge prompt processing on the query triple to obtain a prompt text; and extracting structural information of the natural resource knowledge graph, performing knowledge prefix adapter processing on the structural information to obtain virtual knowledge tags; A generation module is used to use the virtual knowledge mark and the prompt text as input prompts, use a preset large language model to reorder the candidate entities, and generate reply content for completing the natural resource knowledge graph.

Citation Information

Patent Citations

  • Large language model knowledge graph completion method based on subgraph structure information enhancement

    CN118674026A

  • Adaptive knowledge graph representation learning method for integrating graph structure with text information

    US20230186030A1

  • Event detection method and apparatus based on temporal knowledge graph

    WO2023115761A1

Cited By

  • Knowledge graph link prediction method and device, equipment, medium and program product

    CN119990283A

  • Bill processing method and device

    CN120338109A

  • Complementation method for underground water level and building risk knowledge graph

    CN120764644A

  • Knowledge graph entity completion method

    CN120851176A

  • A knowledge graph entity completion method

    CN120851176B