Lossless Data Compression for Time-Series Sensor Data Based on Dynamic Bit Packing

Sang-Ho Hwang, Kyung-Min Kim, Sungho Kim, Jong Wook Kwak2023

TL;DR

This paper introduces a novel lossless data compression technique called Bit Depth Compression (BDC) for time-series sensor data. BDC dynamically adjusts its bit-packing strategy based on the characteristics of the data, leading to significantly improved compression ratios and reduced energy consumption compared to existing methods. This is crucial for efficiently handling the massive data streams generated by IoT devices.

What Problem Does This Paper Address?

The proliferation of IoT devices, from autonomous vehicles to smart factories, generates an ever-increasing volume of time-series sensor data. Transmitting and storing this data presents a significant challenge due to communication bandwidth limitations and storage costs. While lossy compression can achieve high compression ratios, it sacrifices data fidelity, which is unacceptable for applications requiring precise data for AI training or predictive analysis. Existing lossless compression methods often struggle with the inherent noise, outliers, and multidimensional variations present in sensor data, leading to suboptimal compression efficiency. This paper aims to bridge this gap by proposing a lossless compression technique that effectively handles these data complexities.

Methods

The core innovation of this paper is the Bit Depth Compression (BDC) algorithm. Unlike traditional methods that use fixed-size bit packing, BDC dynamically determines the optimal pack size by analyzing the "bit depth" of the sensor data.

Here's how it works:

  • Forecasting Module (FM): This module (which can be delta encoding, delta-of-deltas, or RNN-based) predicts future sensor values. The output of this module is the "error" or difference between the predicted and actual values.
  • Bit Depth Estimator (BDE): This is the heart of BDC. It monitors the bit depth of the error values generated by the FM. A queue, QMBD (Queue to Monitor the Bit Depth), tracks the bit depth levels.
  • Bit Pack Module: Based on the information from the BDE, this module dynamically partitions the data into sub-packs of varying sizes. This dynamic adjustment allows BDC to efficiently pack data with different bit depths, minimizing wasted space caused by zero-padding in fixed-size packing.
  • Dynamic Partitioning: BDC adapts its packing strategy based on the incoming bit depth values. It considers scenarios where the new data's bit depth matches, exceeds, or falls below the current maximum bit depth in the QMBD. This adaptive approach is key to its efficiency.
  • Space Benefit Calculation: When a new data point has a smaller bit depth than the maximum, BDC calculates the potential space benefit of adjusting its "split position" (SP) – a point where the data is divided for packing. It chooses to adjust the SP only if it leads to a greater space saving.
  • Moving Average/Exponential Moving Average (SMA/EMA): These techniques are used to estimate the size of sampled packs, enabling real-time compression without needing to store all data.

Datasets

The performance of BDC was evaluated using several well-known time-series datasets from the UCI repository:

  • Appliances energy prediction dataset: Data from Zigbee wireless sensors monitoring temperature and humidity in a home.
  • Air quality dataset: Measurements of various air pollutants (CO, NOx, benzene, etc.) collected on Italian roads.
  • Gas sensor array temperature modulation dataset: Measurements from chemical sensors exposed to gas mixtures, including CO concentration, temperature, humidity, and flow rate.
  • SML2010 dataset: Time-series data from a smart home, including indoor/outdoor temperature, humidity, and illumination.

All datasets were quantized to 16-bit integers for evaluation.

Key Insights and Ideas

  • Bit Depth is Key: The paper highlights that the "bit depth" of sensor data is a critical characteristic that can be leveraged for more efficient compression.
  • Dynamic Packing Outperforms Static: The core insight is that a fixed-size bit-packing approach is inherently inefficient for sensor data with varying characteristics (outliers, rapid changes). Dynamic adjustment based on bit depth is crucial for maximizing compression.
  • Lossless is Achievable and Valuable: The research demonstrates that high compression ratios can be achieved with lossless methods, preserving data integrity which is vital for AI and predictive analytics.
  • Energy Efficiency Follows Compression: By reducing the amount of data to be transmitted, BDC indirectly leads to significant energy savings, a critical factor for battery-powered IoT devices.

Key Results

The BDC algorithm demonstrated impressive performance across various datasets:

  • Compression Ratio:
    • Up to 247% improvement and 30% on average compared to other compression algorithms.
  • Up to 73% improvement (with XOR forecasting) and 72% improvement (with delta forecasting) compared to the Sprintz algorithm.
  • Up to 98% maximum payload reduction and 46% on average compared to TSXor.
  • Energy Consumption:
    • Up to 34% reduction and 18% on average in data transmission energy using Bluetooth compared to other algorithms.
  • Up to 94% reduction (compared to raw data) and 69% on average in total energy consumption.
  • Up to 67% reduction (compared to TSXor) and 24% on average in total energy consumption.

Limitations and Future Work

  • Computational Complexity: The paper acknowledges that BDC has slightly higher computational complexity due to the Bit Depth Estimator (BDE) calculations. However, this is offset by the gains in compression and reduced transmission energy.
  • Future Work: The authors plan to explore enhanced forecasting models to further improve compression ratios. Additionally, they aim to investigate reducing computation overhead in edge nodes for lossless compression.

Summary updated

BibTeX
@misc{hwang2023lossless,
  author = {Sang-Ho Hwang and Kyung-Min Kim and Sungho Kim and Jong Wook Kwak},
  title = {{Lossless Data Compression for Time-Series Sensor Data Based on Dynamic Bit Packing}},
  year = {2023},
  doi = {10.3390/s23208575},
}
Figure