Knowledge graph construction method and device

CN116992045BActive Publication Date: 2026-10-30ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310979500.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-04
Publication Date
2026-10-30
Estimated Expiration
2043-08-04

AI Technical Summary

Technical Problem

然而,在超级应用中,各种应用场景之间存在不同程度的差异,严重阻碍了应用场景间的有效信息传递和共享,潜在地影响了用户体验

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116992045B_ABST
    Figure CN116992045B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a knowledge graph construction method and device. In the process of constructing a knowledge graph, an entity node is extracted from application scenario service data; an entity hierarchical relationship between the entity nodes is determined; and an entity hierarchical edge relationship is created between the entity nodes according to the determination result of the hierarchical relationship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification generally relate to the field of artificial intelligence, and in particular to methods and apparatus for constructing knowledge graphs. Background Technology

[0002] In recent years, super apps have experienced explosive growth, allowing users to access various services such as online shopping, travel, and financial services through mini-programs provided by super apps, greatly facilitating their daily lives. To efficiently distribute online services, a deep understanding of user behavior across various business scenarios is crucial for accurately capturing user intent and preferences, facilitating intelligent matching between current user needs and the various online services offered within super apps. However, differences exist between various application scenarios within super apps, severely hindering effective information transmission and sharing between these scenarios and potentially impacting user experience.

[0003] To gain a deeper understanding of user needs and provide the necessary services, it is necessary to construct a "bridge" between user needs and services in various application scenarios. To this end, a general knowledge graph for super apps needs to be built based on various application scenarios to support services in different application scenarios, such as search, recommendation, and marketing. Summary of the Invention

[0004] This specification provides a method and apparatus for constructing a knowledge graph. Using this knowledge graph construction scheme, entity nodes can be extracted from user behavior data, and hierarchical relationships can be constructed between these extracted entity nodes to create hierarchical edge relationships, thereby constructing a general knowledge graph. This effectively enables information migration and sharing between application scenarios, thereby improving the understanding of user behavior in various application scenarios to capture user intent or preferences, and ultimately achieving effective distribution of online services.

[0005] According to one aspect of the embodiments of this specification, a knowledge graph construction method is provided, comprising: extracting entity nodes from application scenario service data; determining entity hierarchical relationships between the entity nodes; and creating entity hierarchical edge relationships between the entity nodes based on the hierarchical relationship determination result.

[0006] Optionally, in one example of the above aspects, determining the entity hierarchy relationship between the entity nodes may include: for each entity node, using a text generation model to generate a parent entity node for that entity node; and determining the entity hierarchy relationship between the entity nodes based on the parent entity node generation result for each entity node.

[0007] Alternatively, in one example of the above aspects, the text generation model includes a text-to-text transfer transformer model.

[0008] Optionally, in one example of the above aspects, determining the entity hierarchy relationship between the entity nodes based on the generation result of the parent entity node of each entity node may include: for each entity node, in response to the existence of the generated parent entity node in the entity node, determining that there is a hierarchical relationship between the generated parent entity node and the entity node; in response to the absence of the generated parent entity node in the entity node, determining a similar entity node of the generated parent entity node from the entity nodes, and determining that there is a hierarchical relationship between the similar entity node and the entity node.

[0009] Optionally, in one example of the above aspects, determining similar entity nodes of the generated parent entity node from the entity nodes may include: using a BK-tree based search method to determine similar entity nodes of the generated parent entity node from the entity nodes.

[0010] Optionally, in one example of the above aspects, the knowledge graph construction method may further include: determining the spatiotemporal relationship between entity nodes extracted from service data of the same application scenario; and creating spatiotemporal edge relationships between entity nodes that have spatiotemporal relationships.

[0011] Optionally, in one example of the above aspects, determining the spatiotemporal relationship between entity nodes extracted from the same application scenario service data may include: constructing candidate entity node pairs based on the entity nodes extracted from the same application scenario service data, each entity node pair including a source entity node and a target entity node; providing the entity text information of each candidate entity node pair and the original application scenario service data to a text representation model to generate entity representations of the source entity node and the target entity node in the candidate entity node pair; and predicting the spatiotemporal relationship between the source entity node and the target entity node in each candidate entity node pair based on the entity representations of the source entity node and the target entity node in each candidate entity node pair.

[0012] Alternatively, in one example of the above aspects, the text representation model includes the BERT model.

[0013] Optionally, in one example of the above aspects, the entity node includes a general entity node and an intent entity node.

[0014] Alternatively, in one example of the above aspects, the entity nodes are classified as basic entity nodes, category entity nodes, and domain entity nodes.

[0015] Optionally, in one example of the above aspects, the knowledge graph construction method may further include: obtaining domain knowledge from public data; and constructing domain knowledge edge relationships between the entity nodes based on the domain knowledge.

[0016] Optionally, in one example of the above aspects, the knowledge graph construction method may further include: merging synonymous associations of the entity nodes.

[0017] Optionally, in one example of the above aspects, the application scenario service data includes heterogeneous application scenario service data.

[0018] Optionally, in one example of the above aspects, the application scenario service data includes user behavior data and / or application service description data.

[0019] According to another aspect of the embodiments of this specification, a knowledge graph construction apparatus is provided, comprising: an entity node extraction unit for extracting entity nodes from application scenario service data; a hierarchical relationship determination unit for determining the entity hierarchical relationship between the entity nodes; and an edge relationship creation unit for creating entity hierarchical edge relationships between the entity nodes based on the hierarchical relationship determination result.

[0020] Optionally, in one example of the above aspects, the hierarchical relationship construction unit includes: a parent node generation module, which generates a parent entity node for each entity node using a text generation model; and a hierarchical relationship determination module, which determines the entity hierarchical relationship between the entity nodes based on the parent entity node generation result of each entity node.

[0021] Optionally, in one example of the above aspects, for each entity node, in response to the existence of the generated parent entity node in the entity node, the hierarchy relationship determination module determines that there is a hierarchical relationship between the generated parent entity node and the entity node; in response to the absence of the generated parent entity node in the entity node, the hierarchy relationship determination module determines similar entity nodes of the generated parent entity node from the entity nodes, and determines that there is a hierarchical relationship between the similar entity node and the entity node.

[0022] Optionally, in one example of the above aspects, the hierarchy determination module uses a BK-tree-based search method to determine similar entity nodes of the generated parent entity node from the entity nodes.

[0023] Optionally, in one example of the above aspects, the knowledge graph construction device further includes: a spatiotemporal relationship determination unit, which determines the spatiotemporal relationship between entity nodes extracted from service data of the same application scenario, and the edge relationship creation unit creates spatiotemporal edge relationships between entity nodes that have spatiotemporal relationships.

[0024] Optionally, in one example of the above aspects, the spatiotemporal relationship determination unit includes: a candidate entity node pair construction module, which constructs candidate entity node pairs based on entity nodes extracted from service data of the same application scenario, each candidate entity pair including a source entity node and a target entity node; a text representation module, which provides the entity text information of each candidate entity node pair and the original application scenario service data to a text representation model to generate entity representations of the source entity node and the target entity node in the candidate entity node pair; and a spatiotemporal relationship prediction module, which predicts the spatiotemporal relationship between the source entity node and the target entity node in each candidate entity node pair based on the entity representations of the source entity node and the target entity node in each candidate entity node pair.

[0025] Optionally, in one example of the above aspects, the knowledge graph construction apparatus further includes: a domain knowledge acquisition unit for acquiring domain knowledge from public data; and a domain knowledge edge construction unit for constructing domain knowledge edge relationships between the entity nodes based on the domain knowledge.

[0026] Optionally, in one example of the above aspects, the knowledge graph construction apparatus further includes: an entity node merging unit, which merges the entity nodes by performing synonym association merging.

[0027] According to another aspect of the embodiments of this specification, a knowledge graph construction apparatus is provided, comprising: at least one processor; a memory coupled to the at least one processor; and a computer program stored in the memory, wherein the at least one processor executes the computer program to implement the knowledge graph construction method as described above. Attached Figure Description

[0028] A further understanding of the nature and advantages of this specification can be achieved by referring to the following figures. In the figures, similar components or features may have the same reference numerals.

[0029] Figure 1 An example schematic diagram of a knowledge graph application architecture according to an embodiment of this specification is shown.

[0030] Figure 2 An example flowchart of a knowledge graph construction method according to an embodiment of this specification is shown.

[0031] Figure 3An example flowchart of the hierarchical relationship determination process according to an embodiment of this specification is shown.

[0032] Figure 4 A schematic diagram illustrating an example of the generation process of a higher-level entity node based on a T5 model according to an embodiment of this specification is shown.

[0033] Figure 5 An example flowchart of the entity hierarchy relationship determination process according to an embodiment of this specification is shown.

[0034] Figure 6 An example flowchart of the spatiotemporal relationship determination process according to an embodiment of this specification is shown.

[0035] Figure 7 An example schematic diagram of the spatiotemporal relationship determination process according to an embodiment of this specification is shown.

[0036] Figure 8 An example schematic diagram of a knowledge graph according to an embodiment of this specification is shown.

[0037] Figure 9 An example block diagram of a knowledge graph construction apparatus according to an embodiment of this specification is shown.

[0038] Figure 10 An example block diagram of a hierarchical relationship building unit according to an embodiment of this specification is shown.

[0039] Figure 11 An example block diagram of a spatiotemporal relationship determination unit according to an embodiment of this specification is shown.

[0040] Figure 12 An example schematic diagram of a knowledge graph construction apparatus based on a computer system according to an embodiment of this specification is shown. Detailed Implementation

[0041] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed merely to enable those skilled in the art to better understand and implement the subject matter described herein, and are not intended to limit the scope, applicability, or examples set forth in the claims. The function and arrangement of the elements discussed may be changed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the various examples. For example, the described methods may be performed in a different order than described, and steps may be added, omitted, or combined. Furthermore, features described in some examples may be combined in other examples.

[0042] As used herein, the term "comprising" and its variations are open terms meaning "including but not limited to". The term "based on" means "at least partially based on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other definitions, whether explicit or implicit, may be included below. Unless explicitly indicated by the context, the definition of a term shall remain consistent throughout the specification.

[0043] The flowcharts used in this specification illustrate operations implemented according to some embodiments of this specification. It should be clearly understood that the operations in the flowcharts may not be implemented in a sequential order. Instead, the operations may be implemented in reverse order or simultaneously. Furthermore, one or more additional operations may be added to the flowcharts. One or more operations may be removed from the flowcharts.

[0044] The knowledge graph construction method and apparatus according to embodiments of this specification will now be described with reference to the accompanying drawings.

[0045] Figure 1 An example schematic diagram of a knowledge graph application architecture 100 according to an embodiment of this specification is shown.

[0046] like Figure 1 As shown, the knowledge graph application architecture 100 includes a knowledge graph construction device 110, a knowledge graph storage device 120, an entity representation device 130, and an entity recommendation device 140. The knowledge graph construction device 110, knowledge graph storage device 120, entity representation device 130, and entity recommendation device 140 can communicate with each other via a network 150 to transmit data. In some embodiments, the network 150 can be any one or more of a wired network or a wireless network. Examples of the network 150 may include, but are not limited to, cable networks, fiber optic networks, telecommunications networks, enterprise intranets, the Internet, local area networks (LANs), wide area networks (WANs), wireless local area networks (WLANs), metropolitan area networks (MANs), public switched telephone networks (PSTNs), Bluetooth networks, ZigZee networks, near field communication (NFC), device internal buses, device internal lines, etc., or any combination thereof. In some embodiments, some or all of the components in the knowledge graph construction device 110, knowledge graph storage device 120, entity representation device 130, and entity recommendation device 140 can communicate directly without the need for the network 150.

[0047] The knowledge graph construction device 110 can construct a knowledge graph, such as a general knowledge graph, using application scenario service data. The constructed knowledge graph can be stored in the knowledge graph storage device 120 for use by downstream devices, such as the entity representation device 130 for graph learning to learn entity representations, or the entity recommendation device 140 for entity recommendation. It should be noted that downstream devices may also include other types of knowledge graph application devices.

[0048] The entity representation device 130 can use a knowledge graph to perform graph learning on the entity features of the entity to be represented, thereby obtaining an entity representation of the entity to be represented. The entity recommendation device 140 can use a knowledge graph to perform graph learning on the entity features of candidate recommended entities, thereby obtaining entity representations of candidate recommended entities, and then use the entity representations of candidate recommended entities to perform entity recommendation.

[0049] Optionally, in some embodiments, the entity representation device 130 and / or the entity recommendation device 140 may have storage capabilities, thereby enabling the knowledge graph constructed therefrom to be stored locally on the entity representation device 130 and / or the entity recommendation device 140, thus eliminating the need for the knowledge graph storage device 120.

[0050] Figure 2 An example flowchart of a knowledge graph construction method 200 according to an embodiment of this specification is shown.

[0051] like Figure 2 As shown in 210, entity nodes are extracted from the application scenario service data, thus obtaining the entity node set.

[0052] In this specification, application scenario service data may include user behavior data. User behavior data refers to user behavior data occurring within an application scenario, such as online user interaction data (e.g., access behavior data, click behavior data, search behavior data, text interactions between users and application platforms (e.g., online service platforms), audio / video interactions between users and application platforms, etc.), and offline user transaction data. For example, user behavior data could be something like, "Having a black tea latte at Starbucks in winter is great." Application scenario service data may also include application scenario service description data, such as, "Starbucks Delivery is Starbucks' delivery service." Furthermore, application scenario service data may include any other type of text data that occurs within an application scenario and can be used for entity node extraction. Additionally, application scenario service data includes heterogeneous application scenario service data, that is, application scenario service data occurring in various application scenarios.

[0053] In some embodiments, entity recognition models can be used to extract entity nodes from application scenario service data. For example, sequence labeling-based entity recognition models can be used to extract different types of entity nodes from user search logs, application scenario service description data, etc. For instance, from the application scenario service data "Ocean Park with Mermaid Show brings you a different travel experience", the entity nodes "Ocean Park", "Mermaid Show", and "travel" can be extracted, where "Ocean Park" and "Mermaid Show" are basic entity nodes, and "travel" is a category entity node.

[0054] In some embodiments, for highly specialized application areas, such as the health / insurance sector, web crawlers can be used to extract entity nodes from public data. Alternatively, entity nodes can be created manually, for example, by knowledge experts using their expertise.

[0055] In this specification, entity nodes may include, for example, general entity nodes and awareness entity nodes. Examples of general entity nodes may include, but are not limited to, food entity nodes, product entity nodes, brand entity nodes, scenario entity nodes, service entity nodes, and activity entity nodes. Food entity nodes may include, for example, "coffee," "black tea latte," and "milk tea." Product entity nodes may include, for example, "thermos cup" and "soup spoon." Brand entity nodes may include, for example, "Starbucks" and "KFC." Scenario entity nodes may include, for example, "winter." Service entity nodes may include, for example, "Starbucks delivery." Intent entity nodes are used to reflect the functions and user needs of various services. Intent entity nodes may include, for example, "food reviews" and "appliance repair." In addition, entity nodes can also be classified into basic entity nodes, category entity nodes, and domain entity nodes, thereby forming a hierarchical relationship between entity nodes: "basic entity node → category entity node → domain entity node."

[0056] Optionally, in some embodiments, after obtaining entity nodes, the entity nodes can be merged based on synonymous associations. For example, if the extracted entity nodes include "Starbucks" and "Starbucks", then "Starbucks" and "Starbucks" can be merged into one entity node, such as "Starbucks". In some embodiments, semantic analysis can be performed on entity nodes to determine their semantic similarity, and the semantic similarity can be used to determine whether there is a synonymous association between entity nodes. If a synonymous association exists, then entity node merging is performed.

[0057] After obtaining the entity node set as described above, step 220 determines the entity hierarchy relationships between the entity nodes in the entity node set. In this specification, the term "entity hierarchy relationship" mainly includes the superior-subordinate relationship between entity nodes. For example, the entity node "beverage" is the superior entity node of the entity node "coffee," and the entity node "coffee" is the superior entity node of the entity node "black tea latte."

[0058] The hierarchical relationships between entity nodes are achieved through category abstraction of basic entity nodes, enabling generalized aggregation of entity nodes from fine-grained to coarse-grained. Basic entity nodes can represent specific things or functions. By constructing hierarchical relationships between entity nodes, basic entity nodes can be attached to category entity nodes, and then category entity nodes can be attached to domain entity nodes, such as "Credit Card Application -> Banking Services -> Finance".

[0059] In some embodiments, a classification model can be used to determine entity hierarchy relationships. For example, entity node pairs can be provided to a classification model to determine the likelihood of a hierarchical relationship between the entity node pairs.

[0060] Because the range of basic entity nodes is broad, the number of their superordinate categories is also large, resulting in a significant workload for determining contextual relationships using a classification model. Furthermore, the lack of contextual knowledge for entity nodes makes it difficult to obtain high-quality entity descriptions, leading to low accuracy in the superordinate relationship predictions obtained by the classification model. Moreover, the uneven distribution of entity node data, with fewer entity nodes in some categories, results in limited sample coverage by manually labeled data, thus impacting the performance of the trained classification model.

[0061] Considering the above problems, a scheme for determining entity hierarchy relationships based on a text generation model is proposed. Figure 3 An example flowchart of a hierarchy determination process 300 according to an embodiment of this specification is shown.

[0062] like Figure 3 As shown in 310, for each entity node in the entity node set, the parent entity node of that entity node is generated using a text generation model.

[0063] In some embodiments, the text generation model can employ various language models in the art, such as the Text-Text Transfer Transformer (T5) model.

[0064] The T5 model is a Transformer-based pre-trained language model. It employs a Transformer model architecture, primarily consisting of a Transformer-based encoder and a Transformer-based decoder. The encoder transforms the input sentence into a set of vector representations, while the decoder converts these vector representations into the corresponding output. This unified text transformation framework gives the T5 model better generalization and adaptability. In the T5 model, the encoder and decoder can use the same Transformer structure and share model parameters. Similar to other pre-trained models, the T5 model can also be trained using large-scale unsupervised corpora.

[0065] Figure 4 A schematic diagram illustrating an example of the generation process of a higher-level entity node based on a T5 model according to an embodiment of this specification is shown.

[0066] like Figure 4 As shown, for entity node A whose parent entity node needs to be determined, the input question "What is the parent entity of entity node A?" can be generated, and this input question is then provided to the T5 model. The T5 model uses the knowledge base trained in the model to generate the answer to the input question in a generative manner, thereby generating the parent entity node of entity node A. If a definite parent entity node exists, it is used as the parent entity node generation result. If no definite parent entity node is obtained, a "Null" node is output as the parent entity node generation result.

[0067] In step 320, the hierarchical relationship between entity nodes is determined based on the generation results of the parent entity node of each entity node.

[0068] Figure 5 An example flowchart of an entity hierarchy relationship determination process 500 according to an embodiment of this specification is shown.

[0069] like Figure 5 As shown, for each entity node, after obtaining the result of generating the parent entity node as described above, if a "Null" entity node is generated, it means that the entity node does not have a parent entity node, and therefore the entity node is not a subordinate entity node of any other node. If a definite parent entity node is generated, then in step 510, it is determined whether the generated parent entity node exists in the obtained entity node set.

[0070] If the generated parent entity node exists in the entity node set, then at step 520, it is determined that there is a hierarchical relationship between the generated parent entity node and the current entity node. If the generated parent entity node does not exist in the entity node set, then at step 530, similar entity nodes of the generated parent entity node are determined from the entity node set. In some embodiments, a BK-tree based search method can be used to determine similar entity nodes of the generated parent entity node from the entity node set. After determining similar entity nodes, at step 540, it is determined that there is a hierarchical relationship between the similar entity node and the current entity node.

[0071] Back Figure 2 After determining the hierarchical relationships between entity nodes in the entity node set as described above, in step 230, based on the determined hierarchical relationships, hierarchical edge relationships are created between entity nodes. For example, if entity node A has a parent entity node B, then a parent-child relationship edge is created between entity node A and entity node B, for example, " If entity node A does not have a parent entity node, then no parent relationship edge will be created.

[0072] In addition, alternatively, besides creating hierarchical relationships between entity nodes as described above, spatiotemporal relationships between entity nodes can also be created, that is, in what space and at what time entity nodes are associated.

[0073] Specifically, in 240, the spatiotemporal relationships between entity nodes extracted from service data of the same application scenario are determined.

[0074] Figure 6 An example flowchart of a spatiotemporal relationship determination process 600 according to an embodiment of this specification is shown, and Figure 7 An example schematic diagram of the spatiotemporal relationship determination process according to an embodiment of this specification is shown.

[0075] like Figure 6As shown in section 610, candidate entity node pairs are constructed based on entity nodes extracted from service data of the same application scenario. Each candidate entity node pair includes a source entity node and a target entity node. For example, for the entity nodes "Ocean Park", "Mermaid Show", and "travel" extracted from the application scenario service data "Ocean Park with Mermaid Show brings you a different travel experience", candidate entity node pairs can be constructed by pairing them together, thereby constructing multiple candidate entity node pairs, such as candidate entity node pair 1 (Mermaid Show, OceanPark), candidate entity node pair 2 (Ocean Park, travel), and candidate entity node pair 3 (Mermaid Show, travel), etc. It should be noted that in Figure 7 For simplicity, only two candidate entity node pairs are shown in the example.

[0076] In step 620, the entity text information and original application scenario service data of each candidate entity node pair are provided to the text representation model to generate entity representations of the source and target entity nodes in that candidate entity node pair. For example, the text description of candidate entity node pair 1 (Mermaid Show, Ocean Park) and the application scenario service data "OceanPark with Mermaid Show brings you a different travel experience" are provided to the BERT encoder to generate entity representations of entity nodes "Mermaid Show" and "Ocean Park". The text description of candidate entity node pair 2 (Ocean Park, travel) and the application scenario service data "Ocean Park with Mermaid Show brings you a different travel experience" are provided to the BERT encoder to generate entity representations of entity nodes "OceanPark" and "travel". The text description of candidate entity node pair 3 (Mermaid Show, travel) and the application scenario service data "Ocean Park with Mermaid Show brings you a different travel experience" are provided to the BERT encoder to generate entity representations of entity nodes "Mermaid Show" and "travel".

[0077] In step 630, based on the entity representations of the source and target entity nodes in each candidate entity node pair, the spatiotemporal relationship between the source and target entity nodes is predicted. For example, based on the entity representations of entity nodes "Mermaid Show" and "Ocean Park", it can be predicted whether a spatiotemporal relationship exists between entity nodes "Mermaid Show" and "Ocean Park"; based on the entity representations of entity nodes "Ocean Park" and "travel", it can be predicted whether a spatiotemporal relationship exists between entity nodes "Ocean Park" and "travel"; and based on the entity representations of entity nodes "Ocean Park" and "travel", it can be predicted whether a spatiotemporal relationship exists between entity nodes "Mermaid Show" and "travel".

[0078] After determining the spatiotemporal relationships between entity nodes as described above, in step 250, spatiotemporal edge relationships are created between entity nodes that have spatiotemporal relationships. The created spatiotemporal edge relationships may include, for example, "used for time" and "scene location".

[0079] Furthermore, in some embodiments, domain knowledge can also be obtained from public data. Subsequently, based on the obtained domain knowledge, domain knowledge edge relationships between entity nodes are constructed. In this specification, the term "domain knowledge edge" can reflect the association relationship between two entity nodes based on domain knowledge. For example, the entity node "Pneumonia" and the entity node "Respiratory Medicine" are associated based on medical domain knowledge; thus, a domain knowledge edge is constructed between entity nodes "Pneumonia" and "Respiratory Medicine". Similarly, the entity node "XX Fund" and the entity node "Fund Manager XXX" (the fund manager of "XX Fund") are associated based on financial domain knowledge; thus, a domain knowledge edge is constructed between entity nodes "XX Fund" and "Fund Manager XXX" (the fund manager).

[0080] After creating the edge relationships between entity nodes as described above, the knowledge graph creation process is complete. Figure 8 An example schematic diagram of a knowledge graph according to an embodiment of this specification is shown.

[0081] Using the aforementioned knowledge graph construction scheme, a knowledge graph with hierarchical relationships between entities can be constructed, thereby achieving generalization of entity nodes from fine-grained to coarse-grained. Furthermore, by using heterogeneous application scenario service data for knowledge graph construction, a general knowledge graph applicable to various application scenarios can be built. On the other hand, by constructing spatiotemporal edge relationships between entity nodes, the constructed knowledge graph can reflect when / where a user uses which service / goods to satisfy which user needs.

[0082] Figure 9 An example block diagram of a knowledge graph construction apparatus 900 according to an embodiment of this specification is shown. Figure 9 As shown, the knowledge graph construction device 900 includes an entity node extraction unit 910, a hierarchical relationship determination unit 920, a spatiotemporal relationship determination unit 930, and an edge relationship creation unit 940.

[0083] The entity node extraction unit 910 is configured to extract entity nodes from application scenario service data. The operation of the entity node extraction unit 910 can be referenced above. Figure 2 The operation described in 210.

[0084] The hierarchy relationship determination unit 920 is configured to determine the entity hierarchy relationship between entity nodes. The operation of the hierarchy relationship determination unit 920 can be referenced above. Figure 2 The operation described in 220.

[0085] The spatiotemporal relationship determination unit 930 is configured to determine the spatiotemporal relationships between entity nodes extracted from service data of the same application scenario. The operation of the spatiotemporal relationship determination unit 930 can be referenced above. Figure 2 The operation described in 240.

[0086] The edge relationship creation unit 940 is configured to determine the result based on the hierarchical relationship, create entity hierarchical edge relationships between entity nodes, and create spatiotemporal edge relationships between entity nodes that have spatiotemporal relationships. The operation of the edge relationship creation unit 940 can be referenced above. Figure 2 The operations described in 230 and 250.

[0087] In some embodiments, the knowledge graph construction apparatus may not include a spatiotemporal relationship determination unit. In this case, the edge relationship creation unit 940 does not need to create spatiotemporal edge relationships.

[0088] Optionally, in some embodiments, the knowledge graph construction apparatus may further include a domain knowledge acquisition unit and a domain knowledge edge construction unit. The domain knowledge acquisition unit is configured to acquire domain knowledge from public data. Correspondingly, the domain knowledge edge construction unit constructs domain knowledge edge relationships between entity nodes based on the domain knowledge.

[0089] Optionally, in some embodiments, the knowledge graph construction apparatus may further include an entity node merging unit. The entity node merging unit is configured to perform synonym association merging on entity nodes. Subsequently, a hierarchical relationship determination unit and a spatiotemporal relationship determination unit determine the entity hierarchical relationship, spatiotemporal relationship, and / or domain knowledge edge relationship between the merged entity nodes.

[0090] Figure 10 An example block diagram of a hierarchical relationship construction unit 1000 according to an embodiment of this specification is shown. Figure 10 As shown, the hierarchical relationship construction unit 1000 includes a superior node generation module 1010 and a hierarchical relationship determination module 1020.

[0091] The parent node generation module 1010 is configured to generate a parent entity node for each entity node using a text generation model. The hierarchy relationship determination module 1020 is configured to determine the entity hierarchy relationship between entity nodes based on the parent entity node generation result for each entity node. Specifically, for each entity node, in response to the existence of the generated parent entity node in the entity node set, the hierarchy relationship determination module 1020 determines that there is a hierarchical relationship between the generated parent entity node and the entity node. In response to the absence of the generated parent entity node in the entity node set, the hierarchy relationship determination module 1020 determines similar entity nodes of the generated parent entity node from the entity node set and determines that there is a hierarchical relationship between the similar entity nodes and the entity node. In some embodiments, the hierarchy relationship determination module 1020 may use a BK-tree-based search method to determine similar entity nodes of the generated parent entity node from the entity node set.

[0092] Figure 11 An example block diagram of a spatiotemporal relationship determination unit 1100 according to an embodiment of this specification is shown. Figure 11 As shown, the spatiotemporal relationship determination unit 1100 includes a candidate entity node pair construction module 1110, a text representation module 1120, and a spatiotemporal relationship prediction module 1130.

[0093] The candidate entity node pair construction module 1110 is configured to construct candidate entity node pairs based on entity nodes extracted from service data of the same application scenario. Each candidate entity pair includes a source entity node and a target entity node. The operation of the candidate entity node pair construction module 1110 can be referenced above. Figure 6 The operation described in 610.

[0094] The text representation module 1120 is configured to provide the entity text information of each candidate entity node pair and the original application scenario service data to the text representation model to generate entity representations of the source entity node and the target entity node in that candidate entity node pair. The operation of the text representation module 1120 can be referenced above. Figure 6 The operation described in 620.

[0095] The spatiotemporal relationship prediction module 1130 is configured to predict the spatiotemporal relationship between the source entity node and the target entity node in each candidate entity node pair based on the entity representations of the source entity node and the target entity node in each candidate entity node pair. The operation of the spatiotemporal relationship prediction module 1130 can be referenced above. Figure 6 The operation described in 630.

[0096] As referred above Figures 1 to 11 This specification describes a knowledge graph construction method and apparatus according to embodiments thereof. The knowledge graph construction apparatus described above can be implemented in hardware, software, or a combination of hardware and software.

[0097] Figure 12 An example schematic diagram of a knowledge graph device 1200 implemented using a computer system according to an embodiment of this specification is shown. Figure 12 As shown, the knowledge graph construction apparatus 1200 may include at least one processor 1210, a memory (e.g., non-volatile memory) 1220, a main memory 1230, and a communication interface 1240, and the at least one processor 1210, memory 1220, main memory 1230, and communication interface 1240 are connected together via a bus 1260. At least one processor 1210 executes at least one computer-readable instruction (i.e., the elements implemented in software described above) stored or encoded in the memory.

[0098] In one embodiment, computer-executable instructions are stored in memory that, when executed, cause at least one processor 1210 to: extract entity nodes from application scenario service data; determine entity hierarchy relationships between entity nodes; and, based on the determination results of the hierarchy relationships, create entity hierarchy edge relationships between entity nodes.

[0099] It should be understood that the computer-executable instructions stored in the memory, when executed, cause at least one processor 1210 to perform the above-described combinations in the various embodiments of this specification. Figures 1-11 The description includes various operations and functions.

[0100] According to one embodiment, a program product, such as a machine-readable medium (e.g., a non-transitory machine-readable medium), is provided. The machine-readable medium may have instructions (i.e., the elements implemented in software as described above), which, when executed by a machine, cause the machine to perform the above-described combinations of the various embodiments of this specification. Figures 1-11 The various operations and functions described. Specifically, a system or apparatus equipped with a readable storage medium storing software program code that implements the functions of any of the embodiments described above, and enabling the computer or processor of the system or apparatus to read and execute the instructions stored in the readable storage medium.

[0101] In this case, the program code itself, which can be read from a readable medium, can perform the functions of any of the above embodiments. Therefore, the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of the present invention.

[0102] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer or the cloud via a communication network.

[0103] According to one embodiment, a computer program product is provided, the computer program product including a computer program, which, when executed by a processor, causes the processor to perform the above-described combinations of the various embodiments of this specification. Figures 1-11 The description includes various operations and functions.

[0104] Those skilled in the art will understand that the various embodiments disclosed above can be modified and varied without departing from the spirit of the invention. Therefore, the scope of protection of this invention should be defined by the appended claims.

[0105] It should be noted that not all steps and units in the above process and system structure diagrams are mandatory; some steps or units can be omitted according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above embodiments can be a physical structure or a logical structure; that is, some units may be implemented by the same physical entity, or some units may be implemented by multiple physical entities, or they may be jointly implemented by certain components in multiple independent devices.

[0106] In the above embodiments, the hardware units or modules can be implemented mechanically or electrically. For example, a hardware unit, module, or processor may include permanent dedicated circuitry or logic (such as a dedicated processor, FPGA, or ASIC) to perform the corresponding operation. The hardware unit or processor may also include programmable logic or circuitry (such as a general-purpose processor or other programmable processor), which can be temporarily configured by software to perform the corresponding operation. The specific implementation method (mechanical, dedicated permanent circuitry, or temporarily configured circuitry) can be determined based on cost and time considerations.

[0107] The specific embodiments described above with reference to the accompanying drawings are exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of the claims. The term "exemplary" as used throughout this specification means "serving as an example, instance, or illustration" and does not imply that it is "preferred" or "advantageous" compared to other embodiments. Specific details are included to provide an understanding of the described techniques. However, these techniques can be practiced without these specific details. In some instances, well-known structures and apparatuses are shown in block diagram form to avoid obscuring the concepts of the described embodiments.

[0108] The foregoing description of this disclosure is provided to enable any person skilled in the art to implement or use this disclosure. Various modifications to this disclosure will be apparent to those skilled in the art, and the general principles defined herein can be applied to other variations without departing from the scope of this disclosure. Therefore, this disclosure is not limited to the examples and designs described herein, but is consistent with the widest scope of the principles and novel features disclosed herein.

Claims

1. A knowledge graph construction method, comprising: Extract entity nodes from application scenario service data; Determine the hierarchical relationship between the entity nodes; as well as Based on the results determined by the entity hierarchy relationship, an entity hierarchy edge relationship is created between the entity nodes; Determine the spatiotemporal relationships between entity nodes extracted from service data of the same application scenario. Determining the hierarchical relationship between the entity nodes includes: For each entity node, a text generation model is used to generate the parent entity node of that entity node; and For each entity node, In response to the existence of the generated parent entity node in the entity node, it is determined that there is a hierarchical relationship between the generated parent entity node and the entity node; In response to the generated parent entity node not existing in the entity node, a similar entity node of the generated parent entity node is determined from the entity node, and a hierarchical relationship is determined between the similar entity node and the entity node. Among these, determining the spatiotemporal relationships between entity nodes extracted from service data of the same application scenario includes: Based on entity nodes extracted from service data of the same application scenario, candidate entity node pairs are constructed, each candidate entity node pair including a source entity node and a target entity node; The entity text information and original application scenario service data of each candidate entity node pair are provided to the text representation model to generate entity representations of the source and target entity nodes in that candidate entity node pair; and Based on the entity representations of the source and target entity nodes in each candidate entity node pair, predict the spatiotemporal relationship between the source and target entity nodes in that candidate entity node pair.

2. The knowledge graph construction method as described in claim 1, wherein, The text generation model includes a text-to-text transfer transformer model.

3. The knowledge graph construction method as described in claim 1, wherein, The similar entity nodes determined from the generated parent entity node from the entity nodes include: Using a BK-tree-based search method, similar entity nodes to the generated parent entity nodes are determined from the entity nodes.

4. The knowledge graph construction method as described in claim 1 further includes: Create spatiotemporal edge relationships between entity nodes that have spatiotemporal relationships.

5. The knowledge graph construction method as described in claim 1, wherein, The text representation model includes the BERT model.

6. The knowledge graph construction method as described in claim 1, wherein, The entity nodes include general entity nodes and intent entity nodes.

7. The knowledge graph construction method as described in claim 6, wherein, The entity nodes are classified into basic entity nodes, category entity nodes, and domain entity nodes.

8. The knowledge graph construction method as described in claim 7, further comprising: Extracting domain knowledge from public data; Based on the domain knowledge, construct the neighborhood knowledge edge relationship between the entity nodes.

9. The knowledge graph construction method as described in claim 1, further comprising: The entity nodes are merged by performing synonym association.

10. The knowledge graph construction method as described in claim 1, wherein, The application scenario service data includes heterogeneous application scenario service data.

11. The knowledge graph construction method as described in claim 1, wherein, The application scenario service data includes user behavior data and / or application service description data.

12. A knowledge graph construction apparatus, comprising: The entity node extraction unit extracts entity nodes from application scenario service data. The hierarchy relationship determination unit determines the entity hierarchy relationship between the entity nodes; as well as The edge relationship creation unit creates entity hierarchical edge relationships between the entity nodes based on the hierarchy relationship determination result. The spatiotemporal relationship determination unit determines the spatiotemporal relationships between entity nodes extracted from service data of the same application scenario. The hierarchical relationship determination unit includes: The parent node generation module generates the parent entity node for each entity node using a text generation model; and The hierarchy relationship determination module, for each entity node, determines that there is a hierarchical relationship between the generated parent entity node and the entity node if the generated parent entity node exists in the entity node; and determines that there is a hierarchical relationship between the generated parent entity node and the entity node if the generated parent entity node does not exist in the entity node. The spatiotemporal relationship determination unit includes: The candidate entity node pair construction module constructs candidate entity node pairs based on entity nodes extracted from service data of the same application scenario. Each candidate entity node pair includes a source entity node and a target entity node. The text representation module provides the entity text information and original application scenario service data of each candidate entity node pair to the text representation model to generate entity representations of the source and target entity nodes in that candidate entity node pair; and The spatiotemporal relationship prediction module predicts the spatiotemporal relationship between the source entity node and the target entity node in each candidate entity node pair based on the entity representations of the source entity node and the target entity node in each candidate entity node pair.

13. The knowledge graph construction apparatus as described in claim 12, wherein, The hierarchical relationship determination module uses a BK tree-based search method to determine similar entity nodes of the generated parent entity node from the entity nodes.

14. The knowledge graph construction apparatus of claim 12, further comprising: The edge relationship creation unit creates spatiotemporal edge relationships between entity nodes that have spatiotemporal relationships.

15. The knowledge graph construction apparatus of claim 12, further comprising: The domain knowledge acquisition unit acquires domain knowledge from public data; as well as The domain knowledge edge construction unit constructs domain knowledge edge relationships between the entity nodes based on the domain knowledge.

16. The knowledge graph construction apparatus of claim 12, further comprising: The entity node merging unit performs synonym association merging on the entity nodes.

17. A knowledge graph construction apparatus, comprising: At least one processor; Memory coupled to the at least one processor; as well as A computer program stored in the memory, which is executed by the at least one processor to implement the knowledge graph construction method as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Hypernym determination method and device for hyponyms, electronic equipment and storage medium

    CN111611796A

  • Intention knowledge graph construction method, intention prediction method and article recommendation method and device

    CN116467467A