各类流式传感数据的实时接收与处理是物联网智能应用的基本要求。针对某城市车辆实时监管系统暴露出的数据实时接收与高效数据查询互相制约的问题,提出一种适用于物联网数据管理的结构化数据查询优化方法,在保障流数据实时写入的同时提供高效的数据查询能力。该方法采用数据库集群应对数据并发访问时的性能需求;通过主从延迟复制技术减少数据查询对数据写入性能的影响;采用数据分区和数据缓存技术提升单数据节点的查询性能。实验结果表明,该方法能在一定程度上减少查询对数据写入的影响,提高数据的查询效率。
The real-time receiving and processing of various types of streaming sensor data is the foundation requirements of the Internet of things intelligent application. Taking a city real-time vehicle monitoring system as an example, the system ex- posed the issue of real-time data receiving and efficient data querying which restricted each other. Against this issue, this pa- per proposed a structured data query optimization method, which applied to data management in the Internet of things, to pro- vide efficient data query capabilities under the protection of real-time data written. The method used database cluster to re- sponse the performance requirements of concurrent access to data, and through the master-slave delay replication technology to reduce the influence of data query on the performance of data receiving, and used the data partitioning and data caching tech- nology to enhance the query performance of single data node. Experimental results show that this method can reduce the influ- ence on data written to some extent and improve the efficiency of data query.