张文正 孙知信 宫婧



摘 要:为了解决物联网异构数据的存储问题,该文提出了一种混合技术存储方案。针对结构化数据存储,该文基于MySQL分布式数据库和Redis缓存,设计了结构化数据的存储方案;对于图片等非结构化数据,通过FastDFS分布式文件系统进行管理,使用Redis缓存保存文件的索引映射关系并实现快读热点数据的功能。最后对系统进行测试,测试结果表明该方案实现了性能目标。
关键词:物联网 数据存储 结构化数据 非结构化数据
中图分类号:TP3 文献标识码:A文章编号:1672-3791(2021)04(b)-0001-04
A Hybrid Heterogeneous Data Storage Scheme
ZHANG Wenzheng SUN Zhixin* GONG Jing
(Nanjing University of Posts and Telecommunications, Nanjing, Jiangsu Province, 210023 China)
Abstract: In order to solve the storage problem of heterogeneous data in the Internet of Things, this paper proposes a hybrid technology storage scheme. For structured data storage, this paper designs a structured data storage scheme based on MySQL distributed database and Redis cache; for unstructured data such as pictures, it is managed through the FastDFS distributed file system, and the Redis cache is used to store the index mapping of the file relationship and realize the function of fast reading hot data. Finally, the system is tested, and the test results show that the solution in this paper has achieved the performance goal.
Key Words: Internet of things; Data storage; Structured data; Unstructured data
近年來,国内外在物联网方面的技术应用水平不断提升。伴随着传感器设备种类和数量的不断增加,物联网应用系统中的数据量也日益庞大且逐渐趋于多样化[1]。如何高性能地对各式各样的物联网数据进行存储,成为当前物联网领域的一个热点问题。为了解决物联网数据的高性能存储问题,该文研究了物联网数据的特点,提出了面向异构数据的混合型存储方案。
1 物联网数据存储需求分析
物联网数据的来源是不同的传感器设备[2],通常情况下物联网数据存储系统应满足以下几点要求。
1.1 可靠性
要有较好的数据备份与恢复方案,用以保证数据丢失状况下系统的可靠性。
1.2 开放性
提供相应数据接口,来解决不同场景的数据处理或分析。
1.3 实时性
针对实时监测的需求,可以实时地接收数据,且可以实时地计算处理。
2 物联网数据的分类
考虑到传感器型号、属性差异,物联网数据的往往没有一种统一的格式。……