9928310

In-Memory Graph Pattern Matching

PublishedMarch 27, 2018
Assigneenot available in USPTO data we have
Technical Abstract

Patent Claims
22 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method comprising: receiving a query graph that includes a plurality of query nodes; selecting a first query node from among the plurality of query nodes; storing a first data structure that is accessible to a first plurality of threads; for each thread in the first plurality of threads: assigning, to said each thread, a different set of nodes in a particular graph; identifying, in the set of nodes assigned to said each thread, one or more nodes that match the first query node; storing, in the first data structure, one or more node identities of the one or more nodes identified by said each thread; selecting, from among the plurality of query nodes, a second query node that is different than the first query node; storing a second data structure that is accessible to a second plurality of threads; for each thread in the second plurality of threads: assigning, to said each thread, a different set of nodes identified in the first data structure; identifying, in the particular graph, one or more neighbor nodes, of each node that is identified in the first data structure and is assigned to said each thread, that match the second query node; storing, in the second data structure, one or more identities of the one or more neighbor nodes identified by said each thread; wherein the method is performed by one or more computing devices.

2

2. The method of claim 1 , further comprising: for each thread of the first plurality of threads: prior to storing the one or more node identities in the first data structure, said each thread storing the one or more node identities in a thread-local data structure that is accessible only to said each thread; wherein storing the one or more node identities in the first data structure comprises said each thread copying the one or more node identities from the thread-local data structure to the first data structure.

3

3. The method of claim 2 , further comprising: storing order data that indicates an order among the first plurality of threads, wherein a first thread of the first plurality of threads is ordered before a second thread of the first plurality of threads; wherein, for the second thread, copying the one or more node identities from the thread-local data structure to the first data structure comprises: determining a number of node identities that are stored in a thread-local data structure of the first thread, and based on the number, identifying a position, in the first data structure, in which to store the one or more node identities identified by the second thread.

4

4. The method of claim 3 , wherein identifying the position in the first data structure comprises identifying the position in the first data structure prior to the first thread storing, in the first data structure, the one or more node identities identified by the first thread.

5

5. The method of claim 2 , further comprising: for each thread of the first plurality of threads, determining a number of node identities stored in the thread-local data structure of said each thread; determining a total number of node identities based on each number; determining a size for the first data structure based on the total number; generating the first data structure based on the size.

6

6. The method of claim 1 , further comprising: storing the particular graph, wherein storing the particular graph comprises: storing a node array that identifies each node in the particular graph; storing a neighbor array that identifies, for each node in the particular graph, zero or more nodes that are connected to said each node; wherein at least one node in the particular graph is connected to multiple nodes.

7

7. The method of claim 6 , wherein: storing the particular graph comprises storing a node attribute array that indicates, for each node in the particular graph, zero or more attributes or properties of said each node; at least one entry in the node attribute array indicates one or more attributes of a corresponding node in the particular graph.

8

8. The method of claim 6 , wherein: storing the particular graph comprises storing an edge attribute array that indicates, for each edge in the particular graph, zero or more attributes or properties of said each edge; at least one entry in the edge attribute array indicates one or more attributes of a corresponding edge in the particular graph.

9

9. The method of claim 1 , wherein: for each thread of the first plurality of threads, identifying, in the set of nodes assigned to said each thread, the one or more nodes that match the first query node comprises: identifying one or more attributes of the first query node, for each node in the set of nodes assigned to said each thread: identifying one or more attributes of said each node, comparing one or more attributes of the first query node with the one or more attributes of said each node, and wherein storing in the first data structure comprises storing an identity of said each node in the first data structure only if the one or more attributes of the first query node match the one or more attributes of said each node.

10

10. The method of claim 1 , wherein: for each thread of the second plurality of threads, identifying, in the particular graph, the one or more neighbor nodes that match the second query node comprises: identifying one or more attributes of a query edge from the first query node to the second query node, for each node in the set of nodes, in the first data structure, that is assigned to said each thread: identifying one or more attributes of a graph edge from said each node to a second node, comparing one or more attributes of the query edge with the one or more attributes of the graph edge, and wherein storing in the second data structure comprises storing an identity of the second node in the second data structure only if the one or more attributes of the query edge match the one or more attributes of the graph edge.

11

11. The method of claim 10 , further comprising: for each node in the set of nodes, in the first data structure, that is assigned to said each thread: comparing the one or more attributes of the query edge with the one or more attributes of the graph edge prior to comparing one or more node attributes of the second query node with one or more node attributes of the second node; wherein comparing one or more node attributes of the second query node with one or more node attributes of the second node is only performed if the one or more attributes of the query edge match the one or more attributes of the graph edge.

12

12. One or more non-transitory storage media storing instructions which, when executed by one or more processors, cause: receiving a query graph that includes a plurality of query nodes; selecting a first query node from among the plurality of query nodes; storing a first data structure that is accessible to a first plurality of threads; for each thread in the first plurality of threads: assigning, to said each thread, a different set of nodes in a particular graph; identifying, in the set of nodes assigned to said each thread, one or more nodes that match the first query node; storing, in the first data structure, one or more node identities of the one or more nodes identified by said each thread; selecting, from among the plurality of query nodes, a second query node that is different than the first query node; storing a second data structure that is accessible to a second plurality of threads; for each thread in the second plurality of threads: assigning, to said each thread, a different set of nodes identified in the first data structure; identifying, in the particular graph, one or more neighbor nodes, of each node that is identified in the first data structure and is assigned to said each thread, that match the second query node; storing, in the second data structure, one or more identities of the one or more neighbor nodes identified by said each thread.

13

13. The one or more storage media of claim 12 , wherein the instructions, when executed by the one or more processors, further cause: for each thread of the first plurality of threads: prior to storing the one or more node identities in the first data structure, said each thread storing the one or more node identities in a thread-local data structure that is accessible only to said each thread; wherein storing the one or more node identities in the first data structure comprises said each thread copying the one or more node identities from the thread-local data structure to the first data structure.

14

14. The one or more storage media of claim 13 , wherein the instructions, when executed by the one or more processors, further cause: storing order data that indicates an order among the first plurality of threads, wherein a first thread of the first plurality of threads is ordered before a second thread of the first plurality of threads; wherein, for the second thread, copying the one or more node identities from the thread-local data structure to the first data structure comprises: determining a number of node identities that are stored in a thread-local data structure of the first thread, and based on the number, identifying a position, in the first data structure, in which to store the one or more node identities identified by the second thread.

15

15. The one or more storage media of claim 14 , wherein identifying the position in the first data structure comprises identifying the position in the first data structure prior to the first thread storing, in the first data structure, the one or more node identities identified by the first thread.

16

16. The one or more storage media of claim 13 , wherein the instructions, when executed by the one or more processors, further cause: for each thread of the first plurality of threads, determining a number of node identities stored in the thread-local data structure of said each thread; determining a total number of node identities based on each number; determining a size for the first data structure based on the total number; generating the first data structure based on the size.

17

17. The one or more storage media of claim 12 , wherein the instructions, when executed by the one or more processors, further cause: storing the particular graph, wherein storing the particular graph comprises: storing a node array that identifies each node in the particular graph; storing a neighbor array that identifies, for each node in the particular graph, zero or more nodes that are connected to said each node; wherein at least one node in the particular graph is connected to multiple nodes.

18

18. The one or more storage media of claim 17 , wherein: storing the particular graph comprises storing a node attribute array that indicates, for each node in the particular graph, zero or more attributes or properties of said each node; at least one entry in the node attribute array indicates one or more attributes of a corresponding node in the particular graph.

19

19. The one or more storage media of claim 17 , wherein: storing the particular graph comprises storing an edge attribute array that indicates, for each edge in the particular graph, zero or more attributes or properties of said each edge; at least one entry in the edge attribute array indicates one or more attributes of a corresponding edge in the particular graph.

20

20. The one or more storage media of claim 12 , wherein: for each thread of the first plurality of threads, identifying, in the set of nodes assigned to said each thread, the one or more nodes that match the first query node comprises: identifying one or more attributes of the first query node, for each node in the set of nodes assigned to said each thread: identifying one or more attributes of said each node, comparing one or more attributes of the first query node with the one or more attributes of said each node, and wherein storing in the first data structure comprises storing an identity of said each node in the first data structure only if the one or more attributes of the first query node match the one or more attributes of said each node.

21

21. The one or more storage media of claim 12 , wherein: for each thread of the second plurality of threads, identifying, in the particular graph, the one or more neighbor nodes that match the second query node comprises: identifying one or more attributes of a query edge from the first query node to the second query node, for each node in the set of nodes, in the first data structure, that is assigned to said each thread: identifying one or more attributes of a graph edge from said each node to a second node, comparing one or more attributes of the query edge with the one or more attributes of the graph edge, and wherein storing in the second data structure comprises storing an identity of the second node in the second data structure only if the one or more attributes of the query edge match the one or more attributes of the graph edge.

22

22. The one or more storage media of claim 21 , wherein the instructions, when executed by the one or more processors, further cause: for each node in the set of nodes, in the first data structure, that is assigned to said each thread: comparing the one or more attributes of the query edge with the one or more attributes of the graph edge prior to comparing one or more node attributes of the second query node with one or more node attributes of the second node; wherein comparing one or more node attributes of the second query node with one or more node attributes of the second node is only performed if the one or more attributes of the query edge match the one or more attributes of the graph edge.

Patent Metadata

Filing Date

Unknown

Publication Date

March 27, 2018

Inventors

Raghavan Raman
Sungpack Hong
Hassan Chafi

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “IN-MEMORY GRAPH PATTERN MATCHING” (9928310). https://patentable.app/patents/9928310

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.