Tree-Based Data Structure With Sorted and Unsorted Leaf Blocks
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing tree-based data structures face a challenge in balancing the workload between writers and readers, where sorting entries by key for writers improves read performance but burdens writers, while unsorted entries quicken writes but hinder reads, necessitating a compromise.
Innovation Solution
Implement a B-tree data structure with separate blocks for sorted large blocks for efficient searching and unsorted small blocks for fast updates, using optimizations like shortcut keys, back pointers, and order hints to facilitate efficient read and write operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If the writer places all new entries in sorted order, then read performance is improved, but write performance deteriorates due to larger burden on the writer
Solution Approach 1:
The patent segments the data structure into internal nodes and leaf nodes, with further segmentation of leaf nodes into sorted and unsorted portions. This allows the system to maintain sorted order in internal nodes for efficient searching while permitting unsorted insertion in leaf nodes for fast writes, thus resolving the contradiction between read and write performance.
Solution Approach 2:
Different parts of the data structure have different quality characteristics: internal nodes maintain strict sorted order to optimize search operations, while leaf nodes allow unsorted insertion to optimize write operations. This local differentiation of quality attributes enables simultaneous optimization of both read and write performance in different locations of the same data structure.
2Productivity
If new entries are added in chronological order without sorting, then write performance is improved, but read performance deteriorates due to sorting requirement at read-time
Solution Approach 1:
The patent segments leaf nodes into sorted and unsorted portions, allowing new entries to be appended to the unsorted portion for fast writes, while the sorted portion maintains search efficiency. This segmentation enables the system to accept unsorted chronological inserts without compromising overall read performance.
Solution Approach 2:
The patent introduces a new dimension to the data structure by adding unsorted portions to leaf nodes, effectively creating a multi-dimensional organization where data can be accessed both by sorted order (for searches) and by insertion order (for fast writes), thus resolving the performance contradiction.
3Measurement precision
If the tree structure maintains strict sorted order throughout, then search efficiency is improved, but the complexity of insertion and deletion operations increases
Solution Approach 1:
The patent applies local quality by maintaining strict sorted order only in internal nodes and the sorted portion of leaf nodes, while allowing the unsorted portion to accommodate simple insertions. This localized approach to sorting reduces the overall complexity of insertion and deletion operations while preserving search efficiency in the sorted regions.
Solution Approach 2:
Instead of maintaining strict sorted order throughout the entire tree, the patent applies sorting partially - only in internal nodes and the sorted portion of leaf nodes. This partial application of sorting reduces the complexity burden on insertion and deletion operations while maintaining sufficient search efficiency for practical purposes.
Data Source
Figure 1~3
Figure 4
Figure 5~6
AI summary
A writer writes items to leaf nodes of a tree, and a reader read items from the leaf nodes. Each node comprises a respective first block and second block, the first block comprising a plurality of the items of the respective leaf sorted in order of key. When writing new items to a leaf, the writer writes the new items to the second block of the identified leaf node in an order in which written, rather than sorted in order of key. When reading one or more target items from a leaf, the reader searches the leaf for the one or more target items based on a) the order of the items as already sorted in the first block and b) the reader sorting the items of the second block by key relative to the items of the first block.