Techniques for ontology query construction
Apparatuses, methods, program products, and systems are disclosed for techniques for ontology query construction. An apparatus includes a processor and a memory that stores code that is executable by the processor. The code is executable by the processor to receive a starting model associated with a graph schema defining a graph, receive an ending model associated with the graph schema, determine an optimal path through the graph schema from the starting model to the ending model, and construct a query for querying the graph based on the determined optimal path.
1 . An apparatus, comprising:
a processor; and
a memory that stores code executable by the processor to:
receive a starting model associated with a digital twin graph schema defining a digital twin graph, the starting model represented on a user interface as a graphical icon;
receive an ending model associated with the digital twin graph schema, the ending model represented on the user interface as a graphical icon;
determine an optimal path through the digital twin graph schema from the starting model to the ending model creating a determined optimal path;
construct a query for querying the digital twin graph based on the determined optimal path creating a constructed query;
execute the constructed query on the digital twin graph producing an executed query; and
present a textual representation of results of the executed query on the user interface.
2 . The apparatus of claim 1 , wherein the code is executable by the processor to present the results of the executed query as a graph structure.
3 . The apparatus of claim 1 , wherein the code is executable by the processor to receive at least one filter model for setting a condition for the determined optimal path.
4 . The apparatus of claim 1 , wherein the code is executable by the processor to present an interactive graphical interface for displaying potential models, receiving the starting model, the ending model, and at least one optional filter model.
5 . The apparatus of claim 4 , wherein the code is executable by the processor to present a plurality of models associated with the digital twin graph schema and receive a selection of the starting model, the ending model, and the at least one optional filter model in response to user input.
6 . The apparatus of claim 5 , wherein the user input comprises a drag-and-drop action.
7 . The apparatus of claim 5 , wherein the code is executable by the processor to receive a user-defined value for the at least one optional filter model via the interactive graphical interface.
8 . The apparatus of claim 4 , wherein the code is executable by the processor to present the constructed query within the interactive graphical interface and results of the constructed query as executed on the digital twin graph.
9 . The apparatus of claim 4 , wherein the code is executable by the processor to, in response to a plurality of filter models being selected, receive a selection of at least one Boolean operator to apply to at least two of the selected filter models.
10 . The apparatus of claim 1 , wherein the code is executable by the processor to perform a breadth-first search to determine the optimal path through the digital twin graph schema from the starting model to the ending model.
11 . The apparatus of claim 10 , wherein the code is executable by the processor to determine the optimal path based on weights associated with models defined in the digital twin graph schema.
12 . The apparatus of claim 1 , wherein the code is executable by the processor to determine the optimal path based on inferences determined according to the starting model, the ending model, at least one optional filter model, user input, or a combination thereof.
13 . The apparatus of claim 1 , wherein the code is executable by the processor to determine a plurality of paths through the digital twin graph schema from the starting model to the ending model and to select the optimal path from the plurality of paths.
14 . The apparatus of claim 13 , wherein the optimal path comprises a shortest path from the starting model to the ending model.
15 . The apparatus of claim 1 , wherein the code is executable by the processor to determine the optimal path and construct the query in real-time in response to updates associated with the starting model, the ending model, at least one optional filter model, user input, or a combination thereof.
16 . The apparatus of claim 1 , wherein the digital twin graph schema is associated with a building ontology, the building ontology defining different elements of a building system.
17 . A method, comprising:
receiving a starting model associated with a digital twin graph schema defining a digital twin graph, the starting model represented on a user interface as a graphical icon;
receiving an ending model associated with the digital twin graph schema, the ending model represented on a user interface as a graphical icon;
determining an optimal path through the digital twin graph schema from the starting model to the ending model creating a determined optimal path;
constructing a query for querying the digital twin graph based on the determined optimal path, creating a constructed query;
executing the constructed query on the digital twin graph, producing an executed query; and
presenting a textual representation of results of the executed query on the user interface.
18 . The method of claim 17 , wherein the digital twin graph schema is associated with a building ontology, the building ontology defining different elements of a building system.
19 . The method of claim 17 , further comprising determining the optimal path based on inferences determined according to the starting model, the ending model, at least one optional filter model, user input, or a combination thereof.
20 . A non-transitory computer-readable storage medium configured with data and instructions which upon execution by a processor perform a method comprising:
receiving a starting model associated with a digital twin graph schema defining a digital twin graph, the starting model represented on a user interface as a graphical icon;
receiving an ending model associated with the digital twin graph schema, the ending model represented on a user interface as a graphical icon;
determining an optimal path through the digital twin graph schema from the starting model to the ending model creating a determined optimal path;
constructing a query for querying the digital twin graph based on the determined optimal path, creating a constructed query;
executing the constructed query on the digital twin graph, producing an executed query; and
presenting a textual representation of results of the executed query on the user interface.