Device time series data development

更新时间:
复制 MD 格式

This topic uses vehicle trajectory data in an Internet of Vehicles (IoV) scenario as an example to describe the requirements and architecture for building a vehicle trajectory data platform using IoT Platform and Tablestore.

Scenario requirements

In an Internet of Vehicles (IoV) scenario, vehicles use sensors to report time series data to the cloud. Storing, querying, and analyzing this data supports business objectives such as vehicle status reporting, vehicle location tracking, traffic management, and trajectory projection. For example, you can store the GPS coordinate data from a vehicle's trip to display its trajectory on a navigation screen. For traffic management, you can analyze a vehicle's speed changes over time to determine if it was speeding. The requirements for storing and analyzing vehicle trajectory data in an IoV scenario are as follows:

  • Data writes: The platform must support real-time writes from millions of nodes to handle data from many vehicles.

  • Data storage: Vehicle trajectory data changes dynamically over time. Long-term storage of this data requires massive single-table capacity and cost-effective storage solutions.

  • Data retrieval: The platform must support retrieving a vehicle's trajectory data based on multiple parameters. For example, you can query the latest driving status of a vehicle, such as its current location and remaining battery. This capability requires support for timeline retrieval.

  • Data analytics: The platform must support aggregation and analysis of historical vehicle data. For example, you can analyze the average annual emissions of all vehicles in a city or the average mileage of vehicles from a specific manufacturer. This requires high-performance and easy-to-use data analytics capabilities.

Example scenario

To efficiently operate and manage taxis across a city, a company regularly collects vehicle status data. The company needs to ingest and store the reported time series data in the cloud to reduce business costs. The company also needs to retain only the last three months of vehicle status data.

Solution implementation

  • The implementation process for the example scenario is as follows.

    1. Vehicle status data is ingested into IoT Platform using the Message Queuing Telemetry Transport (MQTT) protocol.

    2. IoT Platform integrates with Tablestore to store the data in a Tablestore time series model. For more information, see Introduction to the time series model.

      A Tablestore time series table stores the vehicle time series data and supports the time to live (TTL) feature. For information about the schema design of the time series model, see Time series model design.

    3. You can use Tablestore's timeline retrieval and SQL queries to retrieve and analyze vehicle data. For more information about SQL queries, see SQL queries.

      Timeline retrieval is used for vehicle data retrieval. SQL queries are used for both vehicle data retrieval and analysis.

  • The following figure shows the architecture of the example scenario.

    fig_vehiclestruct_20220627

Solution advantages

  • Uses a distributed cluster architecture with horizontal scaling capabilities.

  • Provides automatic data lifecycle management by automatically deleting expired data.

  • Supports hot and cold storage of data based on time ranges to reduce storage costs.

  • Uses compression technology for time series data to reduce storage size and costs.

  • Supports high-concurrency writes and high-performance analytics.