A method for constructing and fusing hierarchical multi-level knowledge graphs
Through the hierarchical multi-level knowledge graph construction method, the ontology structure and attribute structure of the low-level graph are referenced and colored, which solves the problem of difficulty in fusing general and domain graphs and realizes efficient data fusion and query.
Patent Information
- Application Number
- CN202210153270.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-18
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-02-18
AI Technical Summary
The general knowledge graph and the domain knowledge graph cannot be effectively integrated, resulting in repeated data construction and inefficient query, and inability to iterate quickly.
A hierarchical multi-level knowledge graph construction method is adopted. Through the vertical cascade of graph levels, the ontology structure and attribute structure of the lower-level graph are referenced and colored, the mapping relationship and virtual connection between entities are established, and the fusion and query of the graph are realized.
It reduces the pressure of repeated data construction and storage, improves query efficiency, realizes the rapid integration and maintenance of graphs at all levels, and reduces query costs.
Smart Images

Figure CN114528414B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for constructing a knowledge graph, and specifically to the establishment, maintenance, fusion and query of a multi-level knowledge graph with a layered structure. Background Art
[0002] Knowledge graphs are generally divided into general knowledge graphs and domain knowledge graphs based on their coverage and usage scenarios. General knowledge graphs, such as encyclopedia knowledge graphs, cover all domains, primarily focus on common sense knowledge, and emphasize the breadth of knowledge. Domain knowledge graphs, on the other hand, focus on specific knowledge domains, emphasize specialization, and provide a more granular depiction of knowledge within a domain.
[0003] The general knowledge graph cannot cover the fine-grained knowledge needs of the domain knowledge graph. For example, the attributes of the same object will have different data content and different storage structures in different domains. Therefore, the general knowledge graph and the domain knowledge graph will be constructed at the same time. There are currently two methods for graph construction: one is to adopt a multi-graph construction mode, that is, the two are completely isolated during construction, and can only complement each other through some manual construction processes. The isolated construction will cause excessive duplication of data, which will cause a burden on storage and later queries; the second is to use the domain knowledge graph as a subgraph of the general knowledge graph. The design of the domain knowledge graph is limited by the general knowledge graph, and the addition of new content also needs to consider whether it is applicable to the general knowledge graph, and it cannot be quickly iterated according to the needs of the domain scenario. Summary of the Invention
[0004] In order to solve the problem that general graphs and domain graphs cannot be integrated and promoted together, the present invention provides a method for constructing a hierarchical multi-level knowledge graph and an update, maintenance and query method based on the aforementioned constructed graph.
[0005] A method for constructing a hierarchical multi-level knowledge graph comprises: constructing a plurality of vertically cascaded graphs, wherein the plurality of graphs comprise low-level graphs and high-level graphs, and each level comprises a plurality of similar graphs; the graphs at the plurality of levels comprise an ontology structure; when the ontology structure to be constructed in the high-level graph involves the ontology structure of any low-level graph, the high-level graph references the involved ontology structure; the ontology structure comprises one or more types and associations between types; when a type in the high-level graph involves a type in any low-level graph, the involved type in the low-level graph is colored; and entities are filled in according to the types and the ontology structure, wherein the entities comprise entity names, entity IDs and entity data.
[0006] Furthermore, the type includes an attribute structure and attributes, the attribute structure represents the composition of the attributes, the attributes include field names, constraint fields and indexing methods, and the entity is filled in according to the attributes; when the attribute structure to be constructed in the high-level graph involves any low-level attribute structure, the high-level graph references the attribute structure involved.
[0007] Furthermore, a mapping relationship is established between entities with the same entity ID and entity name in each graph according to the entity ID, and a virtual connection is established between entities with the same entity name but different entity IDs in each graph.
[0008] Furthermore, the entity is disambiguated before being populated.
[0009] Furthermore, the type also includes extended attributes, which are extended attributes of the type of the low-level graph referenced by the high-level graph. The type with the extended attributes generates attribute extension identifiers in both the high-level graph and the low-level graph.
[0010] Furthermore, it also includes a maintenance method for a hierarchical multi-level knowledge graph, which is used to maintain the hierarchical multi-level knowledge graph constructed using the above-mentioned construction method, and judges whether the entity belongs to a low-level graph or a high-level graph according to the type of the maintenance entity, and maintains the maintenance entity in the corresponding graph. When the identified type has an attribute extension identifier, it indicates that the type belongs to a high-level graph.
[0011] Furthermore, the plurality of vertically cascaded levels of graphs include a first-level general graph and multiple levels of domain graphs.
[0012] A method for fusing hierarchical multi-level knowledge graphs is provided, which is used to fuse the hierarchical multi-level knowledge graphs constructed according to the above-mentioned construction method. The ontology structure in the graph is fused according to the ontology structure involved. Entities with the same entity name in each graph establish a mapping relationship or virtual connection based on the entity ID, and the entities with the same entity name are fused according to the mapping relationship and virtual connection.
[0013] A method for querying a hierarchical multi-level knowledge graph, querying a hierarchical multi-level knowledge graph, wherein the hierarchical multi-level knowledge graph includes a plurality of graphs cascaded vertically, wherein the plurality of graphs include low-level graphs and high-level graphs, and each level includes a plurality of similar graphs; the graphs all include an ontology structure; when an ontology structure to be constructed in a high-level graph involves any low-level ontology structure, the high-level graph references the involved ontology structure; the ontology structure includes one or more types and associations between types; entities are filled in according to the type and the ontology structure, wherein the entities include an entity name, an entity ID, and entity data; the type includes an attribute structure and attributes, the attribute structure represents the composition of the attributes, and the attributes include a field name, a constraint field, and an indexing method;
[0014] There is a mapping relationship between entities with the same entity ID and entity name in each graph, and there is a virtual connection between entities with the same entity name but different entity ID in each graph; the target entity corresponding to the specified graph is queried according to the query request and index method. When the target entity has duplicate entities, the target entities are merged according to the mapping relationship and the virtual connection and the query result is returned.
[0015] Furthermore, the method further includes querying neighbor entities of the target entity according to the ontology structure, attribute structure and query request.
[0016] A system for constructing a hierarchical multi-level knowledge graph, including:
[0017] A storage unit for storing a plurality of levels of graphs cascaded vertically, each level including a plurality of similar graphs, wherein the graphs of the plurality of levels each include an ontology structure including one or more types and associations between the types;
[0018] A construction unit, used to construct the ontology structure and attribute structure in the graph;
[0019] A reference unit is used to refer to any low-level ontology structure in the ontology structure to be constructed in the high-level graph, and the high-level graph refers to the involved ontology structure;
[0020] A filling unit, configured to fill an entity according to the type and the ontology structure, wherein the entity includes an entity name, an entity ID, and entity data;
[0021] A coloring unit, configured to color the involved types in any lower-level graph when the types in the higher-level graph involve the involved types in the lower-level graph;
[0022] The association unit is used to establish connections between entities. A mapping relationship is established between entities with the same entity ID and entity name based on the entity ID, and a virtual connection is established between entities with the same entity name but different entity IDs.
[0023] The beneficial effects of the present invention are:
[0024] The method for constructing a layered multi-level knowledge graph of the present invention can save the steps and energy of repeated construction in the construction stage by referencing the ontology structure and the attribute structure, and can quickly integrate information through the same framework in the fusion or query stage. The problem of duplication between entities is solved by coloring the same type of content and the mapping relationship between entities and the virtual connection, which streamlines the entity content data of the knowledge graph and reduces the storage pressure and query pressure. Moreover, these mapping relationships and virtual connections can also quickly achieve the disambiguation of duplicate entities when the graphs are fused, and better fuse the graphs of each level. Through the expansion of attributes, the maintenance and update of the knowledge graph is made more purposeful, and there is no need to maintain all data. The multi-level knowledge graph in the present invention makes the connection between each graph more organized, and achieves low workload during maintenance and query. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0026] Figure 1 It is a schematic diagram of the overall structure of the knowledge graph of the present invention;
[0027] Figure 2 It is a schematic diagram of the association relationship of the entities of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, features, and advantages of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0029] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.
[0030] Example 1
[0031] This embodiment provides a method for constructing a multi-level knowledge graph with a layered structure. Figure 1 The layered multi-level knowledge graph shown includes:
[0032] Construct several levels of vertically cascaded graphs, each level includes multiple similar graphs; each graph includes an ontology structure, and each graph needs to build its own ontology structure, which includes one or more types and the relationship between types.
[0033] When the ontology structure to be built in a high-level graph involves any low-level ontology structure, the high-level graph can reference the involved ontology structure to build its own ontology structure. When a type in a high-level graph involves a type in any low-level graph, the involved type in the low-level graph is colored.
[0034] The types include places, celebrities, etc., and the place type can also include subtypes such as attractions, municipal buildings, etc.
[0035] Entities are populated based on the type and ontology structure. The entity includes the entity name, entity ID, and entity data. The type includes an attribute structure and attributes. The attribute structure represents the composition of the attributes. The attributes include field names, constraint fields, and indexing methods. Entities are populated based on the attributes. Constraints are constraints. For example, a city must be an existing city name; a custom city name cannot be entered. Indexing methods include inverted indexing, word segmentation indexing, numerical indexing, or geo indexing.
[0036] When the attribute structure to be constructed in the high-level graph involves any low-level attribute structure, the high-level graph references the involved attribute structure.
[0037] For example, in a low-level graph, the attributes of a scenic spot subtype include city and scenic spot level. For example, a scenic spot named West Lake has an entity ID of A, and its attributes include Hangzhou and 5A scenic spots. The relationship between types can be reflected in scenic spots as a distance relationship, such as the distance between West Lake and Lingyin Temple.
[0038] When the high-level graph also contains introductions to scenic spots, the high-level graph will color the introductions to scenic spots in the low-level graph. After coloring, the high-level graph can obtain specific entity data of this type when querying, and exclusive attribute expansion or field expansion can be performed for these entities in the high-level graph. These expanded attributes and fields are not visible to the low-level graph, and only the corresponding content in the high-level graph needs to be maintained during maintenance. For example, in the high-level cultural and tourism graph, when a specific introduction to West Lake is needed, the West Lake in the low-level graph will be colored and an attribute structure suitable for itself will be formed. For example, for West Lake, the entity name is West Lake, the entity ID is A, the attributes are cultural and historical conditions, and store conditions, while in the case of character history, there can be specific entity introductions to characters and events.
[0039] It should be noted that before filling in entities, the entities need to be disambiguated to avoid repeated filling of duplicate entities outside the graph in advance, reducing workload and storage pressure.
[0040] like Figure 2 As shown, if the same entity appears repeatedly across graphs, but the actual content of the repeated entities is the same, the entity names of the entities are usually the same. Entities with the same entity ID and entity name across graphs are mapped based on the entity ID. Entities with the same entity name but different entity IDs across graphs have virtual connections.
[0041] If the low-level graph and the high-level graph store the following entities respectively:
[0042] General Atlas: West Lake (ID B, Hangzhou, 5A level, etc.)
[0043] Cultural Tourism Atlas: West Lake (ID B', Su Dongpo Su Xiaoxiao, souvenir shops, etc.)
[0044] Among them, Hangzhou City and 5A level are attribute information, while Su Dongpo, Su Xiaoxiao, and souvenir shop are also attribute information. The ID of West Lake in the cultural and tourism map is B', while the ID of West Lake in the general map is B. As a result, entities with the same name have different IDs. In this case, a virtual connection from B' to B is established. This allows the relationship to be merged during query, displaying concise query results. Virtual connections store the same content of non-substantial relationships to facilitate future queries and displays. For example, West Lake (ID B) and West Lake (ID B') do not have a substantive relationship, but a relationship is established. The connection storage layer of the virtual connection exists and content is merged at the query result level. Virtual connections compensate for errors when constructing entities. When encountering entities with the same entity name but different entity IDs, using a virtual connection avoids the trouble of deleting one of them and also prevents information from being scattered during queries.
[0045] If a high-level graph is built on the basis of a low-level graph, the low-level graph and the high-level graph store the following entities respectively:
[0046] General Atlas: West Lake (ID A, Hangzhou, 5A level, etc.)
[0047] Cultural Tourism Atlas: West Lake (ID A, Su Dongpo Su Xiaoxiao, souvenir shops, etc.)
[0048] In this case, the types in the higher-level graph refer to types in the lower-level graph. In other words, the types in the lower-level graph belong to the domain of the higher-level graph and are colored in the common graph. If they are constructed separately but have the same entity ID, a direct mapping relationship is formed. After coloring, the higher-level graph can retrieve the specific entity data of the colored type when querying.
[0049] Among them, the type also includes extended attributes, which are extended attributes of the type of the low-level graph referenced by the high-level graph. The type with the extended attributes generates an attribute extension identifier in both the high-level graph and the low-level graph. The extended attributes only exist in the type of the domain graph.
[0050] For example, the low-level map has West Lake, and its attributes include city and scenic area levels. When the high-level map references this type, it can add attributes on its basis. The added attributes are called extended attributes. When referenced by the cultural and tourism map, it can add attributes such as humanities and historical events.
[0051] The above-mentioned vertical cascade of several levels of maps includes the first-level general map and multi-level domain maps, such as Figure 1 As shown, Layer 0 is the level of the general graph, and Layer 1, Layer 2 or Layer N is the domain graph.
[0052] The layered multi-level knowledge graph in this embodiment, through the reference of ontology structure and attribute structure and the coloring of the same type of content, solves the duplication problem between entities through mapping relationships and virtual connections between entities, streamlines the structure of the knowledge graph, and reduces storage and query pressure. In addition, through the expansion of attributes, the maintenance and update of the knowledge graph is more targeted, rather than maintaining and updating all data. The expansion of attributes and type coloring establishes connections between the various graphs, making it easier to obtain target data during queries.
[0053] Example 2
[0054] A method for fusing a hierarchical multi-level knowledge graph is provided, which is used to fuse the hierarchical multi-level knowledge graph constructed according to the construction method described in Example 1. According to the ontology structure involved in the fusion graph, the entities with the same entity name in each graph establish a mapping relationship or virtual connection based on the entity ID, and the entities with the same entity name are fused according to the mapping relationship and virtual connection.
[0055] When the high-level graph and the low-level graph need to be merged, they can first be merged on the overall framework based on the involved ontology structure and the involved attribute structure.
[0056] Entities with the same entity name in each graph establish a mapping relationship or a virtual connection according to the entity ID, and the entities with the same entity name are merged according to the mapping relationship and the virtual connection.
[0057] For example, the low-level graph and the high-level graph store the following entities respectively:
[0058] General Atlas: West Lake (ID A, Hangzhou, 5A level, etc.)
[0059] Cultural Tourism Atlas: West Lake (ID A, Su Dongpo Su Xiaoxiao, souvenir shops, etc.)
[0060] Hangzhou and the 5A rating are attribute information, while Su Dongpo, Su Xiaoxiao, and souvenir shops are also attribute information, that is, entity data. The West Lake ID in the cultural tourism map is A, and the West Lake ID in the general map is A. Since these two entities have the same entity name and actually describe the same entity, a mapping relationship is established between them. Based on this mapping relationship, entity disambiguation can be implemented during fusion, merging them into a single entity, making the fused map more streamlined.
[0061] If the low-level graph and the high-level graph store the following entities respectively:
[0062] General Atlas: West Lake (ID B, Hangzhou, 5A level, etc.)
[0063] Cultural Tourism Atlas: West Lake (ID B', Su Dongpo Su Xiaoxiao, souvenir shops, etc.)
[0064] Among them, Hangzhou City and 5A level are attribute information, while Su Dongpo, Su Xiaoxiao, souvenir shops, etc. are also attribute information, that is, entity data. The ID of West Lake in the cultural and tourism map is B', and the ID of West Lake in the general map is B. As a result, entities with the same name have different IDs. In this case, a virtual connection from B' to B is established. During fusion, if data is deleted, it may affect the upstream data. The virtual connection is to retain both pieces of data at the same time and indicate the duplication problem between the two. Virtual connections store the same content of non-substantial relationships, which makes it convenient to merge some identical entities that cannot be deleted in the future. For example, West Lake (ID B) and West Lake (ID B') do not have a substantive relationship themselves, but a relationship will be established. The connection storage layer of the virtual connection exists and content will be merged at the query result level.
[0065] Example 3
[0066] This embodiment provides a method for maintaining a layered multi-level knowledge graph, which is used to maintain the graph in Example 1. The specific steps include:
[0067] Determine whether the entity belongs to a low-level graph or a high-level graph based on the type of the maintenance entity, maintain the maintenance entity in the corresponding graph, and when the identified type has an attribute extension identifier, it indicates that the type belongs to a high-level graph.
[0068] Generally speaking, low-level graph types are simpler and represent general knowledge, while high-level graph types are more complex, containing domain-specific types or attributes. Therefore, first determine whether the entity to be maintained belongs to the low-level or high-level graph based on the type. If the type belongs to the low-level graph but has an attribute extension identifier, it indicates that the type belongs to the high-level graph. Check whether the entity to be maintained has an extended attribute. If so, maintain the corresponding entity in the high-level graph; otherwise, maintain the corresponding entity in the low-level graph.
[0069] Because the graph constructed in Example 1 has type coloring and type extension attributes, when updating and maintaining, it only needs to be maintained in the corresponding graph to ensure data accuracy, and there is no need to maintain a large amount of graph information to keep the information in the graph consistent.
[0070] Example 4
[0071] This embodiment provides a method for querying a hierarchical multi-level knowledge graph, which is used to query the entity content of the graph in Example 1. The specific steps include:
[0072] The target entity corresponding to the specified graph is queried according to the query request and the index method. When the target entity has duplicate entities, the target entities are merged according to the mapping relationship and the virtual connection and the query result is returned.
[0073] If you specify to query entities in the general graph, only the attribute index in the general graph is used for searching, and the query returns the entity data that meets the search criteria.
[0074] When specifying entities to query in a domain graph, multiple query states may appear because the domain graph may reference the ontology structure and attribute structure of the general graph, or colorize the type content in the general graph. To query the reference information in the domain graph, group the types in the domain graph that reference the general graph together, using this as a query condition. Search the general graph based on this query condition to obtain result set one. Filter the content related to the general graph in the above query condition to form a new query condition. Search the domain graph based on this query condition to obtain result set two. Perform AND or NOT logic processing on the result set based on the query request to obtain the final result set.
[0075] In the query of the domain graph, if you need to obtain the common attributes of an entity, query the common information of the entity in the common graph. If the common graph has a corresponding entity ID mapping relationship, obtain the common information directly based on the entity ID. If there is a virtual connection for association, jump to the entity of the common graph through the virtual connection and obtain the common information.
[0076] This query method also includes querying neighbor entities of the target entity based on the ontology structure, attribute structure, and query request. This includes querying neighbor entities and path queries between entities. These queries rely on global, index-free adjacency graph data storage and are performed using Gremlin syntax.
[0077] This query method is based on the hierarchical multi-level knowledge graph disclosed in Example 1. It has different query methods according to different graph types, and merges the query results before displaying them, which can reduce the user's query cost and help the user quickly obtain relevant results.
[0078] Example 5
[0079] This embodiment provides a system for constructing a layered multi-level knowledge graph, which is used to construct the graph in Example 1, specifically including:
[0080] A storage unit is used to store several levels of graphs cascaded vertically, wherein the graphs of the several levels include low-level graphs and high-level graphs, each level includes multiple similar graphs, and the graphs include an ontology structure, which includes one or more types and the association relationship between types.
[0081] A construction unit is used to construct the ontology structure and attribute structure in the graph.
[0082] The reference unit is used to involve any low-level ontology structure in the ontology structure to be constructed in the high-level graph, and the high-level graph references the involved ontology structure.
[0083] The filling unit is used to fill the entity according to the type and the ontology structure, and the entity includes an entity name, an entity ID and entity data.
[0084] The shading unit is configured to, when a type in a high-level graph involves a type in any low-level graph, color the involved type in the low-level graph.
[0085] The association unit is used to establish connections between entities. A mapping relationship is established between entities with the same entity ID and entity name based on the entity ID, and a virtual connection is established between entities with the same entity name but different entity IDs.
[0086] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not performed.
[0087] The units may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0088] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0089] In particular, according to the embodiments disclosed herein, the process described above with reference to the flowchart may be implemented as a computer software program.
[0090] The flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0091] The above description includes examples of one or more embodiments. Of course, it is not possible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it will be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, to the extent that the term "comprising" is used in the specification or claims, the term is intended to be encompassed in a manner similar to the term "including", as explained by the use of "including" as a transitional word in the claims. In addition, any use of the term "or" in the specification of the claims is intended to mean a "non-exclusive or".
[0092] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for constructing a hierarchical multi-level knowledge graph, characterized in that: include: Constructing a plurality of vertically cascaded graphs, wherein the plurality of graphs include low-level graphs and high-level graphs, and each level includes a plurality of similar graphs; The graphs at several levels each include an ontology structure; When the ontology structure to be constructed in the high-level graph involves the ontology structure of any low-level graph, the high-level graph references the involved ontology structure; The ontology structure includes one or more types and relationships between types, and the types include places and celebrities; When a type in a high-level graph involves a type in any low-level graph, color the involved types in the low-level graph; Fill in entities according to the type and ontology structure, wherein the entities include entity name, entity ID and entity data; A mapping relationship is established between entities with the same entity ID and entity name in each graph based on the entity ID. A virtual connection is established between entities with the same entity name but different entity IDs in each graph. The virtual connection indicates that entities with the same entity name but different entity IDs are stored in the storage layer. Determine whether the entity belongs to a low-level graph or a high-level graph based on its type, maintain the entity in the corresponding graph, and if the identified type has an attribute extension identifier, it indicates that the type belongs to a high-level graph; The vertically cascaded graphs of several levels include a first-level general graph and multiple levels of field graphs, and the field graph is a cultural and tourism graph.
2. The method for constructing a hierarchical multi-level knowledge graph according to claim 1, characterized in that: The type includes an attribute structure and attributes. The attribute structure represents the composition of the attribute. The attribute includes a field name, a constraint field, and an index method. The entity is filled according to the attributes. When the attribute structure to be constructed in the high-level graph involves any low-level attribute structure, the high-level graph references the involved attribute structure.
3. The method for constructing a hierarchical multi-level knowledge graph according to claim 1, characterized in that: The type also includes extended attributes, which are extended attributes of the type of the low-level graph referenced by the high-level graph. The type with the extended attributes generates attribute extension identifiers in both the high-level graph and the low-level graph.
4. The method for constructing a hierarchical multi-level knowledge graph according to claim 1, characterized in that: Determine whether the entity belongs to a low-level graph or a high-level graph based on the type: the low-level graph belongs to general knowledge, and the high-level graph contains exclusive classes or exclusive attributes in this field. If the type belongs to a low-level graph, but the graph content contains an attribute extension identifier, it means that the type belongs to a high-level graph. Check whether the entity belongs to an extended attribute. If so, the entity needs to be maintained in the high-level graph. If not, the entity needs to be maintained in the low-level graph.
5. A method for fusing a hierarchical multi-level knowledge graph, for fusing a hierarchical multi-level knowledge graph constructed by the construction method according to claim 1, characterized in that: According to the ontology structure involved in the fusion graph, the entities with the same entity name in each graph establish a mapping relationship or virtual connection based on the entity ID, and the entities with the same entity name are fused according to the mapping relationship and virtual connection. If the entities with the same entity name have a mapping relationship, entity disambiguation processing is performed during the fusion and merged into one entity. If the entities with the same entity name have a virtual connection, the entities with the same entity name are stored in the storage layer.
6. A query method for a hierarchical multi-level knowledge graph, characterized in that: A multi-level knowledge graph with a hierarchical structure is queried, wherein the multi-level knowledge graph includes several levels of graphs cascaded vertically, wherein the several levels of graphs include low-level graphs and high-level graphs, and each level includes multiple similar graphs; the graphs at the several levels all include an ontology structure; when the ontology structure to be constructed in the high-level graph involves any low-level ontology structure, the high-level graph references the involved ontology structure; the ontology structure includes one or more types and associations between types, wherein the types include places and celebrities; entities are populated according to the types and the ontology structure, wherein the entities include entity names, entity IDs, and entity data; The type includes an attribute structure and attributes, the attribute structure represents the composition of the attribute, and the attributes include a field name, a constraint field, and an index method; Entities with the same entity ID and entity name in each graph have a mapping relationship based on the entity ID. Entities with the same entity name but different entity IDs in each graph have a virtual connection. The virtual connection indicates that entities with the same entity name but different entity IDs are stored in the storage layer. The target entity corresponding to the specified graph is queried according to the query request and the index method. When the target entity has duplicate entities, the target entities are merged according to the mapping relationship and the virtual connection and the query result is returned.
7. The query method of the layered multi-level knowledge graph according to claim 6 is characterized in that: The method also includes querying neighbor entities of the target entity according to the ontology structure, the attribute structure and the query request.
8. A system for constructing a hierarchical multi-level knowledge graph, characterized in that: include: A storage unit, configured to store multiple levels of graphs in a vertical cascade, wherein the multiple levels of graphs include low-level graphs and high-level graphs, each level includes multiple similar graphs, and each graph includes an ontology structure, wherein the ontology structure includes one or more types and associations between types, wherein the types include places and celebrities; A construction unit, used to construct the ontology structure and attribute structure in the graph; A reference unit is used to refer to any low-level ontology structure in the ontology structure to be constructed in the high-level graph, and the high-level graph refers to the involved ontology structure; A filling unit, configured to fill an entity according to the type and the ontology structure, wherein the entity includes an entity name, an entity ID, and entity data; A coloring unit, configured to color the involved types in any lower-level graph when the types in the higher-level graph involve the involved types in the lower-level graph; An association unit is used to establish connections between entities. Entities with the same entity ID and entity name establish a mapping relationship based on the entity ID. Entities with the same entity name but different entity IDs establish a virtual connection. The virtual connection indicates that entities with the same entity name but different entity IDs are stored in the storage layer. An entity maintenance unit is used to determine whether the entity belongs to a low-level graph or a high-level graph based on the entity type, and to maintain the entity in the corresponding graph. If the identified type has an attribute extension identifier, it indicates that the type belongs to a high-level graph. A vertical cascade unit, wherein the vertical cascade comprises several levels of maps, including a first-level general map and multiple levels of domain maps, wherein the domain map is a cultural and tourism map.
Citation Information
Patent Citations
A mass knowledge resource storage method based on a knowledge graph
CN109726296A
A domain knowledge graph construction method and device based on an interlayer core ontology
CN109947950A