登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 电子信息类 > 通信工程 > 正文

基于MQTT的即时通信服务器端软件设计与开发毕业论文

 2021-03-27 06:03  

摘 要

随着移动互联网、物联网以及各种智能终端的迅速发展与普及,IM(Instant messaging 即时通讯)在移动智能终端的应用开发越来越受到开发人员的热捧,针对各种物联网环境应用场景的IM开发也逐渐成为新的热门。由于物联网下移动终端设备有低功耗、低带宽等方面的限制,IM也从基本的即时需求转到低功耗、低带宽和低时延的需求并重,从而对即时通讯中采用的通信协议提出了更高的要求。MQTT(Message Queuing Telemetry Transport,消息队列遥测传输)作为一种轻量级基于发布/订阅模式的消息传输协议,是移动智能终端应用的理想选择,因此能够满足物联网环境下移动终端IM的应用需求。

论文从研究目的意义、国内外研究现状方面阐述了MQTT在各种应用场景下的前景以及即时通讯在当前移动互联网和物联网环境形势下的发展方向。本文还介绍了MQTT 消息传输协议的应用背景、基本内容、主要特征以及目前支持MQTT的应用比较广泛的消息代理服务器和客户端,从而提出一种基于MQTT 协议的即时通讯解决方案。在阿里云MQ开放服务和Eclipse Paho Client开源项目的基础上,本论文设计并实现了一款基于MQTT 协议的移动即时通讯服务端,主要完成了用户注册登录、好友管理、即时通信和状态呈现等IM Server的基本功能以及数据库的设计实现,并与客户端实现了联调。

关键词:MQTT;即时通讯;服务器端;消息代理

Abstract

With the rapid development and popularization of the mobile Internet, Internet of things and various intelligent terminals, IM (Instant messaging) in the mobile intelligent terminal application development becomes the favorable item of more and more developers, and IM development for a variety of IoT environment has also become a new popular. As the mobile terminal equipment under the IoT environment has low power consumption, low bandwidth and other aspects of the restrictions, IM transmits the demand from the basic real-time to low-power, low bandwidth and low latency, so the agreement of the communication protocol used in IM needs a higher demand. MQTT (Message Queuing Telemetry Transport) is an ideal choice for mobile smart terminal applications as a lightweight messaging / protocol based on publish / subscribe mode. It can meet the application requirements of mobile terminal IM in the Internet of Things.

This paper expounds the prospects of MQTT in various application scenarios and the development direction of instant messaging in the current mobile Internet and Internet of Things environment from the aspects of research purpose, domestic and foreign research status. This paper also introduces the application background, basic content, main features and the widely used message proxy server and client supporting MQTT, and proposes an instant messaging solution based on MQTT protocol. Based on the open service of Ali cloud MQ and the open source project of Eclipse Paho Client, this paper designs and implements a mobile instant messaging server based on MQTT protocol, which mainly completes IM Server basic functions, such as user registration-login, friend management, instant communication, status presentation and so on, the design of the database and to achieve a joint tone with the client.

Key Words:MQTT;instant messaging;server-side;message proxy

目 录

摘 要 I

Abstract II

目 录 III

第1章 绪论 1

1.1 课题背景与意义 1

1.2 国内外研究现状 2

1.3 研究目标与主要内容 2

1.4 论文组织结构 3

第2章 相关的技术原理 4

2.1 即时通讯(IM)技术 4

2.1.1 IM技术实现主流方案 4

2.1.2 IM即时通讯方式 5

2.1.3 IM技术实现原理 5

2.2 消息队列遥测传输(MQTT)协议概述 7

2.2.1 MQTT的应用背景 7

2.2.2 MQTT的基本内容 8

2.3 MQTT客户端和代理服务器 11

2.3.1 MQTT客户端 11

2.3.2 MQTT代理服务器 11

2.3.3 消息代理MQ 12

第3章 即时通讯服务器架构设计 14

3.1 即时通讯服务器总体结构设计 14

3.2 即时通讯服务器数据结构设计 15

3.2.1 数据库设计 15

3.2.2 消息格式设计 17

3.3 即时通讯服务器服务功能设计 18

第4章 功能模块实现 20

4.1 开发环境搭建 20

4.1.1 消息中间件MQ接入准备 20

4.1.2 消息中间件MQ相关实现 21

4.2 用户注册模块 24

4.3 用户登陆认证模块 24

4.4 好友管理模块 25

4.5 消息事件管理模块 26

第5章 即时通讯服务器的部署与测试 27

5.1 即时通讯系统的软件组成 27

5.2 即时通讯服务端的软件安装配置 27

5.3 即时通讯服务器测试 28

5.3.1 注册和登陆功能测试 28

5.3.2 好友管理和消息管理测试 29

5.3.3 测试结果分析 31

第6章 总结与展望 32

6.1 论文工作总结 32

6.2 问题和展望 32

参考文献 34

附 录 35

致 谢 37

第1章 绪论

1.1 课题背景与意义

从烽火传递战报到飞鸽传书,从书信来往到电报、电话、电子邮件,再到如今遍布全球的通信网络,无论是最原始的通讯手段,还是将偌大的地球浓缩为地球村的互联网,人类始终以自身的智慧让通讯成为文化交流的使者。随着科学技术的发展以及人们对通讯的需求越来越高,通讯的手段越来越高明,特别是在信息技术时代,通信技术更是频频更迭,即时通讯已然成为通讯最基本的要求。在互联网快速发展的过程中,即时通讯技术也得到很大的发展,各种即时通讯软件(如MSN、QQ等)顺势发展成为该领域的佼佼者。

随着移动互联网的迅速普及,智能移动终端开始成为人们不可或缺的通讯工具,即时通讯技术再一次获得发展的契机。在移动互联网环境下,移动终端设备要求低功耗、低带宽的特点,即时通讯也从基本的即时需求转到低功耗、低带宽和低时延的需求并重,而对于最近几年比较热门的物联网来说更是如此,因此即时通讯中采用的通信协议就要求更加适应这样的需求变化。在目前的商用即时通讯中,除了几家公司使用自己开发的协议外,其它商用软件大多采用SIMPLE 协议和XMPP 协议这两种。[1]但是这两种通信协议只是基于PC端即时通讯而提出的,并不完全适用于移动智能终端,使得采用这两种协议开发的移动即时通讯应用并不尽人意[1]

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图