一种基于Netty的环保物联网实时双向通信模型研究
详细信息    查看全文 | 推荐本文 |
  • 英文篇名:Netty-Based Real-time Bidirectional Communication for the Environmental Protection of Internet of Things
  • 作者:庄国强
  • 英文作者:ZHUANG Guo-qiang;School of mechanic and electronic engineering,Jiangsu College of Engineering and Technology;
  • 关键词:环保物联网 ; 实时远程控制 ; 非阻塞IO ; 消息队列 ; 正则表达式
  • 英文关键词:environmental protection of Internet of things;;real-time remote control;;non-blocking IO;;message queue;;regular expression
  • 中文刊名:ZSFJ
  • 英文刊名:Journal of Zhengzhou Normal Education
  • 机构:江苏工程职业技术学院机电工程学院;
  • 出版日期:2017-11-25
  • 出版单位:郑州师范教育
  • 年:2017
  • 期:v.6;No.36
  • 基金:江苏省科技型中小企业技术创新基金项目(BC2013171);; 江苏省工业和信息化产业转型升级专项资金项目(NO.2150510);; 南通市重点实验室(CP12015007)
  • 语种:中文;
  • 页:ZSFJ201706008
  • 页数:6
  • CN:06
  • ISSN:41-1419/G4
  • 分类号:41-46
摘要
针对环保物联网实时双向通信要求,提出并实现了一种基于Netty的现场机和上位机实时双向通信的设计模型。利用Netty构建数据监听服务程序,首先建立基于设备唯一标识的线程安全的客户端连接缓冲,其次采用正则解析HJ/T212-2005格式数据实现污染源在线自动监控系统数据传输通讯协议,运用生产者消费者模式将接收到的消息推送线程安全的消息队列,业务处理线程从消息队列拉取消息进行处理,最后下发线程则从消息服务器拉取其他异构系统推送的消息,从客户端连接缓冲选择正确的客户端连接进行下发,解决了异构系统间的数据传输问题。实际应用结果表明,数据监听服务程序的实时性和数据接收率都满足工业使用的要求。
        To meet the requirement of real-time bidirectional communication for environmental protection of Internet of Things,this paper proposes a communication model for spot controller and host computer model based on Netty. Firstly,the connection map with thread safety and equipment identification key is established and the custom protocol in HJ/T212-2005 format is implemented by using regular expression. Meanwhile,the message received by the server is pushed to thread safety message queue and the message is processed by business processing thread. And then,the message pushed by other heterogeneous system is polled by the issue thread and issued by the correct client connection,and finally the problem of data transmission between heterogeneous systems is solved. Results show that the real-time feature and data receiving rate of the communication server can meet the demand for industrial application.
引文
[1]陈海明,崔莉,谢开斌.物联网体系结构与实现方法的比较研究[J].计算机学报,2013,36(1):168-188.
    [2]丁浩,管致锦,沈兵,等.环保物联网中远程设备实时控制问题研究[J].计算机测量与控制,2014,22(6):1786-1789.
    [3]于旭耀,余辉,徐可欣,等.恶臭自动在线监控体系设计与实现[J].安全与环境学报,2013,13(6):152-157.
    [4]中华人民共和国环境保护行业标准(HJ/T212-2005):污染源在线自动监控(监测)系统数据传输标准[S].北京:国家环境保护总局,2006.
    [5]王堃,于悦,张玉华,等.面向物联网应用平台的Socket设计与优化[J].吉林大学学报:工学版,2012,42(S1):290-294.
    [6]The Netty Project.The Proven Approach to Rapid Network Application Development[EB/OL].(2013-11-7)[2017-02-09].http://netty.io/3.8/guide/.
    [7]MAURER N.Netty in Action[M].American:Manning Publications,2013:100-102.

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

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

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