IP Library Granted Patent US 10,789,295
Granted Patent B2
US 10,789,295 · App. 15/278,880 · Granted Sep 29, 2020

Pattern-based searching of log-based representations of graph databases

Inventors: Yejuan Long (Union City, CA); Scott M. Meyer (Berkeley, CA)
Assignee: Microsoft Technology Licensing, LLC
G06F16/9024G06F16/2365G06F16/248G06F16/2455
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,789,295
App. No.
15/278,880
Granted
Sep 29, 2020
Kind
B2
Abstract

The disclosed embodiments provide a system that searches a graph database. During operation, the system obtains a log-based representation of a graph database storing a graph, wherein the graph comprises a set of nodes, a set of edges between pairs of nodes in the set of nodes, and a set of predicates. Next, the system obtains a first query containing a first search pattern for searching the log-based representation. The system then matches the first search pattern to one or more records in the log-based representation. Finally, the system outputs, as a first result of the first query, the one or more records in a subgraph of the graph.

Claims (73)

1. A method, comprising:

generating a log-based representation of a graph database from a source of truth for the graph database, wherein the graph database stores a graph, wherein the graph comprises a set of nodes, a set of edges between pairs of nodes in the set of nodes, and a set of predicates, and wherein the log-based representation of the graph stores the set of nodes, the set of edges between pairs of nodes in the set of nodes, the set of predicates, and a set of changes to the graph as a set of increasing offsets within a binary log file;

obtaining a first query comprising a first search pattern for searching the log-based representation, wherein the first search pattern includes at least one numeric offset;

matching, by one or more computer systems, the first search pattern to one or more records in the log-based representation, which includes matching the at least one numeric offset in the first search pattern with at least one numeric offset in the set of increasing offsets in the log-based representation;

outputting, as a first result of the first query, the one or more records in a subgraph of the graph;

obtaining a second result of the first query by running the first query against the graph database; and

comparing the first result and the second result to verify a data correctness of the log-based representation of the graph database.

2. The method of claim 1 , further comprising:

providing the first result as input to a second query comprising a second search pattern for searching the log-based representation;

matching the second search pattern to one or more additional records in the subgraph; and

outputting a second result of the second query.

3. The method of claim 1 , further comprising:

obtaining, from a second query, a second search pattern for searching the log-based representation; and

generating a second result of the second query based on one or more options associated with the second query.

4. The method of claim 3 , wherein the one or more options are associated with at least one of:

a symbolic representation of one or more additional records in the second result; and

a Boolean representation of the one or more additional records.

5. The method of claim 1 , wherein the first search pattern comprises an offset in the log-based representation.

6. The method of claim 1 , wherein the first search pattern comprises at least one of:

a subject;

a predicate; and

an object.

7. The method of claim 1 , wherein the first search pattern comprises a string.

8. The method of claim 1 , wherein the first search pattern comprises a logical operator.

9. The method of claim 8 , wherein the logical operator is at least one of:

a conjunction;

a disjunction; and

a negation.

10. The method of claim 1 , wherein the first search pattern comprises a count of the one or more records.

11. An apparatus, comprising:

one or more processors; and

memory storing instructions that, when executed by the one or more processors, cause the apparatus to:

generate a log-based representation of a graph database from a source of truth for the graph database, wherein the graph database stores a graph, wherein the graph comprises a set of nodes, a set of edges between pairs of nodes in the set of nodes, and a set of predicates, and wherein the log-based representation of the graph stores the set of nodes, the set of edges between pairs of nodes in the set of nodes, the set of predicates, and a set of changes to the graph as a set of increasing offsets within a binary log file;

obtain a first query comprising a first search pattern for searching the log-based representation, wherein the first search pattern includes at least one numeric offset;

match the first search pattern to one or more records in the log-based representation, which includes matching the at least one numeric offset in the first search pattern with at least one numeric offset in the set of increasing offsets in the log-based representation;

output, as a first result of the first query, the one or more records in a subgraph of the graph;

obtain a second result of the first query by running the first query against the graph database; and

compare the first result and the second result to verify a data correctness of the log-based representation of the graph database.

12. The apparatus of claim 11 , wherein the memory further stores instructions that, when executed by the one or more processors, cause the apparatus to:

provide the first result as input to a second query comprising a second search pattern for searching the log-based representation;

match the second search pattern to one or more additional records in the subgraph; and

output a second result of the second query.

13. The apparatus of claim 11 , wherein the memory further stores instructions that, when executed by the one or more processors, cause the apparatus to:

obtain, from a second query, a second search pattern for searching the log-based representation; and

generate a second result of the second query based on one or more options associated with the second query.

14. The apparatus of claim 13 , wherein the one or more options are associated with at least one of:

a symbolic representation of one or more additional records in the second result; and

a Boolean representation of the one or more additional records.

15. The apparatus of claim 11 , wherein the first search pattern comprises at least one of:

an offset in the log-based representation;

a string;

a logical operator; and

a count of the one or more records.

16. The apparatus of claim 15 , wherein the string is at least one of:

a string literal; and

a regular expression.

17. A system, comprising:

a graph database storing a graph, wherein the graph comprises a set of nodes, a set of edges between pairs of nodes in the set of nodes, and a set of predicates; and

a scanning module comprising a non-transitory computer-readable medium comprising instructions that, when executed, cause the system to:

generate a log-based representation of the graph database from a source of truth for the graph database, wherein the log-based representation of the graph stores the set of nodes, the set of edges between pairs of nodes in the set of nodes, the set of predicates, and a set of changes to the graph as a set of increasing offsets within a binary log file;

obtain a first query comprising a first search pattern for searching the log-based representation, wherein the first search pattern includes at least one numeric offset;

match the first search pattern to one or more records in the log-based representation, which includes matching the at least one numeric offset in the first search pattern with at least one numeric offset in the set of increasing offsets in the log-based representation;

output, as a first result of the first query, the one or more records in a subgraph of the graph; and

a verification module comprising instructions that, when executed, cause the system to:

obtain a second result of the first query by running the first query against the graph database; and

compare the first result and the second result to verify a data correctness of the log-based representation of the graph database.

18. The system of claim 17 , wherein the non-transitory computer-readable medium of the scanning module further comprises instructions that, when executed, cause the system to:

provide the first result as input to a second query comprising a second search pattern for searching the log-based representation;

match the second search pattern to one or more additional records in the subgraph; and

output a second result of the second query.

19. The system of claim 17 , wherein the non-transitory computer-readable medium of the scanning module further comprises instructions that, when executed, cause the system to:

obtain, from a second query, a second search pattern for searching the log-based representation; and

generate a second result of the second query based on one or more options associated with the second query.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 1, 2017
From: LINKEDIN CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 044746/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 12, 2016
From: LONG, YEJUAN; MEYER, SCOTT M.
To: LINKEDIN CORPORATION
Reel/Frame 039999/0584 →
Continuity (1)
Related Publication 20180089331A1 · Mar 29, 2018
Cited By (1)
US 12,326,954