Geographic modeling case knowledge graph construction method and device and storage medium
By defining entity types and attributes, extracting entities and inferring relationships, and building a multi-level geographic modeling knowledge graph, the problems of integration and utilization of geographic modeling knowledge and relationship reasoning are solved, the organization and retrieval efficiency of knowledge is improved, and the knowledge graph is enhanced. Practicality.
Patent Information
- Application Number
- CN202411131806.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-16
AI Technical Summary
The existing technology is difficult to effectively integrate and utilize geographic modeling knowledge, which leads to insufficient knowledge sharing and reuse capabilities, and the construction of geographic modeling case knowledge graphs faces the challenges of accurate induction of entity relationships and complex relationship reasoning.
A method of constructing a geographic modeling case knowledge graph is designed, by defining entity types and attributes, extracting entities, inferring modeling process relationships, and constructing multi-level maps, including structured and unstructured relationships between entities, using large language models and It indicates that learning technology realizes the construction of knowledge graph.
It improves the organization and retrieval efficiency of geographical modeling knowledge, enhances the practicality and accuracy of knowledge graphs, and supports research and application in the fields of geographical modeling and simulation.
Smart Images

Figure CN119166730A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of geographic modeling and simulation, and relates to a knowledge graph, 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 technology, geographic modeling is playing an increasingly important role in many key areas such as urban planning, environmental monitoring, and resource management. Geographic modelers simulate the distribution characteristics and change processes of geographic spatial data by building specific models, providing decision makers with powerful analytical examples. However, current research focuses on the analysis of a single case, ignoring the importance of extracting and integrating implicit knowledge from a large number of cases, which limits the ability to share and reuse geographic modeling knowledge.
[0003] Knowledge itself is complex and multi-layered. Each conceptual entity contains rich connotations and maintains complex connections with many other entities. Faced with this complexity, it is almost impossible to convert knowledge into a machine-readable format without appropriate tools. In order to solve this problem, the knowledge graph was designed. It is a semantic network that builds a collection of descriptions of the links between entities by revealing the relationships between different entities.
[0004] In the era of big data, how to efficiently organize, manage and utilize the knowledge in geographic modeling cases has become an urgent problem that needs to be answered. As a structured semantic knowledge base, knowledge graph provides a new solution for the integration of geographic modeling knowledge. However, building a knowledge graph of geographic modeling cases is not without challenges: first, the geographic modeling process involves many concepts. How to accurately summarize and define the relationship between them is the basis for building a knowledge graph; second, the relationship between entities in geographic modeling cases is complex and diverse, including the modeling process relationship within the case and the structured and unstructured relationship between cases. How to accurately infer these relationships is the 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: Reasoning the relationships between structured entities of the same category between different geographic modeling cases and constructing the second-level graph;
[0012] Step 5: Reasoning the relationships between unstructured entities of the same category between different geographic modeling cases and constructing 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 the spatial relationship, R T It is a matter of time. D is the derived 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, in step 1, entity types 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 extract entities in the geographic modeling case using the large language model, 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] The modeling process relationship between the extracted entities is inferred based on the predefined entity relationship:
[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 R is a predefined entity relationship set, f is a function that searches for 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 three and before step four, it also includes: determining whether the number of geographic modeling cases is greater than 1, and if so, executing steps two and three for each geographic modeling case in sequence, and then proceeding to step four; otherwise, executing steps two and three, and directly proceeding to step six.
[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 The 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 time relationship set between them, ΔT 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 them, B i and B j It is entity e i and e j The basic model properties of
[0036] The relationships between the same category of 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] The unstructured entities are mapped to the vector space using the representation learning method, and a distance threshold is set. When the distance between two vectors is less than the threshold, a similarity relationship is constructed for the corresponding unstructured entities, 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 The 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 knowledge graph of geographic modeling cases;
[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 relationship between entities extracted from the same geographic modeling case and store it 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 is used to reason about the relationships between structured entities of the same category between 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 between 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] The present invention proposes a method for constructing a knowledge graph of geographic modeling cases, especially by adding the spatiotemporal characteristics of geographic entities when reasoning about entity relationships, aiming to improve the organization and retrieval efficiency of geographic modeling knowledge, enhance the practicality and accuracy of knowledge graphs, 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 in 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 view of the problem that the organization and retrieval of existing geographic modeling cases are not perfect, the present invention 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, constructs relationships between entities in the same case based on the designed relationships after extracting the entities, and then infers the relationships between entities of the same type in different cases through predefined rules and representation learning to obtain a geographic modeling case knowledge graph. The specific method flow chart is shown in 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 is worth noting that an entity refers to something that exists objectively and can be distinguished from each other. For the geographic modeling process, entities include but are not limited to core elements such as purpose, object, mechanism, variable, model, application and result. In addition, the above-mentioned geographic modeling cases can include academic papers in the field of geoscience, model usage tutorials and related software operation documents, etc., which contain materials that contain a relatively complete geographic modeling process and enrich the source of knowledge. The attributes of an entity include but are not limited to model type, data type, basic model, model structure, data resolution, research time, data spatial location, research field and researchers.
[0060] In this embodiment, the "purpose" type refers to the purpose expected to be achieved in the modeling case, and the attributes should include the purpose description, research field and the problem to be solved; the "object" type refers to the specific research object of concern in the modeling process, and the attributes should include the object description and the region to which it belongs; the "mechanism" type refers to the scientific principles and processes behind the construction of the model, and the attributes should include the mechanism description; the "variable" type refers to all the geographic spatiotemporal data and other types of data required in the modeling process, and the 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 geographical phenomena or fit data characteristics, and the attributes should include the model name, model structure, model parameters and operating environment; the "application" type refers to the export of the model, what kind of field it is applied in and what problems it solves, and the attributes should include the application method, field to which it belongs and the 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 the attributes should include 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 building prompt words. Figure 2 This is an example of constructing a prompt word provided in this embodiment. The structure of the prompt word is Prompt=
[0063] f(T,C,R); T provides a high-level description of the entire task to ensure that the large model understands the goal and scope of the extraction; C describes the designed entity type, which contains a detailed explanation of each core concept in the modeling process; R limits the large language model to only return content directly related to the entity structure of the geographic modeling process and output it in JSON format. This means that the large language model not only needs to identify entities in the text, but also needs to match these entities with the definition of the target entity. Such limitations greatly improve the relevance and usability of the extraction results.
[0064] S103, constructing entity relationships of the extracted entities according to the designed relationships.
[0065] Combine the extracted entities with the original case text, and infer the association between the two entities based on the designed modeling process relationship, including but not limited to the use of models, construction of models, use of data, research objects, research conclusions, 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, together with 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 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 conditions, and the present invention does not limit this.
[0070] According to the designed relational model in this embodiment, a process relation is constructed for the extracted entities. For example, if the "purpose" entity of a case is "flood prediction", then the variable entities directly associated with it may include "rainfall", "terrain", etc., and the model entity may be "hydrological model".
[0071] In order to effectively represent these relationships, the association between entity pairs is stored in the form of triples (Subject, Predicate, Object). In the triple, Subject and Object represent entities, while Predicate represents the relationship between entities. For example, (flood prediction, usage model, hydrological model) is a triple that represents the relationship between the target entity and the model entity.
[0072] After completing the construction of the triples, these entity relationships are digitized and stored in the Neo4j graph database. Neo4j is a popular high-performance NoSQL graph database that stores data as a graph structure, which is particularly suitable for processing data with complex relationships and high interconnection. 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, check the number of cases in the target case library. If the number of cases is greater than 1, perform step 2 for each case in the case library, that is, use the large language model to analyze the case text and extract the core concept entities related to the geographic modeling process. Then, perform step 3 to connect these entities according to the predefined modeling process relationship, establish the relationship between entities, and store them in the Neo4j database. If the number of cases is 1, skip the loop and go directly to the next step.
[0075] S105: Reasoning the relationship between structured entities of the same category based on predefined rules.
[0076] Structured entities usually have a clear hierarchy or topological relationship, 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 topological relationship.
[0077] For the spatial proximity, inclusion, and intersection between structured entities, a study area may be adjacent to another study area, and a watershed may be composed of multiple sub-watersheds. These relationships can be identified and calculated by using spatial analysis tools after obtaining the geographic scope in the "object" entity. In the knowledge graph, the special properties of these spatial relationships are used to define the corresponding spatial topology rules to build 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 the 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 (e.g., 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 attribute 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 i and B j It is entity e i and e j If the two base models are the same, then 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" 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 Nanjing is completely contained in the polygon of the Yangtze River Delta; the Boolean value returned by the function is used as the basis for whether to create a "containment" relationship between the two entities. If the result is True, a spatial relationship is added to the knowledge graph and represented by a triple (Yangtze River Delta, containment, Nanjing); if the result is False, the "Intersects" function is called to determine whether the two objects have an intersection. If the result returned by the function is True, an "intersection" relationship is constructed.
[0089] For studying the order and interval of time, climate change research may focus on temperature changes in different years, and urban expansion simulation may involve land use in different development stages. In the knowledge graph, the time attribute of the entity is used to mark the order of timestamps, and the time relationship is constructed by calculating the intervals between time points.
[0090] Consider a case study of climate change, which includes two time points: the time attribute of the global average annual temperature record in 2000 is 2000, and the time attribute of the global average annual temperature record in 2010 is 2010. Give these two time points a sequential tag, indicating that 2000 precedes 2010 in the time series. Calculate the time interval between the two time points, that is, 10 years, store the time relationship in the knowledge graph, and use the triple (the global average annual temperature record in 2000, 10 years earlier, the global average annual temperature record in 2010) to represent the change in temperature records during this period.
[0091] Suppose we have two geographic models, Model A and Model B. Model A is a basic water resource management model that simulates water flow and water quality in a specific watershed. Over time, researchers have made a series of modifications and extensions to Model A to better understand the impact of climate change on water resources, and finally developed Model B.
[0092] S106: Reasoning about relationships between unstructured entities of the same category based on representation learning methods.
[0093] First, unstructured entities are identified, including model purpose, data description, research purpose, etc. Although these entities lack clear structured attributes, they contain rich semantic content and are crucial to understanding the full picture of geographic modeling cases.
[0094] Next, these unstructured entities are vectorized using word embedding models (such as Word2Vec, GloVe) and document vectorization models (such as BERT, TF-IDF). The word embedding model can convert a single word into a dense vector that captures the semantic information of the word. The document vectorization model can 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 will have similar vector representations. Using this feature, the semantic similarity between entities is quantified by calculating the distance between two vectors (such as Euclidean distance, cosine similarity), and the similarity relationship between them is inferred 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 The type of v is the vector after the unstructured entity e is mapped to the vector space using the vectorization model Vectorize (such as the word embedding model or the 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. 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 similar relationship between them;
[0098] The relationships that can be constructed in this way include but are not limited to similar relationships between research purposes, related relationships between research conclusions, and similar relationships between research objects. The above newly added relationships together with the second-level knowledge graph constitute the third-level knowledge graph.
[0099] Taking "Evaluating the cooling potential of rooftop photovoltaics" and "Estimating the emission reduction of rooftop photovoltaic systems" as examples, the pre-trained BERT model is used to obtain their vectorized representation, and the cosine similarity is used to measure the similarity between the two vectors, with the similarity value ranging from -1 (completely dissimilar) to 1 (completely similar). The threshold is set to 0.5. When it is greater than this value, a semantic similarity relationship is constructed in the graph, and it is represented by a triple (evaluating the cooling potential of rooftop photovoltaics, similarity, estimating the emission reduction of rooftop photovoltaic systems).
[0100] The geographic modeling case knowledge graph constructed by the technical solution provided by the present 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. With the continuous accumulation and updating of knowledge, 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 of the geographic modeling case knowledge graph;
[0103] A knowledge extraction module 402 is used to extract entities in geographic modeling cases;
[0104] The intra-case relationship building module 403 is used to infer the modeling process relationship between two entities extracted from the same geographic modeling case and store it in the Neo4j database;
[0105] A batch extraction case 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 relationship 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 relationship 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] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, 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 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 flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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 flowchart and / or block diagram. 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 capable of directing a computer or other programmable data processing device to operate 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 A 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 operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions 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, a variety of simple modifications can be made to the technical solution of the present invention, and these simple modifications all belong to the protection scope 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 suitable manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.
[0115] In addition, 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: Reasoning the relationships between structured entities of the same category between different geographic modeling cases and constructing the second-level graph; Step 5: Reasoning the relationships between unstructured entities of the same category between different geographic modeling cases and constructing the third-level graph; Step 6: Complete the construction of the geographic modeling case knowledge graph.
2. The method for constructing a geographic modeling case knowledge graph according to claim 1, characterized in that: The structure of the knowledge graph of geographic modeling cases 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 the spatial relationship, R T It is a matter of time. D is the derived 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, we construct Prompt to extract entities in geographic modeling cases using a large language model. Prompt = f(T,C,R), where T provides a description of the extraction goals 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 3 is as follows: The modeling process relationship between the extracted entities is inferred based on the predefined entity relationship: 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 R is a predefined entity relationship set, f is a function that searches for 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 method further includes: determining whether the number of geographic modeling cases is greater than 1; if so, executing steps 2 and 3 in sequence for each geographic modeling case, and then proceeding to step 4; otherwise, executing steps 2 and 3, and then directly proceeding to step 6.
7. The method for constructing a geographic modeling case knowledge graph according to claim 1, characterized in that: Step 5 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 The 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 time relationship set between them, ΔT 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 andB i =B j } Among them, R D It is entity e i and e j The derived pair relationship set between i and B j It is entity e i and e j The basic model properties of The relationships between the same category of structured entities in the above different geographic modeling cases and the first-level graph constitute the second-level graph.
8. The method for constructing a geographic modeling case knowledge graph according to claim 1, characterized in that: Step 6 is as follows: The unstructured entities are mapped to the vector space using the representation learning method, and a distance threshold is set. When the distance between two vectors is less than the threshold, a similarity relationship is constructed for the corresponding unstructured entities, as follows: R S ={(e i ,e j )∣∣C i =C j andd(v i ,v j )≤θ} Among them, C i It is entity e i Category, C j It is entity e j The 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.
9. A device for constructing a knowledge graph of geographic modeling cases, characterized in that: The device comprises: The structure design module is used to design the categories and attributes of entities in the knowledge graph of geographic modeling cases; Knowledge extraction module, used to extract entities in geographic modeling cases; The intra-case relationship building module is used to infer the modeling process relationship between entities extracted from the same geographic modeling case and store it 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 is used to reason about the relationships between structured entities of the same category between different geographic modeling cases; The unstructured entity relationship reasoning module is used to reason about the relationships between unstructured entities of the same category between different geographic modeling cases.
10. 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-8.
Citation Information
Patent Citations
Knowledge graph construction method and system, computer equipment and storage medium
CN116775906A
Ecological restoration project full life cycle tracing method based on large language model
CN117151659A
Method and system for constructing knowledge graph by extracting triples from large model, and medium
CN117273132A
Document complex knowledge object extraction method fusing knowledge graph and large language model
CN117725222A
Large language model question and answer method and device based on cervical vertebra disease knowledge graph
CN118377875A
