Font Size: a A A

Research On Image Cache Based On Redis

Posted on:2020-06-09Degree:MasterType:Thesis
Country:ChinaCandidate:C Z LeiFull Text:PDF
GTID:2428330596478967Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the continuous expansion of server data and the sharp increase of user demand,a large amount of data access has increased the working pressure of disk I/O operation which resulting in a longer response time of network server.To solve this problem,many domestic and foreign scholars are committed to research data cache management to reduce the pressure of database I/O operations.As a typical application of in-memory database,Redis stores all data in memory for management,which improves the data access performance and becomes a research hotspot of many scholars.Common data is divided into unstructured data and structured data,but unstructured data takes up more space and accompanies with the characteristics of system.The case or theory of structured data storing in Redis cannot be applied to unstructured data directly.In response to these problems,the following work was mainly carried out:In the application system,a large number of images need to be displayed in many occasions.An image cache method which could cache images efficiently is needed while the displayed images are mostly similar.An image group cache method is designed according to this problem and system characteristics.Images are divided into groups according to their similarity by a perceptual hash algorithm,and be designed a codebook and index table for each group.The codebook is compressed in JPEG2000 standard and stored by Redis.By improving the strategy,the image cache storage space and access time can be optimized.Image data takes up more space than structured data and would lead to memory overflow and replacement cache.Traditional Redis cache replacement algorithm is not adaptable in this occasion.It may cause a problem that non-required images to be cached while the required images are not cached.According to this,under the research of image data cache replacement algorithm,a cache replacement algorithm based on CB recommendation algorithm has been made.This algorithm combines the data features of the system image to realize the vector extraction of image.CB recommendation algorithm calculates the potential popularity of the image,and combines the real-time access situation of the image to figure out the image popularity prediction.Combined with the image size,transmission time and other factors in cache cost to make a further calculation of the image cache value,which makes the algorithm more suitable for the actual application scenario in the system.By some different contrast experiments,the results verified the correlation between similarity threshold of picture groups,quantity threshold of picture groups and picture similarity.It also proved that the cache replacement algorithm based on CB recommendation algorithm has a higher hit rate than the traditional cache replacement algorithm and the content value-based cache replacement algorithm.
Keywords/Search Tags:image cache, Redis, cache strategy, cache replacement algorithm
PDF Full Text Request
Related items