# DataStream XES Extension: Embedding IoT Sensor Data into Extensible Event Stream Logs
## 2 Foundations and Related Work
### Process Mining
In the following, we will denote all attributes of our proposed extension with the prefix **stream**:, to increase the clarity of the description. We will furthermore assume that the **stream**: prefix is specified in an XES extension--see [[https://cpee.org/datastream/datastream.xesext](https://cpee.org/datastream/datastream.xesext)]([https://cpee.org/datastream/datastream.xesext](https://cpee.org/datastream/datastream.xesext)) (accessed on 8 February 2023). The core of the extension is \"attribute<list>:point\", furthermore denoted as stream:point (see previous paragraph). It contains all the attributes that allow us to represent individual sensor values as XES artifacts. It is a list. Values include:

* **id**: uniquely identifies the sensor, e.g., if a gyro-sensor delivers orientation and angular velocity changes separately, the identifiers can be gyro/velocity and gyro/angular_velocity. On the other hand, if the sensor delivers a value pair, the identifier can be gyro. * **source**: identify the source of a sensor value, e.g., a drilling machine is the source of many different sensor readings at all times. The source attribute allows grouping these values into groups that may belong together and, thus, make sense to be analyzed together. The source is optional. * **timestamp**: A timestamp when the reading was taken. The timestamp is intended to be in ISO 8601 format, including milliseconds (YYYY-MM-DDTHH:mm:ss.sssZ) or microseconds (YYYY-MM-DDTHH:mm:ss.sssssZ). * **value**: The value delivered by the sensor. As sensors can deliver single values (float, int, strings) or complex data (pairs, triplets, deeply structured data,...), we always assume this is stored as some serialized string representation. * **meta**: A straightforward extension point, which allows us to specify an additional list of attributes, which might be important for custom data analysis purposes. Meta is optional. ### Context, Grouping, and Nesting: Stream:Datacontext, Stream:Datastream, Stream:Point

The second concept (see Figure 4) is the stream:datastream. It was introduced to group points for the **\"Single Activity\"** and **\"Trace\"** contexts. Its only (optional) attribute is name, which can be used to describe the purpose of the grouping. If a set of stream:datastream is included directly in the level of the trace, all sensor:point attributes are meant to exist in the **\"Trace\"** context: they cannot be attributed to any event or group of events yet. If a stream:datacontext exists at the trace level, the stream:datacontext has to group multiple events, and it has to contain at least one stream:datastream. This realizes the **\"Group of Activities\"** context. Multiple stream:datacontext attributes can exist at trace level, meaning that multiple groups exist. If a stream:datastream exists at the event level, it has to contain at least one stream:point. Multiple stream:datastream can exist at the event level. While this does not change the meaning of all these points being connected to one event, its purpose might be to further structure the events, e.g., separating two different levels of importance for analysis purposes. All stream:datacontext attributes might be nested. Nested sensor:datacontext attributes convey different layers of connection granularity. For example, some stream:point attributes might be grouped to a group (a) of 2 tasks, some other stream:point attributes might be connected to a group (b) of 2 different tasks.