Interval Hash Table Locality-Preserving Hashing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional interval trees are inefficient for real-time interval queries due to high space overhead, poor memory locality, and suboptimal search times, especially in applications like packet routing and geo-IP search.
Innovation Solution
The method employs locality-preserving hashing to divide intervals into sub-intervals, which are then stored in an interval hash table, allowing for efficient search and overlap detection using binary search, thereby improving both time and space efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If interval trees are used for interval searching, then the search structure can handle interval queries, but the space overhead increases significantly due to heavy use of pointers
Solution Approach 1:
The patent replaces the pointer-based mechanical structure of interval trees with a hash table data structure that uses array indexing instead of pointers. This substitution eliminates the need for pointer storage, significantly reducing space overhead while maintaining interval query functionality through hash-based direct access to interval records
Solution Approach 2:
The patent creates a simplified copy of the interval tree structure by using hash tables to store interval endpoints and their relationships. Instead of maintaining the complex pointer-based tree structure, the system copies the essential interval information into hash table buckets, achieving the same query functionality with reduced space requirements
2Reliability
If interval trees are used for interval searching, then the search functionality is provided, but memory reference locality is poor leading to inefficient use of memory hierarchy
Solution Approach 1:
The patent segments the interval search problem by dividing intervals into discrete endpoints and storing them in separate hash table buckets. This segmentation allows the system to access only relevant portions of memory during queries, improving memory reference locality by avoiding traversal through entire tree structures and enabling better utilization of cache hierarchies
Solution Approach 2:
The patent replaces the pointer-chasing mechanism of interval trees with direct hash table indexing. This substitution transforms random memory access patterns into sequential or localized access patterns, dramatically improving memory reference locality and enabling efficient use of L1 and L2 caches in modern processors
3Reliability
If binary search in trees is used, then interval queries can be performed, but the search time is slower compared to binary search in arrays
Solution Approach 1:
The patent replaces tree-based binary search with hash table-based direct access. Instead of traversing tree nodes and comparing keys at each level, the system uses hash functions to directly compute bucket indices, providing O(1) average-case access time and significantly faster search performance compared to the O(log n) time required by tree-based binary search
Solution Approach 2:
The patent changes the fundamental parameter of search time complexity by transitioning from logarithmic time (tree-based) to constant average time (hash-based). This parameter change is achieved by using hash functions that directly map query endpoints to interval buckets, eliminating the need for iterative comparison and traversal operations
Data Source
Figure 1A~1C
Figure 2
Figure 3
AI summary
Embodiments of the present invention provide a time- and space-efficient system for representing and searching a set of intervals to find all the intervals that overlap with a given query interval or point. A new structure called an interval hash table is introduced to significantly reduce the average search time, thereby improving computing and search technology. During operation, the system obtains data indicating a set of intervals to be hashed. The system divides a respective interval into a set of sub-intervals based on a locality-preserving hashing. The system then obtains a hash code associated with a respective sub-interval, and inserts the respective sub-interval into an interval hash table at a location corresponding to the hash code. The system may further search the interval hash table.