# An Interactive Method for Detection of Process Activity Executions from IoT Data +
## 4 Method to Identify Activity Executions
### Find and Label Similar Activities  
Using the activity signatures of detected activities, we are now able to analyze unknown (i.e., unlabeled) parts of the given IoT data set for the occurrence of activities with similar signatures. In the context of this work, we assume that the process analyst performs a visual search for similarities with known activities. This step has a high potential for automation and we will investigate different means for detecting similarities in time series data (e.g., using dynamic time warping and supervised machine learning) as part of future work [67]. Identified similar activities have to be labeled. Segments of _no activity_ execution also need to be labeled as such, so they can be found in other parts of the data set and each segment (i.e., time frame) receives a label.  
The term _similarity_ does not refer to an exact match of a known activity signature (i.e., sequence of sensor and actuator values) in unknown parts of the IoT data set, but rather a match of patterns and values within specific ranges. These variations in activity signatures might be introduced by different factors, e.g., different parameters for activity executions or imprecision that results from interactions with the physical world. Thus, when moving from the manual detection of similarities to an automated approach, a similarity measure and a threshold have to be introduced in order to find similar activities.  
Figure 15 shows an example of similar activities found in the given IoT data set for the VGR_1 component. Here we can observe very close matches between the signatures of identified activities. Figure 16 shows an example of similar activities found in the given IoT data set for the HBW_1 component. Here we see some larger differences between signatures of the same activities. Taking the _Store Workpiece_ activity as an example, one influencing parameter is the _position_ of the container in the warehouse that should be used for storage. This position influences the duration but not the type of the unload and store procedures and with that, e.g., the number of motor movements.  
Figure 16 also shows an important limitation of only analyzing the raw IoT data for activity executions. All the activities identified here have very similar signatures although they can be distinguished into two different types that belong to different processes in our smart factory example (cf. Section 2.2.2). The first three activities _Store Workpiece_ refer to the storage of a new workpiece in an empty container (cf. Storage Process in Section 2.2.2). The following two activities _Unload Workpiece_ refer to the unloading of an existing workpiece from a container (Production Process). Both types of activities are implemented via the same activations of sensors and actuators and the smart factory configuration currently does not feature sensors to determine the load within a container. This leads to an ambiguity regarding the detected activity [46] that could either be resolved through additional sensors or through the consideration of the activity context (e.g., the preceding and succeeding activities [2]).  
Figure 14: Activity Signature for _Get Workpiece from Pickup_ executed by VGR_1.