APICloud缓存机制的扩展研究与实现
发布时间:2018-12-19 08:46
【摘要】:随着移动互联网的发展,混合式开发作为一种快速开发方式已经成为一种趋势,这种方式既可以体现Web应用同时适用iOS和Android平台的特点,又能解决Web应用不能调用操作系统底层资源的问题。当今移动社交应用发展迅速,使用率、安装率远高于其他类应用。然而社交应用中普遍存在大量的图片、视频等文件资源,这些文件资源从服务器多次存取存在消耗客户端流量、增加访问延迟的问题。针对社交应用,用户的社交关系对缓存使用频率有一定影响,因此本文提出一个基于社交关系的缓存替换算法,对其缓存效率进行分析。同时结合该算法提出一个适用于混合式移动社交应用的图片缓存管理机制,社交应用使用该缓存机制,可以更有针对性地进行缓存,提高移动应用的缓存效率和缓存命中率,减少数据流量和网络资源的浪费。APICloud作为一个国内领先的混合式移动开发平台,现如今并没有提供缓存管理的模块,因此本文结合社交应用缓存机制在APICloud平台下设计并实现一个图片管理的缓存模块,供开发者在混合模式下使用。本文的主要工作包括:1.提出了一种基于社交关系的图片缓存替换算法,该算法结合社交应用中用户之间的社交关系亲密度、图片访问频率、图片占用空间大小进行缓存替换。2.设计并开发一个符合APICloud模块开发规范的缓存模块,将基于社交关系的缓存替换算法应用到该模块中,使模块可以通过JavaScript调用,支持iOS和Android系统。3.基于APICloud平台开发一个移动社交应用,该应用中存在大量图片,应用包括关注、收藏、点赞、评论、私信等社交功能,在该应用中运用社交缓存模块,实现对应用中图片缓存的管理。4.通过实验模拟该算法缓存替换流程,计算并分析算法的缓存效率,实验表明,本文提出的缓存替换算法可以提高缓存命中率。
[Abstract]:With the development of mobile Internet, hybrid development, as a rapid development method, has become a trend, which can not only reflect the characteristics of iOS and Android platform, but also reflect the characteristics of Web application. It can also solve the problem that Web application can not call the underlying resources of operating system. Today's mobile social apps are growing rapidly, using and installing much more than other apps. However, there are a lot of file resources such as pictures, videos and so on in social applications. The problem of consuming client traffic and increasing access delay occurs when these file resources are accessed from the server many times. For social applications, the social relationship of users has a certain impact on the frequency of cache usage, so this paper proposes a cache replacement algorithm based on social relations and analyzes its cache efficiency. At the same time, an image cache management mechanism for hybrid mobile social application is proposed, which can improve the cache efficiency and cache hit rate of mobile application. Reduce data traffic and waste of network resources. APICloud, a leading hybrid mobile development platform in China, does not now offer a cache management module. Therefore, this paper designs and implements a picture management cache module based on APICloud platform, which can be used by developers in mixed mode. The main work of this paper includes: 1. A new image cache replacement algorithm based on social relationship is proposed. The algorithm combines the social relationship affinity between users, the frequency of picture access, and the size of picture space. 2. This paper designs and develops a cache module that conforms to the APICloud module development specification, and applies the cache replacement algorithm based on social relations to the module. The module can be called by JavaScript and can support iOS and Android system. Based on APICloud platform, a mobile social application is developed. There are a lot of pictures in the application. The application includes social functions such as attention, collection, likes, comments, private letter and so on. Implementation of the application of the image cache management. 4. The cache replacement flow is simulated experimentally and the cache efficiency is calculated and analyzed. The experiment shows that the cache replacement algorithm proposed in this paper can improve the cache hit rate.
【学位授予单位】:北方工业大学
【学位级别】:硕士
【学位授予年份】:2017
【分类号】:TP393.09
[Abstract]:With the development of mobile Internet, hybrid development, as a rapid development method, has become a trend, which can not only reflect the characteristics of iOS and Android platform, but also reflect the characteristics of Web application. It can also solve the problem that Web application can not call the underlying resources of operating system. Today's mobile social apps are growing rapidly, using and installing much more than other apps. However, there are a lot of file resources such as pictures, videos and so on in social applications. The problem of consuming client traffic and increasing access delay occurs when these file resources are accessed from the server many times. For social applications, the social relationship of users has a certain impact on the frequency of cache usage, so this paper proposes a cache replacement algorithm based on social relations and analyzes its cache efficiency. At the same time, an image cache management mechanism for hybrid mobile social application is proposed, which can improve the cache efficiency and cache hit rate of mobile application. Reduce data traffic and waste of network resources. APICloud, a leading hybrid mobile development platform in China, does not now offer a cache management module. Therefore, this paper designs and implements a picture management cache module based on APICloud platform, which can be used by developers in mixed mode. The main work of this paper includes: 1. A new image cache replacement algorithm based on social relationship is proposed. The algorithm combines the social relationship affinity between users, the frequency of picture access, and the size of picture space. 2. This paper designs and develops a cache module that conforms to the APICloud module development specification, and applies the cache replacement algorithm based on social relations to the module. The module can be called by JavaScript and can support iOS and Android system. Based on APICloud platform, a mobile social application is developed. There are a lot of pictures in the application. The application includes social functions such as attention, collection, likes, comments, private letter and so on. Implementation of the application of the image cache management. 4. The cache replacement flow is simulated experimentally and the cache efficiency is calculated and analyzed. The experiment shows that the cache replacement algorithm proposed in this paper can improve the cache hit rate.
【学位授予单位】:北方工业大学
【学位级别】:硕士
【学位授予年份】:2017
【分类号】:TP393.09
【参考文献】
相关期刊论文 前10条
1 ;CNNIC发布第39次《中国互联网络发展状况统计报告》[J];中国信息安全;2017年02期
2 陈思;徐晨飞;;基于APICloud的“校园健身达人”APP设计与实现[J];电脑知识与技术;2016年22期
3 周欣欣;卢U,
本文编号:2386687
本文链接:https://www.wllwen.com/guanlilunwen/ydhl/2386687.html