A method, device and storage medium for constructing a geographic modeling case knowledge graph
By constructing a knowledge graph for geographic modeling cases, the problem of integrating and utilizing geographic modeling knowledge is solved, accurate reasoning and efficient organization of entity relationships are achieved, and the sharing and reusing ability of geographic modeling knowledge is improved.
Patent Information
- Application Number
- CN202411131806.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-08-16
AI Technical Summary
There are difficulties in the integration and utilization of geographical modeling knowledge in the prior art, especially how to accurately summarize conceptual relationships and infer complex relationships in geographic modeling processes.
A method for constructing a knowledge graph for geographic modeling cases is designed, including defining entity types and attributes, extracting entities using large language models, inferring modeling process relationships, constructing structured and unstructured entity relationships within and between different cases, using Neo4j database storage, and reasoning similar relationships between unstructured entities through representation.
It improves the organization and retrieval efficiency of geographical modeling knowledge, enhances the practicality of knowledge graphs, and supports research and application in the fields of geographical modeling and simulation.
Smart Images

Figure CN119166730B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of geographic modeling and simulation, and relates to knowledge graphs, specifically a method, device and storage medium for constructing a geographic modeling case knowledge graph. Background Art
[0002] With the continuous advancement of geographic information systems (GIS) and remote sensing technologies, geographic modeling is playing an increasingly important role in a variety of key areas, including urban planning, environmental monitoring, and resource management. By building specific models to simulate the distribution characteristics and changing processes of geospatial data, geographic modelers provide powerful analytical examples for decision makers. However, current research often focuses on the analysis of single cases, ignoring the importance of extracting and integrating implicit knowledge from a large number of cases. This limits the ability to share and reuse geographic modeling knowledge.
[0003] Knowledge itself is complex and multi-layered. Each conceptual entity carries rich connotations and maintains intricate connections with numerous other entities. Faced with this complexity, converting knowledge into a machine-readable format is nearly impossible without the appropriate tools. To address this challenge, knowledge graphs were designed. They are semantic networks that reveal the relationships between different entities and construct a collection of interconnected entities.
[0004] In the era of big data, how to efficiently organize, manage, and utilize the knowledge in geographic modeling cases has become a pressing issue. Knowledge graphs, as structured semantic knowledge bases, offer a new solution for integrating geographic modeling knowledge. However, building a knowledge graph for geographic modeling cases is not without its challenges. First, the geographic modeling process involves numerous concepts, and accurately summarizing and defining the relationships between them is fundamental to building a knowledge graph. Second, the relationships between entities in geographic modeling cases are complex and diverse, including modeling process relationships within a case and structured and unstructured relationships between cases. Accurately reasoning about these relationships is key to building a knowledge graph. Summary of the Invention
[0005] The technical problem to be solved by the present invention is: in view of the problem of integrating and utilizing the existing geographic modeling knowledge, a method for constructing a geographic modeling case knowledge graph is designed.
[0006] The technical solution of the present invention is:
[0007] A method for constructing a geographic modeling case knowledge graph includes the following steps:
[0008] Step 1: Define the entity types and entity attributes of the geographic modeling case knowledge graph;
[0009] Step 2: Extract entities in geographic modeling cases;
[0010] Step 3: Infer the modeling process relationship between the entities extracted from the same geographic modeling case to form a first-level graph;
[0011] Step 4: Infer the relationships between structured entities of the same category across different geographic modeling cases and construct the second-level graph;
[0012] Step 5: Infer the relationships between unstructured entities of the same category across different geographic modeling cases and construct the third-level graph;
[0013] Step 6: Complete the construction of the geographic modeling case knowledge graph.
[0014] Furthermore, the structure of the geographic modeling case knowledge graph is K = (E, R, P, L), R = R k ∪
[0015] (R S ∪R T ∪R D )∪R V , where: E represents the set of entities; R represents the set of relations, R k is the set of modeling process relationships in the first level graph, R S ∪R T ∪R D is the set of relationships between structured entities of the same category between different geographic modeling cases in the second-level graph, R S is a spatial relationship, R T It is a time relationship, R D is a derivative pair relation, R V It is the set of relationships between unstructured entities of the same category between different geographic modeling cases in the third-level graph; P represents the set of attributes; L represents the set of categories.
[0016] Furthermore, the entity types in step 1 include purpose, object, mechanism, variable, model, application, and result;
[0017] The attributes of an entity include model type, data type, base model, model structure, data resolution, research time, data spatial location, research field, and researchers.
[0018] Furthermore, in step 2, Prompt is constructed to use the large language model to extract entities in the geographic modeling case. Prompt = f(T, C, R), where T provides a description of the extraction target and scope that the large language model can understand, C is a dictionary containing a detailed explanation of each concept in the modeling process, and R specifies the form of the large language model output.
[0019] Furthermore, step three is specifically as follows:
[0020] Based on the predefined entity relationships, the modeling process relationships between the extracted entities are inferred:
[0021] R k (e i ,e j )=f(C i ,C j ,R)
[0022] Among them, C i It is entity e i Category, C j It is entity e j Category, R is a predefined entity relationship set, f is a function that finds the corresponding relationship in the predefined entity relationship set according to the entity category and returns the result, R k (e i ,e j ) is entity e i and e j Modeling process relationships between
[0023] The above modeling process relationships and the categories and attributes of the entities defined in step one constitute the first-level graph.
[0024] Furthermore, after step 3 and before step 4, the method further includes: determining whether the number of geographic modeling cases is greater than 1; if so, executing steps 2 and 3 for each geographic modeling case in sequence before proceeding to step 4; otherwise, executing steps 2 and 3 before directly proceeding to step 6.
[0025] Furthermore, step five is specifically as follows:
[0026] The relationships between structured entities of the same category across different geographic modeling cases include:
[0027] Spatial relationships:
[0028]
[0029] Among them, C i It is entity e i Category, C j It is entity e j Category, R T It is entity e i and e j The spatial relationship set between ij It is entity e i The spatial range attribute S i With entity e j The spatial range attribute S j The topological relationship between them;
[0030] Time relationship:
[0031] R T ={(e i ,e j )∣∣C i =C j andΔT ij ≤ΔT max}
[0032] Among them, R T It is entity e i and e j The set of time relations between ij It is entity e i The timestamp attribute T i With entity e j The timestamp attribute T j The time interval between max is the set time interval threshold;
[0033] Derived pair relationship:
[0034] R D ={(e i ,e j )∣C i =C j andB i =B j}
[0035] Among them, R D It is entity e i and e j The derived pair relationship set between B i and B j It is entity e i and e j Basic model properties of;
[0036] The relationships between the same category structured entities in the above different geographic modeling cases and the first-level graph constitute the second-level graph.
[0037] Furthermore, step six is specifically as follows:
[0038] Use the representation learning method to map unstructured entities to vector space, set a distance threshold, and build a similarity relationship for the corresponding unstructured entities when the distance between two vectors is less than the threshold, as follows:
[0039] R S ={(e i ,e j )∣∣C i =C j andd(v i ,v j )≤θ}
[0040] Among them, C i It is entity e i Category, C j It is entity e j Category, v i ,v j is the entity e i ,e j The corresponding vector after the vector space; d is the calculation of v i and v j The function of the distance between them; θ is the distance threshold;
[0041] The relationships between the same category of unstructured entities in the above different geographic modeling cases and the second-level graph constitute the third knowledge graph.
[0042] The present invention also proposes a device for constructing a geographic modeling case knowledge graph, the device comprising:
[0043] The structure design module is used to design the categories and attributes of entities in the geographic modeling case knowledge graph;
[0044] Knowledge extraction module, used to extract entities in geographic modeling cases;
[0045] The intra-case relationship building module is used to infer the modeling process relationships between entities extracted from the same geographic modeling case and store them in the Neo4j database;
[0046] Batch extraction case module, which is used to adjust the extraction strategy according to the number of geographic modeling cases, so as to perform entity extraction and relationship construction tasks on geographic modeling cases in batches;
[0047] The structured entity relationship reasoning module infers the relationships between structured entities of the same category across different geographic modeling cases;
[0048] The unstructured entity relationship reasoning module is used to reason about the relationships between unstructured entities of the same category across different geographic modeling cases.
[0049] The present invention also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the method for constructing the above-mentioned geographic modeling case knowledge graph is implemented.
[0050] Beneficial effects:
[0051] This paper proposes a method for constructing a knowledge graph of geographic modeling cases, especially by incorporating the spatiotemporal characteristics of geographic entities when reasoning about entity relationships. It aims to improve the organization and retrieval efficiency of geographic modeling knowledge, enhance the practicality and accuracy of the knowledge graph, and support research and application in the field of geographic modeling and simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of a method for constructing a geographic modeling case knowledge graph provided in an embodiment of the present invention.
[0053] Figure 2 This is an example of constructing a large language model prompt word according to an embodiment of the present invention.
[0054] Figure 3 A schematic diagram of ontology relationships within a case provided by an embodiment of the present invention.
[0055] Figure 4 A schematic diagram of the structure of a geographic modeling case knowledge graph construction device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In response to the problem that the organization and retrieval of existing geographic modeling cases are not perfect, this paper designs a method for constructing a geographic modeling case knowledge graph. Combined with the currently popular natural language processing technology, it can not only more conveniently understand and extract cases in large quantities and speed up the construction of the knowledge graph, but also use the constructed knowledge graph to prompt and restrict the natural language model, and provide case references for some downstream tasks (geographic modeling solution recommendation).
[0057] The present invention designs entity relationship types and attributes of the knowledge graph, extracts target entities from geographic modeling cases, and then constructs relationships between entities in the same case based on the designed relationships. Then, the relationships between similar entities in different cases are inferred through predefined rules and representation learning to obtain a geographic modeling case knowledge graph. The specific method flow chart is shown in the figure below. Figure 1 As shown, the following steps are included:
[0058] S101. Define the categories and attributes of entities in the geographic modeling case knowledge graph.
[0059] It's worth noting that an entity refers to something that exists objectively and can be distinguished from others. For the geographic modeling process, entities include, but are not limited to, core elements such as purpose, object, mechanism, variables, model, application, and results. Furthermore, these geographic modeling cases can include academic papers in the field of geoscience, model usage tutorials, and related software documentation, which encompass a relatively complete geographic modeling process and enrich the source of knowledge. Entity attributes include, but are not limited to, model type, data type, base model, model structure, data resolution, research time, data spatial location, research field, and researchers.
[0060] In this embodiment, the "Purpose" type refers to the desired purpose in the modeling case, and its attributes should include the purpose description, research field, and problem to be solved; the "Object" type refers to the specific research object of interest in the modeling process, and its attributes should include the object description and the region to which it belongs; the "Mechanism" type refers to the scientific principles and processes behind model construction, and its attributes should include the mechanism description; the "Variable" type refers to all geographic spatiotemporal data and other types of data required in the modeling process, and its attributes should include the data name, acquisition time, acquisition source, resolution, processing method, and data type; the "Model" type refers to the model constructed or selected in the case, which is used to simulate geographic phenomena or fit data features, and its attributes should include the model name, model structure, model parameters, and operating environment; the "Application" type refers to the output of the model, in what field it is applied and what problem it solves, and its attributes should include the application method, field to which it belongs, and application scenario; the "Result" type refers to the output of each stage of the entire modeling process, including data processing results, model evaluation results, model simulation results, and analysis conclusions, and its attributes should include the result description and result type.
[0061] S102. Build Prompt to extract entities from cases using a large language model.
[0062] The core task of this step is to use advanced natural language processing technology to accurately extract the target entities defined in S101 from the geographic modeling case. In order to complete this task, it is necessary to interact with the large language model by constructing prompt words. Figure 2 This is an example of constructing prompt words provided in this embodiment. The structure of prompt words is Prompt=
[0063] f(T, C, R); T provides a high-level description of the entire task, ensuring that the large language model understands the extraction objectives and scope; C describes the designed entity types, including a detailed explanation of each core concept in the modeling process; R restricts the large language model to only return content directly related to the entity structure of the geographic modeling process, and outputs it in JSON format. This means that the large language model must not only identify entities in the text but also match these entities to the definitions of the target entities. This limitation greatly improves the relevance and usability of the extraction results.
[0064] S103. Construct entity relationships for the extracted entities according to the designed relationships.
[0065] Combine the extracted entities with the original case text and infer the associations between the two entities based on the designed modeling process relationship, including but not limited to the use model, construction model, use data, research object, research conclusion, simulation results, and evaluation results, as follows:
[0066] R k (e i , ej )=g(C i , C j , R), R={R1, R2,…, R m}
[0067] Among them, C i It is entity e i Type, C j It is entity e j type, R is the defined modeling relationship set between entities in the same case, g is a function that searches for the corresponding relationship in the relationship set according to the entity type and returns the result, R k (e i , e j ) is entity e i and e j Modeling process relationships between
[0068] The above relationships and the entity types and attributes defined in step 1 constitute the first-level graph.
[0069] In the specific implementation process, the first step is to design the process relationship between entity categories. Figure 3 A schematic diagram of the ontology relationship within a case is provided. The relationship network connects objects, models, mechanisms, results and other ontologies with "purpose" as the core. The specific relationships are as follows: Figure 3 The above is just an example, and other entity relationships can be set according to the extracted entities and specific usage, and the present invention does not limit this.
[0070] Based on the relational model designed in this embodiment, process relationships are constructed for the extracted entities. For example, if the "Purpose" entity of a case is "Flood Forecast," then its directly associated variable entities may include "Rainfall," "Terrain," etc., while the model entity may be "Hydrological Model."
[0071] To efficiently represent these relationships, we use triples (Subject, Predicate, Object) to store associations between entity pairs. In a triple, Subject and Object represent entities, while Predicate represents the relationship between them. For example, (Flood Forecast, Usage Model, Hydrological Model) is a triple representing the relationship between the target entity and the model entity.
[0072] After the triples are constructed, these entity relationships are digitized and stored in a Neo4j graph database. Neo4j is a popular, high-performance NoSQL graph database that stores data as a graph structure, making it particularly well-suited for processing complex, highly interconnected data. Neo4j is a powerful tool for processing complex relational data that is difficult to effectively represent in traditional relational databases.
[0073] S104. Dynamically adjust the extraction strategy to extract knowledge from different numbers of geographic modeling cases.
[0074] First, the number of cases in the target case database is checked. If the number is greater than 1, step 2 is executed for each case in the case database. This involves using a large language model to analyze the case text and extract core conceptual entities related to the geographic modeling process. Next, step 3 is executed to connect these entities using predefined modeling process relationships, establish inter-entity relationships, and store them in the Neo4j database. If the number of cases is 1, the loop is skipped and the next step is executed directly.
[0075] S105: Reasoning relationships between structured entities of the same category based on predefined rules.
[0076] Structured entities typically have a clear hierarchy or topology, and they define and express their relationships through a series of special attributes. Relationships are constructed using the special attributes of structured entities with a certain hierarchy or topology.
[0077] Regarding spatial proximity, inclusion, and intersection between structured entities, one study area may be adjacent to another, and a watershed may consist of multiple sub-watersheds. These relationships can be identified and calculated using spatial analysis tools by obtaining the geographic extent of the "object" entity. In the knowledge graph, these special properties of spatial relationships are utilized to define corresponding spatial topology rules to construct a spatial relationship model between entities.
[0078] The spatial relationship is obtained by obtaining the spatial scope of the study area in the entity attributes, using existing spatial analysis tools to calculate the topological relationship, and converting the topological relationship into the relationship of the corresponding entity, as follows:
[0079]
[0080] Among them, C i It is entity e i Type, C j It is entity e j Type, R S It is entity e i and e jThe spatial relationship between ij It is entity e i The spatial range attribute S i With entity e j The spatial range attribute S j The topological relationship between them, g is a function used to calculate spatial relationships (for example, intersection, inclusion, adjacency, etc.), when S i and S j When the topological relationship between them is not empty, it is considered that entity e i and e j There is a spatial relationship between them.
[0081] The temporal relationship is constructed by using the data acquisition time in the entity attributes as a timestamp to mark the sequence and calculating the interval between time points, as follows:
[0082] R T ={(e i ,e j )∣∣C i =C j andΔT ij ≤ΔT max}, ΔT ij =|T i -T j |
[0083] Among them, C i It is entity e i Type, C j It is entity e j Type, R T It is entity e i and e j The time relationship between ij It is entity e i The timestamp attribute T i With entity e j The timestamp attribute T j The time interval between max is the set time interval threshold, when ΔT ij When the threshold is smaller than the entity e i and e j There is a time relationship between them.
[0084] The derived relationship of the model uses the base model in the entity attribute as the standard. If two models are improved from the same base model, a derived pair relationship is constructed as follows:
[0085] R D ={(e i ,e j )∣C i =Cj andB i =B j}
[0086] Among them, C i It is entity e i Type, C j It is entity e j Type, R D It is entity e i and e j The derivative pair relationship between B i and B j It is entity e i and e j If the two basic models are the same, the entity e i and e j There is a derivative relationship between them.
[0087] The above newly added relationships together with the first-level knowledge graph constitute the second-level knowledge graph.
[0088] Taking "Yangtze River Delta Region" and "Nanjing" as examples, we first extract the geographic scope of these two entities from the GeoNames database, and use the "Contains" function in Geopandas to determine whether the polygon of the Nanjing region is completely contained in the polygon of the Yangtze River Delta region; the Boolean value returned by the function is used as the basis for whether to create a "contains" relationship between the two entities. If the result is True, a spatial relationship is added to the knowledge graph and represented by a (Yangtze River Delta Region, contains, Nanjing) triple; if the result is False, the "Intersects" function is called to determine whether the two objects have an intersection. If the function returns True, an "intersect" relationship is established.
[0089] For studying temporal order and intervals, climate change research might focus on temperature changes over different years, while urban expansion simulations might examine land use at different stages of development. In a knowledge graph, the time attributes of entities are used to mark sequentiality with timestamps, and temporal relationships are constructed by calculating the intervals between time points.
[0090] Consider a climate change research case involving two time points: the "global average annual temperature record in 2000," whose time attribute is 2000, and the "global average annual temperature record in 2010," whose time attribute is 2010. These two time points are assigned a sequential marker, indicating that 2000 precedes 2010 in the time series. The time interval between the two time points is calculated to be 10 years. The temporal relationship is stored in a knowledge graph, using a triple (global average annual temperature record in 2000, 10 years earlier, global average annual temperature record in 2010) to represent the change in temperature during this period.
[0091] Imagine two geographic models, Model A and Model B. Model A is a basic water resource management model used to simulate water flow and quality in a specific watershed. Over time, researchers have modified and expanded Model A to better understand the impacts of climate change on water resources, ultimately developing Model B.
[0092] S106: Reasoning about relationships between unstructured entities of the same category based on representation learning methods.
[0093] First, we identify unstructured entities, including model usage, data description, research objectives, etc. Although these entities lack clear structured attributes, they contain rich semantic content and are crucial for understanding the overall picture of geographic modeling cases.
[0094] Next, these unstructured entities are vectorized using word embedding models (such as Word2Vec and GloVe) and document vectorization models (such as BERT and TF-IDF). Word embedding models convert individual words into dense vectors that capture the semantic information of the words. Document vectorization models, on the other hand, process the entire document and convert it into a fixed-length vector that contains the semantic features of the document.
[0095] After vectorization, each unstructured entity is represented as a vector in a high-dimensional space. In this space, semantically similar entities have similar vector representations. Leveraging this property, we can quantify the semantic similarity between entities by calculating the distance between two vectors (such as Euclidean distance or cosine similarity) and infer the similarity relationship between them by setting a threshold, as follows:
[0096] R V ={(e i ,e h )∣∣C i =C j andd(v i ,v j )≤θ}, v=Vectorize(e)
[0097] Among them, C i It is entity e i Type, C j It is entity e j Type, v is the vector after the unstructured entity e is mapped to the vector space using the vectorization model Vectorize (such as word embedding model or document vectorization model); d is the calculation of v i and v jThe distance between entities is measured in different ways, including but not limited to Euclidean distance, cosine similarity, etc.; θ is the set distance threshold, when entity e i and e j The vectorized distance d(v i ,v j ) is less than or equal to the threshold, then the entity e i and e j There is a similarity relationship between them;
[0098] The relationships that can be constructed in this way include, but are not limited to, similar relationships between research objectives, correlations between research conclusions, and similar relationships between research objects. These newly added relationships, together with the second-level knowledge graph, form the third-level knowledge graph.
[0099] Taking the examples of "Evaluating the Cooling Potential of Rooftop PV" and "Estimating the Emission Reductions of Rooftop PV Systems," we used the pre-trained BERT model to obtain their vectorized representations. We used cosine similarity to measure the similarity between the two vectors, ranging from -1 (complete dissimilarity) to 1 (complete similarity). We set a threshold of 0.5. When the value exceeded this threshold, we constructed a semantic similarity relationship in the graph, representing it as a triplet: "Evaluating the Cooling Potential of Rooftop PV, Similarity, Estimating the Emission Reductions of Rooftop PV Systems."
[0100] The geographic modeling case knowledge graph constructed through the technical solution provided by this invention not only provides a rich knowledge resource library for researchers in the field of geographic modeling and simulation, but also provides a powerful tool and platform for further knowledge discovery, case analysis, and decision support. As knowledge continues to accumulate and update, this knowledge graph will become a valuable asset in the field of geographic modeling, bringing far-reaching impacts to academic research and practical applications.
[0101] Based on the same inventive concept, the embodiment of the present disclosure also provides a geographic modeling case knowledge graph construction device 40, such as Figure 4 As shown, the device 40 includes:
[0102] A structure design module 401 is used to design the categories and attributes of entities in the geographic modeling case knowledge graph;
[0103] The knowledge extraction module 402 is used to extract entities in the geographic modeling case;
[0104] The intra-case relationship building module 403 is used to infer the modeling process relationship between any two entities extracted from the same geographic modeling case and store it in the Neo4j database;
[0105] A batch case extraction module 404 is used to adjust the extraction strategy according to the number of geographic modeling cases to perform entity extraction and relationship construction tasks on the geographic modeling cases in batches;
[0106] The structured entity relationship reasoning module 405 is used to reason about the relationships between structured entities of the same category between different geographic modeling cases;
[0107] The unstructured entity relationship reasoning module 406 is used to reason about the relationships between unstructured entities of the same category between different geographic modeling cases.
[0108] Based on the same technical solution, the present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the method for constructing the geographic modeling case knowledge graph is implemented.
[0109] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0110] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0111] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0113] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various simple modifications can be made to the technical solution of the present invention, and these simple modifications all fall within the scope of protection of the present invention.
[0114] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. To avoid unnecessary repetition, the present invention will not further describe various possible combinations.
[0115] In addition, the various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the present invention, they should also be regarded as the content of the present invention.
Claims
1. A method for constructing a geographic modeling case knowledge graph, characterized in that: The following steps are involved: Step 1: Define the entity types and entity attributes of the geographic modeling case knowledge graph; Step 2: Extract entities in geographic modeling cases; Step 3: Infer the modeling process relationship between the entities extracted from the same geographic modeling case to form a first-level graph; Step 4: Infer the relationships between structured entities of the same category across different geographic modeling cases and construct the second-level graph; Step 5: Infer the relationships between unstructured entities of the same category across different geographic modeling cases and construct the third-level graph; Step 6: Complete the construction of the geographic modeling case knowledge graph; Step 4 is as follows: The relationships between structured entities of the same category across different geographic modeling cases include: Spatial relationships: Among them, C i It is entity e i Category, C j It is entity e j Category, R T It is entity e i and e j The spatial relationship set between ij It is entity e i The spatial range attribute S i With entity e j The spatial range attribute S j The topological relationship between them; Time relationship: R T ={(e i ,e j )|C i =C j andΔT ij ≤ΔT max } Among them, R T It is entity e i and e j The set of time relations between ij It is entity e i The timestamp attribute T i With entity e j The timestamp attribute T j The time interval between max is the set time interval threshold; Derived pair relationship: R D ={(e i ,e j )|C i =C j and B i =B j } Among them, R D It is entity e i and e j The derived pair relationship set between B i and B j It is entity e i and e j Basic model properties of; The relationships between the same type of structured entities in the above different geographic modeling cases and the first level graph constitute the second level graph; Step 5 is as follows: Use the representation learning method to map unstructured entities to vector space, set a distance threshold, and build a similarity relationship for the corresponding unstructured entities when the distance between two vectors is less than the threshold, as follows: R S ={(e i ,e j )|C i =C j and d(v i ,v j )≤θ} Among them, C i It is entity e i Category, C j It is entity e j Category, v i , v j is the entity e i , e j The corresponding vector after the vector space; d is the calculation of v i and v j The function of the distance between them; θ is the distance threshold; The relationships between the same category of unstructured entities in the above different geographic modeling cases and the second-level graph constitute the third knowledge graph.
2. The method for constructing a geographic modeling case knowledge graph according to claim 1, characterized in that: The structure of the geographic modeling case knowledge graph is K = (E, R, P, L), R = R k ∪(R S ∪R T ∪R D )∪R V , where: E represents the set of entities; R represents the set of relations, R k is the set of modeling process relationships in the first level graph, R S ∪R T ∪R D is the set of relationships between structured entities of the same category between different geographic modeling cases in the second-level graph, R S is a spatial relationship, R T It is a time relationship, R D is a derivative pair relation, R V It is the set of relationships between unstructured entities of the same category between different geographic modeling cases in the third-level graph; P represents the set of attributes; L represents the set of categories.
3. The method for constructing a geographic modeling case knowledge graph according to claim 1, characterized in that: In step 1, entity types include purpose, object, mechanism, variable, model, application, and result; The attributes of an entity include model type, data type, base model, model structure, data resolution, research time, data spatial location, research field, and researchers.
4. The method for constructing a geographic modeling case knowledge graph according to claim 1, characterized in that: In step 2, Prompt is constructed to use the large language model to extract entities in the geographic modeling case. Prompt = f(T, C, R), where T provides a description of the extraction target and scope that the large language model can understand, C is a dictionary containing a detailed explanation of each concept in the modeling process, and R specifies the form of the large language model output.
5. The method for constructing a geographic modeling case knowledge graph according to claim 1, characterized in that: Step three is as follows: Based on the predefined entity relationships, the modeling process relationships between the extracted entities are inferred: R k (e i ,e j )=f(C i ,C j ,R) Among them, C i It is entity e i Category, C j It is entity e j Category, R is a predefined entity relationship set, f is a function that finds the corresponding relationship in the predefined entity relationship set according to the entity category and returns the result, R k (e i , e j ) is entity e i and e j Modeling process relationships between The above modeling process relationships and the entity types and entity attributes defined in step one constitute the first-level graph.
6. The method for constructing a geographic modeling case knowledge graph according to claim 1, characterized in that: After step 3 and before step 4, the process further includes: determining whether the number of geographic modeling cases is greater than 1; if so, executing steps 2 and 3 for each geographic modeling case in sequence before proceeding to step 4; otherwise, executing steps 2 and 3 before directly proceeding to step 6.
7. A device for constructing a geographic modeling case knowledge graph using the construction method of any one of claims 1 to 6, characterized in that: The device comprises: The structure design module is used to design the categories and attributes of entities in the geographic modeling case knowledge graph; Knowledge extraction module, used to extract entities in geographic modeling cases; The intra-case relationship building module is used to infer the modeling process relationships between entities extracted from the same geographic modeling case and store them in the Neo4j database; Batch extraction case module, which is used to adjust the extraction strategy according to the number of geographic modeling cases, so as to perform entity extraction and relationship construction tasks on geographic modeling cases in batches; The structured entity relationship reasoning module infers the relationships between structured entities of the same category across different geographic modeling cases; The unstructured entity relationship reasoning module is used to reason about the relationships between unstructured entities of the same category across different geographic modeling cases.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed, implements the method for constructing a geographic modeling case knowledge graph as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Ecological restoration project full life cycle tracing method based on large language model
CN117151659A
Cited By
Multi-scale dynamic space-time geographic map automatic construction method based on vector data
CN122309626A