Two-Pass Graph Path Query Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Graph databases face scalability issues with path queries due to excessive execution time, even for small result paths, due to the exponential number of potential paths between vertices, which existing methodologies like bidirectional search struggle to efficiently handle.

Innovation Solution

Implementing a two-pass technique where the first pass uses breadth-first searches to narrow down the search scope to a subset of edges, and the second pass employs depth-first searches to identify result paths within this subset, significantly reducing temporal complexity from O(2^m) to O(n+m×p, where n is vertices, m is edges, and p is the combined path length.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If traditional bidirectional search is used to find paths between vertices, then the query can handle small graphs, but the execution time becomes excessive for large graphs with millions or billions of vertices and edges

Engineering Contradiction:
Improvepath query execution speedVSAvoidexcessive execution time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent segments the graph traversal into two distinct passes: a first pass that performs breadth-first search from source vertices to identify candidate edges, and a second pass that performs depth-first search from target vertices to find actual paths. This segmentation reduces the search space from the entire graph to a subset of relevant edges, dramatically improving execution speed for large graphs while maintaining correctness.

Inventive Principle:
Principle #1Segmentation

2Reliability

If the entire graph is searched to ensure all paths are found, then completeness is achieved, but the temporal complexity becomes O(2^m) where m is the number of edges

Engineering Contradiction:
Improvecompleteness of path resultsVSAvoidtemporal complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The first pass performs preliminary action by conducting breadth-first search from source vertices to pre-identify and mark candidate edges that could potentially be part of valid paths. This preliminary filtering reduces the search space for the second pass, lowering temporal complexity from O(2^m) to O(n+m×p) while ensuring that all actual paths are still found because the first pass explores all reachable vertices from sources.

Inventive Principle:
Principle #10Preliminary action

3Quantity of substance

If semantic constraints are applied to limit result paths, then the number of result paths is reduced to a small amount, but existing methodologies still require excessive execution time

Engineering Contradiction:
Improvenumber of result pathsVSAvoidexecution time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent applies local quality by performing the first pass only on edges that could potentially satisfy semantic constraints, using breadth-first search to identify candidate edges with appropriate properties. The second pass then focuses depth-first search only on these pre-filtered candidate edges, rather than searching the entire graph. This localized approach ensures that semantic constraints are respected while dramatically reducing execution time compared to searching all edges.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10810257B2Fast processing of path-finding queries in large graph databases
Publication Date: 2020.10.20 ORACLE INT CORP
  • US10810257B2 patent drawing
  • US10810257B2 patent drawing
  • US10810257B2 patent drawing

AI summary

Techniques herein are for fast processing of path-finding queries in large graph databases. A computer system receives a graph search request to find a set of result paths between one or more source vertices of a graph and one or more target vertices of the graph. The graph comprises vertices connected by edges. During a first pass, the computer system performs one or more breadth-first searches to identify a subset of edges of the graph. The one or more breadth-first searches originate at the one or more source vertices. After the first pass and during a second pass, the computer system performs one or more depth-first searches to identify the set of result paths. The one or more depth-first searches originate at the one or more target vertices. The one or more depth-first searches traverse at most the subset of edges of the graph.