Multi-Stage Hash Table for Memory-Efficient Collision Resolution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Hash tables face challenges in managing variable-length keys, leading to memory inefficiencies and increased lookup times when implemented in hardware, as they require storing large key values to resolve collisions, which is problematic for systems with limited memory.
Innovation Solution
A multi-stage hash table approach is implemented, where only fixed-length hash values are stored in entries, and a management table is used to determine hash collisions, allowing for the configuration of multiple hash tables with different hash functions to manage key values efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If key values are stored in hash table entries to resolve hash collisions, then collision resolution capability is improved, but memory consumption increases significantly
Solution Approach 1:
The patent extracts the key value storage function from the hash table entries and relocates it to a separate management table. Only fixed-length hash values are stored in the hash table entries, while the actual key values are stored in the management table, thereby reducing memory consumption in the hash table while maintaining collision resolution capability through the management table.
Solution Approach 2:
The patent introduces a management table as an intermediary structure between the hash table and the key values. The management table stores the mapping between hash values and key values, acting as a mediator that enables collision resolution without requiring key values to be stored in every hash table entry, thus reducing overall memory consumption.
2Adaptability or versatility
If variable-length prefixes are stored in hash table entries, then key diversity is supported, but lookup time increases due to variable processing requirements
Solution Approach 1:
The patent changes the parameter of stored data from variable-length key values to fixed-length hash values. This parameter change enables uniform processing time for all lookups while still supporting variable-length prefixes through the hash function, which converts any length prefix into a fixed-length hash value for storage in the hash table entries.
3Ease of manufacture
If maximum size entries are allocated for all hash table entries, then uniform memory allocation is achieved, but memory waste increases for small prefixes
Solution Approach 1:
The patent extracts the variable-length key value storage requirement from the hash table entries and places it in the management table. This allows hash table entries to use uniform fixed-size allocation for hash values only, while the management table handles the variable-length key values efficiently, thereby eliminating memory waste while maintaining uniform allocation simplicity.
Data Source
AI summary
A method and an apparatus for constructing a multi-stage hash table are disclosed. According to an embodiment of a present disclosure, a method for constructing a multi-stage hash table includes attempting to add management table information to a first management table and attempting to add hash table information to a first hash table. The method also includes determining whether second management table information having the same hash value as a hash value included in first management table information is present in a k-th management table. The method also includes attempting to add table information to the k-th management table and a k-th hash table or to a (k+1)-th management table and a (k+1)-th hash table based on the determination result.


