Method for quickly constructing knowledge graph by using structured spatial data

By extracting geographic entity attributes and spatial relationships, importing them into the Neo4j graph database using Cypher statements, and constructing a knowledge graph of structured spatial data, the problem of quickly constructing knowledge graphs in existing technologies is solved, and efficient, low-threshold entity expression and rapid retrieval are achieved.

CN120705358APending Publication Date: 2025-09-26CHONGQING INST OF SURVEYING & MAPPING SCI & TECH (CHONGQING MAP COMPILATION CENT)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510786756.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing technologies make it difficult to quickly, efficiently, and low-threshold build knowledge graphs of structured spatial data, especially in the automatic extraction of entities and their spatial relationships in complex spatial computing and semantic technology processes.

Method used

A method for quickly constructing a knowledge graph from structured spatial data is designed. By extracting geographic entity attributes and spatial relationships, the data are imported into the Neo4j graph database using Cypher statements to form entity-relationship-entity triples, and data validation and preprocessing are performed.

Benefits of technology

It realizes efficient and low-threshold expression of structured spatial data entities and relationships, supports rapid retrieval and query of massive entities, and promotes the large-scale implementation of knowledge graphs in vertical fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705358A_ABST
    Figure CN120705358A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of surveying and mapping geographic information science, in particular to a method for quickly constructing a knowledge graph based on structured spatial data, which comprises the following specific steps of: classifying according to expressed entity objects to obtain structured spatial data corresponding to each type of entities, and uniquely coding the structured spatial data of each type of geographic entities to obtain a unique coding result; connecting attribute information corresponding to each type of entity objects according to the codes; extracting different types of entity types, attributes and relation constraints, and analyzing a topological relation between the entities by utilizing mapping of keywords and codes of an attribute table; discovering an implicit relationship between entities through path reasoning or correlation analysis, and storing the mined topological relationship and implicit relationship in CSV; the method comprises the following steps: importing CSV data into a graph database in batches through a Cypher statement to form a structured spatial data RDF triple; and on the basis of the characteristics of strong interactivity, clear entities and relationships and the like of the knowledge graph, rapid retrieval and query of massive entities can be well supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of surveying, mapping and geographic information science and technology, and in particular to a method for rapidly constructing a knowledge graph from structured spatial data. Background Art

[0002] Structured data is typically stored and managed in the form of tables, layers, and databases. With the development of the internet and the acceleration of digitalization, the amount of global data is growing exponentially. Traditional data management models are no longer able to meet the requirements for efficient organization and deep mining of massive amounts of structured data. Knowledge graphs, as a semantic network based on graph structures, enable systematic expression, reasoning, and application of knowledge. Rapidly constructing knowledge graphs has become a core requirement for coping with data complexity and improving application efficiency. Summarizing current research progress, the construction of knowledge graphs for structured spatial data takes into account both the geometric characteristics and semantic associations of the data. It is a complex spatial computing and semantic technology process, constructed through a process of "data modeling and ontology design - knowledge extraction and conversion - knowledge fusion and alignment - storage and query optimization." Each step requires professional knowledge and expertise, and current research has not yet effectively addressed the automatic extraction of entities and their spatial relationships.

[0003] Therefore, how to construct a knowledge graph of structured spatial data more quickly, efficiently, and with lower thresholds to support complex geographical reasoning and applications has become an important research topic. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of the existing technology and to propose a method for quickly constructing a knowledge graph from structured spatial data.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] Design a method to quickly construct a knowledge graph from structured spatial data. The specific steps are as follows:

[0007] S1: Select structured spatial data based on the location, size, and shape characteristics of geographic entities that need to be expressed in the physical world, extract geographic entity attributes, coordinates, area, elevation, and explicit spatial relationships, and express them in the form of graphics and attributes;

[0008] S2: For physical objects in the physical world, classify them according to the entity objects they express, obtain the structured spatial data corresponding to each type of physical world entity, assign unique coding information, and synchronize the attribute information corresponding to each type of structured spatial data;

[0009] S3: Extract different types of geographic entities, attributes, and relationship constraints. Based on the spatial relationships between different geographic entities, use the keyword mapping in the attribute table to parse the topological relationships between entities. Write the parsed topological relationships into the attribute table, sort out the relevant field names and field types, and form the corresponding entity, attribute, and relationship information.

[0010] S4: Mining indirect relationships between entities. This method uses path reasoning or association analysis to discover implicit relationships between entities, forming entity tables and relationship tables. After intelligent processing, the resulting data is stored in a CSV file.

[0011] S5: perform corresponding preprocessing on the CSV table data;

[0012] S6: Import CSV data into the graph database in batches using Cypher statements to form structured spatial data RDF triples (entity-relationship-entity);

[0013] S7: Data verification, correct and verify the data after parsing the CSV table data.

[0014] Preferably, the structured spatial data referred to in step S1 is determined according to the specific situation of the physical world geographic entity to be expressed, and point data expression, line data expression and surface data expression are selected, null values ​​and redundant records are removed, the format is unified, similarity calculation is performed to remove duplicates, and phase data cleaning and normalization are carried out.

[0015] Preferably, in step S2, according to the complexity and structural characteristics of the geographic entity, it is divided into different layers according to the basic units that can express the entity. Each layer corresponds to expressing a different geographic entity in the physical world, and ensures that the attributes and scale of the geographic entity corresponding to each layer are complete. That is, if a spatial scale mutation occurs in each layer, the attribute information of the layer after the mutation will also change accordingly, and can mainly express an entity with a complete structure and unified scale independently and accurately.

[0016] Preferably, in step S5, the preprocessing includes: merging multiple row and column headers, synchronizing multiple sheets, checking whether the file format is correct, assigning a unique code, and handling attribute conflicts using a timestamp or data source.

[0017] Preferably, in step S7, the main contents of the verification include: viewing data, editing data, deleting all entity data, deleting a column, deleting a relationship, deleting the associated relationship data when deleting an entity, selecting a processing strategy for duplicate data, overwriting or ignoring.

[0018] The present invention proposes a method for rapidly constructing a knowledge graph from structured spatial data, which has the following beneficial effects:

[0019] 1: Highly efficient and low-threshold way to express structured spatial data entities and relationship knowledge graphs. It is a highly interactive and low-threshold way to express spatial entities.

[0020] 2: Relying on the strong interactivity of knowledge graphs and clear entities and relationships, it can well support the rapid retrieval and query of massive entities.

[0021] 3: Compared with the traditional management method of structured spatial data, this method constructs the spatial data entity-relationship-entity triple knowledge graph with less manual intervention, low threshold and high efficiency, which promotes the large-scale implementation of knowledge graphs in vertical fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a flowchart of a method proposed in the present invention for rapidly constructing a knowledge graph from structured spatial data. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0024] Reference Figure 1 , a new method for quickly constructing knowledge graph expressions from structured spatial data, including the following steps:

[0025] S1, according to the type of geographic entity in the physical world, extracts the entity location, size, shape and attributes (name, type, coordinates) in the structured spatial data;

[0026] In this example, a district entity category is selected to obtain entity subsets, where n1 represents the building entity category, n2 represents the green space entity category, and n3 represents the road entity category. The set of all entities is N = {n1, n2, n3}. Each entity category has multiple data items, which are represented by n tables. 1= {n 11 , n 12, n 13, n 14 , n 15,……, n 1n}, n 2= {n 21 , n 22, n 23, n 24 , n 25,……, n 2n}, n3={n 31 , n 32, n 33, n 34 , n 35,……, n3n It is used to express the physical location and shape of buildings, green squares, and roads in terms of space, and to express the name, type, and area of ​​buildings, roads, and green squares in terms of attributes;

[0027] S2, each type of spatial vector data is assigned unique coding information;

[0028] In this example, three types of geographic entities are selected, namely buildings (n1), roads (n2) and green squares (n3). Each type of entity is encoded according to the principles of uniqueness, applicability, compatibility, etc., using a coding paradigm divided into three sections: "proprietary identification domain + standard domain + extended domain". The proprietary identification domain is 6 bits, consisting of a 2-bit root identifier code and a 4-bit land space unit special code; the standard domain is 29 bits, consisting of a 1-bit management unit hierarchical code, a 2-bit standard unit classification code, and a 26-bit Beidou grid location code; the extended domain is reserved for spatiotemporal data governance and reference, such as the description of time tags and rich scenario dimensions of urban governance; for example, the code for the name "kindergarten" in this example is "CBB82B140D309D00002301D000000000000".

[0029]

[0030] S3, write different topological relationships into the attribute table to form a relationship table and the attribute table is stored in CSV;

[0031] The topological relationship judgment this time uses the nine-intersection model, which divides spatial geometric elements into three parts: interior, boundary, and exterior. The topological relationship between spatial elements is represented by the intersection of these three parts between any two geometric elements.

[0032] Given two geometric objects A and B, the intersection of the interior (I), boundary (B), and exterior (E) of A and B form a classic 3*3 intersection matrix:

[0033]

[0034] Here, dim() represents the intersection dimension, where the dimension of a point is 0, the dimension of a line is 1, the dimension of a surface is 2, and the dimension of an empty set is F. The intersection dimension of two elements will not exceed the minimum of the two dimensions.

[0035] In this example, for example, the spatial relationship between n1 and n3, the spatial topological relationship between different buildings and different green squares is determined, and the result set is T = {separate (distance value), adjacent, intersecting, containing, overlapping}. Then, corresponding to each spatial relationship, different subsets can be obtained, and a total of 5 topological relationship subsets are obtained;

[0036] Assume that T1 represents the phase separation. In this example, T1 = {dist1, dist2, dist3, ..., dist n}

[0037] Assume that T2 represents overlap. In this example, T2 = {Overlay, Crosses}

[0038] Assume that T3 represents containment. In this example, T3 = {Contain, Covers}

[0039] Assume that T4 represents equality. In this example, T4 = {Equal}

[0040] Assume that T5 represents the interior. In this example, T5 = {Cover, Within}

[0041] Among them, dist means distance, Overlay means overlap, Crosses means span, Contain means contain, Covers means cover, Equal means equal, and within means inside;

[0042] For the three types of entities n1, n2, and n3, a spatial analysis method is used to map the spatial topological relationships between different entities, complete the topological relationship calculation of these three types of entity data, and store the calculation results in the attribute table of a certain type of entity (building) in the DIST field;

[0043] Use intelligent means to export entity tables and relationship tables and store them in CSV;

[0044] S4, CSV data processing (parallel columns, multi-sheet forms, correct file format);

[0045] Perform data processing on CSV attribute tables and relationship tables of buildings, roads, and green squares, including file formatting, collating columns, etc.

[0046] S5, through the NoSQL graph database Neo4j, using cypher statements, writes the attribute table and relationship table into the graph database, and completes the knowledge graph construction and visualization expression;

[0047] In this example, with the help of Neo4j graph database software, Cypher statements are used to import data into the graph database.

[0048] LOAD CSV WITH HEADERS FROM'file: / / / building.csv'AS row

[0049] CREATE(p:Building{name:row.name, area:

[0050] row.area,relationship:row.relationship)});

[0051] After importing, the nodes and node relationships of buildings, roads, green spaces and squares are formed;

[0052] Store in a graph database for visualization;

[0053] Neo4j is a high-performance NOSQL graph database that stores structured data on the network instead of in tables. It is an embedded, disk-based Java persistence engine with full transactional features. Neo4j can also be seen as a high-performance graph engine with all the features of a mature database.

[0054] S6, data validation, stores the parsed data from the CSV table into the graph database and performs flexibility monitoring and correction again. The main contents include: data can be viewed and edited, all data of an entity can be deleted, a column can be deleted, and relationships can be deleted. When deleting an entity, the associated relationship data will also be deleted. The processing strategy for duplicate data can be selected, such as overwriting or ignoring.

[0055] Next, according to application requirements, knowledge graph nodes can be added, copied, deleted, etc. flexibly and conveniently through Cypher statements. Various mathematical calculations such as calculation and area statistics can also be performed according to application requirements.

[0056] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A method for rapidly constructing a knowledge graph from structured spatial data, characterized in that: The specific steps are as follows: S1: Select structured spatial data based on the location, size, and shape characteristics of geographic entities that need to be expressed in the physical world, extract geographic entity attributes, coordinates, area, elevation, and explicit spatial relationships, and express them in the form of graphics and attributes; S2: Select physical objects in the physical world, perform geographic entity classification, obtain structured spatial data corresponding to each type of physical world entity, assign unique coding information, and synchronize the corresponding attribute information of each type of structured spatial data; S3: Extracts different types of geographic entities, attributes, and relationship constraints. Maps the spatial relationships between different entities using the keywords and unique codes in the attribute table. Analyzes the topological relationships between entities. Writes the analyzed topological relationships into the attribute table. Sorting out relevant field names and field types to generate corresponding entity, attribute, and relationship information. S4: Mining indirect relationships between entities. This method uses path reasoning or association analysis to discover implicit relationships between entities, forming entity tables and relationship tables. After intelligent processing, the entities and relationships are stored in CSV files. S5: Preprocess the data in the CSV file accordingly; S6: Use Cypher statements to batch import data from CSV files into a graph database to form RDF triples of structured spatial data. Use Neo4J to visualize entity-relationship-entity relationships. S7: Data verification: the parsing results of the data in the CSV file are corrected and verified again.

2. The method for rapidly constructing a knowledge graph from structured spatial data according to claim 1, characterized in that: The structured spatial data referred to in step S1 is determined according to the specific situation of the physical world geographic entity to be expressed, and is selected to express point data, line data, and surface data, remove null values ​​and redundant records, unify the format, calculate similarity to remove duplicates, and carry out phase data cleaning and normalization.

3. The method for rapidly constructing a knowledge graph from structured spatial data according to claim 1, characterized in that: In step S2, based on the complexity and structural characteristics of the geographic entity, it is divided into different layers according to the basic units that can express the entity. Each layer corresponds to expressing a different geographic entity in the physical world, and ensures that the entity attributes corresponding to each layer are complete and the scale is complete. That is, if a spatial scale mutation occurs in each layer, the attribute information of the layer after the mutation will also change accordingly, and it can mainly express an entity with a complete structure and unified scale independently and accurately.

4. The method for rapidly constructing a knowledge graph from structured spatial data according to claim 1, characterized in that: In step S5, preprocessing includes: merging multiple row and column headers, synchronizing multiple sheets, checking whether the file format is correct, assigning a unique code, and handling attribute conflicts using timestamps or data sources.

5. The method for rapidly constructing a knowledge graph from structured spatial data according to claim 1, characterized in that: In step S7, the main contents of the verification include: viewing data, editing data, deleting all entity data, deleting a column, deleting a relationship, deleting the associated relationship data when deleting an entity, selecting a processing strategy for duplicate data, overwriting or ignoring.

Citation Information

Cited By

  • Common neighbor relation mining method and system based on graph calculation and mass data

    CN120950773A