# Adaptive Segmentation of Streaming Sensor Data on Edge Devices
## 2 Related Work
### Data Stream Segmentation  
Sensors located in IoT devices generate data streams continuously. For some application areas, it is crucial to partition such data into segments to perform successful analysis using advanced algorithms, for example the machine learning ones.  
Streaming segmentation of the signal realized on edge devices allows for:  
* reconstruction of a sampled noisy signal (to maintain its continuity/smoothness class as a key feature (like non-negativity)) before the network transmission,
* signal compression (in experiments with test signals, we observed the data size reduction from 135 to 208 times, i.e., two orders of magnitude),
* reduction of network traffic (in the entire infrastructure),
* energy savings (in the entire infrastructure--the network communication is energy-intensive, and additionally the signal smoothed on edge devices no longer needs to be pre-processed in the cloud).  
Recognition and prediction of human activities by real-time analysis of data streams coming from sensors and actuators is one of the areas of application of data stream segmentation [7]. The problem of automatic segmentation of data stream into activities in real time is a difficult one--there is no general approach for determining the end of the detected activity [7]. Sensor data stream segmentation has been the subject of many research works. Some proposed approaches were based on a time window with fixed length or on a dynamic time window including fixed number of events [8; 9]. The other approaches were based on a real-time analysis of temporal information but either very intensive pre-processing was required, or the application was limited (for example to location analysis) [10; 11].  
An approach for continuous activity recognition based on the real-time sensor data segmentation was proposed in [12]. The proposed method was based on dynamically resized time windows (taking into account temporal sensor data and the state of activity recognition) and the ontology-based activity recognition algorithm. A real-time activity prediction method using automatic data stream segmentation based on Jaro-Winkler distance measurement was proposed in [7].  
A method for unsupervised on-the-fly segmentation and classification of the time-series data was proposed in [13]. The approach was based on data density distribution estimation and the data stream was processed incrementally, using fixed amount of resources (memory and CPU). It even worked in real time when the sampling rate of the data stream was on the certain level [13]. A semantic-based approach for real-time separating and segmenting sensor data stream into multiple threads of activities was proposed in [14].  
None of the above-mentioned approaches can provide online \(C^{2}\)-continuous segmentation. This is crucial if we must deal with physical constraints (for example, velocity and acceleration must be continuous).  
Our proposed adaptive segmentation of the data stream (sampled signal) takes place in the approximation space of 3 rd order splines (which represents the space of twice differentiable functions, i.e., the problem domain). Its result is a stream of segments that represents the reconstructed true signal. A spline constructed in this way recreates the signal taking into account its known class of continuity (smoothness). Therefore, we segment the data stream taking into account the features (continuity/smoothness class) of the processed signal.