Ontology-Based Data Storage for Distributed Knowledge Bases

By modeling query workloads as hypergraphs and mapping them to data node capabilities, the method addresses inefficiencies in managing distributed knowledge bases, optimizing data placement and reducing computational costs.

JP7546664B2Active Publication Date: 2024-09-06INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022520219
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-10-07
Filing Date
2020-09-30
Publication Date
2024-09-06
Estimated Expiration
2040-09-30

AI Technical Summary

Technical Problem

Existing systems for managing distributed knowledge bases (KBs) are inefficient due to a lack of understanding of domain ontology, leading to ineffective query routing and high computational resource usage, especially in federated databases that rely on centralized mediators.

Method used

A method involving a data orchestrator that models query workload information as a hypergraph, generates mappings based on ontology concepts and data node capabilities, and establishes a distributed knowledge base for efficient data placement, reducing computational costs and improving system responsiveness.

Benefits of technology

This approach enables efficient data storage and retrieval by aligning data placement with existing workloads and node capabilities, minimizing computational waste and enhancing system responsiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007546664000011
    Figure 0007546664000011
  • Figure 0007546664000005
    Figure 0007546664000005
  • Figure 0007546664000014
    Figure 0007546664000014
Patent Text Reader

Abstract

A technique for distributed data placement is provided. Query workload information corresponding to a domain is determined by a data orchestrator, and the query workload information is modeled as a hypergraph, the hypergraph including a set of vertices and a set of hyperedges, and each vertex in the set of vertices corresponds to a concept in an ontology associated with the domain. A mapping between the concepts and the multiple data nodes is generated based on the hypergraph and further based on predefined capabilities of each of the multiple data nodes. A distributed knowledge base is established based on the generated mapping.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to knowledge bases, and more particularly, to the use of ontologies for efficient data placement in distributed knowledge bases. [Background technology]

[0002] More and more enterprises are utilizing Knowledge Bases (KBs) to enhance analytics and improve decision-making, efficiency, and effectiveness of the enterprise's systems. Often, KBs are relatively specialized within the enterprise's domain. For example, a financial institution may rely on a KB that contains critical financial knowledge, such as data related to government regulation of financial markets. Conversely, a healthcare enterprise may maintain a KB that contains a significant amount of data collected from medical literature. There is a great need for deep domain specialization, effective systems, and techniques to manage these KBs. Existing systems that do not recognize a domain ontology that provides an entity-centric view of the domain schema cannot effectively manage and route queries against the KB.

[0003] Furthermore, a KB may be distributed across multiple data sites with different capabilities and costs to improve its operation. Existing architectures, such as federated databases, rely on a centralized mediator to aggregate data from each such source. This is inefficient and does not scale well. Furthermore, existing systems do not understand the underlying ontology and capabilities of each data source and therefore cannot route queries efficiently. This reduces the efficiency of such systems and requires a significant amount of computational resources to respond to standard queries. Summary of the Invention

[0004] According to an aspect of the present invention, there is provided a method including determining, by a data orchestrator, query workload information corresponding to a region. The method further includes modeling the query workload information as a hypergraph, the hypergraph including a set of vertices and a set of hyperedges, each vertex in the set of vertices corresponding to a concept in an ontology associated with the region. The method further includes generating a mapping between concepts and a plurality of data nodes based on the hypergraph and further based on a predefined capability of each of the plurality of data nodes, and establishing a distributed knowledge base based on the generated mapping. The method advantageously enables the data orchestrator to efficiently locate and store data within a distributed environment based on an existing workload and the capabilities of each data node. In this manner, providing an efficient data map reduces the computational expense required to store data and further improves system responsiveness.

[0005] According to another embodiment of the present disclosure, determining the query workload information includes receiving a set of previous ontology queries. A method according to this embodiment includes generating a first set of concepts accessed by a first query in the set of previous ontology queries and generating a second set of operations performed by the first query. The first summarized query is generated by identifying a group of queries from the set of previous ontology queries that includes a corresponding matching first set, and determining an aggregated set of operations for each query in the identified group of queries based on the corresponding second set. The first summarized query is then associated with the aggregated set of operations and concepts reflected in the corresponding matching first set. In such an embodiment, the data orchestrator is improved over existing systems by effectively summarizing the previous queries and determining a suitable storage plan for the data to meet anticipated needs. This again improves efficiency and reduces computational waste during run-time.

[0006] According to yet another embodiment of the present disclosure, modeling the query workload information as a hypergraph includes creating a vertex for each concept in the ontology and creating a first hyperedge for a first summarized query, the first hyperedge connecting a first set of vertices in the hypergraph, the first set of vertices corresponding to concepts reflected in the first set of matches. In one such embodiment, the method further includes labeling the first hyperedge with an aggregated set of operations. Such an embodiment advantageously enables a data orchestrator to effectively represent the workload in the form of a graph, allowing the orchestrator to better and efficiently evaluate data and drive improved placement decisions, thereby dramatically improving runtime performance.

[0007] According to yet another embodiment of the present disclosure, generating the mapping includes creating a first cluster for a first operation included in the hypergraph. The embodiment then includes identifying a first set of concepts connected by a first hyperedge in the hypergraph and identifying a first set of operations indicated by the first hyperedge. The method includes assigning the first set of concepts to the first cluster upon determining that the first set of operations includes the first operation. One advantage of such an embodiment is that it allows for efficient evaluation of the hypergraph, resulting in reliable data placement requiring minimal movement at run time.

[0008] According to another embodiment of the present disclosure, generating the mapping further includes mapping the first set of concepts to one or more data nodes by identifying a set of data nodes capable of performing the first operation and mapping each concept in the first set of concepts to each data node in the identified set of data nodes. This advantageously enables the system to generate data mappings based on node capabilities while taking into account prior workloads, thereby increasing the likelihood that the system will be well positioned to respond to future queries with minimal latency and resource consumption.

[0009] According to another embodiment of the present disclosure, generating the mapping includes identifying a first set of concepts connected by a first hyperedge in the hypergraph, identifying a first set of operations indicated by the first hyperedge, and determining a minimum set of data nodes that can collectively perform the first set of operations. The method then includes generating clusters containing the first set of concepts and labeling the clusters with the minimum set of data nodes. Such an embodiment improves over existing solutions by minimizing data duplication within the system, reducing storage costs, and further reducing latency and resource consumption due to data movement within the system.

[0010] According to a further embodiment of the present disclosure, generating the mapping further includes mapping each concept in the first set of concepts to each data node in the minimum set of data nodes, thereby also reducing storage costs and latency of the system.

[0011] According to yet another embodiment of the present disclosure, establishing the distributed knowledge base includes, for each concept in the ontology, identifying each data node indicated by the mapping, identifying data corresponding to each concept, and facilitating storage of the identified data in each data node. Such an embodiment advantageously enables an orchestrator to efficiently generate mappings and place data on appropriate nodes in an efficient manner, reducing both pre- and during-runtime computations.

[0012] According to different embodiments of the present disclosure, any of the aforementioned embodiments may be implemented by a computer-readable storage medium that includes computer program code that performs operations when executed by operation of one or more computer processors. In an embodiment, the operations performed may correspond to any combination of the methods and embodiments described above.

[0013] According to yet another alternative embodiment of the present disclosure, any of the above-described embodiments may be implemented by a system including one or more computer processors and a memory storing a program, the program performing operations when executed by the one or more computer processors. In an embodiment, the operations performed may correspond to any combination of the methods and embodiments described above. [Brief description of the drawings]

[0014] [Figure 1] FIG. 1 illustrates an architecture configured for arranging knowledge base data and routing ontology queries according to one embodiment disclosed herein. [Diagram 2] FIG. 2 illustrates a workflow for processing and routing ontology queries according to one embodiment disclosed herein. [Figure 3A]FIG. 2 illustrates an example ontology that may be used to evaluate and route queries in accordance with one embodiment disclosed herein. [Figure 3B] FIG. 2 illustrates an example ontology that may be used to evaluate and route queries in accordance with one embodiment disclosed herein. [Figure 4A] FIG. 2 illustrates a workflow for parsing and routing an example ontology query according to one embodiment disclosed herein. [Figure 4B] FIG. 2 illustrates a workflow for parsing and routing an example ontology query according to one embodiment disclosed herein. [Diagram 5] FIG. 2 is a block diagram illustrating a query processing orchestrator configured to route ontology queries according to one embodiment disclosed herein. [Figure 6] 1 is a flow diagram illustrating a method for processing and routing ontology queries according to one embodiment disclosed herein. [Figure 7] 1 is a flow diagram illustrating a method for processing ontology queries and efficiently routing query blocks according to one embodiment disclosed herein. [Figure 8] 1 is a flow diagram illustrating a method for evaluating potential query routing plans for efficiently routing an ontology query according to one embodiment disclosed herein. [Figure 9] 1 is a flow diagram illustrating a method for routing an ontology query according to one embodiment disclosed herein. [Figure 10] FIG. 2 illustrates a workflow for evaluating a workload and storing knowledge base data according to one embodiment disclosed herein. [Figure 11]1 is an exemplary hypergraph used to evaluate workloads and store knowledge base data according to one embodiment disclosed herein. [Figure 12] FIG. 2 is a block diagram illustrating a data placement orchestrator configured to evaluate workloads and store data according to one embodiment disclosed herein. [Figure 13] 1 is a flow diagram illustrating a method for evaluating and summarizing query workloads to inform data placement decisions according to one embodiment disclosed herein. [Figure 14] FIG. 1 is a flow diagram illustrating a method for modeling ontology workloads and informing data placement decisions according to one embodiment disclosed herein. [Figure 15] 1 is a flow diagram illustrating a method for evaluating a hypergraph to drive data placement decisions according to one embodiment disclosed herein. [Figure 16] 1 is a flow diagram illustrating a method for evaluating a hypergraph to drive data placement decisions according to one embodiment disclosed herein. [Figure 17] 1 is a flow diagram illustrating a method for mapping ontology concepts to storage nodes according to one embodiment disclosed herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0015] Embodiments of the present disclosure provide an ontology-driven architecture that enables support of various query types using multiple data stores or nodes, each of which may have different capabilities. Embodiments of the present disclosure advantageously allow queries to be efficiently processed and routed to diverse data stores based on existing ontologies, improving system latency and reducing the computational resources required to identify and return relevant data. In embodiments, the techniques described herein can be used to support a variety of query applications, including natural language and conversational interfaces. The systems described herein can provide transparent access to the underlying backend stores via an abstract ontology query language (OQL) that allows users to express information needs against a domain ontology.

[0016] In one embodiment, to improve performance of various query types, the system optimizes the placement of KB data in various stores by first placing a subset of data in the appropriate backend store according to the capabilities of the backend store. In some embodiments, at runtime, the system parses, compiles, and translates OQL queries into the query language and / or API of the various backend data nodes. In one embodiment, the system described herein also employs a query orchestrator that routes queries to one or more backend stores according to the placement of the associated data. This efficient routing reduces the latency required to generate and return results to the requesting entity.

[0017] In an embodiment, the KB data queried may include any information, including structured, unstructured, or semi-structured data, or a combination thereof. To support deep domain specialization, the embodiments disclosed herein leverage domain ontologies. In particular, in one embodiment, the domain ontology defines entities and entity relationships only at the metadata level and does not provide instance-level information. That is, in one embodiment, the domain ontology provides the domain schema, while instance-level data is stored in various back-end data stores (also referred to as data sites and data nodes). In an embodiment, the data nodes may include any store architecture, including relational databases, inverted index document store(s), Java(R)Script Object Notation (JSON) stores, graph databases, and the like.

[0018] In some embodiments, the system can move, store, and index KB data in any backend that provides the necessary capabilities to support the query type. In other words, the system does not need to federate data across existing operational data stores. This is clearly different from federated database and mediator based approaches. In some embodiments, the system performs a capability-based data placement step, where knowledge base data conforming to a particular ontology is stored in various backend resources. In at least one embodiment, the multi-store architecture is configured to minimize data movement between different data stores, since data movement incurs high data transformation costs as well as data transfer costs. One solution to minimize data movement costs is to replicate data in all backend nodes to ensure that queries can be answered by a single store without data movement. However, this also requires unnecessary duplication, defeating the purpose of leveraging the various capabilities of multiple data stores using a multi-store architecture. In embodiments of the present disclosure, KB data may be stored in any number of backend resources, and the system intelligently routes queries to select the optimal data store to minimize data movement costs.

[0019] In some embodiments described herein, the system architecture provides a suitable abstraction to query data without knowing how the data is stored and indexed in multiple data stores. In one embodiment, to achieve this goal, an Ontology Query Language (OQL) is introduced. The OQL is expressed against the enterprise's domain ontology. Users of the system need only know about the domain ontology that defines the entities and entity relationships. In an embodiment, the system understands the mapping of concepts from various ontologies to the backend data stores, as well as their corresponding schemas, and provides a query translator from OQL to the target query language of the underlying system.

[0020] In an embodiment, one or more data nodes may be involved in any particular query. An embodiment of the present disclosure provides an approach to identify the participating stores and generate appropriate sub-queries to compute the final query result. In some embodiments, the system does not use a mediator approach, where a global query is split into multiple sub-queries and the final result is assembled in a mediator. Instead, one or more of the data stores are used as mediators, and a back-end data store completes the query answer. For example, in one embodiment, a relational database is used to complete the query response, since a relational store is more likely to be able to complete the join operation quickly.

[0021] FIG. 1 illustrates an architecture 100 configured to route ontology queries according to one embodiment disclosed herein. In the illustrated embodiment, a query processing orchestrator 115 receives an ontology query 105 constructed using OQL, having a corresponding ontology schema 110. The ontology query 105 is processed by the query processing orchestrator 115 to identify and return relevant data. In an embodiment, the query processing orchestrator 115 routes the query to a backend 125 that includes various data nodes 130A-N. In the illustrated embodiment, this routing is performed based at least in part on a set of concept mappings 140 and capabilities 135.

[0022] In the illustrated embodiment, the ontology query 105 is formatted based on OQL, which is used to express queries that operate on the set of concepts and relationships in the ontology schema 110. In an embodiment, the OQL can express queries that include aggregations, unions, nested subqueries, etc. In some embodiments, the OQL can also express full-text and field search predicates, as well as path queries. An OQL query typically consists of a single query block or a union of multiple OQL query blocks, with each OQL query block consisting of a SELECT clause or a FROM clause. In some embodiments, an OQL block can also include a WHERE clause, a GROUP BY clause, an ORDER BY clause, a FETCH FIRST clause, or a HAVING clause, or a combination thereof. In an embodiment, the OQL query operates on a set of tuples constructed by a Cartesian product of the concepts referenced in the FROM clause.

[0023] In embodiments, ontology schema 110 describes entities and entity relationships in the KB at a semantic level, regardless of how the data is actually stored in back-end resources. In one embodiment, ontology schema 110 describes entities related to a domain, properties that may be associated with various entities, and possible relationships between various entities. Ontology schema 110 can provide an expressive data model that captures various real-world relationships between entities, such as function, inheritance, and union. In some embodiments, ontology schema 110 does not include instance data. That is, ontology schema 110 defines entities and relationships, but does not include data related to a particular entity or relationship in the KB. For example, ontology schema 110 may define that an entity "company" can have multiple properties, such as "name" and "address," but ontology schema 110 does not include data for a particular instance, such as a company with a name of "Main Street Grocer" and an address of "123 Main Street." Instead, this instance data is maintained independently within the backend 125.

[0024] In an embodiment, the conceptual mapping 140 indicates a correspondence between the logical schema represented by the ontology schema 110 and the physical schema of the underlying data nodes 130 in the backend 125. For example, if the ontology schema 110 is defined as O(C,R,P), where C={C n Let |1≦n≦N} denote the set of concepts (also called entities), and R={r k Let |1≦k≦K} denote the set of relationships between concepts / entities, and P={p mAssume that |1≦m≦M} is a set of data properties. In one embodiment, each relationship exists between two or more concepts, but each data property corresponds to a characteristic of a concept. In the illustrated embodiment, concept mapping 140 indicates a mapping between concepts, relationships, and properties (defined in ontology schema 110) and underlying data nodes 130. That is, in one such embodiment, concept mapping 140 indicates each data node 130 that stores a particular concept (e.g., entity), relationship, and / or property. For example, concept mapping 140 may indicate that instances of the entity "company" are stored in data nodes 130A and 130M, and data related to a particular type of relationship between "company" entities is stored in data node 130B.

[0025] In one embodiment, capabilities 135 indicate the operations and capabilities provided by each data node 130. In some embodiments, the capabilities of a data node 130 are expressed as views (view definitions) that enumerate all possible queries that can be processed / answered by the data store. This approach, while flexible, is not scalable because the number of view definitions can become very large, leading to problems rewriting queries that use an infinite number of views. To improve scalability, some embodiments of the present disclosure describe the capabilities of a backend data node 130 in terms of the operations (e.g., joins, grouping, aggregation, fuzzy text matching, path expressions, etc.) that the backend data node 130 supports, rather than enumerating all possible queries that can be answered by the data store. Furthermore, at least one embodiment of the present disclosure provides a more fine-grained description of each supported operation by utilizing a mechanism for expressing any associated restrictions. For example, in one such embodiment, an aggregation function of type MAX may only be supported for numeric types.

[0026] Thus, in one embodiment, the capabilities 135 indicate, for each particular data node 130, the set of operations that the node can complete (and in some embodiments, associated limitations on that capability). In an embodiment, the query processing orchestrator 115 evaluates the capabilities 135 and the concept mappings 140 to select one or more data nodes 130 to which the received ontology query 105 should be routed. To do this, in one embodiment, the query processing orchestrator 115 identifies data nodes 130 that either contain the required data (e.g., based on the concept mappings 140), are capable of completing the required operations (e.g., based on the capabilities 135), or both. The query processing orchestrator 115 can then generate a sub-query for each selected data node 130.

[0027] In an embodiment, the query processing orchestrator 115 translates sub-queries as needed using a set of translators 120A-N. In the embodiment shown, each type of data node 130 has a corresponding translator 120. In some embodiments, each translator 120A-N receives all or part of an OQL query and generates an equivalent query in the language and / or syntax of the corresponding data node 130A-N. For example, translator 120A may generate an SQL query for a relational database contained in data node 130A, and translator 120B outputs a graph query for a graph store contained in data node 130B.

[0028] In an embodiment, the translator 120 relies on a schema mapping that maps concepts and relationships represented by the domain ontology to appropriate schema objects in the target physical schema. For example, in the case of a relational backend data node 130, the schema mapping can provide a correspondence between (1) concepts in the ontology and tables in the relational schema, (2) data properties or attributes of concepts in the ontology and table columns in the physical schema, or (3) constraints between relationships between concepts in the ontology and primary and foreign keys between tables corresponding to the concepts in the database, or a combination thereof. Similarly, in the case of a JSON document store, the schema mapping may map concepts, data properties, and relationships represented in the ontology to appropriate field paths in the JSON documents.

[0029] In some embodiments, the translator 120 also handles special concepts and relationships that may be represented in an ontology, such as unions, inheritance, and traversals between concepts that typically represent join conditions between concepts in an ontology. Depending on the physical data layout, these concepts and relationships are translated into appropriate operations supported by the data nodes 130 in the backend 125.

[0030] In an embodiment, each data node 130 receives the sub-query and generates a response to the query processing orchestrator 115. If the data node 130 contains all the necessary data locally and can complete the indicated operation, it executes the query and returns the results. In some embodiments, the sub-query may indicate that the data node 130 should send the query to one or more other data nodes 130 to retrieve the data required to complete the query. For example, in some embodiments, it is preferred that join operations are performed by relational data nodes because relational systems tend to have less latency for join operations. Furthermore, some operations are only possible on certain nodes. For example, assume that data node 130A is the only node that can complete a join operation, but the data to be joined resides only in data node 130B. In one embodiment, data node 130A receives a sub-query that instructs data node 130A to join the related data, plus one or more other sub-queries that are forwarded to data node 130B to retrieve the data.

[0031] That is, in one such embodiment, the query processing orchestrator 115 prepares transformed sub-queries for data node 130B and sends them to data node 130A, which can then simply forward them to data node 130B. Data node 130B then returns the data to data node 130A, which completes the operation and returns the results to query processing orchestrator 115. In another embodiment, the query processing orchestrator 115 may send the sub-queries to data node 130B and forward the resulting data to data node 130A for processing. In yet another embodiment, the query processing orchestrator 115 performs the join locally.

[0032] In the illustrated embodiment, the architecture 100 further includes a data placement orchestrator 150 that determines which data nodes 130A-N should be used to store data in the knowledge base. As shown in the figure, the data placement orchestrator 150 receives similar indications of capabilities 155 of the data nodes 130 and an indication of a query workload 160. In one embodiment, the query workload 160 indicates an average or expected set of queries against the knowledge base. For example, in one embodiment, the query workload 160 is generated by observing user interactions with the knowledge base over time. The system can aggregate these interactions and determine an average, expected, or typical workload for the system. In some embodiments, the query workload 160 includes indications of which concepts are queried together, which operations are applied to each concept, etc.

[0033] In an embodiment, based on node capabilities 155 and known query workload 160, data placement orchestrator 150 determines which data node 130 should store the concept instance-level data for each concept / entity in ontology schema 110. For example, based on the operations that a particular data node 130A can perform, and further based on query workload 160, data placement orchestrator 150 may determine that data node 130A should store all data for the entities "company" and "public metric" because these entities are often queried together. Similarly, data placement orchestrator 150 may determine to place an instance of the concept "document" in data node 130B based on a determination that queries frequently include performing fuzzy match operations on "document" data and that data node 130B supports fuzzy match.

[0034] This intelligent data placement can reduce subsequent data transfers during run-time. In an embodiment, data placement orchestrator 150 may be utilized at startup (e.g., to provide an initial placement) and / or periodically during run-time (e.g., to revise placement decisions based on how query workload 160 has evolved over time). While shown as separate components in an embodiment for conceptual clarity, the operations of query processing orchestrator 115 and data placement orchestrator 150 may be combined or distributed across any number of components.

[0035] As shown, the data placement orchestrator 150 outputs a set of placement decisions 165 to the backend 125 and / or one or more intermediary services, such as extract, transform, and load (ETL) services. The instance-level data in the knowledge base is then stored in the appropriate data nodes 130 based on these selections. The concept mappings 140 reflect the current placement of the data. In one embodiment, if the data placement orchestrator 150 is used to modify the placement of the data based on an updated query workload 160, the concept mappings 140 are updated as well. In the following, the query processing orchestrator 115 is described in more detail using Figures 2-9 and assumes that the data has already been placed. The data placement orchestrator 150 and various techniques for ensuring efficient data placement are described in more detail with reference to Figures 10-17.

[0036] FIG. 2 illustrates a workflow 200 for processing and routing ontology queries according to one embodiment disclosed herein. As shown in the figure, the workflow 200 begins when an OQL query 205 is received. The OQL query 205 is provided to an OQL parser 210, which parses the query and determines the meaning of the query. As indicated by arrow 215, the parsed OQL query is then provided to a Query Graph Model (QGM) constructor 220. In an embodiment, the QGM constructor 200 generates a logical representation of the query in the form of a query graph model, thereby reducing the complexity of query compilation and optimization. An exemplary query graph model is described in further detail below with respect to FIGS. 4A and 4B. In an embodiment, the QGM captures data flow and dependencies in the query using operator boxes such as SELECT, GROUP BY, SETOP, etc. In an embodiment, the order of operations within a box can be freely changed between those operations, but the boundaries of the boxes are respected when generating a query execution plan, i.e., the query execution plan must follow the order of the query boxes.

[0037] In one embodiment, data flows between query boxes are represented using quantifiers. This format allows the system to reason about query equivalence and apply rewrite optimizations. In an embodiment, the QGM representation of queries allows the system to focus on optimizing data flows between different data stores during query execution, while the selection of the actual physical execution plan is deferred to the underlying data node 130 responsible for the execution of the query box or fragment. In an embodiment, the QGM 225 is used to generate optimized multi-store execution plans that minimize data movement and data transformations across different backends.

[0038] In some embodiments, the QGM 225 includes a set of quantifiers at the bottom that provide a set of input concepts to query, and each query block in the QGM includes a head and a body. The body of each block includes a set of predicates that describe a set of operations (such as combining) to be performed on the set of input concepts, and the head expression describes how the output properties of the resulting concept are computed. In other words, in embodiments, the body of each box includes a set of predicates (also called operations), each of which is applied to the input quantifiers of the box. In some embodiments, predicates / operations that reference a single quantifier are classified as local predicates, while predicates / operations that reference multiple quantifiers represent combining predicates.

[0039] In the illustrated workflow 200, the QGM 225 is passed to the operator placement component 230, which continues the query routing process. As shown, the operator placement component 230 further receives a set of concept mappings 235 and node capabilities 240, and annotates the query blocks in the QGM 225 based on the capabilities and concept mappings. In one embodiment, the operator placement component 230 traverses the QGM from bottom to top and annotates each operation in the query with a set of possible stores that can perform the operation. In some embodiments, annotations are generated differently for local predicates and join predicates. Recall that in some embodiments, all head expressions associated with a single quantifier are treated in the same way as local predicates.

[0040] In one embodiment, if a query block contains a local predicate / operation (e.g., a single quantifier), the operator placement component 230 determines whether the quantifier is a base concept. If so, the predicate is annotated with an indication of the data nodes 130 that (i) contain the concept and (ii) have the ability to execute the predicate. In an embodiment, if the quantifier comes from another QGM block (i.e., was computed by another block), the operator placement component 230 annotates the predicate with a set of data stores that (i) complete the QGM box for this quantifier and (ii) can execute the predicate. In some embodiments, if none of the data nodes 130 containing inputs to this predicate have the ability to execute this predicate, the operator placement component 230 annotates this predicate with a set of stores that can execute this predicate.

[0041] For example, if a predicate involves a fuzzy search, but the data is stored only in the relational backend data nodes 130, the operator placement component 230 can annotate the predicate with a document store in which the fuzzy search can be computed, even though the data is not stored in that document store. Note that in such cases, data may need to be moved during query execution.

[0042] In some embodiments, if a query block contains a join predicate / operation, the operator placement component 230 examines the join type and the join predicate. In embodiments, each join predicate is associated with two or more quantifiers, one for each of the join inputs. In embodiments, the operator placement component 230 identifies these quantifiers and proceeds based on where the quantifier comes from (e.g., whether the quantifier is calculated and / or stored locally, or received from another node), in addition to whether the identified quantifier is a computed input or a base concept.

[0043] If all of the quantifiers span the base concepts, the operator placement component 230 evaluates the set of data nodes 130 in which any of the base concepts reside, and for each such store, determines whether the store supports the join operation. The operator placement component 230 then annotates the join operation with an indication of the stores that contain one or more of the required concepts and that support this type of join operation. In some embodiments, if one of the stores is a relational node, the operator placement component 230 annotates the operation with an indication of this relational data node 130 instead of the remaining nodes.

[0044] In some embodiments, if both quantifiers are generated by QGM query blocks, the operator placement component 230 annotates the join operation with data nodes 130 that support this type of join operation (which in some embodiments includes only relational stores). In embodiments, the operator placement component 230 further annotates the operation with an indication of the data stores that generate the quantifiers if those data stores can perform the JOIN.

[0045] In a further embodiment, if one of the quantifiers is a base concept and another quantifier is computed from another QGM query block, the placement decision for the join operation is similar to that described above for the case where both quantifiers are computed by other QGM blocks. In an embodiment, the operator placement component 230 annotates the join operation with a set of data stores that support the type of join and are local to at least one of the join inputs.

[0046] As shown, the annotated QGM 245 is then passed to a block placement component 250. In an embodiment, the block placement component 250 utilizes the annotations generated by the operator placement component 230 to determine possible placement options for the query boxes in the query.

[0047] In one embodiment, determining placement options for a "select" query box is modeled as a problem of determining a minimum set cover. That is, the block placement component 250 determines the minimum number of data nodes 130 required to satisfy the placement of all operators in a particular select box. In some embodiments, the block placement component 250 utilizes a greedy heuristic to perform predicate-store grouping, ensuring that each predicate is placed in a single store and that the total number of stores spanned by the query box is minimized. After each predicate is annotated with the appropriate stores in which it will be placed, the block placement component 250 determines whether the query block needs to be split.

[0048] In an embodiment, if all predicates in a select query box are placed in the same data node 130, the query box is annotated to be placed in that store. In contrast, if the predicates in a select query box are placed in more than one data node 130 (indicating that the query box needs to be processed by multiple stores), the block placement component 250 determines that the block must be split into multiple query boxes. In that case, the block placement component 250 splits the block such that each resulting (sub-)block contains predicates that are assigned to a single data node.

[0049] In some embodiments, for a "group by" query box, the block placement component 250 determines the placement based on stores that support this type of aggregation operation, and stores that process preceding query boxes that feed data to the group by box. In an embodiment, if the stores that feed these inputs also support group by and aggregation functions, the block placement component 250 places the selected "group by" box in the same store. However, if that store does not support these operations, the block placement component 250 annotates the box with a list of data nodes 130 that can perform the group by operation. Note that such placement requires data movement from the source store to a store that can process the box.

[0050] After the block placement component 250 annotates each query block with all possible placements for each query block (e.g., all data nodes 130 on which the block can be executed), the cost component 255 determines the cost of each combination of placements. In one embodiment, the cost model for query routing focuses only on the data transfer and data transformation costs for selecting among alternative query execution plans, since the costs of data movement and data transformation are likely to dominate the overall cost of an execution plan in a multi-store environment. Thus, in at least some embodiments, the cost of execution of a particular execution plan is determined by aggregating the costs of data movement for each pair of source and target data stores in the query execution plan. Note that in some embodiments, various operations, such as join operations and graph operations, may be executed with very different performance on different data nodes 130. For example, join operations can be supported by a variety of data stores (e.g., JSON stores), but typically relational databases achieve the best performance for join operations.

[0051] In some embodiments, the cost model further accounts for this difference in the execution cost of operations of different stores. In other embodiments, the cost model does not include these factors. In one such embodiment, such cases are handled using a declarative mechanism to express the capabilities of the underlying stores. For example, to avoid performing join operations on a JSON store, the system may completely hide the join capabilities of the JSON store in the capability description, or add restrictions to limit applicability to certain data types.

[0052] In an embodiment, the cost component 255 enumerates all possible placement combinations across all query blocks and generates an execution plan for each such combination by grouping certain query boxes together into groups. In one embodiment, each group in the query plan includes query boxes that (i) are results in the QGM (e.g., separated by a single hop) and (ii) can be processed by the same data node 130. The cost component 255 then connects these groups of blocks based on the flow of the QGM and defines edges that represent data flows between the data nodes 130. In an embodiment, the cost component 255 further generates a set of data movement descriptors for each execution plan based on the edges between the groups in the generated plan.

[0053] In some embodiments, the cost component 255 uses these movement descriptors for each plan and utilizes the data movement cost model described above to determine a cost for each execution plan and selects the execution plan with the lowest cost. For example, in one embodiment, the cost component 255 determines the cost of each of the corresponding movement descriptors for each possible execution plan. This cost may include latency, computational cost, etc. These values ​​may then be aggregated within each execution plan to determine which execution plan has the lowest cost. As shown in the figure, this lowest cost plan is then selected and used to generate one or more transformed queries 260 for the data nodes 130.

[0054] 3A and 3B illustrate an exemplary ontology 300 that may be used to evaluate and route queries according to one embodiment disclosed herein. In the illustrated embodiment, each concept 305A-I is depicted using an oval, while each property 310A-N is depicted using a rounded rectangle. Additionally, arrows are used to indicate associations between concepts 305 and properties 310, while thicker arrows indicate relationships between concepts 305. Additionally, each relationship arrow is labeled based on the type of relationship. For example, as shown in the figure, the "Company" concept 305B is a subclass of the "PublicCompany" concept 305D. Additionally, the Company concept 305B is associated with multiple properties 310, including a "name" property 310E and an identifier property 310D, both of which are strings.

[0055] As previously mentioned, in an embodiment, the data in the knowledge base follows an ontology 300. In other words, the ontology 300 defines the concepts and entities in the knowledge base, as well as the relationships between the entities and the properties associated with each concept. Notably, the ontology 300 does not include any instance data (e.g., data about a particular company), but instead defines the structure of the data. In some embodiments, the concepts 305, properties 310, and / or relationships may be distributed across any number of data nodes 130. In one embodiment, data is placed in a data node 130 based at least in part on the type of data.

[0056] In one such embodiment, if the concept mapping indicates that a particular concept 305 is stored in a particular data node 130, then all instance data corresponding to that concept 305 is stored in the data node 130. For example, if the mapping indicates that data node 130A contains the concept 305F of "PublicMetric," then the query processing orchestrator 115 can retrieve data about any instance of "PublicMetric" (e.g., any metric for any company) from data node 130A. Thus, if a received query requires access to the data for "PublicMetric," the query processing orchestrator 115 routes at least a portion of the query to data node 130A (or to another node that also provides concept 305F).

[0057] 4A and 4B illustrate a workflow 400 for parsing and routing an exemplary ontology query, according to one embodiment disclosed herein. In the embodiment shown, input 405 is received and evaluated to retrieve relevant data from data nodes 130. In the embodiment shown, input 405 is natural language text (e.g., from a user). However, in various embodiments, input 405 may include queries or other data. Additionally, input 405 may be received from any number of sources, including automated applications, user-facing applications, directly from a user, etc. In some embodiments, input 405 is received as part of a chatbot or other conversational application that allows a user to search and explore a knowledge base.

[0058] In the illustrated example, the input 405 is the phrase "Show me the total revenue of all companies that filed technology patents in the last 5 years." In the illustrated workflow 400, the input 405 is parsed and evaluated using one or more natural language processing (NLP) techniques, such as semantic analysis, keyword search, sentiment analysis, and intent analysis. This enables the system to generate an OQL query 410 based on the input 405. Of course, in some embodiments, the input 405 is itself an OQL query.

[0059] As shown, OQL query 410 corresponding to input 405 includes "select" and "group by" operations, as well as indications regarding related tables or concepts and "where" clauses indicating restrictions on the query. This OQL query 410 is then parsed by query processing orchestrator 115 to generate QGM 435A, which is a logical representation of the query and includes multiple query blocks. In the illustrated embodiment, QGM includes "select" query block 415B and "group by" query block 415A.

[0060] As shown in the figure, QGM 435A includes a set of quantifiers 430A-E at the bottom that provide a set of input concepts to the query. In the embodiment shown, these quantifiers include "PublicMetricData", "PublicMetric", "PublicCompany", "Document", and "CompanyInfo". In an embodiment, each query block 415 in QGM 435A includes a head 420 and a body 425. The body 425 typically includes a set of operations (such as joins) to be performed on the set of input concepts, while the expressions in head 420 describe how the output properties of the resulting concepts are computed. For example, in the embodiment shown, head 420B of "select" query block 415B specifies the output properties "oPMD.value", "oPMD.year_calendar", and "oCI.id". Body 425B includes a set of predicates to be applied to the input quantifiers 430A-E. As mentioned above, in embodiments, a predicate that refers to a single quantifier is a local predicate, while a predicate that refers to multiple quantifiers represents a conjunctive predicate.

[0061] As shown in FIG. 4B, the query processing orchestrator 115 recognizes that the “select” query block 415B contains predicates that must be executed by a different data node 130. In particular, while most of the predicates in the query block 415B can be executed by a relational data store, the query processing orchestrator 115 determines that the predicates “oD -> companyInfo = oCI” and “oD.selfMATCH(‘Tech Patent Filed’)” correspond to operations that are executed using ElasticSearch that the relational database node does not support. Thus, the query processing orchestrator 115 splits the query block 415B by separating these predicates into a new query block 415C. As shown in the figure, the query block 415C serves as an input to the query block 415B.

[0062] In the embodiment shown, by splitting query block 415B, the query processing orchestrator 115 ensured that each block can be executed entirely within a single data node 130. For example, query blocks 415A and 415B can both be executed within a relational data node 130, but query block 415C should be executed by a data node 130 that supports ElasticSearch. Thus, in one embodiment, the query processing orchestrator 115 identifies or generates a sub-query that corresponds to query blocks 415A and 415B, converts the sub-query into the appropriate language and / or format of the relational node, and sends the converted sub-query to the relational node.

[0063] In the embodiment shown, the query processing orchestrator 115 further identifies or generates a sub-query to accomplish query block 415C and converts it into a language and / or format supported by the ElasticSearch node. In one embodiment, the query processing orchestrator 115 further sends this sub-query to a relational data store acting as an aggregator. The relational node can then forward the sub-query to the elastic node and use the results returned by the elastic node to complete the relational node's own sub-query.

[0064] FIG. 5 is a block diagram illustrating a query processing orchestrator 115 configured to route ontology queries according to one embodiment disclosed herein. While shown in an embodiment as a physical device, the query processing orchestrator 115 may be implemented using a virtual device and / or across multiple devices (e.g., in a cloud environment). As shown in the figure, the query processing orchestrator 115 includes a processor 510, memory 515, storage 520, a network interface 525, and one or more I / O interfaces 530. In the embodiment shown, the processor 510 stores and retrieves application data present in the storage 520 as well as retrieves and executes programming instructions stored in the memory 515. The processor 510 is generally representative of a single CPU and / or GPU, multiple CPUs and / or GPUs, a single CPU and / or GPU including multiple processing cores, and the like. The memory 515 is included to generally represent random access memory. Storage 520 may be any combination of disk drives, flash-based storage devices, and may include fixed and / or removable storage devices, such as fixed disk drives, removable memory cards, cache, optical storage, network attached storage (NAS), or storage area networks (SAN).

[0065] In some embodiments, input and output devices (e.g., keyboard, monitor, etc.) are connected via I / O interface 530. Additionally, via network interface 525, query processing orchestrator 115 can be communicatively coupled to one or more other devices and components (e.g., via network 580, which may include the Internet, a local network, etc.). As shown in the figure, processor 510, memory 515, storage 520, network interface 525, and I / O interface 530 are communicatively coupled by one or more buses 575. Additionally, query processing orchestrator 115 is communicatively coupled to a number of data nodes 130A-N via network 580. Of course, in embodiments, data nodes 130A-N may be directly connected to query processing orchestrator 115, accessible via a local network, integrated into query processing orchestrator 115, etc. Although not included in the illustrated embodiment, in some embodiments, the query processing orchestrator 115 is further communicatively coupled to a data placement orchestrator 150.

[0066] In the illustrated embodiment, storage 520 includes ontology 560, capability data 565, and data mappings 570. Although illustrated in the embodiment as residing in storage 520, ontology 560, capability data 565, and data mappings 570 may be stored in any suitable location and manner. In an embodiment, as previously described, ontology 560 describes entities or concepts relevant to the domain in which query processing orchestrator 115 is operating, as well as possible properties of each concept / entity and relationships between entities / concepts. In at least one embodiment, ontology 560 does not include instance level data. Instead, the actual data in the KB is stored in data nodes 130A-N.

[0067] In an embodiment, as previously described, capability data 565 indicates capabilities of each data node 130A-N. Capability data 565 may include, for example, an indication of the operations each data node 130A-N supports, and corresponding limitations on that support. For example, capability data 565 may indicate that data node 130A supports the "Join" operation only for integer data types. In an embodiment, as previously described, data mapping 570 indicates the data nodes 130 in which instance data for each entity / concept defined in ontology 560 is stored. For example, data mapping 570 may indicate that all instances of the concept "Company" are stored in data nodes 130A and 130B, while all instances of the concept "Document" are stored in data nodes 130B and 130N.

[0068] In the illustrated embodiment, memory 515 includes a query application 535. Although illustrated in the embodiment as software residing in memory 515, query application 535 may be implemented using hardware, software, or a combination of hardware and software. As shown in the figure, query application 535 includes a set of parsing component 540, routing component 545, and translator 120. Although illustrated in the embodiment as separate components for conceptual clarity, the operations of parsing component 540, routing component 545, and translator 120 may be combined or distributed across any number of components.

[0069] In an embodiment, the parsing component 540 receives OQL queries, parses them to determine their meaning, and generates a logical representation of the query (e.g., a QGM). As previously mentioned, in some embodiments, the logical representation includes a set of query blocks, where each query block specifies one or more predicates that define the operations to be performed on the block's input quantifiers. In an embodiment, these quantifiers may be basic concepts stored in one or more data nodes 130 and / or data computed by another query block. In an embodiment, this logical representation enables the query application 535 to understand and reason about the structure of the query and how data flows between the blocks. This allows the routing component 545 to efficiently route the query (or sub-queries of the query).

[0070] In the illustrated embodiment, the routing component 545 receives and evaluates the logical representation (e.g., a query graph model) from the parsing component 540 to identify one or more data nodes 130 to which the query should be routed. In some embodiments, this evaluation includes analyzing the predicates contained in each query block in the logical representation. In one embodiment, the routing component 545 labels or annotates each predicate in a particular query block based on the data nodes 130 that can complete the predicate. In some embodiments, this data node 130 includes data nodes 130 that contain an associated quantifier and / or are capable of performing the indicated action. Further, in at least one embodiment, after each predicate in the block is processed, the routing component 545 can evaluate the annotations and determine a location for placement of the block. That is, the routing component 545 determines whether the query block can be placed in a single data node 130. If so, in one embodiment, the routing component 545 assigns the block to that store. Further, in an embodiment, if a block cannot be processed by a single data node 130, the routing component 545 splits the block into two or more query blocks and repeats the routing process for each query block.

[0071] In an embodiment, after each query block is assigned to a single data node 130, the translator 120 generates one or more corresponding translated queries. In an embodiment, each translator 120 corresponds to the architecture of a particular data node 130 and is configured to translate the OQL query (or subquery) into a query appropriate for the architecture of the corresponding data store. For example, in one such embodiment, the system may include a first translator 120 for translating OQL into a query for a relational store (e.g., SQL), a second translator 120 for translating OQL into a JSON query, a third translator 120 for translating into a query for document search, and a fourth translator 120 for translating OQL into a graph query.

[0072] In an embodiment, based on the data node 130 executing the query or subquery, the query (or subquery) is routed to the appropriate translator 120. In some embodiments, each query (or subquery) is then sent directly to that data node 130 (e.g., via an application programming interface (API)). In some embodiments, if completing the query requires data movement between data nodes 130 (e.g., to combine data from two or more stores), the query application 535 can determine the data flow based on the generated logical representation and send the query appropriately. That is, the query application 535 uses QGM to determine which stores need to receive data from other stores and sends the required queries to these combining stores. For example, if data node 130A receives data from data node 130N and completes one or more operations on data node 130A, query application 535 may send a second query configured for data node 130N to data node 130A in addition to a first query to retrieve data from data node 130A. Data node 130A may then perform its own inquiry against data node 130N using the provided query.

[0073] FIG. 6 is a flow diagram illustrating a method 600 for processing and routing ontology queries according to one embodiment disclosed herein. Method 600 begins at block 605, where the query processing orchestrator 115 receives an ontology query for execution against a knowledge base. In an embodiment, the ontology query is expressed in terms of a predefined domain ontology, where the ontology specifies concepts, properties, and relationships related to the domain. In block 610, the query processing orchestrator 115 parses the received query and generates a logical representation of the query. In some embodiments, the query processing orchestrator 115 generates a query graph model representation of the query. In an embodiment, the logical representation includes one or more query blocks that indicate the underlying concepts implied by the query, the operations to be performed on the data, and the data flow.

[0074] The method 600 then proceeds to block 615, where the query processing orchestrator 115 maps each query block in the logical representation to one or more data stores based on predefined concept mappings and / or data store capabilities. For example, in one embodiment, the query processing orchestrator 115 determines, for each query block, which concepts are relevant (e.g., what data the query block accesses). The query processing orchestrator 115 can then use the concept mappings to identify data stores that can provide the required data. Further, in one embodiment, the query processing orchestrator 115 determines, for each query block, which operations are required. The query processing orchestrator 115 can then use predefined store capabilities to identify data nodes that can perform the required operations. The query processing orchestrator 115 then maps the query blocks to data nodes while striving to minimize data movement between stores.

[0075] At block 620, the query processing orchestrator 115 selects one of the mapped query blocks. The method 600 then proceeds to block 625, where the query processing orchestrator 115 generates a translated query corresponding to the query block based on the mapped data store. In one embodiment, this generation includes identifying or generating a sub-query from the received query to execute the selected query block. The query processing orchestrator 115 then determines the configuration of the data nodes that will execute the query block. That is, in one embodiment, the query processing orchestrator 115 determines the language and / or format of the query, and the nodes are configured to process these languages ​​and / or formats. In another embodiment, the query processing orchestrator 115 identifies a translator that corresponds to the mapped data store. The query processing orchestrator 115 then uses the translator to generate a query appropriate for the store.

[0076] Next, the method 600 proceeds to block 630, where the query processing orchestrator 115 determines whether there is at least one additional query block that has not yet been processed. If so, the method 600 returns to block 620. If not, the method 600 proceeds to block 635, where the query processing orchestrator 115 sends the converted query or queries to one or more data nodes. In one embodiment, the query processing orchestrator 115 sends each query to a corresponding node. In another embodiment, the query processing orchestrator 115 sends queries based on the flow of data in the logical representation. For example, the query processing orchestrator 115 may send multiple queries to a single node so that the node can forward the queries to the appropriate store to retrieve the data. The node can then act as a mediator to complete the results.

[0077] Advantageously, by using one of the data nodes as a mediator, the query processing orchestrator 115 can reduce computational costs and increase the scalability of the system. At block 640, the query processing orchestrator 115 receives the completed query results from the data store it is acting as a mediator for (or from just the data store to which the query was sent, if the received query can be executed in a single backend resource). The query processing orchestrator 115 then returns the results to the requesting entity.

[0078] FIG. 7 is a flow diagram illustrating a method 700 for processing ontology queries to efficiently route query blocks, according to one embodiment disclosed herein. Method 700, in some embodiments, provides additional details regarding the routing of query blocks. Method 700 begins at block 705, where the query processing orchestrator 115 generates one or more query blocks representing a received query, as described above. In one embodiment, each query block specifies one or more quantifiers that indicate input data for the block. These quantifiers may correspond to base concepts (e.g., instance data in a knowledge base) or computed interim data (e.g., data that has been retrieved from a store and processed and / or transformed in some way), or both. Additionally, in an embodiment, each query block specifies an operation to be performed on the quantifiers.

[0079] At block 710, the query processing orchestrator 115 selects one of the generated blocks. Further, at block 715, the query processing orchestrator 115 identifies a set of data nodes that can satisfy the operations defined by the selected block. In one embodiment, the query processing orchestrator 115 performs such identification by accessing a predefined capability definition that defines the set of operations that each data store can complete, and corresponding restrictions on this capability. Next, the method 700 proceeds to block 720, where the query processing orchestrator 115 identifies a set of nodes that can satisfy the quantifiers listed in the query block. That is, for each quantifier that corresponds to a base concept, the query processing orchestrator 115 identifies a node that stores the base concept.

[0080] In one embodiment, for each quantifier computed by another query block, the query processing orchestrator 115 identifies a data node assigned to that query block. Recall that in an embodiment, the query processing orchestrator 115 maps query blocks to nodes by traversing the QGM from bottom to top. Thus, if a first block depends on data computed in a second block, necessarily, the second block has been evaluated and assigned one or more data nodes before the query processing orchestrator 115 begins evaluating the first query block.

[0081] The method 700 then proceeds to block 725, where the query processing orchestrator 115 determines whether there is at least one data node that can provide a quantifier and that can perform an action. In one embodiment, this determination includes determining whether there is an overlap between the identified sets. For example, if the quantifiers are all basic concepts, the overlap between the two sets indicates a set of nodes that can perform all of the required actions and that store all of the concepts. If the quantifiers include items that are computed by other query blocks, the overlapping set indicates nodes that can perform actions and that (may) execute other blocks.

[0082] In an embodiment, if an overlap exists between the sets, the method 700 proceeds to block 730, where the query processing orchestrator 115 annotates the selected query block with the nodes identified in the overlap. The annotation indicates that the specified node has the potential to execute the query block, but has not yet reached a state of final allocation of the block to the node. In an embodiment, if the query block has multiple nodes included in the annotation, the query processing orchestrator 115 performs a cost analysis, as described in more detail below, to evaluate each alternative in an effort to minimize data transfer between stores. The method 700 then proceeds to block 740.

[0083] In the illustrated embodiment, if there is no overlap between the sets, the query processing orchestrator 115 determines that there is no single data node that can complete the query block. In some embodiments, if all of the operations can be performed by a single store, the query processing orchestrator 115 annotates the block with the stores that can perform the operations of the block. One or more other stores can then be assigned to provide quantifiers. In the illustrated embodiment, the method 700 then proceeds to block 735, where the query processing orchestrator 115 divides the selected query block into two or more blocks in an effort to create a query block that can be executed entirely within a single node. In one embodiment, dividing the selected query block includes identifying a subset of quantifiers and / or operations that can be executed by a single store. For example, the query processing orchestrator 115 may identify subsets of the specified predicates (e.g., predicates that can be executed by the same store) that share an annotation. The query block can then be divided by separating the predicates into corresponding boxes based on the subset to which they belong. For example, if a query block requires traditional relational database operations and a fuzzy match operation, the query processing orchestrator 115 may determine that the fuzzy match should be split into a separate box, which may allow the query processing orchestrator 115 to assign each split block to a single data store (e.g., the relational operations can be assigned to a relational store and the fuzzy match operation can be assigned to a different backend that can execute the fuzzy match operation).

[0084] In the embodiment shown, these newly generated query blocks are placed in a queue to be evaluated, just like the existing blocks. The method 700 then proceeds to block 740. At block 740, the query processing orchestrator 115 determines whether there is at least one additional query block that has not been evaluated. If so, the method 700 returns to block 710 to iterate through each block. That is, the query processing orchestrator 115 continues to iterate through each query block, splitting boxes as necessary, until all of the query blocks have been annotated with at least one data node.

[0085] If all query blocks have been annotated, the method 700 proceeds to block 745, where the query processing orchestrator 115 executes the query. In some embodiments, this execution includes evaluating alternative combinations of assignments to minimize data transfer, as described in more detail below. In some embodiments, if the annotations of one or more of the query blocks indicate a single data node, the query processing orchestrator 115 simply assigns the block to the indicated node since there are no alternatives that can be considered.

[0086] FIG. 8 is a flow diagram illustrating a method 800 for evaluating possible query routing plans to efficiently route an ontology query, according to one embodiment disclosed herein. In the embodiment shown, the method 800 begins after a query block has been annotated with possible assignments (e.g., nodes that can execute the entire block and provide all necessary quantifiers). The method 800 begins at block 805, where the query processing orchestrator 115 selects one of the possible combinations of node assignments. That is, in an embodiment, the query processing orchestrator 115 generates all possible combinations of the store of the block based on the corresponding annotations. To do this, the query processing orchestrator 115 may iteratively select different choices for each block until all possible choices have been generated.

[0087] For example, assume that a first block is annotated with "node A" and "node B" and a second block is annotated with "node A." In an embodiment, the query processing orchestrator 115 determines that a possible routing plan includes assigning the first block and the second block to "node A" or assigning the first block to "node B" and the second block to "node A." At block 805, the query processing orchestrator 115 selects one of the identified combinations for evaluation. The method 800 then proceeds to block 810.

[0088] At block 810, the query processing orchestrator 115 identifies data movement required according to the selected plan. In an embodiment, this movement is determined based on the store selection and / or query graph model in the plan. Continuing with the above example, the query processing orchestrator 115 may determine that a plan to assign both blocks to “node A” does not require movement because both query blocks can be grouped in a single node. That is, because the blocks are grouped together and no data movement is required because they are the result of the model (e.g., directly connected / separated by a single hop with no other blocks in between) and are assigned the same node. In contrast, assigning the first block to “node B” would require a transfer of data between “node A” and “node B” because the QGM indicates that data flows from the second block to the first block and that these blocks are assigned to different stores.

[0089] The method 800 then proceeds to block 815, where the query processing orchestrator 115 selects one of the identified data transfers required by the selected query plan. At block 820, the query processing orchestrator 115 determines the computational cost of the selected move. In an embodiment, this determination is made based on a predefined cost model. In some embodiments, the model may indicate, for each ordered pair of data nodes, the computational cost of transferring data from a first node to a second node. This cost may include, for example, latency introduced to actually transfer the data and / or to transform the data as necessary so that the destination node can operate on the data, processing time and / or memory requirements for the transfer / transformation, etc.

[0090] At block 825, the query processing orchestrator 115 determines whether the selected combination requires additional data transfers. If so, the method 800 returns to block 815. If not, the method 800 proceeds to block 830, where the query processing orchestrator 115 calculates the total cost of the selected plan by aggregating the individual costs of each move. At block 835, the query processing orchestrator 115 determines whether there is at least one alternative plan that has not been evaluated. If so, the method 800 returns to block 805. If not, the method 800 proceeds to block 840, where the query processing orchestrator 115 ranks the plans based on the aggregate costs of the plans. In an embodiment, the query processing orchestrator 115 selects the plan with the lowest determined cost. The query processing orchestrator 115 then executes the plan by transforming and routing the subqueries based on the node assignments of the least-cost plan.

[0091] FIG. 9 is a flow diagram illustrating a method 900 for routing an ontology query according to one embodiment disclosed herein. The method 900 begins at block 905, where the query processing orchestrator 115 receives an ontology query. At block 910, the query processing orchestrator 115 generates one or more query blocks based on the ontology query, where each query block indicates one or more operations and one or more quantifiers representing data flows between the query blocks. The method 900 then proceeds to block 915, where the query processing orchestrator 115 identifies at least one data node for each of the one or more query blocks based on the one or more quantifiers and the one or more operations. Further, at block 920, the query processing orchestrator 115 selects one or more of the identified data nodes based on a predefined cost criterion. Further, in block 925, the query processing orchestrator 115 then sends the one or more sub-queries to the selected data node or nodes.

[0092] FIG. 10 illustrates a workflow 1000 for evaluating a workload and storing knowledge base data according to one embodiment disclosed herein. As previously discussed, enterprise applications often require support for a variety of query types depending on the application's query workload. To support these various query types, embodiments of the present disclosure utilize multiple backend stores, such as relational databases, document stores, graph stores, etc. In embodiments of the present disclosure, the system has the ability to move, store, and index knowledge base data in any backend that provides the necessary capabilities for the supported query types. This flexibility in organizing data allows initial data placement across multiple backend stores to play a key role in efficient query execution.

[0093] To minimize replication overhead and achieve efficient run-time execution, some embodiments of the present disclosure provide an offline data preparation and loading stage, including intelligent data placement. In general, data ingestion, placement, and loading into multiple back-end stores involves a series of operations. First, domain-specific knowledge-based data is ingested from a wide variety of sources, including structured, semi-structured, and unstructured data. In some embodiments, the first stage of data ingestion from these data sources is a data enrichment / curation process, including information extraction, entity resolution, data integration, and transformation. The output data generated by this step, which conforms to the domain ontology, is then fed to the data placement orchestrator 150 to generate data placements suitable for multiple back-end data stores. In some embodiments, the data may already be curated before the data placement orchestrator 150 is applied and may already be used to answer queries. After a sufficient data placement is determined, the data loading module places the instance data in the appropriate data stores according to the data placement plan.

[0094] In some embodiments, data movement during query execution can be avoided by replicating the entire set of data across all data nodes. However, this solution leads to very large replication overhead and significantly increases storage space requirements. Furthermore, in many embodiments, not all stores provide all the necessary capabilities required by a query, and even full replication cannot completely eliminate data movement. To minimize unnecessary storage costs and data movement, some embodiments of the present disclosure provide a capacity-based data placement technique that allocates data to data stores while considering both the expected workload and the capabilities of the backend data stores (e.g., regarding the operations the backend data stores can perform on the stored data).

[0095] In an embodiment, the data placement orchestrator 150 reasons about data placement at the level of query operations across all of the concepts in the domain ontology that represent the schema of the data stored in the knowledge base. In some embodiments, the orchestrator identifies distinct, possibly overlapping, subsets of the ontology based on the capabilities of the underlying stores as well as the specific workload on the knowledge base, and outputs a mapping between the identified subsets of data and the target data stores where the data should be stored.

[0096] In the illustrated embodiment, the workflow 1000 begins when a set of OQL queries 1005 are received. In some embodiments, the OQL queries 1005 are queries that have been previously submitted to a knowledge base. For example, in some embodiments, the knowledge base is a corpus of existing data that users and applications can query and explore. In such embodiments, the OQL queries 1005 may correspond to queries that users, applications, and other entities have previously submitted while interacting with the knowledge base.

[0097] In an embodiment, the OQL queries 1005 typically represent an average, typical, expected, and / or historical workload for the knowledge base. In other words, the OQL queries 1005 are typically representative of queries that the knowledge base receives (or is expected to receive) during the execution of its operations and can be used to identify sets of concepts that are often queried together, operations that are typically performed for each concept, and so on. As shown in the figure, these representative OQL queries 1005 are provided to an OQL query analyzer 1010, which analyzes and evaluates these OQL queries 1005 to generate a summarized workload 1015.

[0098] In an embodiment, the OQL query analyzer 1010 represents the OQL query 1005 as a set of relationships between concepts and corresponding operations that are performed on the concepts. The analyzer generates a summarized workload 1015 based on this set. In other words, the summarized workload 1015 reflects a summary of the provided OQL query 1005 and enables deeper analysis to identify patterns in the data. In one embodiment, the summarized workload 1015 includes a set of summarized queries generated based on the OQL query 1005. Notably, in some embodiments, the summarized queries are not fully formatted queries that can be executed against the knowledge base. Instead, the summarized queries indicate clusters of concepts that are likely to be queried together during execution, along with a set of operations that are likely to be applied to each cluster of concepts.

[0099] In some embodiments, the OQL query analyzer 1010 takes as input a set of OQL queries 1005 expressed against a domain ontology and creates two sets for each query: one set of concepts that the query accesses, and another set of operations (e.g., joins, aggregations, etc.) that the query performs across all of those concepts. In at least one embodiment, to generate a representation of a summarized workload 1015 for a particular OQL query 1005, the OQL query analyzer 1010 groups queries that access the same set of concepts into groups, and then creates a set that combines the related operations of each query in the group. This is described in more detail below.

[0100] In the illustrated embodiment, the summarized workload 1015 is then provided to a Hypergraph Modeler 1020, which evaluates the provided summarized queries to generate a hypergraph 1025. In an embodiment, the hypergraph 1025 is a graph that includes a set of vertices and a set of edges (also referred to as hyperedges), where each edge may connect to any number of vertices. In some embodiments, each vertex in the hypergraph 1025 corresponds to a concept from a domain ontology, and each hyperedge corresponds to a summarized query from the summarized workload 1015. For example, each hyperedge spans the set of concepts represented by the corresponding summarized query. In one embodiment, each hyperedge is further annotated or labeled with an indication of the set of operations represented by the corresponding summarized query.

[0101] As shown in the figure, the hypergraph 1025, along with the ontology schema 110 and node capabilities 155, are evaluated by the data placement component 1030. In one embodiment, the data placement component 1030 groups the concepts and relationships in the hypergraph 1025 into potentially overlapping subsets based on the query behavior. Data corresponding to these subsets can then be placed in separate backend data nodes based on the supported behavior. In some embodiments, the data placement decision is made at the granularity of the identified ontology subset, placing all data for all ontology concepts as a whole. In other words, the placement decision 165 does not split concepts across different stores horizontally. For example, if the data placement component 1030 places the concept of “company” in the first data node, then all instance-level data corresponding to the concept of “company” is placed in the first data node.

[0102] In some embodiments, the ontology-based data placement component 1030 follows a two-step approach for data placement. First, the data placement component 1030 runs a graph analysis algorithm on the hypergraph 1025 representing the summarized workload 1015 to group concepts in the domain ontology schema 110 based on the similarity of the operations performed on the concepts. Then, based on the capabilities of each of the underlying data stores, data corresponding to these identified groups or subsets of the ontologies are mapped to the underlying data stores while minimizing the amount of duplication required. In embodiments, the resulting capability-based data placement minimizes data movement (and data transformation) for a particular workload when processing a query, greatly increasing the efficiency of query processing in a multi-store environment. As shown in the figure, the final output of the data placement component 1030 is a concept-to-store mapping (e.g., placement decision 165) that maps the concepts of the ontology to appropriate data nodes.

[0103] Although not depicted in the depicted workflow 1000, in an embodiment, the system then utilizes placement decisions 165 to store the data in various back-end resources. In one embodiment, the system performs such storage by invoking extract, transform, and load (ETL) services that perform the necessary transformations so that the data can be stored in the associated data nodes 130.

[0104] In some embodiments, workflow 1000 is used to periodically reevaluate and refine data placement to maintain system efficiency. For example, during off-peak times (e.g., non-business hours), the system may invoke workflow 1000 based on an updated set of OQL queries 1005 (e.g., including queries received after the last data placement determination) to determine whether the placement should be updated to reflect the evolving workload. In this manner, system effectiveness can be improved by preventing data locations from becoming stale.

[0105] 11 illustrates an exemplary hypergraph 1100 used to evaluate workloads and store knowledge base data according to one embodiment disclosed herein. In the illustrated embodiment, each concept 1105A-G is depicted as an ellipse, and each hyperedge 1110A-D is depicted as a dashed line surrounding the concepts 1105 to which the hyperedge corresponds. For example, hyperedge 1110A joins concepts 1105A ("Company"), 1105B ("PublicCompany"), 1105C ("PublicMetric"), and 1105D ("PublicMetricData"). As shown in the figure, each hyperedge 1110 may include both disjoint subsets of concepts 1105 (e.g., hyperedges 1110A and 1110C do not overlap) and overlapping subsets (e.g., hyperedges 1110A and 1110B overlap with respect to the concept 1105A of “Company”).

[0106] Further, as shown in the figure, each hyperedge 1110 is labeled with an operation 1115A-C associated with that edge. As previously mentioned, in one embodiment, the label indicates a set of operations that are or may have been applied to the concepts 1105 connected by the hyperedge 1110. For example, in the example shown in the figure, hyperedge 1110A is associated with operations 1115A ("combine"), 1115B ("aggregate"), and 1115C ("fuzzy" matching). In particular, each operation 1115 may be associated with any number of hyperedges 1110 and / or concepts 1105. In the illustrated embodiment, the "combine" operation 1115A is associated with hyperedges 1110A and 1110B, the "aggregate" operation 1115B is associated with hyperedges 1110A and 1110D, and the "fuzzy" operation 1115C is associated with hyperedges 1110A, 1110D, and 1110C.

[0107] FIG. 12 is a block diagram illustrating a data placement orchestrator 150 configured to evaluate workloads and store data according to one embodiment disclosed herein. While shown in an embodiment as a physical device, the data placement orchestrator 150 may be implemented using virtual devices and / or across multiple devices (e.g., in a cloud environment). As shown in the figure, the data placement orchestrator 150 includes a processor 1210, memory 1215, storage 1220, a network interface 1225, and one or more I / O interfaces 1230. In the embodiment shown, the processor 1210 stores and retrieves application data residing in the storage 1120 as well as retrieves and executes programming instructions stored in the memory 1215. The processor 1210 is generally representative of a single CPU and / or GPU, multiple CPUs and / or GPUs, a single CPU and / or GPU including multiple processing cores, and the like. The memory 1215 is included to generally represent random access memory. Storage 1220 may be any combination of disk drives, flash-based storage devices, and may include fixed and / or removable storage devices, such as fixed disk drives, removable memory cards, cache, optical storage, network attached storage (NAS), or storage area networks (SAN).

[0108] In some embodiments, input and output devices (e.g., keyboard, monitor, etc.) are connected via I / O interface 1230. Additionally, via network interface 1225, data placement orchestrator 150 can be communicatively coupled to one or more other devices and components (e.g., via network 1280, which may include the Internet, a local network, etc.). As shown in the figure, processor 1210, memory 1215, storage 1220, network interface 1225, and I / O interface 1230 are communicatively coupled by one or more buses 1275. Additionally, data placement orchestrator 150 is communicatively coupled to data nodes 130A-N via network 1280. Of course, in embodiments, data nodes 130A-N may be directly connected to data placement orchestrator 150, accessible via a local network, integrated into data placement orchestrator 150, etc. Although not included in the illustrated embodiment, in some embodiments, the data placement orchestrator 150 is further communicatively coupled to the query processing orchestrator 115 .

[0109] In the illustrated embodiment, storage 1220 includes copies of domain ontology 1260, capability data 1265, and data mappings 1270. Although illustrated in the embodiment as residing in storage 1220, ontology 1260, capability data 1265, and data mappings 1270 may be stored in any suitable location and manner. In one embodiment, ontology 1260, capability data 1265, and data mappings 1270 correspond to ontology 560, capability data 565, and data mappings 570 described above with reference to query processing orchestrator 115.

[0110] For example, as previously described, ontology 1260 may indicate the entities or concepts associated with a domain, as well as possible properties of each concept / entity and relationships between the entities / concepts, and does not include instance-level data. Similarly, as previously described, capability data 1265 indicates the capabilities of each data node 130A-N. Capability data 1265 may include, for example, an indication of the operations that each data node 130A-N supports, and any corresponding restrictions on that support.

[0111] In an embodiment, data mapping 1270 is generated by placement application 1235 and indicates which data nodes 130 store instance data for each entity / concept defined in ontology 1260. For example, data mapping 1270 may indicate that all instances of the concept of “Company” are stored in data nodes 130A and 130B, while all instances of the concept of “Document” are stored in data nodes 130B and 130N.

[0112] In the illustrated embodiment, memory 1215 includes a deployment application 1235. Although illustrated in the embodiment as software residing in memory 1215, the deployment application 1235 may be implemented using hardware, software, or a combination of hardware and software. As shown in the figure, the deployment application 1235 includes a summary component 1240, a hypergraph component 1245, and a deployment component 1250. Although illustrated in the embodiment as separate components for conceptual clarity, the operations of the summary component 1240, the hypergraph component 1245, and the deployment component 1250 may be combined or distributed across any number of components.

[0113] In an embodiment, the summarization component 1240 receives previous OQL queries (or sample queries) that reflect previous, current, expected, typical, average, anticipated, or typical workloads on the system, or a combination thereof. The summarization component 1240 then evaluates the provided queries and summarizes the workload in the form of a summarized query. In an embodiment, a summarized query generally indicates a set of concepts that are queried together, along with the operations that are performed on the concepts, but does not correspond to an actual query that may be executed. Below, the functionality of the summarization component 1240 is described in further detail with reference to FIG. 13.

[0114] In an embodiment, the hypergraph component 1245 receives and parses the summarized workload information from the summarization component 1240 to generate a hypergraph representing the query workload. As mentioned above, in some embodiments, the hypergraph includes a vertex for each concept in the ontology 1260. Further, in an embodiment, the concept vertices are connected by hyperedges that represent the summarized query workload. The operation of the hypergraph component 1245 is described in further detail below with reference to FIG.

[0115] In one embodiment, the placement component 1250 evaluates the hypergraph to generate data placement decisions (e.g., data mappings 1270). These decisions can then be used to route data to appropriate nodes. For example, in one embodiment, the system iterates through the knowledge base to place the data. For each data item, the system can determine the corresponding concept, search for the corresponding data node 130, and store the data in the indicated node. In some embodiments, the system also performs any transformations appropriate for the destination store. Below, the functionality of the placement component 1250 is described in further detail with reference to Figures 15 and 16.

[0116] FIG. 13 is a flow diagram illustrating a method 1300 for evaluating and summarizing a query workload to inform data placement decisions, according to one embodiment disclosed herein. The method 1300 begins at block 1305, where the data placement orchestrator 150 receives one or more queries representing a knowledge-based workload. At block 1310, the data placement orchestrator 150 selects one of the received queries for evaluation. The method 1300 then proceeds to block 1315, where the data placement orchestrator 150 identifies concepts contained in the selected query. Similarly, at block 1320, the data placement orchestrator 150 identifies operations contained in the query.

[0117] In one embodiment, data placement orchestrator 150 associates the determined set of concepts specified by the query with the set of operations contained in the query. In some embodiments, operation-concept pairs are determined at a fine-grained concept / operation level. In some other embodiments, data placement orchestrator 150 links a set of operations as a whole to a set of concepts as a whole, rather than determining which operations are linked to which concepts. That is, data placement orchestrator 150 ignores the details of the actual execution / desired outcome of the query and defines a set of related concepts and operations based on the data / operations involved, rather than the specific application of transformations.

[0118] Next, method 1300 proceeds to block 1325, where data placement orchestrator 150 determines whether there is at least one additional query that has not yet been evaluated. If so, method 1300 returns to block 1310. If not, method 1300 proceeds to block 1330. At grouping 1330, data placement orchestrator 150 groups the received queries based on a set of concepts that correspond to each received query. In one embodiment, this grouping includes grouping or clustering all queries that specify a matching set of concepts. For example, data placement orchestrator 150 may group all queries that specify both the concept of “Company” and the concept of “PublicMetric” into a first group. Notably, in such an embodiment, queries that specify only the concept of “Company” or the concept of “PublicMetric” alone are placed into different groups. Similarly, queries that specify “Company” and “PublicMetric” but also include the concept of “Document” are not placed into the first group.

[0119] That is, in an embodiment, data placement orchestrator 150 groups queries that specify an exact matching set of concepts. Queries that specify additional or fewer concepts are placed into other groups. In one embodiment, the set of concepts corresponding to each group is used to form each summarized query. That is, in the embodiment shown, data placement orchestrator 150 aggregates previous queries received by grouping queries that access identical concepts into clusters, regardless of the operation that each query performs.

[0120] Method 1300 then proceeds to block 1335, where data placement orchestrator 150 selects one of these defined query groups. At block 1340, data placement orchestrator 150 selects one of the queries associated with the selected group. Additionally, at block 1345, data placement orchestrator 150 associates the corresponding operations specified by the selected query with the summarized query representing the selected query group. In one embodiment, if an operation is already reflected in the summarized query, data placement orchestrator 150 does not add that operation again. That is, in an embodiment, the set of operations associated with the summarized query is a binary value indicating either the presence or absence of a particular operation.

[0121] In embodiments, the operations associated with the summarized query can be at any level of granularity. For example, in some embodiments, data placement orchestrator 150 defines the summarized query at the operation level (e.g., “join”) without considering any particular type of operation (e.g., inner join), restrictions on the operation, or specifications of the operation (e.g., type of data, such as string join or integer join). In other embodiments, these details are included in the summarized query description to provide richer details for subsequent processing.

[0122] Next, method 1300 proceeds to block 1350, where the data placement orchestrator 150 determines whether at least one additional query exists in the selected group. If so, method 1300 returns to block 1340. If not, then, at block 1355, the data placement orchestrator 150 determines whether there is at least one additional group of queries that have not yet been evaluated. If so, method 1300 returns to block 1335. If not, method 1300 proceeds to block 1360. At block 1360, the data placement orchestrator 150 stores the summarized workload so that the summarized workload can be used to generate a hypergraph and evaluated.

[0123] 14 is a flow diagram illustrating a method 1400 for modeling the workload of an ontology and informing data placement decisions according to one embodiment disclosed herein. The method 1400 begins at block 1405, where the data placement orchestrator 150 selects one of the concepts of the ontology. At block 1410, the data placement orchestrator 150 generates a hypergraph vertex for the selected concept. The method 1400 then proceeds to block 1415, where the data placement orchestrator 150 determines whether any additional concepts remain in the ontology that do not yet have a vertex in the hypergraph. If so, the method 1400 returns to block 1405. If not, the method 1400 proceeds to block 1420.

[0124] At block 1420, the data placement orchestrator 150 selects one of the summarized queries. As previously described, in an embodiment, each summarized query indicates a set of concepts and a corresponding set of operations that were applied to the concepts in a previous workload. At block 1425, the data placement orchestrator 150 generates a hyperedge linking each of the concepts indicated by the selected summarized query. The method 1400 then proceeds to block 1430, where the data placement orchestrator 150 labels the newly generated hyperedge with an indication of the operation indicated by the selected summarized query. In this manner, the data placement orchestrator 150 can then evaluate the hypergraph and identify relationships and usage patterns for the knowledge base.

[0125] The method 1400 then proceeds to block 1435 where the data placement orchestrator 150 determines whether there is at least one additional summarized query to be evaluated and incorporated into the hypergraph. If there is, the method 1400 returns to block 1420. If not, the method 1400 proceeds to block 1440 where the data placement orchestrator 150 stores the generated hypergraph for subsequent use.

[0126] Figures 15 and 16 show flow diagrams illustrating a method for evaluating a hypergraph and driving data placement decisions according to one embodiment disclosed herein. Method 1500 described with reference to Figure 15 illustrates one embodiment of a motion-based clustering technique for generating concept mappings, while method 1600 described below with reference to Figure 16 illustrates one embodiment of a minimum covering technique.

[0127] In one embodiment, the behavior-based clustering technique groups concepts based on the behaviors they undergo. In one such embodiment, for each behavior description in the hypergraph, the data placement orchestrator 150 creates a respective cluster. The data placement orchestrator 150 then iterates through all the sets of behavior descriptions associated with each hyperedge, and for each such behavior description, assigns all concepts that the hyperedge spans to the corresponding behavior's cluster. In an embodiment, after the concepts are clustered together, the data placement orchestrator 150 assigns each concept cluster to a set of data nodes such that each node has a capability description that matches the cluster's behavior description (e.g., can perform the cluster's corresponding behavior). Finally, in a behavior-based system, the data placement orchestrator 150 generates a mapping that maps each concept in each cluster to a corresponding set of identified data stores.

[0128] As an example of one embodiment of the action-based clustering technique, consider the hypergraph 1100 shown in Figure 11. First, the data placement orchestrator 150 assigns a cluster C (e.g., C) to each action 1115A-C. Join , C Agg , and C Fuzzy ) for each hyperedge, the system then determines a set of actions associated with the hyperedge. For each action listed, the system assigns the concept specified by the hyperedge 1110 to a corresponding cluster. Continuing with the example above, C Join includes concepts 1105A, 1105B, 1105C, and 1105D from hyperedge 1110A, as well as concepts 1110E and 1105F from hyperedge 1110B. Agg includes concepts 1105A, 1105B, 1105C, and 1105D from hyperedge 1110A, as well as concept 1105G from hyperedge 1110D. Fuzzyincludes concepts 1105A, 1105B, 1105C, and 1105D from hyperedge 1110A, as well as concept 1105H from hyperedge 1110C.

[0129] In many embodiments, these operation-based clusters contain significant overlap. For example, note that concepts 1105A, 1105B, 1105C, and 1105D are included in all clusters. To complete the mapping, in one embodiment, the data placement orchestrator 150 identifies, for each cluster, all data nodes 130 that can perform the corresponding operation. The data placement orchestrator 150 then maps all concepts 1105 in the cluster to all of the identified data nodes 130. In some embodiments, operation-based techniques can minimize or reduce data movement during query processing by placing data in all stores that support the corresponding operation, but introduce some replication overhead since the same cluster of concepts may be placed in multiple stores if multiple stores have the capability to satisfy the cluster's operation.

[0130] In some implementations, an embodiment of a minimal covering technique is utilized to further reduce replication overhead. In one embodiment, an embodiment of a minimal covering improves over behavior-based techniques by further minimizing the amount of data replication while still minimizing data movement during query processing. In an embodiment, this technique leverages a minimum set covering algorithm to find the minimum number of data stores required to support the complete set of operations required by each hyperedge in the hypergraph of a query workload. In some embodiments, the minimal covering technique minimizes the distance of each hyperedge across the set of data stores that satisfy the set of operations required by the hyperedge.

[0131] In one example embodiment of the minimum covering technique, for each hyperedge in the hypergraph, the data placement orchestrator 150 finds the minimum number of data nodes that cover all of the indicated operations. For example, if all of the operations can be completed by a single data node 130A, then the minimum set includes only this node. If one or more of the operations cannot be completed by data node 130A, then one or more other data nodes 130B-N are added to the minimum set until all operations are satisfied. After the minimum set is determined for the hyperedge, each concept in the hyperedge is mapped to each of the nodes in the corresponding minimum set.

[0132] As an example of one embodiment of the minimum covering clustering technique, consider the hypergraph 1100 shown in FIG. 11. Assume that the data nodes 130 include a first data node 130A configured to support operations 1115A and 1115B, a second data node 130B configured to support operations 1115B and 1115C, and a third data node 130C configured to support only operation 1115B. For the hyperedge 1110A, the data placement orchestrator 150 may determine that no single node can support all three operations shown, but that the set of data nodes 130A and 130B can support the operations. Because these two nodes can support the entire hyperedge, there is no need to add data node 130C to the set.

[0133] Similarly, hyperedge 1110B is assigned to data node 130A (the only node configured to provide join operations), while hyperedge 1110C is assigned to data node 130B (the only node configured to provide fuzzy matching). Finally, hyperedge 1110D can be assigned to either data nodes 130A and 130B or data nodes 130B and 130C. In some embodiments, the data placement orchestrator 150 selects between these otherwise equivalent alternatives based on their respective latency or computational resources, other criteria such as predefined priorities, etc. The data placement orchestrator 150 then maps the concepts 1105 of each hyperedge 1110 to the assigned data nodes 130.

[0134] 15 is a flow diagram illustrating an operator-based method 1500 for evaluating a hypergraph and driving data placement decisions according to one embodiment disclosed herein. Method 1500 begins at block 1505, where the data placement orchestrator 150 selects one of the operations indicated by the hypergraph. At block 1510, the data placement orchestrator 150 generates a cluster of the selected operation. Method 1500 then proceeds to block 1515, where the data placement orchestrator 150 determines whether there is at least one additional operation reflected in the hypergraph for which a cluster is not yet associated. If there is, method 1500 returns to block 1505. If not, method 1500 proceeds to block 1520.

[0135] At block 1520, the data placement orchestrator 150 selects one of the hyperedges in the hypergraph for analysis. At block 1525, the data placement orchestrator 150 identifies concepts and operations associated with the selected edge. The method 1500 then proceeds to block 1530, where the data placement orchestrator 150 selects one of these indicated operations. Additionally, at block 1535, the data placement orchestrator 150 identifies a cluster corresponding to the selected operation and adds all of the concepts indicated by the selected hyperedge to this cluster. The method 1500 then proceeds to block 1540, where the data placement orchestrator 150 determines whether the selected edge indicates at least one additional operation that has not yet been processed. If so, the method 1500 returns to block 1530.

[0136] If there are no additional operations associated with the selected hyperedge, the method 1500 proceeds to block 1545, where the data placement orchestrator 150 determines whether the hypergraph includes at least one additional edge that has not yet been evaluated. If so, the method 1500 returns to block 1520. If not, the method 1500 proceeds to block 1550, where the data placement orchestrator 150 maps the operation clusters to corresponding data nodes configured to process each operation. For example, in one embodiment, the data placement orchestrator 150 identifies, for each cluster, a set of data nodes that can perform the corresponding operation. In an embodiment, the data placement orchestrator 150 then maps all concepts in the cluster to each node of the set of identified data nodes. The data placement orchestrator 150 can use these mappings to distribute the data in the knowledge base across various data nodes.

[0137] 16 is a flow diagram illustrating a minimum covering based method 1600 for evaluating a hypergraph and driving data placement decisions according to one embodiment disclosed herein. The method 1600 begins at block 1605, where the data placement orchestrator 150 selects one of the hyperedges in the hypergraph. At block 1610, the data placement orchestrator 150 identifies a corresponding concept and action associated with the selected edge. Furthermore, at block 1615, the data placement orchestrator 150 determines a minimum set of data nodes that can collectively satisfy all of the indicated actions.

[0138] In one embodiment, the data placement orchestrator 150 determines the minimum set by iteratively evaluating each combination of data nodes and determining whether the combination satisfies the indicated operations. That is, whether all operations indicated by the selected edges can be performed by at least one data node in the combination. If not, the combination can be discarded and another node or combination can be selected for testing (or another node can be added to the current combination). The data placement orchestrator 150 may determine whether each combination is complete and sufficient in that it can perform all required operations, and may identify combinations that include the smallest number of data nodes as such combinations are likely to result in the least data movement during execution. In one embodiment, if two or more combinations are equally small, the data placement orchestrator 150 may utilize a predefined criterion or preference to select the best combination. For example, a predefined rule may indicate that combinations that include at least one relational data store are preferred over combinations that do not include a relational data store. As another example, the rules may indicate weights or priorities for particular types of stores and / or particular data nodes 130. In such an embodiment, the data placement orchestrator 150 may aggregate these weights for each combination or otherwise determine which store should be used. The selected edge may then be labeled with an indication of the determined set of data nodes.

[0139] After the minimum set of data nodes is determined, method 1600 proceeds to block 1620 where data placement orchestrator 150 determines whether at least one additional hyperedge exists in the hypergraph. If so, method 1600 returns to block 1605. If not, method 1600 proceeds to block 1625. At block 1625, data placement orchestrator 150 selects one of the available data nodes in the system. At block 1630, data placement orchestrator 150 identifies all hyperedges in the hypergraph that have a label that contains the selected data node. Data placement orchestrator 150 then groups or clusters these hyperedges (or the concepts that each hyperedge contains) together to form a group / cluster of concepts that are stored in the selected node. The method 1600 then proceeds to block 1635 where the data placement orchestrator 150 determines whether there is at least one additional data node in the system that has not yet been assigned a group / cluster. If so, the method 1600 returns to block 1625.

[0140] If not, the method 1600 proceeds to block 1640 where the data placement orchestrator 150 maps, for each data node, all of the concepts contained in the corresponding cluster to a store. The data placement orchestrator 150 can then use these mappings to distribute the data in the knowledge base across the various data nodes.

[0141] FIG. 17 is a flow diagram illustrating a method 1700 for mapping concepts of an ontology to storage nodes according to one embodiment disclosed herein. The method 1700 begins at block 1705, where the data placement orchestrator 150 determines query workload information corresponding to a domain. At block 1710, the data placement orchestrator 150 models the query workload information as a hypergraph, where the hypergraph includes a set of vertices and a set of hyperedges, where each vertex in the set of vertices corresponds to a concept in the ontology associated with the domain. The method 1700 then proceeds to block 1715, where the data placement orchestrator 150 generates a mapping between concepts and a plurality of data nodes based on the hypergraph and further based on the predefined capabilities of each of the plurality of data nodes. Further, at block 1720, the data placement orchestrator 150 establishes a distributed knowledge base based on the generated mapping.

[0142] The description of various embodiments of the present disclosure is presented for illustrative purposes, but is not intended to be exhaustive and is not limited to the disclosed embodiments. It will be apparent to those skilled in the art that many changes and modifications can be made without departing from the scope of the described embodiments. The terms used in this specification are selected to best explain the principles of the embodiments, practical applications, or technical improvements beyond the technology found in the market, or to allow other skilled in the art to understand the embodiments disclosed herein.

[0143] Above and / or below, reference is made to the embodiments presented in the present disclosure. However, the scope of the present disclosure is not limited to the specific described embodiments. Instead, any combination of the above and / or below features and elements, whether related to different embodiments, is contemplated to implement and practice the contemplated embodiments. Furthermore, while the embodiments disclosed herein may achieve advantages over other possible solutions or over the prior art, whether or not a particular advantage is achieved by a particular embodiment is not a limitation of the scope of the present disclosure. Thus, the above and / or below aspects, features, embodiments, and advantages are merely exemplary and should not be considered as elements or limitations of the appended claims unless expressly set forth in the claims. Similarly, a reference to "the present invention" should not be construed as a generalization of the subject matter of any invention disclosed herein, and should not be considered as an element or limitation of the appended claims, unless expressly set forth in the claims.

[0144] Aspects of the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.), or an embodiment combining software and hardware aspects, all of which may be referred to generally herein as a "circuit," "module," or "system."

[0145] The present invention may be a system, method, and / or computer program product, and may include a computer readable storage medium including computer readable program instructions for causing a processor to perform aspects of the present invention.

[0146] A computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. A non-exhaustive list of more specific examples of computer-readable storage media includes portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically encoded devices such as punch cards or ridge structures in grooves in which the instructions are recorded, and any suitable combinations of these. As used herein, computer-readable storage media should not itself be construed as being ephemeral signals such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted over wires.

[0147] The computer readable program instructions described herein may be downloaded from a computer readable storage medium to each computing device / processing device or to an external computer or storage device over a network (e.g., the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof) that may include copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface within each computing device / processing device receives the computer readable program instructions from the network and forwards the computer readable program instructions for storage on a computer readable storage medium within each computing device / processing device.

[0148] The computer readable program instructions for carrying out the operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk®, C++, and traditional procedural programming languages ​​such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partially on the user's computer as a standalone software package, partially on the user's computer and on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, to carry out aspects of the invention, electronic circuitry including, for example, programmable logic circuitry, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute computer readable program instructions to customize the electronic circuitry by utilizing state information of the computer readable program instructions.

[0149] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks included in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.

[0150] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, where the instructions, executed by the processor of the computer or other programmable data processing apparatus, produce means for performing the functions / operations specified in the blocks of the flowcharts and / or block diagrams. These computer readable program instructions may be stored on a computer readable storage medium and capable of directing a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner, such that the computer readable storage medium on which the instructions are stored comprises an article of manufacture containing instructions for performing aspects of the functions / operations specified in the blocks of the flowcharts and / or block diagrams.

[0151] The computer readable program instructions may be loaded into a computer, other programmable data processing apparatus, or other device to cause a series of operable steps to be performed on the computer, other programmable apparatus, or other device to generate a computer-implemented process such that the instructions, which execute on the computer, other programmable apparatus, or other device, perform the functions / acts specified in the flowchart and / or block diagram blocks.

[0152] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of instructions, comprising one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions shown in the blocks may occur in a different order than that shown in the figures. For example, two blocks shown in succession may in fact be executed substantially simultaneously or in reverse order, depending on the functionality involved. It is also noted that each block in the block diagrams and / or flowchart illustrations, as well as combinations of blocks included in the block diagrams and / or flowchart illustrations, may be implemented by a dedicated hardware-based system that performs the specified functions or operations or executes a combination of dedicated hardware and computer instructions.

[0153] Embodiments of the present invention may be provided to end users via a cloud computing infrastructure. Cloud computing typically refers to the provision of scalable computational resources as a service over a network. More formally, cloud computing may be defined as a computing capability that provides an abstraction between computational resources and their underlying technical architecture (e.g., servers, storage, network), enabling convenient, on-demand network access to a shared pool of configurable computational resources, and allowing these computational resources to be rapidly provisioned and released with minimal administrative effort or interaction with a service provider. Thus, cloud computing allows users to access virtual computational resources (e.g., storage, data, applications, and fully virtualized computing systems) in the "cloud" without awareness of the underlying physical systems (or the location of such systems) used to provide the computational resources.

[0154] Typically, cloud computing resources are provided to users on a pay-per-use basis, with users being charged only for the computing resources actually used (e.g., the amount of storage space consumed by the user or the number of virtualization systems instantiated by the user). Users can access any of the resources present in the cloud from anywhere, anytime, via the Internet. In the context of the present invention, users may access applications (e.g., the query processing orchestrator 115) or associated data available in the cloud. For example, the query processing orchestrator 115 may run on a computing system in the cloud and evaluate queries and back-end resources. In such a case, the query processing orchestrator 115 may route queries and store the back-end resource and / or capability configurations in a storage location in the cloud. In that way, users may access this information from any computing system connected to a network (e.g., the Internet) connected to the cloud.

[0155] While the forgoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope of the invention, which is determined by the appended claims.

Claims

1. A method performed by computer-readable program instructions, the method being carried out on a system including a memory containing the computer-readable program instructions that perform an operation when executed by a computer processor, the method comprising: determining, by a data orchestrator, query workload information corresponding to the region; modeling the query workload information as a hypergraph, the hypergraph including a set of vertices and a set of hyperedges, each vertex in the set of vertices corresponding to a concept in an ontology associated with the domain; generating a mapping between concepts and the plurality of data nodes based on the hypergraph and further based on a predefined capability of each of the plurality of data nodes; and establishing a distributed knowledge base based on the generated mapping.

2. determining the query workload information, Receiving a set of previous ontology queries; generating a first set of concepts accessed by a first query in the set of previous ontology queries; generating a second set of operations to be performed by the first query; The first summarized query is identifying a group of queries from the set of previous ontology queries that includes a first set of corresponding matches; determining, for each query in the identified group of queries, an aggregate set of actions based on a corresponding second set; Associating the first summarized query with the aggregated set of actions and concepts reflected in the corresponding first set of matches. and generating the compound by:

3. Modeling the query workload information as a hypergraph, creating a vertex for each concept in the ontology; creating a first hyperedge for the first summarized query, the first hyperedge connecting a first set of vertices in the hypergraph, the first set of vertices corresponding to the concepts reflected in the first set of matches; and labeling the first hyperedge with the aggregate set of actions.

4. generating the mapping, creating a first cluster of a first action included in the hypergraph; identifying a first set of concepts connected by a first hyperedge in the hypergraph; identifying a first set of actions indicated by the first hyperedge; and assigning the first set of concepts to the first cluster upon determining that the first set of actions includes the first action.

5. generating the mapping, identifying a set of data nodes capable of performing the first operation; Mapping each concept in the first set of concepts to each data node in the identified set of data nodes.

5. The method of claim 4, further comprising mapping the first set of concepts to one or more data nodes by:

6. generating the mapping, identifying a first set of concepts connected by a first hyperedge in the hypergraph; identifying a first set of actions indicated by the first hyperedge; determining a minimum set of data nodes that can collectively perform said first set of operations; generating clusters including the first set of concepts; and labeling the cluster with a minimal set of the data nodes.

7. 7. The method of claim 6, wherein generating the mapping further comprises mapping each concept in the first set of concepts to each data node in the minimal set of data nodes.

8. Establishing the distributed knowledge base comprises: for each concept in the ontology: identifying each data node represented by the mapping; identifying data corresponding to each of said concepts; and facilitating storage of the identified data in each of the data nodes.

9. A computer program product for causing a computer to carry out the steps of the method according to any one of claims 1 to 8.

10. 10. A computer readable storage medium having recorded thereon the computer program of claim 9.

11. one or more computer processors; and a memory containing a program that, when executed by said one or more computer processors, performs operations, said operations including: determining, by a data orchestrator, query workload information corresponding to the region; modeling the query workload information as a hypergraph, the hypergraph including a set of vertices and a set of hyperedges, each vertex in the set of vertices corresponding to a concept in an ontology associated with the domain; generating a mapping between concepts and the plurality of data nodes based on the hypergraph and further based on a predefined capability of each of the plurality of data nodes; and establishing a distributed knowledge base based on the generated mapping.

12. determining the query workload information, Receiving a set of previous ontology queries; generating a first set of concepts accessed by a first query in the set of previous ontology queries; generating a second set of operations to be performed by the first query; The first summarized query is identifying a group of queries from the set of previous ontology queries that includes a first set of corresponding matches; determining, for each query in the identified group of queries, an aggregate set of actions based on a corresponding second set; Associating the first summarized query with the aggregated set of actions and concepts reflected in the corresponding first set of matches. and generating by:

13. Modeling the query workload information as a hypergraph, creating a vertex for each concept in the ontology; creating a first hyperedge for the first summarized query, the first hyperedge connecting a first set of vertices in the hypergraph, the first set of vertices corresponding to the concepts reflected in the first set of matches; and labeling the first hyperedge with the aggregate set of actions.

14. generating the mapping, creating a first cluster of a first action included in the hypergraph; identifying a first set of concepts connected by a first hyperedge in the hypergraph; identifying a first set of actions indicated by the first hyperedge; and assigning the first set of concepts to the first cluster upon determining that the first set of actions includes the first action.

15. generating the mapping, identifying a first set of concepts connected by a first hyperedge in the hypergraph; identifying a first set of actions indicated by the first hyperedge; determining a minimum set of data nodes that can collectively perform said first set of operations; generating clusters including the first set of concepts; and labeling the cluster with a minimal set of the data nodes.

Citation Information

Patent Citations

  • A cloud data processing method and system based on workload

    CN108984308A

  • Document retrieval device and method

    JP2013033452A

  • Process and Framework For Facilitating Data Sharing Using a Distributed Hypergraph

    US20150347480A1

  • Handling failures in processing natural language queries

    US20170075953A1