A method for constructing geographic information knowledge graph based on large language model
By combining the large language model and the Reflxion mechanism, efficient and automated knowledge graph construction is achieved in the field of geographic information, solving the problems of manual labeling dependence and recognition difficulties in low-resource scenarios in existing technologies, and providing a systematic solution suitable for multi-source heterogeneous data.
Patent Information
- Application Number
- CN202510656945.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-05-21
AI Technical Summary
Existing knowledge graph construction technology in the field of geographic information relies on high-cost manual labeling and weak generalization capabilities in low-resource scenarios. It is difficult to effectively identify and extract new entities or relationships that have not been seen, and it lacks robustness. In particular, there is a lack of systematic technical routes in complex fields such as water network management.
Large language models (LLMs) combined with the Reflxion mechanism are used to perform entity recognition and relationship extraction in stages. Through dual-model collaborative optimization and dynamic feedback mechanism, the dependence on manual labeling is reduced, the recognition ability in zero-sample or few-sample scenarios is improved, and entity alignment is performed through semantic similarity and geographic similarity.
It significantly reduces the annotation cost of constructing knowledge graphs in the geographic information field, improves the accuracy of entity and relationship recognition in zero-sample or few-sample scenarios, and provides a systematic technical route suitable for automated knowledge extraction from multi-source heterogeneous data, shortens the construction cycle and improves the efficiency of knowledge base generation.
Smart Images

Figure CN120179740B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of geographic information and artificial intelligence technology, and specifically relates to a method for constructing a geographic information knowledge graph based on a large language model. Background Art
[0002] Knowledge graphs (KGs), as an advanced form of structured knowledge representation, are a core technology for managing and utilizing large-scale, highly complex data. They are primarily used in general fields such as search engine optimization, intelligent question-answering systems, recommender systems, and natural language processing. Their basic structure consists of entities, relations, and attributes. Using triples as the fundamental representational unit, they organize real-world objects, concepts, and their connections into a networked knowledge system. The construction of a knowledge graph typically encompasses data collection, entity recognition, relationship extraction, entity alignment, knowledge storage, and updating. The goal is to transform diverse unstructured or semi-structured data sources into a structured knowledge base that is machine-understandable, computable, and reasonable. Knowledge graphs are particularly effective in integrating and representing complex spatial entities and their interrelationships, particularly in fields requiring precise management and analysis of distinct geographic spatial distributions, such as urban infrastructure, natural resource management, and logistics networks. Despite significant progress in both theoretical and applied knowledge graph construction, existing approaches, particularly those relying on supervised learning, still face several prominent challenges and inherent shortcomings. These technologies generally rely heavily on large-scale, high-quality annotated datasets. However, in the field of geographic information, obtaining such data is not only extremely challenging and costly, but often requires the participation of scarce experts with deep domain knowledge. This makes annotation a key bottleneck, and annotation deviations between different experts can easily introduce inconsistencies in data quality, negatively impacting model performance and the accuracy of the knowledge graph. Furthermore, in few-shot or zero-shot scenarios where annotated data is sparse, existing model methods often exhibit limited generalization capabilities, making it difficult to effectively identify and extract new, unseen entities or relationships. Furthermore, these models often lack robustness when processing real-world data containing noise, errors, or incomplete information, making them prone to producing erroneous knowledge extraction results.
[0003] In recent years, pre-trained models, represented by Large Language Models (LLMs), have achieved significant breakthroughs in the field of artificial intelligence. Their powerful contextual understanding, semantic reasoning, and text generation capabilities have given them enormous potential for automatically extracting semantic knowledge, identifying entities, and associating relationships from unlabeled or lightly labeled data. This provides a promising new technical paradigm for overcoming the bottlenecks of traditional knowledge graph construction and enabling more efficient and large-scale automated construction. However, despite their enormous potential, the practice of using LLMs to build knowledge graphs is still in its early stages of exploration and has significant limitations. Current research and applications primarily focus on general domains, and the knowledge extracted tends to be common sense or publicly available information. This limits their effectiveness in scenarios requiring deep domain knowledge, resulting in these methods not yet being widely adopted. In particular, the relevant technical frameworks and supporting tool chains in the field of geographic information are still underdeveloped.
[0004] For example, in the complex field of water network management, there is currently a significant lack of a systematic, universally applicable technical approach or integrated framework that can guide practitioners on how to effectively leverage the power of large language models to accurately and efficiently automatically construct specialized knowledge graphs that meet specific needs from diverse water network-related data sources (such as design drawings, operation logs, maintenance records, sensor data, and relevant regulatory documents). While significant progress has been made in knowledge graph construction technology, it faces significant challenges in specific areas such as water networks, which involve complex professional knowledge and geospatial information, due to its high reliance on manual annotation, high costs, and poor generalization capabilities in low-resource scenarios. Summary of the Invention
[0005] In response to the problems mentioned in the background technology, the present invention proposes a method for constructing a geographic information knowledge graph based on a large language model, applies large language models (LLMs) to the construction of geographic information knowledge graphs, and proposes a systematic and universal large-model geographic information domain knowledge extraction technology route, which provides a universal framework for the production of geographic information knowledge graphs, lowers the construction threshold of domain knowledge graphs, and provides a reference for the automated construction of knowledge graphs in other fields.
[0006] Technical solution: In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0007] A method for constructing a geographic information knowledge graph based on a large language model includes the following steps:
[0008] S1: Data preprocessing and knowledge graph model definition;
[0009] S2: Phased entity recognition integrating the Reflxion mechanism to identify geographic information entities that conform to predefined patterns from the preprocessed text;
[0010] S3: Relation extraction integrating Reflxion mechanism to extract semantic relations between identified entities;
[0011] S4: Entity alignment and attribute alignment are performed based on semantic similarity and geographic similarity, and similar entities are merged for storage and visualization.
[0012] Preferably, in S1, geospatial data, encyclopedia text data and multi-source heterogeneous data related to water network management are collected; non-text data are converted into text, and the collected text data are cleaned, including removing irrelevant characters, format standardization, and text segmentation; according to the specific water network scenario, predefined entity types include rivers, lakes, cities, places, people and related relationships and attribute definitions.
[0013] As a preference, the specific process of S2 is:
[0014] S21: Identification of entity types;
[0015] S22: preliminary entity recognition;
[0016] S23: Entity recognition effect evaluation;
[0017] S24: Output of entity collection.
[0018] Preferably, in S21, the entity type identification process is:
[0019] The large language extraction model is used to perform preliminary entity type range definition on the input text block, determine the entity types contained in the text block, and output a subset of relevant entity types for the text block.
[0020] Preferably, in S22, the specific process of preliminary entity recognition is:
[0021] Entity instances are extracted from the subset of relevant entity types identified in S21. By constructing a prompt containing a text block and the current target entity type, the large language extraction model is instructed to extract all specific instances of this type of entity in the text and their text spans.
[0022] Preferably, in S23, the specific process of entity recognition effect evaluation is:
[0023] Introducing the Reflexion mechanism for evaluation, the original text, the output of the large language extraction model in S22, the target entity type definition and verification rules are passed to the large language evaluation model. The output results of the large language extraction model are reviewed, various errors are identified, and an organized evaluation report or correction suggestions are generated;
[0024] The evaluation results of the large language evaluation model are fed back to the large language extraction model to perform a second round of extraction of the same text block and the same entity type. The prompts at this time will incorporate the feedback points of the large language evaluation model to guide the large language extraction model to make corrections.
[0025] As a preference, the specific process of S3 is:
[0026] S31: Relation extraction based on large language model;
[0027] S32: Relationship extraction effect evaluation;
[0028] S33: Output of the complete triplet.
[0029] Preferably, in S31, the specific content of the relationship extraction based on the large language model is:
[0030] Using the verified entity list produced by S2, identify candidate entity pairs in the current text block;
[0031] Using the large language extraction model as the initial relation extractor, combined with the text context, candidate entity pairs, and the full set of predefined relation types, the prompt instruction large language extraction model is constructed to determine whether there is a predefined relationship between each candidate entity pair and determine the most appropriate relationship type;
[0032] Output a list of preliminary determined relationship triples.
[0033] Preferably, in S32, the specific process of evaluating the effect of relation extraction is as follows:
[0034] Start the evaluation phase in the Reflexion mechanism and submit the relation triple list generated by the large language extraction model in S31 to the large language evaluation model for independent evaluation and verification;
[0035] Review each relationship triple based on the original text content, the definition and constraints of the relationship type, and the verified entity information; identify various errors and generate evaluation results or correction suggestions.
[0036] Preferably, in S4, the specific process is:
[0037] S41: Extract all unique entity names from the acquired knowledge graph and use geocoding technology to obtain the latitude and longitude of related geographic entities;
[0038] S42: Use the embedding model to convert the entity name into a word vector and calculate the cosine similarity of the two word vectors as the semantic similarity. The specific calculation formula is:
[0039] ,
[0040] Among them, A and B represent the word vectors corresponding to entities A and B respectively. 、 Respectively represent the modulus length of word vectors A and B, i represents the current word vector dimension, and n represents the total word vector dimension;
[0041] S43: Calculate the spatial distance d of each entity, convert it into geographical similarity using the Gaussian kernel function, and use distance to measure their similarity, specifically:
[0042] ,
[0043] Where d represents the distance and σ represents the adjustment parameter;
[0044] S44: Calculate entity alignment similarity S;
[0045] ,
[0046] ,
[0047] Among them, isSameEntity indicates whether two entities are the same entity; α is the weight parameter, and s is the set threshold; when the entity alignment similarity S is greater than or equal to s, they are considered to be similar entities;
[0048] After merging all similar entities, the Neo4j graph database is used to store and visualize the knowledge graph.
[0049] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0050] (1) This invention combines the contextual understanding and semantic reasoning capabilities of large language models (LLMs) to significantly reduce the dependence on large-scale manually annotated data in the construction of knowledge graphs in the geographic information field, effectively reducing the need for participation of domain experts and the annotation costs.
[0051] (2) The present invention introduces large language models (LLMs) in stages and combines them with a dynamic feedback mechanism. It utilizes the semantic understanding and reasoning capabilities of the model to learn domain patterns from limited samples, and enhances the recognition ability of unseen entities and relationships through iterative correction, significantly improving the extraction of domain knowledge, including geographic information, in zero-sample or few-sample scenarios.
[0052] (3) This invention proposes a systematic technical route and integrated framework for the field of geographic information, providing practical guidance for the automated knowledge extraction and graph construction of multi-source heterogeneous data. It also provides a reference for the automated construction of knowledge graphs in other fields with geographic spatial attributes (such as transportation networks, power systems, emergency management, etc.), and has strong cross-domain promotion potential. Through full-process automated design and multi-model collaborative optimization, the knowledge graph construction cycle is shortened, and efficient and large-scale structured knowledge base generation is achieved to meet real-time requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a flowchart of the method for constructing a geographic information knowledge graph based on a large language model;
[0054] Figure 2 It is a flow chart of the phased entity recognition of the fusion Reflxion mechanism of the present invention;
[0055] Figure 3 This is a flow chart of the relationship extraction integrating the Reflxion mechanism of the present invention;
[0056] Figure 4 is a flow chart of entity alignment of the present invention;
[0057] Figure 5 is a schematic diagram of the performance evaluation of the entity recognition module of the present invention;
[0058] Figure 6 Schematic diagram of performance evaluation of the relationship extraction module of the present invention. DETAILED DESCRIPTION
[0059] The present invention will be further illustrated below with reference to specific examples. The examples are implemented based on the technical solutions of the present invention. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0060] The method for constructing a geographic information knowledge graph based on a large language model, provided in this embodiment, addresses the existing problems of low accuracy, low efficiency, high need for manual intervention, and difficulty in information integration when processing multi-source, heterogeneous, unstructured geographic information data. This method is particularly targeted at fields with complex spatial structures and specialized knowledge, such as water networks. Its core approach is to utilize a dual LLM collaborative mechanism to improve the accuracy of knowledge extraction and integrate geographic spatial features for entity alignment. The specific implementation steps are as follows:
[0061] S1: Data preprocessing and knowledge graph model definition;
[0062] S11: data preprocessing;
[0063] Collect multi-source heterogeneous data related to water network management, including text data and non-text data, convert non-text data into text, and clean the collected text data, including removing irrelevant characters, format standardization (such as date, unit), and text segmentation.
[0064] Collect geospatial data and encyclopedia text data.
[0065] S12: Define the knowledge graph model;
[0066] Depending on the specific water network scenario, predefined entity types include rivers (main stream, first-level tributaries, second-level tributaries), lakes, cities, related properties, places, people, and related relationships and attribute definitions.
[0067] Among them, the relationship definition of rivers includes river code, river length, and the basin to which it belongs; the relationship definition of lakes includes lake code and water surface area; and the relationship definition of cities includes prefecture-level city code and gross domestic product.
[0068] Among them, entities are defined from the perspective of spatial relationships and non-spatial relationships; spatial relationships include flow through, inflow, parent river, tributaries, related rivers, and related lakes; non-spatial relationships include also known as, originate from, related people, governance / management, related culture, and related events.
[0069] S2: Phased entity recognition integrating Reflxion mechanism: identifying geographic information entities that conform to predefined patterns from preprocessed text;
[0070] Directly using a large model can easily lead to incorrect demarcation of geographic entity boundaries or confusion of hierarchical relationships due to semantic ambiguity. Correct demarcation of entity boundaries is particularly important for geographic entities. The core goal of this step is to accurately identify geographic entities that conform to predefined patterns from the preprocessed text. This step uses a refined strategy that combines type scoping and dual-model evaluation feedback to identify geographic entities.
[0071] S21: Accurate identification of entity types;
[0072] First, the system uses the Large Language Extraction Model (LLM_A) to perform a preliminary scoping of entity types for the input text block. A predefined list of entity types (such as rivers, lakes, and cities) is provided to LLM_A along with the current text block, requiring it to quickly determine the entity types that may be present in the text block. This step aims to narrow the scope of subsequent fine-grained extraction, allowing the model to focus more on entity categories relevant to the current text, improving processing efficiency and relevance. The output of LLM_A is a subset of relevant entity types for the text block.
[0073] S22: preliminary entity recognition;
[0074] The system then extracts and refines entity instances based on the subset of relevant entity types identified in S21. For a specific target entity type (e.g., river), LLM_A performs the extraction action. By constructing a prompt containing a text block and the target entity type, LLM_A is instructed to extract all specific instances of that entity type within the text, including their spans.
[0075] S23: Entity recognition effect evaluation;
[0076] A reflexion mechanism is introduced for evaluation. The preliminary extraction results from the previous step are passed to the Large Language Evaluation Model (LLM_B) for independent evaluation and verification. LLM_B acts as the "evaluator," receiving the original text, the output of LLM_A, the target entity type definition, and verification rules. It rigorously reviews LLM_A's results, identifying potential errors (such as type errors, inaccurate boundaries, entity completeness, or contextual consistency) and generating a structured evaluation report or correction suggestions. The evaluation results generated by LLM_B are explicitly fed back to the initial extraction model, LLM_A. After receiving this feedback from the "evaluator," LLM_A is instructed to perform a second round of extraction for the same text block and entity type. This prompt incorporates the key points of LLM_B's feedback to guide LLM_A's corrections. LLM_A uses this external feedback obtained through the reflexion mechanism to self-adjust, generating an iteratively optimized and more accurate list of entities of that type, significantly improving the accuracy of geographic entity recognition.
[0077] S24: Output of entity set;
[0078] After completing this reflexion-based process of "LLM_A initial extraction -> LLM_B evaluation -> LLM_A post-feedback refinement" for all relevant entity types, the entity recognition module aggregates the final refined entity lists for each type. This collection of high-quality entity instances, optimized through dual-model collaboration, constitutes the module's final entity recognition results.
[0079] S3: Relation extraction integrating Reflxion mechanism to extract semantic relations between identified entities;
[0080] After obtaining high-quality entity recognition results through S2, this step is dedicated to extracting the semantic relationships between these recognized entities and applying the Reflexion mechanism based on dual-model feedback to improve accuracy.
[0081] S31: Relation extraction based on large language model (LLM);
[0082] Using the verified entity list generated by S2, candidate entity pairs are identified within the currently processed text block. LLM_A is used as the initial relation extractor. Combining the text context, candidate entity pairs, and the full set of predefined relation types, LLM_A is designed to determine whether any predefined relations exist between each candidate entity pair and determine the most appropriate relation type. At this step, LLM_A outputs a list of preliminarily determined relation triples (Subject-Predicate-Object).
[0083] S32: Relationship extraction effect evaluation;
[0084] The evaluation phase of the Reflexion mechanism is initiated, submitting the preliminary list of relation triples generated by LLM_A to the large language evaluation model LLM_B for independent evaluation and verification. LLM_B acts as a "relation evaluator," rigorously reviewing each relation triple proposed by LLM_A based on the original text content, the definition and constraints of the relation type, and verified entity information. LLM_B is responsible for identifying issues such as incorrect relation type judgments and mismatches between subject and object and relation type, and generating detailed evaluation results or corrective suggestions.
[0085] S33: output of the complete triplet;
[0086] LLM_B's evaluation report or correction suggestions are explicitly fed back to LLM_A. After receiving this feedback from the "evaluator," LLM_A conducts a second round of relationship judgment and extraction for the same text block and the same candidate entity pairs (or relationship scenarios). Ultimately, after completing the entire relationship extraction process, the system obtains a set of high-quality relationship triplets within the text block, optimized through dual-model collaboration.
[0087] S4: Entity alignment and attribute alignment based on semantic similarity and geographical similarity;
[0088] After the above steps, the system collects entity instances extracted and verified from all text blocks. However, due to the diversity of expressions or incomplete information, entities extracted from different texts may refer to the same real-world object.
[0089] S41: Extract all unique entity names (e.g., entity A and entity B) from the acquired knowledge graph and use geocoding technology to obtain the latitude and longitude of the relevant geographic entities;
[0090] S42: Use an embedding model (such as BERT) to convert the entity name into a word vector and calculate the cosine similarity between the two word vectors as the semantic similarity. The specific calculation formula is:
[0091] ,
[0092] Among them, A and B represent the word vectors corresponding to entities A and B respectively. 、 They represent the modulus of word vectors A and B respectively, i represents the current word vector dimension, and n represents the total word vector dimension.
[0093] S43: Calculate the spatial distance d of each entity, convert it into geographical similarity using Gaussian kernel function, and use distance to measure their similarity, specifically;
[0094] ,
[0095] Where d is the distance and σ is the tuning parameter.
[0096] S44: Calculate entity alignment similarity S;
[0097] ,
[0098] ,
[0099] Among them, isSameEntity indicates whether two entities refer to the same entity; α is a weight parameter that can be adjusted according to actual needs; s is the set threshold.
[0100] Combined with a vectorization model, text data is converted into vectors in a mathematical space. The similarity of the data is quantified by calculating the cosine similarity between vectors. Finally, a threshold s is set based on the actual situation. When the entity alignment similarity S is greater than or equal to s, the entities are considered similar.
[0101] After merging all similar entities, the Neo4j graph database is used to store and visualize the knowledge graph; knowledge applications include data query, reasoning analysis, knowledge question and answer, water network visualization, node partitioning, and node importance ranking.
[0102] This paper uses three basic metrics: precision, recall, and F1 score to evaluate the results of the entity extraction module and the relationship extraction module. Evaluations are conducted in both zero-shot and few-shot scenarios. Zero-shot refers to when the model has not seen any labeled examples of a specific category during training. Few-shot refers to when the model has seen only a very small number (usually a few) of labeled examples of a specific category during training.
[0103] Precision measures how many of the results identified as positive examples by the model are actually positive examples.
[0104] Recall measures how many of all true positive examples are successfully identified by the model.
[0105] The F1 score is the harmonic mean of precision and recall, which comprehensively measures the accuracy and completeness of the model.
[0106] This paper demonstrates the effectiveness of a method for constructing geographic information knowledge graphs based on a large language model through systematic experiments. The experimental results show that the large language model demonstrates significant performance in both entity recognition (NER) and relation extraction (RE) tasks in both zero-shot and few-shot low-resource scenarios, preliminarily confirming the feasibility of this technology approach for constructing geographic information knowledge graphs.
[0107] Experimental results from the entity recognition module clearly demonstrate that the proposed dual-stage entity recognition strategy outperforms single-stage approaches, enabling more effective identification of geographic entities. Furthermore, the innovative integration of the reflexion mechanism into both the entity recognition and relationship extraction modules significantly improves accuracy. Experiments in both modules demonstrate that the introduction of the reflexion mechanism improves performance, particularly in challenging zero-shot scenarios.
[0108] The present invention achieves optimal performance in both entity recognition and relationship extraction, which strongly supports the fact that the geographic information knowledge graph construction method based on a large language model proposed in the present invention can effectively solve the problems of traditional methods' heavy reliance on large-scale annotated data and weak generalization ability in low-resource scenarios.
[0109] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for constructing a geographic information knowledge graph based on a large language model, characterized in that: The following steps are involved: S1: Data preprocessing and knowledge graph model definition; S2: Phased entity recognition integrating the Reflexion mechanism to identify geographic information entities that conform to predefined patterns from preprocessed text; S21: Identification of entity types; S22: preliminary entity recognition; The system extracts and refines entity instances traversally based on the subset of relevant entity types identified in S21. For the target entity type, the large language extraction model performs the extraction action. By constructing a prompt containing a text block and the current target entity type, the large language extraction model is instructed to extract all specific instances of the entity type and their text spans in the text. S23: Entity recognition effect evaluation; The Reflexion mechanism is introduced for evaluation. The preliminary extraction results of step S22 are passed to the large language evaluation model for independent evaluation and verification. The large language evaluation model acts as an "evaluator." It receives the original text, the output of the large language extraction model, the target entity type definition, and verification rules. It rigorously reviews the results of the large language extraction model, identifies potential errors, and generates a structured evaluation report or correction suggestions. The evaluation results generated by the large language evaluation model are fed back to the initial large language extraction model. After receiving feedback from the "evaluator", the large language extraction model is instructed to perform a second round of extraction for the same text block and the same entity type. The prompts at this time will incorporate the feedback points of the large language evaluation model to guide the large language extraction model to make corrections. S24: Output of entity set; S3: Relation extraction integrating the Reflexion mechanism to extract the semantic relationships between identified entities; S31: Relation extraction based on large language model; Using the verified entity list produced by S2, candidate entity pairs are identified within the currently processed text block. The large language extraction model is used as the initial relation extractor. Combining the text context, candidate entity pairs, and the full set of predefined relation types, the large language extraction model is instructed by setting prompts to determine whether there are any predefined relations between each candidate entity pair and determine the most appropriate relation type. The large language extraction model outputs a list of preliminary determined relationship triplets; S32: Relationship extraction effect evaluation; Start the evaluation phase of the Reflexion mechanism and submit the preliminary relationship triple list generated by the large language extraction model to the large language evaluation model for independent evaluation and verification; The large language evaluation model acts as a "relationship evaluator," reviewing each relationship triplet proposed by the large language extraction model based on the original text content, the definition and constraints of the relationship type, and verified entity information. The large language evaluation model is responsible for identifying relationship type errors and mismatches between subject and object and relationship type, and generates detailed evaluation results or correction suggestions. S33: output of the complete triplet; The evaluation report or correction suggestions from the large language evaluation model are explicitly fed back to the large language extraction model. After receiving feedback from the "evaluator," the large language extraction model performs a second round of relationship judgment and extraction for the same text block and the same candidate entity pairs. Ultimately, after completing the complete process of the relationship extraction module, the system obtains a set of relationship triplets within the text block that have been collaboratively optimized by the two models. S4: Entity alignment and attribute alignment based on semantic similarity and geographic similarity, and similar entities are merged for storage and visualization; S41: Extract all unique entity names from the acquired knowledge graph and use geocoding technology to obtain the latitude and longitude of related geographic entities; S42: Use the embedding model to convert the entity name into a word vector and calculate the cosine similarity of the two word vectors as the semantic similarity. The specific calculation formula is: Where A and B represent the word vectors corresponding to entities A and B respectively, ||A|| and ||B|| represent the modulus of word vectors A and B respectively, i represents the current word vector dimension, and n represents the total word vector dimension; S43: Calculate the spatial distance d of each entity, convert it into geographical similarity using the Gaussian kernel function, and use distance to measure their similarity, specifically: Where d represents the distance and σ represents the adjustment parameter; S44: Calculate entity alignment similarity S; S = α·semantic similarity + (1-α)·geographical similarity, Among them, isSameEntity indicates whether two entities are the same entity; α is the weight parameter, and s is the set threshold; when the entity alignment similarity S is greater than or equal to s, they are considered to be similar entities; After merging all similar entities, the Neo4j graph database is used to store and visualize the knowledge graph.
2. The method for constructing a geographic information knowledge graph based on a large language model according to claim 1, characterized in that: In S1, geospatial data, encyclopedia text data, and multi-source heterogeneous data related to water network management are collected; non-text data is converted to text, and the collected text data is cleaned, including removing irrelevant characters, format standardization, and text segmentation; according to the specific water network scenario, predefined entity types include rivers, lakes, cities, places, people, and related relationships and attribute definitions.
3. The method for constructing a geographic information knowledge graph based on a large language model according to claim 1, characterized in that: In S21, the entity type identification process is: The large language extraction model is used to perform preliminary entity type range definition on the input text block, determine the entity types contained in the text block, and output a subset of relevant entity types for the text block.
Citation Information
Patent Citations
Hydropower station equipment knowledge graph construction method based on large language model and related system
CN119783792A
Knowledge graph construction method based on fine-tuning large language model
CN119808917A
Cited By
Multi-scale dynamic space-time geographic map automatic construction method based on vector data
CN122309626A