# Building Topic-Driven Virtual IoTs in a Multiple IoTs Scenario
## 4 Definition of a Thing's Profile  
In this section, we present our definition of a thing's profile, which represents a first important contribution of this paper. As pointed out in the Introduction, analogously to what happens for human profiles, the profile of a thing can have two components. The former registers its past behavior and is extremely useful for content-based recommendations; for this reason, we call it \"content-based component\" in the following. The latter registers the main features of those things with which it mostly interacted in the past and can be used for collaborative filtering recommendations; for this reason, we call it \"collaborative filtering component\" in the following. Before illustrating in detail the profile of a thing, we must introduce some preliminary concepts. First of all, given two instances \(\iota_{j_{k}}\) of \(o_{j}\) and \(\iota_{q_{k}}\) of \(o_{q}\) in \(\mathcal{I}_{k}\), we can define the set \(tranSet_{j_{\mathcal{I}_{k}}}\) of the transactions from \(\iota_{j_{k}}\) to \(\iota_{q_{k}}\) as follows:  
\[tranSet_{j_{\mathcal{I}_{k}}}=\{T_{j_{\mathcal{I}_{k_{1}}}},T_{j_{\mathcal{I} _{k_{2}}}},\cdots,T_{j_{\mathcal{I}_{k_{2}}}}\} \tag{7}\]  
A transaction \(T_{j_{\mathcal{I}_{k_{t}}}}\in tranSet_{j_{\mathcal{I}_{k}}}\) is represented as:  
\[T_{j_{\mathcal{I}_{k_{t}}}}=\langle reason_{j_{\mathcal{I}_{k_{t}}}},source_{j_ {\mathcal{I}_{k_{t}}}},dest_{j_{\mathcal{I}_{k_{t}}}},start_{j_{\mathcal{I}_{k _{t}}}},finish_{j_{\mathcal{I}_{k_{t}}}},success_{j_{\mathcal{I}_{k_{t}}}},content _{j_{\mathcal{I}_{k_{t}}}}\rangle \tag{8}\]  
Here:  
* \(reason_{j_{\mathcal{I}_{k_{t}}}}\) denotes the reason why \(T_{j_{\mathcal{I}_{k_{t}}}}\) occurred, chosen among a set of predefined values. * \(source_{j_{\mathcal{I}_{k_{t}}}}\) indicates the starting node of the path followed by \(T_{j_{\mathcal{I}_{k_{t}}}}\). * \(dest_{j_{\mathcal{I}_{k_{t}}}}\) represents the final node of the path followed by \(T_{j_{\mathcal{I}_{k_{t}}}}\). * \(start_{j_{\mathcal{I}_{k_{t}}}}\) denotes the starting timestamp of \(T_{j_{\mathcal{I}_{k_{t}}}}\). * \(finish_{j_{\mathcal{I}_{k_{t}}}}\) indicates the ending timestamp of \(T_{j_{\mathcal{I}_{k_{t}}}}\). * \(success_{j_{\mathcal{I}_{k_{t}}}}\) denotes whether \(T_{j_{\mathcal{I}_{k_{t}}}}\) was successful or not; it is set to true in the affirmative case, to false in the negative one, and to NULL if \(T_{j_{\mathcal{I}_{k_{t}}}}\) is still in progress. * \(content_{j_{\mathcal{I}_{k_{t}}}}\) indicates the content \"exchanged\" from \(\iota_{j_{k}}\) to \(\iota_{q_{k}}\) during \(T_{j_{\mathcal{I}_{k_{t}}}}\). In its turn, \(content_{j_{\mathcal{I}_{k_{t}}}}\) presents the following structure: \[content_{j_{\mathcal{I}_{k_{t}}}}=\langle format_{j_{\mathcal{I}_{k_{t}}}},file Name_{j_{\mathcal{I}_{k_{t}}}},size_{j_{\mathcal{I}_{k_{t}}}},topics_{j_{ \mathcal{I}_{k_{t}}}}\rangle\] (9) Here:
* \(format_{j_{\mathcal{I}_{k_{t}}}}\) indicates the format of the content exchanged during \(T_{j_{\mathcal{I}_{k_{t}}}}\); the possible values are: \"audio\", \"video\", \"image\" and \"text\". * \(fileName_{j_{\mathcal{I}_{k_{t}}}}\) denotes the name of the transmitted file. * \(size_{j_{\mathcal{I}_{k_{t}}}}\) indicates the size in bytes of the content. * \(topics_{j_{\mathcal{I}_{k_{t}}}}\) indicates the set of the content topics; it consists of a set of keywords representing the subjects exchanged during \(T_{j_{\mathcal{I}_{k_{t}}}}\). It can be formalized as: \(topics_{j_{\mathcal{I}_{k_{t}}}}=\{(kw^{1}_{j_{\mathcal{I}_{k_{t}}}},nkw^{1}_{ j_{\mathcal{I}_{k_{t}}}}),(kw^{2}_{j_{\mathcal{I}_{k_{t}}}},nkw^{2}_{j_{ \mathcal{I}_{k_{t}}}}),\ldots,(kw^{w}_{j_{\mathcal{I}_{k_{t}}}},nkw^{w}_{j_{ \mathcal{I}_{k_{t}}}})\}\). In other words, the set of the topics of the \(t^{th}\) transaction from \(j_{k_{t}}\) to \(\iota_{q_{k}}\) consists of \(w\) pairs; each pair consists of a keyword and the corresponding number of occurrences. Now, we can define the set \(tranSet_{j_{k}}\) of the transactions performed by \(\iota_{j_{k}}\) in \(\mathcal{I}_{k}\).