通用短信平台中协议转换功能的设计与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
目前很多产品都有对外的短消息接口,以便与移动、联通的网关进行消息收、发的交互。而目前已经有的各种协议,如CMPP (China Mobile Peer to Peer,中国移动点对点协议)、SMPP(Short Message Peer to Peer,短消息点对点协议)、SGIP(Short Message Gateway Interface Protocol,中国联通短消息网关接口协议)等,其协议类型较多,协议内字段及内容较为繁琐。对相关产品的提供者,每开发一套新业务,或者将业务拓展到一个新的协议,都需要修改相关应用接口,对业务开发、尤其快速开发是个很重的负担,尤其当业务开发人员希望只关注于业务提供本身时。而让这些已有协议修改又不实际,此时,一个致力于各种短消息协议转换(包括但不仅限于上述三种协议格式)的平台,不但能将业务后台从各种复杂的外部协议的研究和实现中解脱出来,而且可以在平台上加载更多业务需要的功能,支持不同的服务等级的实现。
     这样的平台可以实现任意平台中已支持的协议(包括但不仅限于目前移动、联通的CMPP. SMPP、SGIP协议)间的转换,不但可以消除业务中实现的协议与其最终通信的目的协议间的差异,将业务平台从额外的负担(如对每一种具体协议的编解码、以及与各种网关的登录、鉴权、心跳控制等)中解脱出来,还可以帮业务完成更多服务质量相关的功能,如流量控制、负荷分担、流量缓冲、消息加解密、以及按照各方状态灵活选择接收方等,既减轻了业务的负担,更使信息发送更为灵活、安全、可靠。
     平台应用于有短消息交互的系统之间(如业务平台及移动网关),既可同时安装在发送、接收端,也可只安装在一方。一旦安装后,对端(如业务平台或移动网关)视平台为其实际要交互的业务系统(或者网关),对已有的业务平台无需在其与其目标端(如网关)的连接方式上(包括协议及连接方式)做任何改动,最大限度的减少了业务在协议上的开发。
     在协议转换的基础上,平台根据各业务系统运行的实际情况,对业务系统提供更多功能上的支持,如流量控制、负荷分担等。
     平台设计的目标是在实现以上提到的除编解码外的各种对业务系统功能的支持时与具体的通信协议无关。要达到这个目的,各种协议的短消息在系统中必须以协议无关的统一格式存储。平台在运行中将接收到的短信息解码成平台内部的存储格式,进行处理(包括寻找短消息目的端及以上的各种附加功能等),然后在发送的时候按照目标协议进行编码并发送,而这一将协议码流解码成内部存储格式及按照目的协议编解成对应协议的码流并发送的过程在平台的协议转换功能中实现。由于正确的消息识别是消息正确处理的基础,正确的编码是消息正确被接收的基础,同时正确好用的内部存储结构(解码的结果)是消息其他处理流程能正常处理的基础,协议转换部分及其涉及的相关功能是短信平台的基础部分。
     本论文主要分七部分:引言,背景介绍,需求分析,协议转换功能的设计,协议转换功能的实现,单元测试和系统测试和总结。引言是论文的开头,简单的引出本论文。第二部分介绍了系统的背景:包括短信的产生及在中国各电信运营商间的现状、与短信网关有交互的业务系统、以及其他有消息交互情况的系统。第三部分介绍了UNISMS(UNI SMS platform)的整体应用需求及其中与协议转换部分相关的需求。第四部分介绍了协议转换功能相关的设计,包括:系统的重要运行流程的设计、短消息在平台中存储格式PDU的详细设计、协议转换功能的详细设计及平台内部协议无关的轻量级的协议的设计。第五部分介绍了平台协议转换功能的具体实现,包括其类图、组件图等。第六部分对UNISMS平台中协议转换相关部分进行了单元测试和相关的系统测试。最后一部分是系统开发的总结。
Nowadays, many products have external interactive short message interface, to send or recive short messages provided by Chinese telecom service providers. Of all the exsiting protocols of telcom service providers, such as the CMPP (China Mobile Peer to Peer, China Mobile Point to Point Protocol), SMPP (Short Message Peer to Peer, Short Message Point to Point Protocol), SGIP (Short Message Gateway Interface Protocol, China Unicom Short Message Gateway Interface Protocol), they are mostly have many types for each protocol, and many fixed complicated fileds for each type.Each time to develop a new set of related business, or to expand system to a new protocol, there are many work to be done in changing the realization of code-decodings parts.Which is a heavey burden to the rapid development of business, especially when the developers want to focus only on the service-related parts.It is irrealistic to let the telcom operators modify the existing protocols to make it simple, which can also cause trouble for the exsiting service systems. At this point, a platform naming UNISMS (UNI Short Message Service), which is dedicated to the exchange of different protocols(including yet not limited to the protocols of the above telcom operators), can not only free the business system from all kinds of complicated external message protocols, it can also add more fuctions the service system can use, thus to support the implementation of different service levels.
     The UNISMS platform can fulfill the exchange of any two kinds of protocol that the platform already supports(including but not limited to the current Mobile, China Unicorn's protocol of CMPP, SMPP, SGIP). Not only can it eliminate the protocol difference between business system and its destination gateways, to free the service system of the heavy burden (of the coding and decoding of specific agreement of, and the related login, authentication, heartbeat control, etc.).It can also help the business systems to finish more quality-related fuctions, such as flow control, load sharing, buffering, encryption, and to choose the reciver flexibility according to their states and other information.It can make the sending and receiving of information become more flexible, safe and reliable without affecting the business itself.
     The platform can be installed in between the systems that need to exchange messages. It can be located in both the sned and reciver sides and also one of them.Once installed, it can be seen as a substite of the system in which side it located in, without andy need of changing protocol for the other side, with more load control functions that being mentioned above to be provided.
     Platform's goal is to make the implement of business-related supporting functions independent with specific communication protocols. To achieve this, all protocols of short message must be stored using a protocol-independent format in the system. During the running process, platform decdode the in-messages to the internal format, process it with all the other fuctions, then code it from the internal format to the target protocol, the function of coding and decoding, using internal format, is finished in the protocol functions.
     In order to achieve the most basic function of the system:the message forwarding, the correct implementation of protocol conversion function is very important. Also to improve the system's processing speed, as well as to support the various function extensions, the design of internal message has to be well-designed, and these are the functions of the protocol conversion part involved.
     This thesis is divided into seven sections:introduction, background introduction, requirement analysis, the design of UNISMS's protocol conversion functions, the implementation, functional test, and the summary. The first part is the beginning of this thesis, leading the following context. The second part gives the background of the system, including the generation of short message as well as its development status, the business systems that need to exchange message with the short message gateways, and also other systems that need to exchange messages.The third section describes the requirements of UNISMS system and the the related protocol conversion part.The main flow diagrams and functional modules,as well as some startergies that are used in system are designed in Part IV And the implementation of the system and its modules are given in Part V, including the class diagram, component diagrams. Part VI is the testing of the major functions for the UNISMS's protocol conversion part. The last part of the thesis is the summary of this design.
引文
[1]百度百科.短信http://baike.baidu.com/view/9420.htm
    [2]张春敏.从手机短信的发展看大众传播的革命.新闻实践.2005年第1期.2005年1月:40-41
    [3]张君;中国电信运营商的竞争与发展策略研究.华中科技大学博士论文.2010-03-26
    [4]曾广平.Unix网络环境下C/S模型的程序设计方法与示例.计算技术与自动化.第17卷第3期.1998年9月:77-79
    [5]蔡秀珍.TCP/IP网络协议栈的构件化研究.计算机系统应用.2008年第4期.2008年4月:70-82
    [6]邓志刚.linux环境下的网络编程.武汉科技学院机电学院学报.第21卷.第7期.2008年7月
    [7]蒋振宇.网络编程中的字节序处理.华南金融电脑.2004年第2期.2004年2月:74-75
    [8]Zhang, Yuting, Liao Jianxin, Zhang Tieying, Zhu Xiaomin.A novel method for the short message or multimedia message synchronization. Second International Conference on Wireless and Mobile Communications 2006.10
    [9]冯怀迪,周亚军.通信协议设计与实现.机电工程.第26卷第11期.2009年9月:91-93
    [10](美)Bruce Molay著杨宗源,黄海涛译.UNIX/LINUX编程实践教程.清华大学出版社.200611:63-120
    [11](美)W.Richard Stevens等.UNIX高级环境编程.人民邮电出版社:20062:25-35

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700