QSketch: An Efficient Sketch for Weighted Cardinality Estimation in Streams

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Qi, Yiyan, Li, Rundong, Wang, Pinghui, Sun, Yufang, Xing, Rui
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909232505290752
author Qi, Yiyan
Li, Rundong
Wang, Pinghui
Sun, Yufang
Xing, Rui
author_facet Qi, Yiyan
Li, Rundong
Wang, Pinghui
Sun, Yufang
Xing, Rui
contents Estimating cardinality, i.e., the number of distinct elements, of a data stream is a fundamental problem in areas like databases, computer networks, and information retrieval. This study delves into a broader scenario where each element carries a positive weight. Unlike traditional cardinality estimation, limited research exists on weighted cardinality, with current methods requiring substantial memory and computational resources, challenging for devices with limited capabilities and real-time applications like anomaly detection. To address these issues, we propose QSketch, a memory-efficient sketch method for estimating weighted cardinality in streams. QSketch uses a quantization technique to condense continuous variables into a compact set of integer variables, with each variable requiring only 8 bits, making it 8 times smaller than previous methods. Furthermore, we leverage dynamic properties during QSketch generation to significantly enhance estimation accuracy and achieve a lower time complexity of $O(1)$ for updating estimations upon encountering a new element. Experimental results on synthetic and real-world datasets show that QSketch is approximately 30\% more accurate and two orders of magnitude faster than the state-of-the-art, using only $1/8$ of the memory.
format Preprint
id arxiv_https___arxiv_org_abs_2406_19143
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle QSketch: An Efficient Sketch for Weighted Cardinality Estimation in Streams
Qi, Yiyan
Li, Rundong
Wang, Pinghui
Sun, Yufang
Xing, Rui
Databases
Data Structures and Algorithms
Estimating cardinality, i.e., the number of distinct elements, of a data stream is a fundamental problem in areas like databases, computer networks, and information retrieval. This study delves into a broader scenario where each element carries a positive weight. Unlike traditional cardinality estimation, limited research exists on weighted cardinality, with current methods requiring substantial memory and computational resources, challenging for devices with limited capabilities and real-time applications like anomaly detection. To address these issues, we propose QSketch, a memory-efficient sketch method for estimating weighted cardinality in streams. QSketch uses a quantization technique to condense continuous variables into a compact set of integer variables, with each variable requiring only 8 bits, making it 8 times smaller than previous methods. Furthermore, we leverage dynamic properties during QSketch generation to significantly enhance estimation accuracy and achieve a lower time complexity of $O(1)$ for updating estimations upon encountering a new element. Experimental results on synthetic and real-world datasets show that QSketch is approximately 30\% more accurate and two orders of magnitude faster than the state-of-the-art, using only $1/8$ of the memory.
title QSketch: An Efficient Sketch for Weighted Cardinality Estimation in Streams
topic Databases
Data Structures and Algorithms
url https://arxiv.org/abs/2406.19143