基于XMPP協(xié)議的Android終端消息推送平臺(tái)的設(shè)計(jì)與實(shí)現(xiàn)
本文關(guān)鍵詞: XMPP協(xié)議 Android終端 消息推送 出處:《重慶理工大學(xué)》2017年碩士論文 論文類型:學(xué)位論文
【摘要】:消息推送服務(wù)在移動(dòng)互聯(lián)網(wǎng)已經(jīng)得到了非常廣泛的應(yīng)用,手機(jī)應(yīng)用開發(fā)者合理使用推送業(yè)務(wù)能夠吸引并留住用戶,提高手機(jī)應(yīng)用活躍度。針對(duì)消息推送框架、傳統(tǒng)的消息推送方案展開了研究,結(jié)合校園背景設(shè)計(jì)并實(shí)現(xiàn)了基于Android終端的消息推送平臺(tái)。針對(duì)傳統(tǒng)消息推送方案進(jìn)行研究。輪詢起初是用于web的請(qǐng)求連接方案,主要原理是按照設(shè)置好的間隔時(shí)間向服務(wù)器端發(fā)起連接請(qǐng)求,輪詢就是用這種頻繁連接的方法來保持與服務(wù)器的同步。長(zhǎng)連接采用的方式是多個(gè)請(qǐng)求共用一個(gè)連接,在維持連接期間如果沒有消息需要推送,那么客戶端以發(fā)送鏈路檢測(cè)包的方式與服務(wù)器保持一個(gè)持久的連接,如果有消息需要推送,那么就直接發(fā)出去。長(zhǎng)連接在與服務(wù)器建立連接后是不用關(guān)閉的,可以解決輪詢方式因?yàn)轭l繁發(fā)起連接請(qǐng)求帶來的浪費(fèi)資源的問題。輪詢方案中,客戶端收到服務(wù)器響應(yīng)后,它們之間的連接就會(huì)斷開以等待下次輪詢連接,這種連接方式相比長(zhǎng)連接一直保持與服務(wù)器端連接消耗的電量更少,但長(zhǎng)連接的實(shí)時(shí)性優(yōu)于輪詢。但是要是有很多客戶端同時(shí)與服務(wù)器保持長(zhǎng)連接,這對(duì)服務(wù)器的并發(fā)量有很高的要求。而長(zhǎng)連接為了與服務(wù)器維持不斷地連接,用戶數(shù)量太多可能會(huì)導(dǎo)致系統(tǒng)的崩潰。輪詢方案不一定每次都能獲得數(shù)據(jù),加重網(wǎng)絡(luò)負(fù)載;長(zhǎng)連接方案消息隨時(shí)可以推送到客戶端,保證了消息的實(shí)時(shí)性,但是推送功能中長(zhǎng)連接空閑時(shí)間太多造成資源浪費(fèi)。針對(duì)這兩種消息推送方案難以兼顧移動(dòng)終端的電量消耗、流量消耗和消息實(shí)時(shí)性,設(shè)計(jì)了一種動(dòng)態(tài)連接策略。實(shí)驗(yàn)證明,動(dòng)態(tài)連接算法可降低移動(dòng)終端的耗電量和流量,同時(shí)對(duì)消息推送實(shí)時(shí)性沒有很大影響。結(jié)合校園背景,對(duì)消息推送平臺(tái)進(jìn)行需求分析,提出了設(shè)計(jì)目標(biāo)和設(shè)計(jì)思路,詳細(xì)設(shè)計(jì)實(shí)現(xiàn)各個(gè)功能模塊,主要包括服務(wù)器端、客戶端、后臺(tái)管理及數(shù)據(jù)庫。實(shí)現(xiàn)Android終端的消息推送平臺(tái)及平臺(tái)提供的開放接口服務(wù),并對(duì)消息推送功能及開放接口功能進(jìn)行測(cè)試。
[Abstract]:Message push service has been widely used on the mobile Internet. Mobile phone application developers can attract and retain users and improve mobile application activity by using push service reasonably. The traditional message push scheme is researched, and the message push platform based on Android terminal is designed and implemented based on campus background. The traditional message push scheme is researched. Polling is the request connection scheme for web at first. The main principle is to initiate the connection request to the server side according to the set interval time, polling is to use this kind of frequent connection method to keep the synchronization with the server. If no messages need to be pushed during the maintenance of the connection, the client maintains a persistent connection with the server by sending link detection packets, and if there is a message to push, The long connection is not closed after the connection is established with the server, which can solve the problem of wasting resources caused by frequent connection requests in the polling mode. In the polling scheme, the client receives a response from the server. The connection between them is disconnected to wait for the next polling connection, which uses less power to maintain a connection to the server than a long connection. But the real-time performance of long connection is better than polling. However, if there are many clients who maintain long connection with the server at the same time, there is a high requirement for the concurrent quantity of the server, and the long connection is to maintain a continuous connection with the server. Too many users may lead to the crash of the system. The polling scheme does not always get data and increase the network load; the long connection scheme message can be pushed to the client at any time to ensure the real-time message. However, too much idle time of long connection in push function causes waste of resources. A dynamic connection strategy is designed to solve the problem of power consumption, traffic consumption and message real-time of mobile terminal in these two message push schemes. Dynamic connection algorithm can reduce the power consumption and traffic of mobile terminal, and has no great effect on the real time of message push. Combined with the campus background, the requirement analysis of message push platform is carried out, and the design goal and design idea are put forward. Each function module is designed and implemented in detail, including server, client, background management and database. The message push platform of Android terminal and the open interface service provided by the platform are realized. The message push function and open interface function are tested.
【學(xué)位授予單位】:重慶理工大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2017
【分類號(hào)】:TP311.52;TP391.3
【參考文獻(xiàn)】
相關(guān)期刊論文 前10條
1 卿斯?jié)h;;Android安全的研究現(xiàn)狀與展望[J];電信科學(xué);2016年10期
2 蘇瑞瑩;黃美鳳;;“中國夢(mèng)”引領(lǐng)下高校青年學(xué)生統(tǒng)戰(zhàn)工作問題研究[J];開封教育學(xué)院學(xué)報(bào);2016年10期
3 張向南;汪傳建;蘭貞益;;基于Android的老人關(guān)愛系統(tǒng)[J];計(jì)算機(jī)系統(tǒng)應(yīng)用;2016年06期
4 張哲宇;周潤(rùn)林;孫斌;胡燕;;XMPP協(xié)議的數(shù)據(jù)分發(fā)網(wǎng)絡(luò)的負(fù)載均衡算法[J];北京郵電大學(xué)學(xué)報(bào);2016年S1期
5 汪海占;邸萌;黃祥林;;基于XMPP協(xié)議的Android消息推送設(shè)計(jì)與實(shí)現(xiàn)[J];科技廣場(chǎng);2015年02期
6 倪紅軍;;基于Android平臺(tái)的消息推送研究與實(shí)現(xiàn)[J];實(shí)驗(yàn)室研究與探索;2014年05期
7 關(guān)慶余;李鴻彬;于波;;MQTT協(xié)議在Android平臺(tái)上的研究與應(yīng)用[J];計(jì)算機(jī)系統(tǒng)應(yīng)用;2014年04期
8 律智堅(jiān);吳廣財(cái);;消息推送在移動(dòng)高級(jí)應(yīng)用中的研究與實(shí)現(xiàn)[J];廣東電力;2014年02期
9 劉永玲;劉兀;郭克華;;一種面向移動(dòng)終端的自適應(yīng)消息推送策略[J];計(jì)算機(jī)工程與科學(xué);2013年12期
10 李文江;陳詩琴;;基于Android GCM服務(wù)的圖書館信息推送系統(tǒng)設(shè)計(jì)[J];現(xiàn)代圖書情報(bào)技術(shù);2013年11期
相關(guān)碩士學(xué)位論文 前7條
1 張哲;基于擴(kuò)展XMPP協(xié)議的即時(shí)通信系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)[D];中國海洋大學(xué);2015年
2 張克建;基于JavaEE與Android的消息推送系統(tǒng)的研究與實(shí)現(xiàn)[D];華北電力大學(xué);2015年
3 王平;基于iOS平臺(tái)的新聞推送系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)[D];東南大學(xué);2015年
4 向宇川;基于因子分解模型的移動(dòng)上下文推薦系統(tǒng)研究[D];西南財(cái)經(jīng)大學(xué);2014年
5 顧正敏;一種面向Android平臺(tái)的輕量級(jí)推送技術(shù)研究與應(yīng)用[D];北京大學(xué);2013年
6 殷昊;基于Android平臺(tái)的消息推送能力的研究與實(shí)現(xiàn)[D];北京郵電大學(xué);2013年
7 張玉婷;個(gè)性化主動(dòng)信息推送技術(shù)研究[D];華中科技大學(xué);2007年
,本文編號(hào):1509663
本文鏈接:http://sikaile.net/kejilunwen/ruanjiangongchenglunwen/1509663.html