基于WebSocket和Redis的移动目标轨迹跟踪系统设计与实现
2021-09-05魏江东涂继辉赖少东高梦然
魏江东 涂继辉 赖少东 高梦然



摘 要: 针对物联网系统中监控移动目标位置和轨迹信息的需求,设计和实现了一种基于Websocket和Redis移动目标轨迹跟踪系统。该系统主要分为三个部分:首先利用手机App客户端采集移动目标的轨迹信息,然后利用Webocket将轨迹信息传输到远程服务器进行保存,最后服务端将传送的轨迹信息保存在Redis+MySQL数据库中,并根据客户需要实现轨迹信息的查询和在地图上进行轨迹重现。经过测试表明,该系统能够准确、实时地获取移动目标的轨迹信息,并进行有效的存储,这为物联网移动目标的轨迹跟踪提供了较好的解决方案。
关键词: 移动目标跟踪; WebSocket; 轨迹重现; Redis
中图分类号:TN919.3;TP311.1 文献标识码:A 文章编号:1006-8228(2021)08-76-05
Design and implementation of moving target tracking system
based on WebSocket and Redis
Wei Jiangdong, Tu Jihui, Lai Shaodong, Gao Mengran
(Electronic Information Collage of Yangtze University, Jingzhou, Hubei 434023, China)
Abstract: In response to the need to monitor the location and trajectory information of moving targets in the Internet of Things system, a moving target trajectory tracking system is designed and implemented based on Websocket and Redis. The system includes three parts, collecting the trajectory information of the moving target by using the mobile App client, transmitting the trajectory information to the remote server for storage by using Webocket and saving the transmitted trajectory information in the server with Redis+MySQL database, which realizes the tracking information query and the trajectory replay on map according to the needs of customer. Tests show that the system can accurately obtain the trajectory information of the moving target in real time and store it effectively, which provides a better solution for the trajectory tracking of moving target in the Internet of Things system.
Key words: moving target tracking; WebSocket; trajectory replay; Redis
0 引言
物联网作为新一代互联网信息技术已经应用到我们生活中的各个领域,而移动目标的轨迹信息跟踪和监控是物联网技术中非常重要的环节,它能较好的了解物联网中终端节点的位置信息以及移动情况,因此,实时、准确和高效地对移动目标轨迹信息进行跟踪和保存是物联网系统研究的热点。
目前应用广泛的移动目标轨迹跟踪系统多以车载GPS终端与基于B/S的Web方式实现,系统中传统的HTTP请求方式带来了大量的无效请求,造成了服务器资源的不必要开销,同时,传统的MySQL数据库存取数据较慢,交互方式存在一定的延迟,而基于PC端查询物流、巡逻等工作移动目标轨迹跟踪的系统,无法满足用户实时性、便携性的需求,小规模企业与零散客户也难以承担类似系统的开发成本[1-2]。……
