To solve the problem of approximate query in streaming data,an approximate query model was put forward,which combined stream processing and batch processing.Sliding window was used to provide streaming approximate query capabilities,and an improved hierarchical algorithm was utilized for stratified sampling the massive historical data generated from data stream,minimizing the influence of the bias values on the query results.Experimental results show that the combination of the sliding window queries and the stratified sampling of historical data improves the precision of query.%为有效解决流数据中近似查询问题,提出一种综合流式处理和批处理的近似查询模型.利用滑动窗口提供流式近似查询能力,利用改进的分层抽样算法对于数据流产生的海量历史数据进行分层抽样,最大限度避免偏倚值对于查询结果的影响.实验结果表明,该算法结合了滑动窗口流式分析以及分层抽样技术批处理分析的优点,提高了查询的精度.
展开▼