Knowledge graph construction method and device and computer readable storage medium
By building a knowledge graph containing business paths and using one-way edges to represent affiliation relationships, the problem of poor consistency of knowledge graphs in the prior art is solved, and the accurate description and representation of business objects and their domain relationships is achieved.
Patent Information
- Application Number
- CN202310730470.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-19
- Publication Date
- 2024-12-20
AI Technical Summary
The existing knowledge graph has poor consistency in describing the affiliation between business objects and their domains, resulting in inconsistent understanding.
By obtaining business data, a knowledge graph containing business paths is built. The business path uses one-way edges to represent subordinate relationships, ensuring that the subordinate relationships of each node are arranged in sequence and clearly represent the relationship between business objects and their domains.
Improves consistency of the knowledge graph to ensure accurate description and representation of the affiliation between business objects and their domains.
Smart Images

Figure CN119166825A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a knowledge graph construction method, device and computer-readable storage medium. Background Art
[0002] Currently, the business scenarios that require the construction of knowledge graphs are becoming more and more complex, and the subordinate relationships between business objects and the domains to which they belong are also becoming more and more complex. However, when describing the subordinate relationships between business objects and the domains to which they belong, the current knowledge graph may have ambiguity in the description, resulting in poor consistency in the constructed knowledge graph. Summary of the invention
[0003] The embodiments of the present application provide a knowledge graph construction method, device and computer-readable storage medium, which improve the consistency of the constructed knowledge graph.
[0004] In one aspect, a knowledge graph construction method is provided, comprising: obtaining business data; wherein the business data comprises: information for describing a target business object and information for describing at least one domain to which the target business object belongs; in the case where the at least one domain is a plurality of domains, the plurality of domains are domains having a subordinate relationship;
[0005] A target knowledge graph is constructed based on the business data; the target knowledge graph includes a business path corresponding to the target business; the business path includes: a first leaf node, at least one first non-leaf node, and a unidirectional edge; the first leaf node is used to describe the target business object and at least one domain to which the target business object belongs; each of the first non-leaf nodes is used to describe a domain to which the target business object belongs, and the unidirectional edge points from the upper node to the lower node along the business path; the domain or business object described by the lower node is subordinate to the domain described by the upper node.
[0006] On the other hand, a knowledge graph construction device is provided, comprising: an acquisition unit and a processing unit;
[0007] an acquisition unit, configured to acquire business data; wherein the business data includes: information for describing a target business object and information for describing at least one domain to which the target business object belongs; in the case where the at least one domain is a plurality of domains, the plurality of domains are domains having a subordinate relationship;
[0008] A processing unit, used to construct a target knowledge graph based on the business data; the target knowledge graph includes a business path corresponding to the target business; the business path includes: a first leaf node, at least one first non-leaf node, and a unidirectional edge; the first leaf node is used to describe the target business object and at least one domain to which the target business object belongs; each of the first non-leaf nodes is used to describe a domain to which the target business object belongs, and the unidirectional edge points from the upper node to the lower node along the business path; the domain or business object described by the lower node is subordinate to the domain described by the upper node.
[0009] On the other hand, a knowledge graph construction device is provided, comprising: a memory and a processor; the memory and the processor are coupled; the memory is used to store a computer program; and the processor implements the knowledge graph construction method described in any of the above embodiments when executing the computer program.
[0010] On the other hand, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the knowledge graph construction method described in any of the above embodiments is implemented.
[0011] On the other hand, a computer program product is provided, which includes computer program instructions, and when the computer program instructions are executed by a processor, the knowledge graph construction method described in any of the above embodiments is implemented.
[0012] In an embodiment of the present application, when constructing a knowledge graph, a corresponding business path is constructed for the target business object in the knowledge graph based on at least one domain to which the target business object belongs in the business data and the subordinate relationship between these domains. The nodes of the business path are arranged in sequence based on the subordinate relationship between the content they describe (the content is a business object or a domain), and the subordinate relationship between adjacent nodes is represented by a unidirectional edge. Based on this, the knowledge graph constructed for business data in an embodiment of the present application can accurately describe the business object and the domain to which the business object belongs through the business path, and clearly represent the subordinate relationship between the domains to which the business object belongs, thereby improving the consistency of the knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only drawings of some embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0014] Figure 1 A schematic diagram of a process for constructing a knowledge graph provided in some embodiments of the present application;
[0015] Figure 2 A schematic diagram of a data concept model of a data concept field provided for some embodiments of the present application;
[0016] Figure 3 A schematic diagram of the structure of a knowledge graph established based on a data concept model of a data concept field provided in some embodiments of the present application;
[0017] Figure 4 A flowchart of another knowledge graph construction method provided for some embodiments of the present application;
[0018] Figure 5 A flowchart of another knowledge graph construction method provided for some embodiments of the present application;
[0019] Figure 6 A flowchart of another knowledge graph construction method provided for some embodiments of the present application;
[0020] Figure 7 A schematic diagram of a data concept model after merging data concept fields provided in some embodiments of the present application;
[0021] Figure 8 A schematic diagram of the structure of a knowledge graph after merging business domains provided in some embodiments of the present application;
[0022] Fig. 9 A flowchart of another knowledge graph construction method provided for some embodiments of the present application;
[0023] Fig.10 A schematic diagram of the structure of a knowledge graph after splitting into business subdomains provided in some embodiments of the present application;
[0024] Fig.11 A flowchart of another knowledge graph construction method provided for some embodiments of the present application;
[0025] Fig.12 A schematic diagram of the structure of a knowledge graph construction device provided in some embodiments of the present application;
[0026] Fig.13 A schematic diagram of the hardware structure of a knowledge graph construction device provided for some embodiments of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0030] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "multiple" means two or more.
[0031] Currently, the business scenarios that require the construction of knowledge graphs are becoming more and more complex, and the subordinate relationships between business objects and the domains to which they belong are also becoming more and more complex. However, when describing the subordinate relationships between business objects and the domains to which they belong, the current knowledge graph may have ambiguity in the description, which leads to poor consistency in the constructed knowledge graph.
[0032] For example, in wireless communication network scenarios, the current fourth generation mobile communication technology (4G) and / or fifth generation mobile communication technology (5G) networks have complex network structures, complex business scenarios, and complex R&D organizational structures. In this case, each network node in the wireless communication network scenario usually uses different modeling rules to construct a knowledge graph. This will lead to a lack of association between the knowledge graphs of different network nodes. When business and data collaboration is performed based on these knowledge graphs, different knowledge graphs describe the subordinate relationships between business objects and the domains to which the business objects belong in different ways, which may result in ambiguous descriptions and inconsistent understanding of the knowledge graphs.
[0033] In view of this, an embodiment of the present application provides a method for constructing a knowledge graph. When constructing a knowledge graph, based on at least one domain to which the target business object belongs in the business data and the subordinate relationship between these domains, a corresponding business path is constructed for the target business object in the knowledge graph. The nodes of the business path are arranged in sequence based on the subordinate relationship between the content described by them (the content is a business object or a domain), and the subordinate relationship between adjacent nodes is represented by a unidirectional edge. Based on this, the knowledge graph constructed for business data in an embodiment of the present application can accurately describe the business object and the domain to which the business object belongs through the subordinate relationship between each node in the business path, and clearly represent the subordinate relationship between the domains to which the business object belongs, thereby improving the consistency of the knowledge graph.
[0034] like Figure 1 As shown, a knowledge graph construction method provided in an embodiment of the present application is as follows: Figure 1 As shown, the knowledge graph construction method includes the following steps 101 and 102. The following is a detailed description:
[0035] Step 101: The knowledge graph construction device obtains business data.
[0036] The business data includes: information for describing the target business object and information for describing at least one domain to which the target business object belongs; in the case where the at least one domain is multiple domains, the multiple domains are domains with a subordinate relationship.
[0037] As an example, the above business data can be data in the data concept field for which a knowledge graph needs to be established. The data concept field refers to the division of business fields in the current actual business. For example, the business data can be specifically "business domain: wireless network; business subdomain: 5G network; business subdomain: tariff: business object: user a". At this time, the business data represents the tariff situation of user a in the business field of 5G network of the wireless network.
[0038] Business objects refer to objects that need to be specifically defined or described, and domains refer to the division of hierarchical labels for business objects in specific areas of the business domain. For example, the business object that needs to be defined or described in the above business data is user a; the domain to which the business object belongs is determined by dividing the fields of "wireless network, 5G network, and tariffs".
[0039] Figure 2 FIG. 1 is a schematic diagram showing a data concept model of a data concept field in the present application. Figure 2As shown, the data concept domain includes business domain 0, which specifically includes business subdomain 1 and business subdomain 2; business subdomain 1 further includes business subdomain 11, ..., business subdomain 1n, where n is an integer greater than 1. Business subdomain 11 includes business object A, business object B, and business object C. Business subdomain 1n includes business object X. Business subdomain 2 includes business subdomain 21, ..., business subdomain 2m, where m is a positive integer. Business subdomain 21 includes business object D, business object E, and business object C. Business subdomain 2m includes business object Y.
[0040] When it is necessary to establish a knowledge graph for the data concept field, the knowledge graph construction device can first obtain the data of each business object from the data concept field as business data.
[0041] For example, the knowledge graph construction device obtains the data of business object A as business data, and the data of business object A includes: business domain 0, business subdomain 1, business subdomain 11, and business object A.
[0042] For another example, the knowledge graph construction device obtains data of business object D as business data, and the data of business object D includes: business domain 0, business subdomain 2, business subdomain 21, and business object D.
[0043] It can be understood that the knowledge graph construction device can obtain the data of any business object as business data according to this method. The content in the business data is determined based on the business domain and business subdomain to which the business object belongs in the data concept field. This application does not elaborate on this.
[0044] Step 102: The knowledge graph construction device constructs a target knowledge graph based on business data.
[0045] Among them, the target knowledge graph includes a business path corresponding to the target business (recorded as the target business path); the business path includes: a first leaf node, at least one first non-leaf node, and a unidirectional edge; the first leaf node is used to describe the target business object and at least one domain to which the target business object belongs; each first non-leaf node is used to describe a domain to which the target business object belongs, and the unidirectional edge business path points from the upper node to the lower node; the domain or business object described by the lower node is subordinate to the domain described by the upper node.
[0046] As an example, Figure 3 A knowledge graph construction device is shown based on Figure 2 The knowledge graph is built based on the data concept model in the data concept field.
[0047] like Figure 3As shown, the knowledge graph includes the business path corresponding to each business object. The business path of each business object includes the business domain node, business subdomain node, and business object node to which the business object belongs. Each node is arranged in sequence based on its ownership relationship, and a unidirectional edge is used to point from the upper node to the lower node.
[0048] When multiple lower-level nodes are subordinate to the same upper-level node, the upper-level node points to the multiple lower-level nodes respectively through multiple unidirectional edges.
[0049] The same business object corresponds to different business paths based on the domains to which it belongs. For example, the domains to which business object C belongs are: business domain 0, business subdomain 1, business subdomain 11; and business domain 0, business subdomain 2, business subdomain 21. In this case, business object C corresponds to two business paths, namely: business domain 0 node-business subdomain 1 node-business subdomain 11 node-business object C node; and: business domain 0 node-business subdomain 2 node-business subdomain 21 node-business object C* node. At this time, the business object C node and the business object C* node in the two paths can be pointed to respectively through bidirectional edges. It means that the two business object nodes are the same business object node in different paths.
[0050] In the knowledge graph construction device based on Figure 2 When establishing an indication graph for the data concept model in the data concept domain, the business paths corresponding to the business objects can be created based on the data of each business object in the data concept model. Figure 3 The knowledge graph shown.
[0051] Above Figure 3 This is only a schematic diagram of a knowledge graph provided in the embodiment of the present application. The knowledge graph constructed by the knowledge graph construction device in the embodiment of the present application can also be other types of knowledge graphs. For example, Figure 3 In addition to the knowledge graph with the tree structure shown, the knowledge graph in the embodiment of the present application can also be a knowledge graph with a network structure, or a knowledge graph with a block diagram structure, or a knowledge graph of other shapes, and the present application does not limit this.
[0052] The embodiment of the present application provides a method for constructing a knowledge graph. When constructing a knowledge graph, based on at least one domain to which the target business object belongs in the business data and the subordinate relationship between these domains, a corresponding business path is constructed for the target business object in the knowledge graph. The nodes of the business path are arranged in sequence based on the subordinate relationship between the content described by them (the content is a business object or a domain), and the subordinate relationship between adjacent nodes is represented by a unidirectional edge. Based on this, the knowledge graph constructed for business data in the embodiment of the present application can accurately describe the business object and the domain to which the business object belongs through the business path, and clearly represent the subordinate relationship between the domains to which the business object belongs, thereby improving the consistency of the knowledge graph.
[0053] The following, combined Figure 3 , the knowledge graph provided in the embodiment of the present application is described in detail.
[0054] The knowledge graph in the embodiment of the present application includes nodes and edges, wherein nodes are used to describe domains or business objects in business data, and edges are used to connect two nodes, and the relationship between the two connected nodes is represented by the different directions of the edges. Nodes and edges are described in detail below.
[0055] 1. Node
[0056] Nodes are used to describe domains or business objects in business data. In the embodiment of the present application, the knowledge graph can adopt a knowledge graph with a tree structure. In this case, based on the different content described by the nodes, the nodes can be further divided into leaf nodes and non-leaf nodes.
[0057] Leaf nodes are used to describe business objects. They are the lowest level nodes in the knowledge graph, that is, the last node in a business path.
[0058] In some embodiments, a leaf node includes a business feature field of a business object, a business primary key of the business object, and node identifiers of all non-leaf nodes in the business path to which the leaf node belongs.
[0059] Among them, the business feature field is used to represent the specific information of the business object. For example, when the business data is "business domain: wireless network; business subdomain: 5G network; business subdomain: tariff: business object: user a", the business feature field of user a in the business data can specifically include the value of the tariff generated when user a uses the 5G wireless network. The business primary key of the business object is the identifier of the business object. The node identifier is used to uniquely identify each node in the knowledge graph. The identifiers of the corresponding business object nodes of the same business object in different business paths are also different.
[0060] As an example, when adding a node identifier to a leaf node, the knowledge graph construction device searches for all non-leaf nodes in a business path starting from the root node, and adds the node identifiers of all the non-leaf nodes found to the leaf nodes of the business path.
[0061] Non-leaf nodes are used to describe the domain to which the business object belongs. One leaf node describes one domain. The domain to which the business object belongs can be further divided into business domain and business subdomain. The non-leaf node describing the business domain is the root node, and the node describing the business subdomain is the non-root node.
[0062] The root node is used to describe the business domain to which the business object belongs. It is the top-level node in the knowledge graph, that is, the front-end node in a business path.
[0063] In some embodiments, the root node includes a business primary key of the business domain described by the root node. As an example, the business primary key of the business domain is an identifier of the business domain.
[0064] Non-root nodes are used to describe the business subdomain to which a business object belongs. They are nodes in the middle layer of the knowledge graph, that is, nodes between the root node and the leaf node in a business path. The number of non-root nodes in a business path is related to the number of business subdomains to which the business object corresponding to the business path belongs. When a business object has N business subdomains, the business path includes N non-root nodes, where N is an integer.
[0065] In some embodiments, the non-root node includes a business primary key of the business subdomain described by the non-root node; as an example, the business primary key of the business subdomain is an identifier of the business subdomain.
[0066] 2. Edge
[0067] Edges are used to represent the connection relationship between nodes in the knowledge graph. The edges in the embodiments of the present application include unidirectional edges and bidirectional edges.
[0068] A unidirectional edge is used to connect two nodes with a subordinate relationship and points from the upper node to the lower node.
[0069] One-way edges can be specifically divided into: One-way edges from the root node to the non-root node, indicating that the pointed non-root node is subordinate to the root node at the other end.
[0070] A unidirectional edge from a non-root node to another non-root node indicates that the pointed non-root node is subordinate to the non-root node at the other end.
[0071] A unidirectional edge from a root node to a leaf node indicates that the pointed leaf node is subordinate to the root node at the other end. In this case, the business object described by the leaf node has no business subdomain to which it belongs and is directly subordinate to the business domain.
[0072] A unidirectional edge from a non-root node to a leaf node indicates that the pointed leaf node is subordinate to the non-root node at the other end. In this case, the business object described by the leaf node has a business subdomain to which it belongs.
[0073] A bidirectional edge is used to connect leaf nodes in two different business paths that describe the same business object. The two leaf nodes connected by a bidirectional edge are used to describe the same business object, but the business object can belong to different business domains or business subdomains in the data concept domain.
[0074] In some embodiments, the knowledge graph provided by the embodiments of the present application is a knowledge graph of a fractal structure, in which a node and one or more nodes of the next level and a unidirectional edge together form a fractal structure of smaller granularity. Based on the fractal structure, the knowledge graph has stronger compatibility and is easier to implement when the content in the knowledge graph needs to be changed.
[0075] The knowledge graph provided in the embodiment of the present application has been described in detail above. The following is a detailed description of the process of creating a knowledge graph by the knowledge graph creation device in the embodiment of the present application in combination with a specific implementation method.
[0076] As an implementation method, when the knowledge graph creation device constructs a target knowledge graph based on business data, it first queries whether the existing nodes in the current knowledge graph include nodes related to the target business objects in the business data and the domains to which they belong, and then constructs the target knowledge graph based on the query results. The process is described in detail below.
[0077] Combination Figure 1 ,like Figure 4 As shown, in some implementations, the above step 102 can be specifically implemented through the following steps 401-402.
[0078] Step 401: The knowledge graph creation device queries whether there is at least one first non-leaf node mentioned above in the current knowledge graph.
[0079] In some embodiments, the knowledge graph creation device queries whether there are non-leaf nodes describing each domain in at least one domain to which the target business object belongs in the current knowledge graph (that is, whether there are all the first non-leaf nodes), and whether the arrangement order of these first non-leaf nodes is the same as the arrangement order of the target business path requirements. The arrangement order of the target business path requirements is the subordinate order between at least one domain to which the business object belongs.
[0080] If all the first non-leaf nodes exist in the current knowledge graph, and the arrangement order is the same as the arrangement order of the target business path requirements, the knowledge graph creation device determines that at least one of the above-mentioned first non-leaf nodes exists in the current knowledge graph.
[0081] If only some of the first non-leaf nodes exist in the current knowledge graph; or no first non-leaf node exists in the knowledge graph; or although all the first non-leaf nodes exist in the knowledge graph, the arrangement order of these first non-leaf nodes is different from the arrangement order of the target business path requirements, the knowledge graph creation device determines that at least one of the above-mentioned first non-leaf nodes does not exist in the current knowledge graph.
[0082] As an example, the knowledge graph can query whether there is at least one first non-leaf node mentioned above in the current knowledge graph based on the business primary key.
[0083] Specifically, the knowledge graph creation device determines the business primary key of the target business data and the business primary key of each domain to which the target business belongs, and arranges the above business primary keys based on the subordinate relationship between each domain and the business object to obtain a first sort. After that, the knowledge graph creation device queries the current knowledge graph for nodes including the above business primary keys, and records multiple nodes in the same business path as target nodes, and the knowledge graph creation device determines whether the arrangement order of these target nodes in the business path is the same as the first sort.
[0084] When the business primary key in the target node includes the business primary key of each domain to which the target business belongs, and the order of the target node in the business path is the same as the first order, the knowledge graph creation device determines that at least one of the above-mentioned first non-leaf nodes exists in the current knowledge graph. In other cases, the knowledge graph creation device determines that one or more of the above-mentioned at least one first non-leaf node does not exist in the current knowledge graph.
[0085] As an example, based on Figure 2 and Figure 3 , the knowledge graph creation device obtains the business data of business object A. The business primary key of business object A is: ObjectA; business object A belongs to: business domain 0-business subdomain 1-business subdomain 11 in sequence. The business primary key of business domain 0 is: Domain0; the business primary key of business subdomain 1 is: Domain1; the business primary key of business subdomain 11 is: Domain11. In this case, the first order of the business primary key of business object A is: Domain0-Domain1-Domain11-ObjectA.
[0086] The knowledge graph creation device queries whether there is a business path in the current knowledge graph whose node's business primary key includes the above-mentioned "Domain0-Domain1-Domain11".
[0087] If there is a node of a service path whose service primary key includes the above-mentioned "Domain0-Domain1-Domain11", it is determined whether the arrangement order of the nodes including these service primary keys is the same as the order of "Domain0-Domain1-Domain11".
[0088] If the arrangement order is also the same, the knowledge graph creation device determines that at least one of the above-mentioned first non-leaf nodes exists in the current knowledge graph.
[0089] Otherwise, the knowledge graph creation device determines that one or more first non-leaf nodes among the at least one first non-leaf node do not exist in the current knowledge graph.
[0090] Step 402: The knowledge graph creation device updates the current knowledge graph based on the query results to determine the target knowledge graph.
[0091] In some embodiments, the query results include: Case 1, at least one of the above-mentioned first non-leaf nodes exists in the current knowledge graph; Case 2, one or more of the above-mentioned first non-leaf nodes does not exist in the current knowledge graph.
[0092] In situation 1, the knowledge graph creation device does not need to create the at least one first non-leaf node in the current knowledge graph, and can directly determine the target business path based on the at least one first non-leaf node existing in the current knowledge graph.
[0093] In situation 2, the knowledge graph creation device needs to start from the bottom-level first leaf node among the first non-leaf nodes existing in the current knowledge graph, create the non-existent first non-leaf node and first leaf node based on the belonging relationship between the business subdomains, and determine the target business path based on the created first non-leaf node and first leaf node.
[0094] Since the process of creating a knowledge graph by the knowledge graph creation device is different under different query results, the process of creating a knowledge graph by the knowledge graph creation device in Case 1 and Case 2 in the above query results is described in detail below.
[0095] Case 1: The query result is that there is at least one first non-leaf node mentioned above in the current knowledge graph.
[0096] As an example, for the business data of the above-mentioned business object A, if the knowledge graph creation device queries and finds that there is a target node in a business path of the current knowledge graph whose business primary keys are arranged in the order of "Domain0-Domain1-Domain11", it is determined that the current query result satisfies the above-mentioned situation 1.
[0097] In case 1, combined with Figure 4,like Figure 5 As shown, the above step 402 can be specifically implemented through the following steps 501 to 503.
[0098] Step 501: The knowledge graph creation device determines whether there is a first leaf node in the current knowledge graph.
[0099] That is to say, when the knowledge graph creation device determines that there is at least one first non-leaf node in the current knowledge graph, it further determines whether there is a first leaf node in the current knowledge graph.
[0100] As an example, for the business data of the above-mentioned business object A, the knowledge graph creation device queries whether there is a target node in the current knowledge graph whose business primary keys are arranged in the order of "Domain0-Domain1-Domain11-ObjectA".
[0101] If it exists, the knowledge graph creation device determines that there is a first leaf node in the current knowledge graph.
[0102] If it does not exist, the knowledge graph creation device determines that the first leaf node does not exist in the current knowledge graph.
[0103] Step 502: When there is a first leaf node in the current knowledge graph, the knowledge graph creation device adds a business feature field of the target business object in the first leaf node to obtain the target knowledge graph.
[0104] The information used to describe the target business object in the business data includes a business feature field.
[0105] In this case, the knowledge graph creation device determines that at least one of the first non-leaf nodes and the first leaf node mentioned above already exist in the current knowledge graph. That is, a business path corresponding to the target business already exists in the current knowledge graph. At this time, the knowledge graph creation device does not need to repeatedly create a business path corresponding to the target business, but directly adds the business feature field contained in the information used to describe the business object in the target business data to the leaf node of the business path.
[0106] As an example, for the business data of the above-mentioned business object A, the knowledge graph creation device determines through query that there are target nodes in the current knowledge graph whose business primary keys are arranged in the order of "Domain0-Domain1-Domain11-ObjectA", then the knowledge graph creation device adds the business feature field of business object A to the nodes whose business primary key is ObjectA to obtain the target knowledge graph.
[0107] For example, when the business data of business object A is "business domain: wireless network; business subdomain: 5G network; business subdomain: tariff: business object: user a", the knowledge graph creation device determines that a business path that describes user a and its domain in the order of attribution already exists in the current knowledge graph. After that, the knowledge graph construction device updates the characteristic field of user a in the business data of business object A to the leaf node of the path, indicating that user a has generated new tariff information.
[0108] Step 503: When the first leaf node does not exist in the current knowledge graph, the knowledge graph creation device creates the first leaf node in the current knowledge graph, as well as a unidirectional edge from the last first non-leaf node in at least one first non-leaf node to the first leaf node, to obtain the target knowledge graph.
[0109] In this case, the knowledge graph creation device determines that at least one of the above-mentioned first non-leaf nodes already exists in the current knowledge graph, and no first leaf node exists. That is, all non-leaf nodes in the business path corresponding to the target business data already exist in the current knowledge graph. At this time, the knowledge graph creation device directly creates a first leaf node in the current knowledge graph, and connects the newly created first leaf node and the last first non-leaf node in the above-mentioned at least one first non-leaf node through a unidirectional edge. The last first non-leaf node is used to describe the business domain or business subdomain to which the target business object directly belongs.
[0110] As an example, for the business data of the above-mentioned business object A, the knowledge graph creation device queries and determines that there are target nodes in the current knowledge graph whose business primary keys are arranged in the order of "Domain0-Domain1-Domain11", but there are no target nodes whose business primary keys are arranged in the order of "Domain0-Domain1-Domain11-ObjectA". At this time, the knowledge graph creation device creates a first leaf node with the business primary key of ObjectA, and adds the feature data of business object A to the first leaf node. After that, the knowledge graph creation device creates a unidirectional edge from the above-mentioned target node with the business primary key of Domain11 to the first leaf node.
[0111] As an example, after creating the above-mentioned first leaf node, the knowledge graph creation device adds the node identifier of the target node whose business primary key is arranged in the order of "Domain0-Domain1-Domain11" to the above-mentioned first leaf node. In this way, the node identifier in the first leaf node can accurately represent each node in the business path to which the first leaf node belongs. Furthermore, the knowledge graph creation device can add the node identifier to the first leaf node in the order of the above-mentioned business primary key. In this way, the node identifier in the first leaf node can also represent the arrangement order and superior-subordinate relationship of each node in the business path.
[0112] The above describes in detail the process of the knowledge graph creation device constructing the target knowledge graph based on the business data for situation 1, when the query result is that there is at least one first non-leaf node in the current knowledge graph.
[0113] Below, situation 2, where the query result is that one or more first non-leaf nodes do not exist in the current knowledge graph, is explained in detail.
[0114] As an example, for the business data of the business object A, if the knowledge graph creation device finds that there is no target node in the current knowledge graph whose business primary key is arranged in the order of "Domain0-Domain1-Domain11", it is determined that the current query result meets the above situation 2.
[0115] In case 2, since the current knowledge graph does not have the above one or more first non-leaf nodes, the knowledge graph creation device needs to first create the non-existent first non-leaf nodes and the first leaf node.
[0116] In case 2, combined with Figure 4 ,like Figure 5 As shown, the above step 402 can be specifically implemented by the following step 504. The details are described below.
[0117] Step 504: The knowledge graph creation device creates a target first non-leaf node, a first leaf node, a first non-leaf node between the target first non-leaf node and the first leaf node, and a unidirectional edge between every two upper and lower nodes in the current knowledge graph to obtain a target knowledge graph.
[0118] The target first non-leaf node is the non-leaf node closest to the root node among the one or more first non-leaf nodes.
[0119] As an example, for the business data of the above-mentioned business object A, the knowledge graph creation device queries the current knowledge graph and finds that there are target nodes whose business primary keys are arranged in the order of "Domain0-Domain1". At this time, the knowledge graph creation device creates the first non-leaf node whose business primary key is Domain11, and the first leaf node whose business primary key is ObjectA, and adds the feature data of business object A to the first leaf node. After that, the knowledge graph creation device creates a unidirectional edge from the first non-leaf node whose business primary key is Domain11 to the first leaf node.
[0120] As an example, after creating the above-mentioned first leaf node, the knowledge graph creation device adds the node identifier of the target node whose business primary key is arranged in the order of "Domain0-Domain1-Domain11" to the above-mentioned first leaf node. Furthermore, the knowledge graph creation device can add the node identifier to the first leaf node in the above-mentioned business primary key order.
[0121] In some embodiments, Figure 5 As shown, after creating the first leaf node in the above step 504, the method further includes:
[0122] Step 505: The knowledge graph creation device queries whether there is a second leaf node in the current knowledge graph.
[0123] The second leaf node is a leaf node that is subordinate to the second non-leaf node and is used to describe the target business object; the second non-leaf node and the first non-leaf node are located in different business paths.
[0124] Step 506: If there is a second leaf node, the knowledge graph creation device creates a business path in the current knowledge graph and then creates bidirectional edges pointing to the first leaf node and the second leaf node respectively to obtain the target knowledge graph.
[0125] As an example, combining Figure 2 , for the business data of business object C, business object C exists in business subdomain 1 and business subdomain 2. In business subdomain 1, the first order of the business primary key of business object C is: Domain0-Domain1-Domain11-ObjectC. In business subdomain 2, the first order of the business primary key of business object C is: Domain0-Domain2-Domain21-ObjectC*.
[0126] After the knowledge graph creation device completes the creation of the knowledge graph of the business data of business object C in business subdomain 1, when creating the knowledge graph of the business data of business object C in business subdomain 2, the creation nodes in the current knowledge graph are in the order of business primary keys: Domain0-Domain2-Domain21-ObjectC*. After this, the knowledge graph creation device queries that there is a second leaf node in the knowledge graph with a business primary key of ObjectC, which is also used to describe business object C. At this time, the knowledge graph creation device creates bidirectional edges pointing to: the second leaf node with a business primary key of ObjectC and the first leaf node with a business primary key of ObjectC*.
[0127] In this way, based on the bidirectional edge, the same business object in different business domains / business subdomains can be accurately represented.
[0128] In some embodiments, after creating the target first non-leaf node, if the target first non-leaf node is a non-root node, the knowledge graph creation device also needs to connect the target first non-leaf node and its parent node to determine the business path of the target business data, and then determine the target knowledge graph. This process can be specifically implemented by the following steps 507:
[0129] Step 507: The knowledge graph creation device creates a unidirectional edge from the target parent node to the target first non-leaf node to obtain the target knowledge graph.
[0130] The target upper-level node is the upper-level node of the non-leaf node to which the second leaf node is subordinate.
[0131] In some embodiments, after creating the target first non-leaf node, if the target first non-leaf node is a root node, the knowledge graph creation device also needs to create a new root node and establish a connection relationship between the new root node and the target first non-leaf node. This process can be specifically implemented by following the following steps 508.
[0132] Step 508: The knowledge graph creation device creates a first root node, a unidirectional edge from the first root node to the first target node, and a unidirectional edge from the first root node to the second target node in the current knowledge graph to obtain a target knowledge graph.
[0133] Among them, the first target node is the root node to which the first leaf node in the current knowledge graph belongs, and the second target node is the root node to which the second leaf node in the current knowledge graph belongs.
[0134] In this way, since the first leaf node and the second leaf node are leaf nodes that describe the same business object in different business domains, the two nodes are associated in the data concept. Through the above step 508, the business domains to which the two nodes belong can be merged to obtain a new business domain that can simultaneously include the two business paths of the business object.
[0135] The above is a detailed description of the process of creating a knowledge graph by the knowledge graph creation device in the embodiment of the present application.
[0136] Below, in combination with specific implementation methods, the process of upward growth and downward growth of the knowledge graph in this application is described in detail.
[0137] Among them, upward growth refers to the process of merging multiple root nodes into a new root node to obtain a higher-level business domain. Downward growth refers to the process of splitting a non-leaf node into multiple leaf nodes to obtain a more subdivided business subdomain.
[0138] Scenario 1: Upward growth of the knowledge graph.
[0139] like Figure 6 As shown, the process of knowledge graph growing upward can be specifically implemented through the following steps 601 and 602.
[0140] Step 601: The knowledge graph creation device receives a first instruction.
[0141] The first instruction is used to indicate merging multiple target root nodes of the target knowledge graph.
[0142] In some embodiments, multiple business domains may be merged in the data concept domain to generate a higher-level business domain, and the original business domain may be degraded into a business subdomain. For example, in the original data concept domain, telecom operator A and telecom operator B are two separate business domains. Later, due to changes in the data concept domain, a new business domain telecom operator is generated. At this time, telecom operator A and telecom operator B need to be merged into the new business domain telecom operator. Telecom operator A and telecom operator B will degenerate from the original business domain to a business subdomain and be subordinate to the new business domain telecom operator.
[0143] As an example, combining Figure 2 ,like Figure 7 As shown, the data concept domain includes business domain i, which specifically includes business subdomain 3; business subdomain 3 further includes business subdomain 31, ..., business subdomain 3k, where k is an integer greater than 1. Business subdomain 31 includes business object F, business object G, and business object H. Business subdomain 3k includes business object L.
[0144] According to the change of the current data concept domain, it is necessary to merge business domain 0 and business domain i into a higher-level business domain j. Business domain 0 degenerates into business subdomain 0, and business domain i degenerates into business subdomain i. At this time, a first instruction can be input into the knowledge graph creation device to obtain a knowledge graph of the data concept model after the fusion of business domain 0 and business domain i.
[0145] Step 602: In response to the first instruction, the knowledge graph creation device creates a second root node in the target knowledge graph, and a unidirectional edge from the second root node to each target root node.
[0146] As an example, the knowledge graph creation device is based on Figure 7 The target knowledge graph created is as follows Figure 8 shown.
[0147] like Figure 8 As shown, after the knowledge graph creation device receives the first instruction, the knowledge graph creation device creates a second root node, which is used to describe the new business domain j. Figure 7 The business domain 0 node in degenerates into the business subdomain 0 node, and the business domain i node degenerates into the business subdomain i node. The knowledge graph creation device creates a unidirectional edge from the business domain j node to the business subdomain 1 node, and a unidirectional edge from the second root node to the business subdomain 2 node, to obtain a merged knowledge graph.
[0148] In some embodiments, the knowledge graph creation device concatenates the business primary key of each target root node to obtain the business primary key of the second root node. The knowledge graph creation device adds the node identifier of the second root node to all leaf nodes under the second root node. Figure 8 In the knowledge graph shown, the knowledge graph creation device concatenates the business primary keys of the business subdomain 0 node and the business subdomain i node to obtain the business primary key of the business subdomain j node. The knowledge graph creation device adds the node identifier of the business domain j node to the business object A node, business object B node, business object C node, business object X node, business object D node, business object E node, business object C* node, business object F node, business object G node, business object H node, business object L node, and business object Y node.
[0149] The above is a detailed description of the upward growth process of the knowledge graph in combination with a specific implementation method. Based on the above upward growth method, when it is necessary to merge business domains in the knowledge graph, the business domain merger can be accurately realized, which improves the compatibility of the knowledge graph and enhances the accuracy when merging different knowledge graphs.
[0150] Scenario 2: The knowledge graph grows downward.
[0151] like Fig. 9As shown, the process of downward growth of the knowledge graph can be specifically implemented through the following steps 901 and 902.
[0152] Step 901: The knowledge graph creation device receives a second instruction.
[0153] The second instruction is used to instruct to split multiple third non-leaf nodes from the target non-leaf node of the target knowledge graph.
[0154] In some embodiments, in the data concept field, there may be a situation where a business domain is split into multiple business domains, or a business subdomain is split into multiple business subdomains. For example, in the original data concept field, user billing is a business subdomain. Due to the increase in billing services, user billing needs to be refined and split into user Internet billing and user voice billing. At this time, the user billing business subdomain needs to be split into a user Internet billing business subdomain and a user voice billing business subdomain.
[0155] For example, if it is necessary to split business subdomain 1 into business subdomain 13 and business subdomain 14, a second instruction for splitting business subdomain 1 into business subdomain 13 and business subdomain 14 is input into the knowledge graph creation device.
[0156] Step 902: In response to the second instruction, the knowledge graph creation device creates multiple third non-leaf nodes in the target knowledge graph, and a unidirectional edge from the target non-leaf node to each third non-leaf node.
[0157] As an example, combining Figure 3 ,like Fig.10 As shown, after receiving the second instruction, the knowledge graph creation device splits the business subdomain 1 node into a business subdomain 13 node and a business subdomain 14 node, and creates a unidirectional edge from the business subdomain 1 node to the business subdomain 13 node, and a unidirectional edge from the business subdomain 1 node to the business subdomain 14 node.
[0158] In one possible implementation, combining Fig. 9 ,like Fig.11 As shown, after creating multiple third non-leaf nodes, the method also includes the following step 1101.
[0159] Step 1101: The knowledge graph creation device performs the following target operations on each third non-leaf node, and the target operations include:
[0160] The knowledge graph creation device determines the split business object in the business subdomain described by any third non-leaf node.
[0161] As an example, the business objects included in the business subdomain 13 are business object A and business object B, and the business objects included in the business subdomain 14 are business object A and business object C. In this case, the knowledge graph creation device determines that the split business objects in the business subdomain 13 node are business object A and business object B; the split business objects in the business subdomain 14 node are business object A and business object C.
[0162] The knowledge graph creation device creates a first target leaf node for describing the split business object in the target knowledge graph, and a unidirectional edge pointing from any of the above-mentioned third non-leaf nodes to the first target leaf node.
[0163] As an example, combining Fig.11 The knowledge graph creation device creates a business object A* node and a business object B* node after the business subdomain 13 node of the current knowledge graph, and creates a unidirectional edge from the business subdomain 13 node to the business object A* node and a unidirectional edge from the business subdomain 13 node to the business object B* node; creates a business object A' node and a business object C' node after the business subdomain 14 node, and creates a unidirectional edge from the business subdomain 14 node to the business object A node and a unidirectional edge from the business subdomain 14 node to the business object C node.
[0164] In a possible implementation, the method further includes the following steps 1102 and 1103.
[0165] Step 1102: The knowledge graph creation device determines a second target leaf node among the subordinate nodes of the target non-leaf node that is the same as the first business object described by the first target leaf node.
[0166] Step 1103: The knowledge graph creation device creates bidirectional edges in the target knowledge graph, pointing to the first target leaf node and the second target leaf node respectively.
[0167] As an example, combining Fig.11 For the business object A* node, the knowledge graph creation device queries whether there is a node describing business object A in the target object under the business subdomain 1 node, and queries the business object A node for describing business object A. In this case, the knowledge graph creation device creates bidirectional edges pointing to the business object A* node and the business object A node respectively.
[0168] For other nodes, the knowledge graph creation device performs similar operations to create bidirectional edges pointing to the business object B* node and the business object B node respectively; bidirectional edges pointing to the business object A' node and the business object A node respectively; and bidirectional edges pointing to the business object C' node and the business object C* node respectively.
[0169] The above is a detailed description of the downward growth process of the knowledge graph in combination with the specific implementation method. Based on the downward growth method of the knowledge graph, when a business domain or business subdomain in the data concept field needs to be split into finer-grained business subdomains, the corresponding nodes and edges can be adjusted directly in the current knowledge graph without recreating the knowledge graph. The amount of data required to adjust the knowledge graph when dividing finer-grained business subdomains is reduced, while ensuring the consistency of the adjusted knowledge graph with the data concept field.
[0170] It is understandable that in order to realize the above functions, the knowledge graph construction device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments of the present application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0171] The embodiment of the present application can divide the functional modules of the knowledge graph construction device according to the above method embodiment. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one functional module. The above integrated module can be implemented in the form of hardware or software. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.
[0172] Fig.12 is a schematic diagram of the structure of a knowledge graph construction device provided in an embodiment of the present application. The knowledge graph construction device can execute the knowledge graph construction device provided in the above method embodiment. Fig.12 As shown, the knowledge graph construction device includes: an acquisition unit 1201 and a processing unit 1202.
[0173] The acquisition unit 1201 is used to acquire business data; wherein the business data includes: information for describing a target business object and information for describing at least one domain to which the target business object belongs; in the case where the at least one domain is multiple domains, the multiple domains are domains with a subordinate relationship;
[0174] Processing unit 1202 is used to construct a target knowledge graph based on the business data; the target knowledge graph includes a business path corresponding to the target business; the business path includes: a first leaf node, at least one first non-leaf node, and a unidirectional edge; the first leaf node is used to describe the target business object and at least one domain to which the target business object belongs; each of the first non-leaf nodes is used to describe a domain to which the target business object belongs, and the unidirectional edge points from the upper node to the lower node along the business path; the domain or business object described by the lower node is subordinate to the domain described by the upper node.
[0175] In some embodiments, the processing unit 1202 is further used to: query whether the at least one first non-leaf node exists in the current knowledge graph; and update the current knowledge graph based on the query result to determine the target knowledge graph.
[0176] In some embodiments, the processing unit 1202 is also used to: when the query result is that at least one first non-leaf node exists in the current knowledge graph, determine whether the first leaf node exists in the current knowledge graph; when the first leaf node exists in the current knowledge graph, add the business feature field of the target business object to the first leaf node to obtain the target knowledge graph; the information in the business data used to describe the target business object includes the business feature field.
[0177] In some embodiments, the processing unit 1202 is also used to: when the query result is that the at least one first non-leaf node exists in the current knowledge graph, determine whether the first leaf node exists in the current knowledge graph; when the first leaf node does not exist in the current knowledge graph, create the first leaf node in the current knowledge graph, and a unidirectional edge from the last first non-leaf node in the at least one first non-leaf node to the first leaf node, to obtain the target knowledge graph.
[0178] In some embodiments, the processing unit 1202 is also used to: when the query result is that one or more of the first non-leaf nodes do not exist in the current knowledge graph, create a target first non-leaf node, the first leaf node, the first non-leaf node between the target first non-leaf node and the first leaf node, and a unidirectional edge between every two upper and lower nodes in the current knowledge graph to obtain the target knowledge graph; the target first non-leaf node is the non-leaf node closest to the root node among the one or more first non-leaf nodes.
[0179] In some embodiments, the processing unit 1202 is also used to: query whether there is a second leaf node in the current knowledge graph; the second leaf node is a leaf node that is subordinate to a second non-leaf node and is used to describe the target business object; the second non-leaf node and the first non-leaf node are in different business paths; if the second leaf node exists, then after creating the business path in the current knowledge graph, create bidirectional edges pointing to the first leaf node and the second leaf node respectively to obtain the target knowledge graph.
[0180] In some embodiments, the domain to which the target business object belongs includes one or more business subdomains; the at least one first non-leaf node also includes one or more non-root nodes; each of the non-root nodes is used to describe a business subdomain to which the target business object belongs; the processing unit 1202 is also used to: create a unidirectional edge from the target parent node to the target first non-leaf node to obtain the target knowledge graph; the target parent node is the parent node of the non-leaf node to which the second leaf node belongs.
[0181] In some embodiments, the domain to which the target business object belongs includes a business domain; the at least one first non-leaf node includes a root node; the root node is used to describe the business domain to which the target business object belongs; the processing unit 1202 is also used to create a first root node, a unidirectional edge from the first root node to the first target node, and a unidirectional edge from the first root node to the second target node in the current knowledge graph to obtain the target knowledge graph; wherein the first target node is the root node to which the first leaf node belongs in the current knowledge graph, and the second target node is the root node to which the second leaf node belongs in the current knowledge graph.
[0182] In some embodiments, the acquisition unit 1201 is also used to: receive a first instruction; the first instruction is used to instruct the merging of multiple target root nodes of the target knowledge graph; the processing unit 1202 is also used to create a second root node in the target knowledge graph and a unidirectional edge from the second root node to each of the target root nodes in response to the first instruction.
[0183] In some embodiments, the acquisition unit 1201 is also used to receive a second instruction, wherein the second instruction is used to instruct the splitting of multiple third non-leaf nodes from the target non-leaf node of the target knowledge graph; the processing unit 1202 is also used to create the multiple third non-leaf nodes in the target knowledge graph in response to the second instruction, as well as a unidirectional edge from the target non-leaf node to each of the third non-leaf nodes.
[0184] In some embodiments, the processing unit 1202 is also used to: perform the following target operation for each of the third non-leaf nodes, and the target operation includes: determining a split business object in the business subdomain described by any third non-leaf node; creating a first target leaf node for describing the split business object in the target knowledge graph, and a unidirectional edge from any third non-leaf node to the first target leaf node.
[0185] In some embodiments, the processing unit 1202 is also used to: determine a second target leaf node among the subordinate nodes of the target non-leaf node, which is the same as the first business object described by the first target leaf node; and create bidirectional edges in the target knowledge graph pointing to the first target leaf node and the second target leaf node respectively.
[0186] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the present application embodiment provides another possible structure of the knowledge graph construction device involved in the above-mentioned embodiment. Fig.13 As shown, the knowledge graph construction device includes: a processor 1302 and a bus 1304. In some embodiments, the knowledge graph construction device may also include a memory 1301; in some embodiments, the knowledge graph construction device may also include a communication interface 1303.
[0187] Processor 1302 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present application. The processor 1302 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present application. Processor 1302 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0188] The communication interface 1303 is used to connect with other devices via a communication network, such as Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0189] The memory 1301 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0190] As a possible implementation, the memory 1301 may exist independently of the processor 1302, and the memory 1301 may be connected to the processor 1302 via a bus 1304 to store instructions or program codes. When the processor 1302 calls and executes the instructions or program codes stored in the memory 1301, the knowledge graph construction device provided in the embodiment of the present application can be implemented.
[0191] In another possible implementation, the memory 1301 may also be integrated with the processor 1302 .
[0192] The bus 1304 may be an extended industry standard architecture (EISA) bus, etc. The bus 1304 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0193] Some embodiments of the present application provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) having computer program instructions stored therein. When the computer program instructions are executed on a computer, the computer executes a knowledge graph construction device as described in any of the above embodiments.
[0194] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or magnetic tapes, etc.), optical disks (e.g., compact disks (CD), digital versatile disks (DVD), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.). The various computer-readable storage media described in this application may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.
[0195] An embodiment of the present application provides a computer program product comprising instructions. When the computer program product is run on a computer, the computer is enabled to execute the knowledge graph construction device described in any of the above embodiments.
[0196] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A knowledge graph construction method, characterized in that: include: Acquire business data; wherein the business data includes: information for describing a target business object and information for describing at least one domain to which the target business object belongs; in the case where the at least one domain is a plurality of domains, the plurality of domains are domains having a subordinate relationship; A target knowledge graph is constructed based on the business data; the target knowledge graph includes a business path corresponding to the target business; the business path includes: a first leaf node, at least one first non-leaf node, and a unidirectional edge; the first leaf node is used to describe the target business object and at least one domain to which the target business object belongs; each of the first non-leaf nodes is used to describe a domain to which the target business object belongs, and the unidirectional edge points from the upper node to the lower node along the business path; the domain or business object described by the lower node is subordinate to the domain described by the upper node.
2. The method according to claim 1, characterized in that The constructing a target knowledge graph based on the business data includes: Query whether the at least one first non-leaf node exists in the current knowledge graph to obtain a query result; The current knowledge graph is updated based on the query result to determine the target knowledge graph.
3. The method according to claim 2, characterized in that The updating the current knowledge graph based on the query result to determine the target knowledge graph includes: In the case where the query result is that at least one first non-leaf node exists in the current knowledge graph, determining whether the first leaf node exists in the current knowledge graph; In the case where the first leaf node exists in the current knowledge graph, the business feature field of the target business object is added to the first leaf node to obtain the target knowledge graph; the information in the business data used to describe the target business object includes the business feature field.
4. The method according to claim 2, characterized in that: The updating of the current knowledge graph based on the query result to determine the target knowledge graph includes: In the case where the query result is that at least one first non-leaf node exists in the current knowledge graph, determining whether the first leaf node exists in the current knowledge graph; In the case that the first leaf node does not exist in the current knowledge graph, the first leaf node is created in the current knowledge graph, and a unidirectional edge is pointed from the last first non-leaf node among the at least one first non-leaf node to the first leaf node, so as to obtain the target knowledge graph.
5. The method according to claim 2, characterized in that: The updating of the current knowledge graph based on the query result to determine the target knowledge graph includes: When the query result is that one or more of the first non-leaf nodes do not exist in the current knowledge graph, create a target first non-leaf node, the first leaf node, a first non-leaf node between the target first non-leaf node and the first leaf node, and a one-way edge between every two upper and lower nodes in the current knowledge graph to obtain the target knowledge graph; The target first non-leaf node is the non-leaf node closest to the root node among the one or more first non-leaf nodes.
6. The method according to claim 5, characterized in that After creating the first leaf node, the method further includes: Query whether there is a second leaf node in the current knowledge graph; the second leaf node is a leaf node that is subordinate to the second non-leaf node and is used to describe the target business object; wherein the second non-leaf node and the first non-leaf node are located in different business paths; If the second leaf node exists, after creating the business path in the current knowledge graph, create bidirectional edges pointing to the first leaf node and the second leaf node respectively to obtain the target knowledge graph.
7. The method according to claim 6, characterized in that The domain to which the target business object belongs includes one or more business subdomains; the at least one first non-leaf node also includes one or more non-root nodes; each of the non-root nodes is used to describe a business subdomain to which the target business object belongs; In the case where the target first non-leaf node is a non-root node, before obtaining the target knowledge graph, the method further includes: Create a unidirectional edge from the target parent node to the target first non-leaf node to obtain the target knowledge graph; wherein the target parent node is the parent node of the non-leaf node to which the second leaf node is subordinate.
8. The method according to claim 6, characterized in that The domain to which the target business object belongs includes a business domain; the at least one first non-leaf node includes a root node; the root node is used to describe the business domain to which the target business object belongs; In the case where the target first non-leaf node is a root node, before obtaining the target knowledge graph, the method further includes: Creating a first root node, a unidirectional edge from the first root node to a first target node, and a unidirectional edge from the first root node to a second target node in the current knowledge graph to obtain the target knowledge graph; Among them, the first target node is the root node to which the first leaf node belongs in the current knowledge graph, and the second target node is the root node to which the second leaf node belongs in the current knowledge graph.
9. The method according to any one of claims 1 to 8, characterized in that: The domain to which the target business object belongs includes a business domain; the at least one first non-leaf node includes a root node; the root node is used to describe the business domain to which the target business object belongs; After constructing the target knowledge graph based on the business data, the method further includes: Receive a first instruction; the first instruction is used to instruct to merge multiple target root nodes of the target knowledge graph; In response to the first instruction, a second root node and a unidirectional edge pointing from the second root node to each of the target root nodes are created in the target knowledge graph.
10. The method according to any one of claims 1 to 8, characterized in that: After constructing the target knowledge graph based on the business data, the method further includes: Receive a second instruction, where the second instruction is used to instruct to split a plurality of third non-leaf nodes from the target non-leaf node of the target knowledge graph; In response to the second instruction, the multiple third non-leaf nodes are created in the target knowledge graph, as well as a unidirectional edge from the target non-leaf node to each of the third non-leaf nodes.
11. The method according to claim 10, characterized in that The method further comprises: The following target operation is performed for each of the third non-leaf nodes, where the target operation includes: Determine a split business object in a business subdomain described by any third non-leaf node; A first target leaf node for describing the split business object and a unidirectional edge from any third non-leaf node to the first target leaf node are created in the target knowledge graph.
12. The method according to claim 11, characterized in that The method further comprises: Determine, among subordinate nodes of the target non-leaf node, a second target leaf node having the same first business object as that described by the first target leaf node; Create bidirectional edges in the target knowledge graph, pointing to the first target leaf node and the second target leaf node respectively.
13. A knowledge graph construction device, characterized in that: include: a processor and a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions so that the knowledge graph construction device executes the knowledge graph construction method as described in any one of claims 1-12.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer executes the knowledge graph construction method as described in any one of claims 1 to 12.
