Distributed Graph Pattern Matching Engine Using Depth-First Traversal
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for processing regular path queries (RPQs) on distributed graphs are computationally expensive and require significant memory, especially when dealing with unbounded quantifiers, as they involve costly pre-processing steps and fixed reachability graphs that are not reusable across queries.
Innovation Solution
The approach extends asynchronous graph pattern-matching engines with a depth-first traversal method that thins out computation as it deepens, allowing for minimal intermediate memory usage and efficient matching of regular path patterns in a distributed setting, using depth-first traversal for local computations and asynchronous messaging for remote edges to manage flow control and memory efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If pre-processing reachability indices/graphs are constructed for each regular path pattern, then query evaluation time is reduced, but memory consumption and pre-processing cost increase significantly
Solution Approach 1:
The patent applies preliminary action by pre-computing and caching reachability information for frequently occurring path patterns. The system identifies common path expressions in advance, computes their reachability graphs during off-peak times, and stores them in a cache. When queries arrive, the system retrieves pre-computed reachability information from the cache rather than computing it on-demand, thus reducing query evaluation time while controlling memory usage through selective caching of only frequently accessed patterns.
Solution Approach 2:
The patent implements universality by creating a shared reachability graph that serves multiple regular path patterns simultaneously. Instead of constructing separate reachability indices for each pattern, the system builds a unified reachability structure that can answer multiple different RPQ patterns. This multi-functional approach reduces both memory consumption and pre-processing time compared to maintaining separate indices for each pattern.
2Quantity of substance
If depth first search or breadth first search is used without any index, then memory consumption is reduced, but query evaluation time increases to O(N+E) per vertex pair
Solution Approach 1:
The patent applies preliminary action by pre-computing reachability information for frequently occurring path patterns. The system identifies common path expressions in advance, computes their reachability graphs during off-peak times, and stores them in a cache. When queries arrive, the system retrieves pre-computed reachability information from the cache rather than computing it on-demand, thus reducing query evaluation time while controlling memory usage through selective caching of only frequently accessed patterns.
Solution Approach 2:
The patent implements local quality by computing reachability information locally for specific subgraphs rather than globally for the entire graph. The system identifies frequently accessed path patterns and computes reachability only for the relevant subgraphs involved in those patterns. This localized approach reduces memory consumption compared to global pre-computation while still providing speedup for the most common query patterns.
3Measurement precision
If reachability graphs are constructed for each regular path pattern, then path pattern matching accuracy is improved, but the approach becomes computationally expensive and not reusable across queries
Solution Approach 1:
The patent implements universality by creating a shared reachability graph that serves multiple regular path patterns simultaneously. Instead of constructing separate reachability indices for each pattern, the system builds a unified reachability structure that can answer multiple different RPQ patterns. This multi-functional approach reduces both memory consumption and pre-processing time compared to maintaining separate indices for each pattern.
Solution Approach 2:
The patent applies preliminary action by pre-computing and caching reachability information for frequently occurring path patterns. The system identifies common path expressions in advance, computes their reachability graphs during off-peak times, and stores them in a cache. When queries arrive, the system retrieves pre-computed reachability information from the cache rather than computing it on-demand, thus reducing query evaluation time while controlling memory usage through selective caching of only frequently accessed patterns.
Data Source
AI summary
A pattern matching engine interprets a query into a data structure resembling a finite state machine. Vertices in the query pattern are treated as states or stages, while edges connecting them are treated as state transitions or hops. To match the full pattern, the first stage is first matched by applying vertex filters, if any. If the vertex is eligible, its edges that satisfy the edge filters, if any, are followed to move to the neighbors that can potentially produce results, thus progressing to the next stage. This process is repeated; if all stages are matched, then the whole pattern has been matched successfully.


