@
matrix1010 @
aphorism 谢谢两位,信息很有用,Redis 里面已经有拓展的模块可以试验一下。
同时还有几种概率型数据结构的“一句话用途描述”,快速理解:
https://redis.io/docs/stack/bloom/Use these data structures to answer a set of common questions concerning data streams:
- HyperLogLog: How many unique values appeared so far in the data stream?
- Bloom filter and Cuckoo filter: Did the value v already appear in the data stream?
- Count-min sketch: How many times did the value v appear in the data stream?
- Top-K: What are the k most frequent values in the data stream?
- t-digest can be used to answer these questions:
- - What fraction of the values in the data stream are smaller than a given value?
- - How many values in the data stream are smaller than a given value?
- - Which value is smaller than p percent of the values in the data stream? (what is the p-percentile value)?
- - What is the mean value between the p1-percentile value and the p2-percentile value?
- - What is the value of the n-th smallest / largest value in the data stream? (what is the value with [reverse] rank n)?