Introduction to Knowledge Graph
Micro Focus IDOL Knowledge Graph is an IDOL component that allows you to explore connections in a data set. You can define relationships between concepts or entities in IDOL documents, based on the field types in the document. Knowledge Graph then transforms the IDOL database into the set of relationships it contains. This set of relationships is called a graph.
You can use Knowledge Graph to enrich a database with meaningful, human-defined connections. The graph then allows you to create interesting queries to find out more about your data. For example, you can find out how many times something is connected to something else, and with what importance. There might be multiple types of connection in the graph, and each connection type might occur multiple times (represented by a count). You can also suggest new connections between entities based on their existing neighbors in the graph.
Knowledge Graph connects your data and reveals missing or hidden information. For example, you can use it to:
- find weak or fraudulent links in an e-mail chain.
- suggest a key competitive advantage
- find the fastest route to a particular market
- find an influential distributor
IDOL Knowledge Graph explicitly models relationships between parts of your data, offering an alternative view of your data to existing IDOL installations. This method of conceptualizing the data can make it easier to analyze patterns of dependency, causality, or endorsement, and to explain connections between items.
Graph Concepts
A graph is a representation of the relationships between concepts or entities.
Each concept is a node in the graph. The nodes have unique names, and Knowledge Graph assigns each node a unique ID. Relationships between nodes are represented by edges.
Edges are a directed connection between a source node to a target node. In addition, every edge has a type, and Knowledge Graph creates only one edge of each type between each unique pair of nodes (that is, a specified source and specified target). Each edge also has the following attributes:
- Count. The number of times a given edge occurs in the data. The first time a connection occurs in the data, Knowledge Graph creates the edge. Each subsequent time the same connection occurs, it increments the count attribute for the edge.
- Weight. A user-defined or automatically generated weight value. Knowledge Graph can use the weight of an edge as the distance along an edge when calculating the shortest path.
The following diagram shows an example graph.
Each node in this graph represents a person, identified by an e-mail address. All the edges have the type emailed.
The count represents the number of times a person has e-mailed a particular other person; for example, in this graph. Duncan has e-mailed Eleanor 100 times. The weight is a user-defined value; for example, in this graph it might correspond to the e-mail priority.
The graph also has the following features:
-
Path lengths. A path is a sequence of edges connecting two nodes that are not necessarily adjacent to each other in the graph. The length or weight of a path is the sum of the weights of its edges. For an unweighted path, this length is the number of edges on the path between two nodes. In this graph, the length of path from Felix to Alice is three, while from Felix to Eleanor is two. For all paths, edges are directional.
Multiple paths can exist between two nodes, and the shortest path is determined by comparing path lengths. In this graph, there are two paths between Bob and Duncan. The shortest path (unweighted) is the direct edge. However, if the direct edge had a high weight, the path from Bob to Carole to Duncan might be a shorter route.
-
In Degree. The in degree of a node is the number of edges that point to that node (the number of edges where the node is the target node). In this graph, Felix and Eleanor have an in degree of one, while Duncan has an in degree of three.
-
Out Degree. The out degree of a node is the number of edges that lead from a node (the number of edges where the node is the source node). In this graph, Carole, Eleanor, and Felix have an out degree of one, while Duncan and Bob have an out degree of two.
Create and Query a Graph
IDOL Knowledge Graph is an in-memory graph database, which also automatically persists its state to disk. You can configure the graph by defining edges in the server configuration file. For more information about configuration, see Configure Knowledge Graph.
You can index documents into Knowledge Graph in JSON format, for example by using the Connector Framework Server (CFS) to extract content from a repository. You can also index existing IDX documents into the server, by using the Python script provided in the Knowledge Graph installation.
The IDOL Knowledge Graph interface uses the ACI API. The interface includes actions to allow you to add data to your graph and to query the graph. The Knowledge Graph actions allow you to retrieve neighbors for specified nodes, paths between specified nodes, or subgraphs containing a specified set of nodes. It returns the information as IDOL XML responses.