US 12,169,523 B2
Query conversion for different graph query languages
Siming Tian, Redmond, WA (US); Xin Zhang, San Jose, CA (US); Yi Zeng, Bothell, WA (US); Yang Yang, Redmond, WA (US); and Daxin Jiang, Beijing (CN)
Assigned to Microsoft Technology Licensing, LLC, Redmond, WA (US)
Appl. No. 17/920,215
Filed by Microsoft Technology Licensing, LLC, Redmond, WA (US)
PCT Filed Mar. 24, 2021, PCT No. PCT/US2021/023797
§ 371(c)(1), (2) Date Oct. 20, 2022,
PCT Pub. No. WO2021/242382, PCT Pub. Date Dec. 2, 2021.
Claims priority of application No. 202010469919.0 (CN), filed on May 28, 2020.
Prior Publication US 2023/0342396 A1, Oct. 26, 2023
Int. Cl. G06F 7/00 (2006.01); G06F 16/901 (2019.01); G06F 16/9032 (2019.01)
CPC G06F 16/9032 (2019.01) [G06F 16/9027 (2019.01)] 12 Claims
OG exemplary drawing
 
1. A method for query conversion performed by a computer system employing a processor, the method comprising:
obtaining, by the computer system, a first query in a first graph query language for a first graph database;
generating, by the computer system, a syntax tree by:
obtaining an ontology file associated with the first graph database;
obtaining a data structure corresponding to the first graph database through parsing the ontology file, and
generating the syntax tree through parsing the first query using the data structure;
creating, by the computer system, a query graph based on the syntax tree, wherein the creating the query graph comprises:
extracting a set of nodes and a set of edges from the syntax tree;
determining a node type of each node in the set of nodes from the syntax tree;
determining an edge type of each edge in the set of edges from the syntax tree;
determining a query path based on the set of nodes and corresponding node types and the set of edges and corresponding edge types; and
combining the set of nodes and the set of edges into the query graph according to the query path;
converting, by the computer system, the query graph into a second query for a second graph database, the second query being formatted according to a second graph query language different from the first graph query language, thereby improving interoperability between different graph database systems utilizing different graph query languages; and
applying the second query to the second graph database to retrieve information from the second graph database.