首页|基于微服务架构的智慧灯杆系统研究与应用

基于微服务架构的智慧灯杆系统研究与应用

扫码查看
传统智慧灯杆系统实时数据的推送和获取需通过不断轮询,占用系统开销,网络带宽压力大,且高流量请求可能造成系统崩溃等问题.为解决上述问题,设计和实现了一种基于微服务架构的智慧灯杆数据实时推送系统.从业务实际需求出发,对系统技术架构与功能架构进行设计,明确4种技术模块与功能模块,并通过提取梳理模块、功能、实体以及资源结点的关系与属性,明确不同结点之间的权重,搭建图网络,采用图聚类算法将系统拆分为以实时数据推送服务为主的九大微服务.系统针对实时数据推送需求,采用双Redis数据库设计,分离实时数据与缓存数据,明确了3种实时数据存储结构以及数据点位表、转存配置表、系统三者之间的关系,启用Redis实时数据库键空间通知功能,监听特定键值变化,并通过Websocket实时推送到客户端.系统测试表明,该系统可以高效、准确地实现智慧灯杆实时数据推送以及历史数据的展示与存储,满足实时性与并发需求,其为智慧城市中的智慧灯杆数据可视化场景建设提供了完善的解决方案.
Research and Application of Smart Lamppost System Based on Microservice Architecture
Due to the constant polling,the push and acquisition of real-time data in the traditional smart lamppost system takes up system overhead,which causes the large network bandwidth pressure,and high traffic requests may cause system collapse and other problems.To solve the above problems,a smart lamppost data real-time push system based on microservice architecture is designed and implemented.Based on the actual business needs,the system technical architecture and functional architecture are designed,and four technical modules and functional modules are clarified.By extracting and sorting out the relationship and attributes of modules,functions,entities and resource nodes,the weights between different nodes are clarified,and the graph network is built.The graph clustering algorithm is used to split the sys-tem into nine micro services based on real-time data push services.The system uses the dual-Redis database design to separate the real-time data and cache data according to the real-time data push demand,clarifies the three real-time data storage structures and the relationship be-tween the data point table,the transfer configuration table,and the system,which enables the Redis real-time database key space notification function,monitors the specific key value changes,and pushes them to the client in real time through Websocket.The system test shows that the system can efficiently and accurately push the real-time data of the smart lamppost and display and store of the historical data to meet the real-time and concurrent requirements,which provides a perfect solution for the construction of the smart lamppost data visualization scenari-os in the smart city.

smart lamppostRedisgraph clusteringreal-time pushWebsocket

寇柏源、王少林

展开 >

山东建筑大学 信息与电气工程学院,山东 济南 250100

智慧灯杆 Redis 图聚类 实时推送 Websocket

山东省智慧住区项目

鲁财建指[2019]31号

2024

软件导刊
湖北省信息学会

软件导刊

影响因子:0.524
ISSN:1672-7800
年,卷(期):2024.23(4)
  • 21