发明授权
US07797326B2 Method of obtaining data samples from a data stream and of estimating the sortedness of the data stream based on the samples 有权
从数据流获取数据样本并基于样本估计数据流的排序的方法

Method of obtaining data samples from a data stream and of estimating the sortedness of the data stream based on the samples
摘要:
Disclosed is a method of scanning a data stream in a single pass to obtain uniform data samples from selected intervals. The method comprises randomly selecting elements from the stream for storage in one or more data buckets and, then, randomly selecting multiple samples from the bucket(s). Each sample is associated with a specified interval immediately prior to a selected point in time. There is a balance of probabilities between the selection of elements stored in the bucket and the selection of elements included in the samples so that elements scanned during the specified interval are included in the sample with equal probability. Samples can then be used to estimate the degree of sortedness of the stream, based on counting how many elements in the sequence are the rightmost point of an interval such that majority of the interval's elements are inverted with respect to the interval's rightmost element.
信息查询
0/0