为了减少数据立方体进行联机分析处理(OLAP)操作的响应时间,提出了基于用户行为习惯分析的数据立方体缓存策略。首先,对采集上报的用户行为数据进行语义分析,并结合用户访问频率,计算出用户行为之间的关联度;其次,在综合考虑了关联度和时间因素的基础上设计了C&T缓存算法,该算法是对最近最不常用(LFU)算法的改进;最后,选用Redis内存数库据作为缓存存储介质,并设计了适用于Redis的数据立方体存储结构。实验结果表明,C&T缓存算法的查询效率,比未加缓存时提高了约60%,比LFU算法提高了约20%。
In order to reduce the response latency of OLAP( On Line Analytical Processing) cube operation, a data cube caching strategy based on user behavior analysis was proposed. Firstly, the correlation degree of behavioral habits among users was calculated by the semantic analysis of the user behavior data,which was reported in the collection, and combined with the user access frequency; secondly, an improved CT cache replacement algorithm based on LFU( Least Frequently Used)algorithm was designed on the basis of considering correlation degree and time. Finally, Redis was used as cache storage media,and the storage structure of data cube suitable for Redis was designed. The experimental results show that the efficiency of CT cache algorithm is about 60% higher than that of unused cache algorithm and about 20% higher than LRU( Least Recently Used).