Graph Query Processing Inversion for Memory Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for processing graph queries are inefficient and consume vast amounts of memory due to redundant data processing, leading to poor performance.
Innovation Solution
A computer-implemented method that processes graph queries by selecting a first edge and traversing it from the source node to the target node, then iteratively evaluating and filtering subsequent edges from the target node back to the source node, reducing memory consumption by minimizing intermediate result sets.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the prior art approach of evaluating each edge from source node to target node and intersecting intermediate result sets is used, then the graph query processing is comprehensive, but vast amounts of memory are consumed due to temporal storing of multiple intermediate result sets
Solution Approach 1:
The patent inverts the traditional graph query processing approach by evaluating edges in reverse direction (from target node to source node) for all edges except the first one. This inversion allows the system to generate only one intermediate result set initially, then progressively filter it backward through each edge, thereby dramatically reducing memory consumption while maintaining query completeness
Solution Approach 2:
The patent extracts and eliminates the problematic intermediate result sets that cause memory consumption. By taking out the need to store multiple intermediate result sets simultaneously and replacing them with a single result set that is iteratively filtered, the system achieves the same comprehensive query processing with minimal memory usage
2Productivity
If the prior art approach of generating and storing multiple intermediate result sets is used, then all source nodes are processed, but the efficiency of graph query processing deteriorates due to vast memory usage and computing resources
Solution Approach 1:
By inverting the evaluation direction from forward (source to target) to backward (target to source) for most edges, the patent eliminates the need to generate and manage multiple intermediate result sets. This single-pass backward filtering approach significantly improves processing efficiency while reducing computing resource consumption
Solution Approach 2:
The patent discards the inefficient practice of storing multiple intermediate result sets and recovers performance by using a single result set that is progressively filtered. This discarding of redundant data structures and recovery of a streamlined processing approach leads to better efficiency and reduced resource usage
Data Source
AI summary
In certain example embodiments, a graph query retrieves data items from a data source by indicating a source node, a target node, and a plurality of edges between the source and target nodes. Each edge includes one or more relation conditions. Each relation condition defines a mapping between items of one of the source item types and items of one of the target item types. The edges are selected and traversed from the source node to the target node in accordance with the relation condition(s), producing an intermediate set of result items including items of the data source that belong to the at least one target item type and fulfill the corresponding relation condition(s). Items from the intermediate set of result items that do not fulfill the corresponding relation condition(s) are deleted as further traversals are made. The intermediate set ultimately is returned as the graph query result.


