Bidirectional Graph Search for Distributed Shortest Path Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing distributed graph database systems face inefficiencies in calculating the shortest path due to exponential time consumption as the number of path layers increases, making it difficult to support efficient mining in large-scale data volumes.

Innovation Solution

A method and apparatus that perform a breadth-first search in a distributed graph database with start and end entities as root nodes, followed by intersection checking and path backtracking to find the shortest path, utilizing a two-way breadth-first search algorithm and multi-threaded asynchronous processing to optimize the search process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the one-way breadth-first search algorithm is used in distributed graph database, then the algorithm can adapt to distributed storage data retrieval, but the time consumption increases exponentially as the number of path layers increases

Engineering Contradiction:
Improveadaptability to distributed storageVSAvoidquery time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent applies bidirectional search by performing breadth-first search simultaneously from both the start entity and the end entity, rather than searching in one direction only. This inversion of the search direction reduces the search space exponentially, as the two search fronts meet in the middle, significantly decreasing query time while maintaining adaptability to distributed storage systems

Inventive Principle:
Principle #13The other way round (Inversion)

Solution Approach 2:

The patent merges two separate breadth-first search processes (one from start entity, one from end entity) into a coordinated bidirectional search system. By combining the search efforts from both directions and using intersection checking to detect when the search fronts meet, the system achieves exponential time reduction compared to unidirectional search

Inventive Principle:
Principle #5Merging (Combining)

2Area of stationary object

If the number of path layers increases in the shortest path algorithm, then the search coverage increases, but the time consumption increases rapidly

Engineering Contradiction:
Improvesearch coverageVSAvoidretrieval time
Core Design Contradiction:
Area of stationary objectVSLoss of time

Solution Approach 1:

By inverting the search approach to bidirectional search, the patent maintains comprehensive search coverage across multiple path layers while reducing retrieval time. The search from both directions meets in the middle, effectively halving the maximum search depth required and exponentially reducing the number of nodes that need to be visited

Inventive Principle:
Principle #13The other way round (Inversion)

3Quantity of substance

If the access degree of entity increases in distributed graph storage, then the data completeness improves, but the shortest path algorithm cannot satisfy efficient mining

Engineering Contradiction:
Improvedata completenessVSAvoidmining efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The bidirectional search algorithm handles high access degrees efficiently by searching from both ends simultaneously, which reduces the branching factor impact. As the search progresses layer by layer from both directions, the effective search space grows much slower than in unidirectional search, maintaining mining efficiency even with high entity access degrees and complete distributed graph data

Inventive Principle:
Principle #13The other way round (Inversion)

Data Source

PatentUS11657091B2Method and apparatus for querying shortest path of graph, and storage medium
Publication Date: 2023.05.23 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US11657091B2 patent drawing
  • US11657091B2 patent drawing
  • US11657091B2 patent drawing

AI summary

The present disclosure provides a method and an apparatus for querying the shortest path of a graph, and a storage medium. The method includes: performing a breadth-first search in a distributed graph database with a start entity to be searched and an end entity to be searched as root nodes respectively, and obtaining a layer of new entities for each search; performing an intersection checking on the new entities and entities of the highest layer from a search set on an opposite side, so as to determine whether an intersection between the new entities and the entities of the highest layer exists; and when the intersection exists, determining intersection points, and performing path backtracking through the intersection points to find the shortest path from the start entity to the end entity.