基于时序数据库的海洋装备监控数据存储系统
2023-08-01倪昱郑志恒
倪昱 郑志恒



摘 要:目前在海洋裝备上通常使用关系数据库存储海量监控数据,存在空间占用大、查询性能差的问题。文章提出了基于时序数据库的海洋装备监控数据存储解决方案,并基于国产数据库TDEngine完成了系统工程实现,实现了监控数据的自动建表、自动存储以及快速可视化。经测试表明,该系统的数据压缩和查询性能相比于传统关系型数据库具有明显优势,为解决海洋装备海量监控数据存储的难题提供了良好的解决方法。
关键词:时序数据库;监控数据存储;海洋装备;TDEngine
中图分类号:TP39;U665.26 文献标识码:A 文章编号:2096-4706(2023)11-0101-04
Monitoring Data Storage System for Marine Equipment Based on Time Series Database
NI Yu, ZHENG Zhiheng
(State Key Laboratory of Deep-Sea Manned Vehicles, China Ship Scientific Research Center, Wuxi 214082, China)
Abstract: At present, relational database is usually used to store massive monitoring data on marine equipment, which has the problems of large space occupation and poor query performance. This paper proposes a solution of monitoring data storage for marine equipment based on time series database, and completes the system engineering implementation based on the domestic database TDEngine, which realizes automatic table building, automatic storage and rapid visualization of monitoring data. The tests show that the data compression and query performance of the system has obvious advantages over traditional relational database, which provides a good solution to the difficult problem of massive monitoring data storage for marine equipment.
Keywords: time series database; monitoring data storage; marine equipment; TDEngine
0 引 言
随着计算机软硬件技术的飞速发展,监控系统在海洋装备中得到了更加广泛的应用。对于船舶、载人潜器等有人装备,监控数据提供了运行状态分析、故障判断的有力手段;对于无人艇、水下机器人等无人装备,监控数据提供了自主决策控制的依据。
为了对历史数据进行分析查看,需要实现监控数据的存储。目前对于海洋装备的监控数据存储,一般采用MySQL、Oracle等关系数据库,然而监控历史数据是高频次采集的时序数据,使用关系数据库存储会带来以下问题:
1)存储空间占用大。海洋装备中的监控数据测点数量多,采样频率高,需要保存的时间周期长,因此数据量大。因为关系数据库的压缩算法没有针对时序数据进行优化,所以在通常的磁盘容量很难满足上述海量数据的存储需求。
2)查询性能差。海量数据检索对数据库的查询性能要求较高。……
