Composite Data Sketching for Distinct Count Estimation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing solutions for approximating distinct counts in large datasets suffer from performance deficiencies and lack effective error guarantees, making it difficult to build reliable database applications that efficiently process massive data sets with a large number of counters.
Innovation Solution
A novel data sketching method that combines CountMin and HyperLogLog sketches, using statistical estimation techniques to provide provably accurate and efficient distinct count estimation with tight confidence intervals, allowing for robust performance even under poor sketching parameter settings.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If sampling-based methods are used to answer many questions about the original data, then the versatility to answer broad range of questions is improved, but the memory space required increases significantly
Solution Approach 1:
The patent combines CountMin sketch and HyperLogLog sketch into a unified data structure that leverages the strengths of both approaches. The CountMin component handles frequency estimation while the HyperLogLog component handles distinct element counting, creating a versatile system that answers multiple query types with controlled memory usage.
Solution Approach 2:
The patent creates a composite sketching approach that integrates two different sketching methodologies (CountMin and HyperLogLog) into a single system. This composite structure allows the system to provide both frequency estimation and distinct count functionality with guaranteed error bounds, achieving versatility without linear memory growth.
2Measurement precision
If the number of distinct counters is increased to handle large number of subgroups, then the accuracy of aggregate statistics is improved, but the total memory required runs out of control
Solution Approach 1:
The patent segments the counting problem into multiple independent hash tables or sketch structures, each handling a portion of the data. By dividing the large-scale distinct counting problem into smaller segments that can be processed independently and then merged, the system maintains accuracy for aggregate statistics while keeping individual memory requirements manageable.
Solution Approach 2:
The patent transitions from a single-dimensional approach to a multi-dimensional sketching structure. By organizing counters in a hierarchical or multi-level structure with dimensions for different grouping levels, the system can answer aggregate queries at multiple granularities without requiring memory proportional to the product of all grouping factors.
3Quantity of substance
If existing approximate distinct count solutions are used, then memory usage is reduced, but performance and accuracy suffer severe deficiencies
Solution Approach 1:
The patent incorporates feedback mechanisms that monitor the quality of approximations and dynamically adjust sketch parameters or trigger refinement operations. This feedback loop ensures that performance remains acceptable by detecting when approximation errors exceed thresholds and initiating corrective actions such as increasing sketch resolution or switching to exact computation for critical queries.
Data Source
AI summary
A method estimates counts of distinct items. A system allocates a matrix B in memory and receives a data stream including many data items. Each item includes a set of query fields and a set of identifier fields. For each item, the system computes a row for the data item by hashing data values of the identifier fields. The system also computes a column for the data item by hashing a combination of data values of the query fields and the row. The system computes a bin value for the item by hashing data values of the identifier fields. The system updates the matrix B by computing B[r,c]=max(v, B[r,c]). Subsequently, the system receives a query key value. For each row in the matrix B, the system computes a column, and estimates the number of data items from the data stream matching the query key.


