摘要: | 物聯網(Internet of Things, IoT)由各種嵌入式裝置組成,持續生成大量的感測器觀測數據。然而,隨著物聯網技術近年的蓬勃發展,物聯網面臨嚴重的異質性問題,不同開發者設計各種專有的資料模型或服務協定,造成物聯網資源水平整合的困難。為從根源解決此問題,遵循物聯網開放式標準為有效的方案,例如開放地理空間聯盟(Open Geospatial Consortium, OGC)之SensorThings API(STA)。 STA不僅針對物聯網定義了完整且通用的資料模型以描述其屬性及關係的複雜性,亦提供RESTful服務介面以直覺且有彈性的方式訪問物聯網資源。為了管理資料屬性之間的關係,許多STA的實作使用關聯式資料庫(relational database, RDB)管理物聯網資料,例如FROST Server,GOST和Mozilla STA。然而,RDB在管理大量的多維度資料時面臨嚴重的資料插入及查詢效能下降問題。因此,本研究提出了一種針對STA服務的可擴展且高效的多維物聯網資料管理解決方案。具體來說,我們使用MongoDB為資料儲存系統,MongoDB為分散式文檔資料庫,並支持類似於RDB的關係連接功能。為了提高查詢大量多維物聯網資料的性能,我們應用了過往研究提出之自適應多屬性索引框架(Adaptive Multi-Attribute Indexing Framework, AMAIF)解決方案。在實驗中,我們對提出的STA實作進行壓力測試並與其他的STA實作進行了比較。結果表明在單純的多維度資料查詢中,所提出之系統有效增進查詢響應的速度。且在資料擴展性方面,得益於鍵值對儲存的優勢,可快速地插入大量資料且簡單地分割與擴充儲存空間,以上兩點足見本系統對於多維度資料的管理與查詢的效益。;The Internet of Things (IoT) is composed of various embedded devices that generate a large amount of sensor observation data. These observations are usually heterogeneous because they follow different data models or service agreements, which brings difficulties to data integration. To solve this problem, it is necessary to follow open standards specifically designed for IoT, such as the Open Geospatial Consortium (OGC) SensorThings API (STA). STA not only defines an IoT data model to capture the complexity of attributes and their relationships, but also provides a RESTful service interface to access IoT data. In order to manage the relationship between the properties of the Internet of Things, many STA implementations use relational database (RDB) solutions, such as FROST Server, GOST and Mozilla STA. However, RDB faces serious performance problems when managing large amounts of multi-dimensional data. Therefore, this research proposes a scalable and efficient data management solution for multi-dimensional IoT data query on STA services. Specifically, we use MongoDB as a data storage system, which is a distributed document-based database that supports table-join operators similar to RDB. In order to improve the performance of querying large amount of multi-dimensional IoT data, we apply the previously proposed Adaptive Multi-Attribute Indexing Framework (AMAIF) solution. In the experiment, we compare the proposed STA implementation with FROST Server. The experiment results show that in the multi-dimensional data query, the proposed system can effectively improve the speed of query response. And in terms of the data scalability, a large amount of data can be inserted quickly and can be easily divided and expanded in KVS stores. |