Automatic construction method and system of knowledge graph for geographic entities
By building structure trees and extracting paths, combining natural semantic recognition and entity linking technology, extracting and organizing information related to geographic entities from large-scale geographic data, the problem that existing technology cannot automatically process geographic data is solved, and efficient information fusion and knowledge graph construction are achieved.
Patent Information
- Application Number
- CN202410842889.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-06-27
AI Technical Summary
The prior art cannot use automation technology to extract, converge and organize information related to geographic entities from large-scale geographic data.
By calling script components, obtaining the database type and location nodes of the geographic data system, building a structure tree and extracting paths, using the task manager and data recognition unit to perform natural semantic recognition, building entity links and semantic relationship tables, and forming a knowledge graph of geographic entities.
The ability to extract, converge and organize information related to geographic entities from large-scale geographic data is realized, the efficiency of entity recognition and linking is improved, and the semantic relationships between geographic entities are automatically extracted.
Smart Images

Figure CN118708733B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of constructing knowledge graphs of geographic data, and in particular to a method and system for automatically constructing a knowledge graph oriented to geographic entities. Background Art
[0002] In the process of data extraction and identification, knowledge graphs are used as tools for extraction, identification and analysis. Different data require different knowledge graphs. Conventional technology is implemented through some data models. For example, the patent document with the publication number "CN113139065A" discloses a method for constructing a hybrid knowledge graph that integrates geographic knowledge. The method mainly includes the following steps: First, for some entities with geographic knowledge attributes in the existing knowledge graph, a geographic knowledge model in the hybrid knowledge graph is designed. Secondly, according to the constructed model, the structured or semi-structured knowledge of geographic entities is extracted and cleaned from the public geographic data sets and encyclopedic knowledge graphs containing geographic entities. Finally, a name dictionary of geographic entities is constructed, and according to the name dictionary, the entity linking work is performed on the geographic entity knowledge in the two data sources after processing to complete the integration of geographic knowledge and encyclopedic knowledge. The above technical means cannot use automation technology to extract, integrate and organize geographic entity related information from large-scale geographic data. Summary of the invention
[0003] In view of this, the main purpose of the present invention is to provide a method and system for automatically constructing a knowledge graph for geographic entities.
[0004] The technical solution adopted by the invention is as follows:
[0005] The automatic construction method of knowledge graph for geographic entities includes:
[0006] Call the script component, execute the database type query instruction, and obtain the database type of the geographic data system and the corresponding database location node;
[0007] Classifying the databases according to the database types, and constructing a structure tree according to the node relationships between the database location nodes, and constructing an extraction path according to the structure tree to extract the geographic data in the corresponding database, thereby forming a storage module with a structure tree;
[0008] Calling the task manager, when the task manager detects that the data extraction thread is enabled, the task manager forms a plurality of data identification units according to the configuration data identification model corresponding to the number of extraction threads to respectively perform natural semantic identification on the geographic data extracted by the corresponding extraction threads to obtain geographic entities;
[0009] Constructing a corresponding entity link for each geographic entity, and associating the geographic entity with a database of a geographic data system through the entity link;
[0010] Build a text mining database, associate the text mining database with the trained analysis model, analyze the text data contained in the geographic entities through the analysis model, and extract the semantic relationship between the geographic entities to form a semantic relationship table;
[0011] Performing an integral operation on the entity quantity of the geographic entity under each semantic relationship according to the semantic relationship table to obtain an integral value of the entity quantity of the geographic entity corresponding to each semantic relationship; and setting an active value of each semantic relationship according to the integral value;
[0012] The semantic relationships in the data entity and semantic relationship table are called to construct a primary knowledge graph of the geographic entity, and the primary knowledge graph is prioritized according to the active value of each semantic relationship to obtain a knowledge graph set of the geographic entity.
[0013] Furthermore, the geographic data includes one or more combinations of map data, text data and satellite images.
[0014] Furthermore, the structure tree is constructed in the following manner:
[0015] Create a constructor to point to the root node of the tree and get a parameterless structure tree;
[0016] Configure the hierarchy of each root node and the directory entry of the root node;
[0017] The parameters formed by the position nodes are written into the corresponding root nodes respectively according to the node relationship between the database position nodes, so that one root node corresponds to one database.
[0018] Further, constructing an extraction path according to the structure tree includes:
[0019] Call the structure tree's constructor;
[0020] The constructor is used to call the root nodes with actual parameters in sequence according to the hierarchical structure and the child-parent relationship. During the calling, an extraction path is configured for each root node, and the extraction path is associated with the root node.
[0021] Furthermore, the task manager forms a plurality of data recognition units according to the configuration data recognition model corresponding to the number of extraction threads to form a one-to-one correspondence with the extraction threads respectively, and performs natural semantic recognition on the geographic data extracted from the storage module having the structure tree through the data recognition unit.
[0022] Furthermore, the method of constructing a corresponding entity link for each geographic entity includes:
[0023] Get the root node corresponding to the geographic data in the storage module;
[0024] Each geographical entity is matched with the root node one by one to form a corresponding relationship table;
[0025] An entity link is constructed according to the corresponding relationship table and the hierarchical structure and the child-parent relationship of the root node.
[0026] Furthermore, the text mining database is constructed according to the following method:
[0027] A large amount of geographic data is obtained, and the geographic entities in the geographic data are expressed using natural semantics by artificial experts, so as to obtain the relevant geographical locations in the geographic entities and the adjacent relationships between the geographical locations, and the semantic relationships between the geographical locations are formed to express the semantic relationships between the geographical entities, and the text mining database is constructed based on the geographical locations, the adjacent relationships between the geographical locations and the semantic relationships.
[0028] The present application also provides a system for automatically constructing a knowledge graph for geographic entities, which is applied to the above-mentioned method, and the system includes:
[0029] A query module, which is used to call a script component, execute a database type query instruction through the script component, and obtain the database type of the geographic data system and the corresponding database location node;
[0030] A data extraction module, which is used to classify databases according to database types, and to construct a structure tree according to the node relationships between database location nodes, and to construct an extraction path according to the structure tree to extract geographic data from the corresponding database, and to store the extracted geographic data in a storage module having a structure tree;
[0031] A data recognition model, the data recognition model is connected to a task manager, and the data extraction thread is monitored by the task manager. When the data extraction thread is detected to be enabled, the task manager forms a plurality of data recognition units according to the configured data recognition model corresponding to the number of extraction threads to respectively perform natural semantic recognition on the geographic data extracted by the corresponding extraction threads to obtain geographic entities;
[0032] An entity link building module, used to build a corresponding entity link for each geographic entity, and to associate the geographic entity with a database of a geographic data system through the entity link;
[0033] The analysis module analyzes the text data contained in the geographic entities by calling the text mining database, thereby extracting the semantic relationship between the geographic entities and forming a semantic relationship table;
[0034] An integral operation module performs integral operation on the entity quantity of the geographic entity under each semantic relationship according to the semantic relationship table to obtain an integral value of the entity quantity of the geographic entity corresponding to each semantic relationship; and sets an active value of each semantic relationship according to the integral value;
[0035] The knowledge graph generation module is used to call the semantic relationships in the data entity and semantic relationship table to construct the primary knowledge graph of the geographic entity, and prioritize the primary knowledge graph according to the active value of each semantic relationship to obtain the knowledge graph set of the geographic entity.
[0036] This application has the following beneficial effects:
[0037] This application integrates technical means such as structure tree storage, natural language processing, and data mining, and can realize the ability to extract, integrate, and organize information related to geographic entities from large-scale geographic data.
[0038] To realize the function of entity recognition and linking, we use natural language processing technology to identify geographic entities such as place names and places from text data. Then, we use entity linking technology to associate these entities with the corresponding geographic data in the existing geographic entity database.
[0039] To achieve automatic extraction of semantic relationships, use text mining technology to analyze geographic text data and extract semantic relationships between geographic entities, such as geographic locations, adjacent relationships, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The following drawings are only used to illustrate and explain the present invention, and are not used to limit the scope of the present invention, wherein:
[0041] Figure 1 is a flow chart of the method in the present invention;
[0042] Figure 2 This is a schematic diagram of the framework of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution, design method and advantages of the present invention clearer, the present invention is further described in detail by specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0044] Reference Figure 1 , this application provides a method for automatically constructing a knowledge graph for geographic entities, including:
[0045] Call the script component, execute the database type query instruction, and obtain the database type of the geographic data system and the corresponding database location node;
[0046] Classifying the databases according to the database types, and constructing a structure tree according to the node relationships between the database location nodes, and constructing an extraction path according to the structure tree to extract the geographic data in the corresponding database, thereby forming a storage module with a structure tree;
[0047] Calling the task manager, when the task manager detects that the data extraction thread is enabled, the task manager forms a plurality of data identification units according to the configuration data identification model corresponding to the number of extraction threads to respectively perform natural semantic identification on the geographic data extracted by the corresponding extraction threads to obtain geographic entities;
[0048] Constructing a corresponding entity link for each geographic entity, and associating the geographic entity with a database of a geographic data system through the entity link;
[0049] Build a text mining database, associate the text mining database with the trained analysis model, analyze the text data contained in the geographic entities through the analysis model, and extract the semantic relationship between the geographic entities to form a semantic relationship table;
[0050] Performing an integral operation on the entity quantity of the geographic entity under each semantic relationship according to the semantic relationship table to obtain an integral value of the entity quantity of the geographic entity corresponding to each semantic relationship; and setting an active value of each semantic relationship according to the integral value;
[0051] The semantic relationships in the data entity and semantic relationship table are called to construct a primary knowledge graph of the geographic entity, and the primary knowledge graph is prioritized according to the active value of each semantic relationship to obtain a knowledge graph set of the geographic entity.
[0052] In the above, the database type of the geographic data system is obtained by calling the script component to execute at least SQL and noSQL query instructions; and
[0053] The database address query instruction is executed at least through the script component to obtain the location node where the database is deployed in the geographic data system.
[0054] In the above, the geographic data includes one or more combinations of map data, text data and satellite images.
[0055] In the above, the database is classified to clarify the type of data in the geographic data system, so as to clarify the scope of the knowledge graph to be constructed, the target entity type, the application scenario, etc.
[0056] In the above, the structure tree is constructed as follows:
[0057] Create a constructor to point to the root node of the tree and get a parameterless structure tree;
[0058] Configure the hierarchy of each root node and the directory entry of the root node;
[0059] The parameters formed by the position nodes are written into the corresponding root nodes respectively according to the node relationship between the database position nodes, so that one root node corresponds to one database.
[0060] The directory entry includes at least one level of key, value, left child node and right child node. The idea of using the proxy is to call the internal node constructor and pass in the key and value parameters to generate a node object node, determine whether there is a root node, that is, determine whether it is empty. If it is empty, directly use node as the root node, that is, assign node to the root attribute. If it is not empty, compare node.key with the key value of the traversed node, and finally find the appropriate position for insertion.
[0061] In the above, the code used to construct the structure tree is as follows:
[0062] function BinarysearchTree(){
[0063] / / property
[0064] this.root = null
[0065] / 1Node constructor
[0066] function Node(key,value){
[0067] this.key=keythis.value=value
[0068] this.right=null
[0069] this.left=null / ! Search for the data corresponding to the specified keyBinarySearchTree.prototype.search=function(key){ / 11. Then find the root node of the tree and start traversinglet node=this.root
[0070] / / 2. Always compare with the key value of the traversed node while(node! == null) f / / The key value found is greater than the current node key value if(key>node.key){
[0071] node = node.right;
[0072] / / The key value to be searched is less than the current node key value else if (key <node.key)node=node.left
[0073] / / Find the node corresponding to the key value else
[0074] return node.value
[0075] / / No node corresponding to the key value was found
[0076] return false.
[0077] In the above, constructing the extraction path according to the structure tree includes:
[0078] Call the structure tree's constructor;
[0079] The constructor is used to call the root nodes with actual parameters in sequence according to the hierarchical structure and the child-parent relationship. During the calling, an extraction path is configured for each root node, and the extraction path is associated with the root node.
[0080] In the above, the task manager forms multiple data recognition units according to the configuration data recognition model corresponding to the number of extraction threads to form a one-to-one correspondence with the extraction threads respectively, and performs natural semantic recognition on the geographic data extracted from the storage module with a structure tree through the data recognition unit.
[0081] Furthermore, the method of constructing a corresponding entity link for each geographic entity includes:
[0082] Get the root node corresponding to the geographic data in the storage module;
[0083] Each geographical entity is matched with the root node one by one to form a corresponding relationship table;
[0084] An entity link is constructed according to the corresponding relationship table and the hierarchical structure and the child-parent relationship of the root node.
[0085] Furthermore, the text mining database is constructed according to the following method:
[0086] A large amount of geographic data is obtained, and the geographic entities in the geographic data are expressed using natural semantics by artificial experts, so as to obtain the relevant geographical locations in the geographic entities and the adjacent relationships between the geographical locations, and the semantic relationships between the geographical locations are formed to express the semantic relationships between the geographical entities, and the text mining database is constructed based on the geographical locations, the adjacent relationships between the geographical locations and the semantic relationships.
[0087] Furthermore, performing an integral operation on the entity quantity of the geographic entity under each semantic relationship according to the semantic relationship table includes:
[0088] Set the reference unit for geographic entity statistics;
[0089] Each semantic relationship is called in turn through the semantic relationship table, all geographic entities under the semantic relationship are obtained through the semantic relationship, and all geographic entities are statistically calculated through the reference unit quantity, wherein each reference unit quantity is 1 integral, thereby obtaining the integral value of the entity quantity of the geographic entity.
[0090] Reference Figure 2 The present application also provides a system for automatically constructing a knowledge graph for geographic entities, which is applied to the above method. The system includes:
[0091] A query module, which is used to call a script component, execute a database type query instruction through the script component, and obtain the database type of the geographic data system and the corresponding database location node;
[0092] A data extraction module, which is used to classify databases according to database types, and to construct a structure tree according to the node relationships between database location nodes, and to construct an extraction path according to the structure tree to extract geographic data from the corresponding database, and to store the extracted geographic data in a storage module having a structure tree;
[0093] A data recognition model, the data recognition model is connected to a task manager, and the data extraction thread is monitored by the task manager. When the data extraction thread is detected to be enabled, the task manager forms a plurality of data recognition units according to the configured data recognition model corresponding to the number of extraction threads to respectively perform natural semantic recognition on the geographic data extracted by the corresponding extraction threads to obtain geographic entities;
[0094] An entity link building module, used to build a corresponding entity link for each geographic entity, and to associate the geographic entity with a database of a geographic data system through the entity link;
[0095] The analysis module analyzes the text data contained in the geographic entities by calling the text mining database, thereby extracting the semantic relationship between the geographic entities and forming a semantic relationship table;
[0096] An integral operation module performs integral operation on the entity quantity of the geographic entity under each semantic relationship according to the semantic relationship table to obtain an integral value of the entity quantity of the geographic entity corresponding to each semantic relationship; and sets an active value of each semantic relationship according to the integral value;
[0097] The knowledge graph generation module is used to call the semantic relationships in the data entity and semantic relationship table to construct the primary knowledge graph of the geographic entity, and prioritize the primary knowledge graph according to the active value of each semantic relationship to obtain the knowledge graph set of the geographic entity.
[0098] This application integrates technical means such as structure tree storage, natural language processing, and data mining, and can realize the ability to extract, integrate, and organize information related to geographic entities from large-scale geographic data. It realizes the functions of entity recognition and linking, and uses natural language processing technology to identify geographic entities such as place names and places from text data. Then, these entities are associated with the corresponding geographic data in the existing geographic entity database through entity linking technology. It realizes the automatic extraction of semantic relationships, and uses text mining technology to analyze geographic text data and extract semantic relationships between geographic entities, such as geographic locations, adjacent relationships, etc.
[0099] Based on the above, the basic principle of this application is: First, clarify the needs of the geographic data system, including the scope of the knowledge graph to be constructed, the target entity type, the application scenario, etc. Then, collect, clean and prepare geographic data from multiple sources, including map data, text data, satellite images, etc. Use natural language processing technology to identify geographic entities, such as place names, places, etc. from text data. Then, these entities are associated with corresponding entities in the existing geographic entity database through entity linking technology. Use text mining technology to analyze geographic text data and extract semantic relationships between geographic entities, such as geographic locations, adjacent relationships, etc. Based on entity and relationship information, a knowledge graph of geographic entities can be constructed, and a graph database or knowledge graph construction tool can be used. For the ambiguity problem of geographic entities, a disambiguation algorithm is used to process it to ensure the accuracy of the knowledge graph. At the same time, the geographic entity information from different data sources is integrated to improve the integrity of the knowledge graph.
[0100] At the same time, the obtained knowledge graph also enables users to browse and explore the knowledge graph through query, visualization, etc. Users can interact with the knowledge graph through the interface and obtain the required information. The system integrates multi-source data to ensure that the system can handle large-scale geographic data. Geographic data and knowledge graphs are updated regularly to ensure the timeliness and accuracy of information.
[0101] In this specification, example embodiments have been presented based on a selected set of details. However, one of ordinary skill in the art will appreciate that many other example embodiments including different selected sets of these details may be practiced. It is intended that the appended claims cover all possible example embodiments.
Claims
1. A method for automatically constructing a knowledge graph for geographic entities, characterized in that: include: Call the script component, execute the database type query instruction, and obtain the database type of the geographic data system and the corresponding database location node; Classifying the databases according to the database types, and constructing a structure tree according to the node relationships between the database location nodes, and constructing an extraction path according to the structure tree to extract the geographic data in the corresponding database, thereby forming a storage module with a structure tree; Calling the task manager, when the task manager detects that the data extraction thread is enabled, the task manager forms a plurality of data identification units according to the configuration data identification model corresponding to the number of extraction threads to respectively perform natural semantic identification on the geographic data extracted by the corresponding extraction threads to obtain geographic entities; Constructing a corresponding entity link for each geographic entity, and associating the geographic entity with a database of a geographic data system through the entity link; Build a text mining database, associate the text mining database with the trained analysis model, analyze the text data contained in the geographic entities through the analysis model, and extract the semantic relationship between the geographic entities to form a semantic relationship table; Performing an integral operation on the entity quantity of the geographic entity under each semantic relationship according to the semantic relationship table to obtain an integral value of the entity quantity of the geographic entity corresponding to each semantic relationship; and setting an active value of each semantic relationship according to the integral value; The semantic relationships in the data entity and semantic relationship table are called to construct a primary knowledge graph of the geographic entity, and the primary knowledge graph is prioritized according to the active value of each semantic relationship to obtain a knowledge graph set of the geographic entity.
2. The method for automatically constructing a knowledge graph for geographic entities according to claim 1, characterized in that: The geographic data includes one or more combinations of map data, text data and satellite images.
3. The method for automatically constructing a knowledge graph for geographic entities according to claim 1, characterized in that: The structure tree is constructed as follows: Create a constructor to point to the root node of the tree and get a parameterless structure tree; Configure the hierarchy of each root node and the directory entry of the root node; The parameters formed by the position nodes are written into the corresponding root nodes respectively according to the node relationship between the database position nodes, so that one root node corresponds to one database.
4. The method for automatically constructing a knowledge graph for geographic entities according to claim 1, characterized in that: Constructing an extraction path according to the structure tree includes: Call the structure tree's constructor; The constructor is used to call the root nodes with actual parameters in sequence according to the hierarchical structure and the child-parent relationship. During the calling, an extraction path is configured for each root node, and the extraction path is associated with the root node.
5. The method for automatically constructing a knowledge graph for geographic entities according to claim 1, characterized in that: The task manager forms a plurality of data recognition units according to the configuration data recognition model corresponding to the number of extraction threads to form a one-to-one correspondence with the extraction threads respectively, and performs natural semantic recognition on the geographic data extracted from the storage module with the structure tree through the data recognition unit.
6. The method for automatically constructing a knowledge graph for geographic entities according to claim 1, characterized in that: The method of constructing a corresponding entity link for each geographic entity includes: Get the root node corresponding to the geographic data in the storage module; Match each geographic entity to the root node one by one to form a corresponding relationship table; An entity link is constructed according to the corresponding relationship table and the hierarchical structure and the child-parent relationship of the root node.
7. The method for automatically constructing a knowledge graph for geographic entities according to claim 1, characterized in that: The text mining database is constructed according to the following method: A large amount of geographic data is obtained, and the geographic entities in the geographic data are expressed using natural semantics by artificial experts, so as to obtain the relevant geographical locations in the geographic entities and the adjacent relationships between the geographical locations, and the semantic relationships between the geographical locations are formed to express the semantic relationships between the geographical entities, and the text mining database is constructed based on the geographical locations, the adjacent relationships between the geographical locations and the semantic relationships.
8. A system for automatically constructing a knowledge graph for geographic entities, applied to the method described in any one of claims 1 to 7, characterized in that: The system comprises: A query module, which is used to call a script component, execute a database type query instruction through the script component, and obtain the database type of the geographic data system and the corresponding database location node; A data extraction module, which is used to classify databases according to database types, and to construct a structure tree according to the node relationships between database location nodes, and to construct an extraction path according to the structure tree to extract geographic data from the corresponding database, and to store the extracted geographic data in a storage module having a structure tree; A data recognition model, the data recognition model is connected to a task manager, and the data extraction thread is monitored by the task manager. When the data extraction thread is detected to be enabled, the task manager forms a plurality of data recognition units according to the configured data recognition model corresponding to the number of extraction threads to respectively perform natural semantic recognition on the geographic data extracted by the corresponding extraction threads to obtain geographic entities; An entity link building module, used to build a corresponding entity link for each geographic entity, and to associate the geographic entity with a database of a geographic data system through the entity link; The analysis module analyzes the text data contained in the geographic entities by calling the text mining database, thereby extracting the semantic relationship between the geographic entities and forming a semantic relationship table; An integral operation module performs integral operation on the entity quantity of the geographic entity under each semantic relationship according to the semantic relationship table to obtain an integral value of the entity quantity of the geographic entity corresponding to each semantic relationship; and sets an active value of each semantic relationship according to the integral value; The knowledge graph generation module is used to call the semantic relationships in the data entity and semantic relationship table to construct the primary knowledge graph of the geographic entity, and prioritize the primary knowledge graph according to the active value of each semantic relationship to obtain the knowledge graph set of the geographic entity.
Citation Information
Patent Citations
Hybrid knowledge graph construction method fusing geographic knowledge
CN113139065A
Geographic space information query method, system and equipment based on mapping knowledge domain and medium
CN117633033A
Method and apparatus for visual construction of knowledge graph system
US20230409728A1