# Social Milieu Oriented Routing: A New Dimension to Enhance Network Security in WSNs
## 3 Algorithm Description  
### QoT Parameters Aggregation Rules and Related Definitions  
In this paper, we take two independent QoT parameters, that is, trust and recommendation into consideration. We first define trustor node, target trustee node and intermediate participant in WSNs while performing social milieu oriented routing. Then, definitions of these two QoT parameters are given and related aggregation rules are described in detail.  
**Definition 1**.: _Trustor node is a type of participant in WSNs, who is the invoker of social milieu oriented routing and the performer of the aforementioned QA_OSTP algorithm._  
**Definition 2**.: _Target trustee node is a type of participant in WSNs, who is the destination of the messages sent by the trustor node. Moreover, its trustworthiness can be represented more comprehensively based on QA_OSTP algorithm._  
**Definition 3**.: _Intermediate participant is a type of participant in WSNs along the social trust path between the trustor node and the target trustee node, with whose help the trustor node can find his optimal social trust path to the target trustee node before invoking the social milieu oriented routing._  
In human societies, trust is a complex topic subject to previous mutual interactions between two peer parties. Many different trust definitions have been proposed addressing people's different concerns [11]. In the context of this paper, trust between two participants in WSNs can be defined as follows.  
**Definition 4**.: _Trust is the belief showing to what degree a participant will accept its neighbor participants' recommendation based on their past mutual interactions. \(T_{AB}\in[0,1]\) denotes trust value that participant \(A\) assigns to participant \(B\). When \(T_{AB}\)= 0, it means that \(A\) does not trust \(B\) at all and when \(T_{AB}\) = 1, it denotes that participant \(A\) completely trust \(B\)._  
The trust value between a trustor node and the target trustee node along a social trust path can be aggregated based on the trust transitivity rule [11]. Given there are n participants \(a_{1}\),... \(a_{n}\) in order along a social trust path \(p(a_{1}\),... \(a_{n})\) between the trustor node and the target trustee node, we can compute the aggregated trust value using:  
\[T_{p(a_{1},\ldots,a_{n})}=\prod_{(a_{i},a_{i+1})\in p(a_{1},\ldots,a_{n})}T_{a _{i}a_{i+1}} \tag{1}\]  
Research in social psychology shows that, in the same society, the recommendation of a third party node does not decay with the increase of the number of transitivity hops [19]. From this point of view, recommendations from the third party node and its aggregation rule can be defined as follows.  
**Definition 5**.: \(R\in[0,1]\) _is the recommendation of a third party node in WSNs. \(R\) = 0 indicates that the third party node has no knowledge of the trustee node. \(R\) = 1 indicates that the third party node completely knows about the trustee node._  
Due to the fact that the recommendation of a participant does not decay with the increasing of transitivity hops, the recommendation value along a certain social trust path \(p(a_{1},...\,a_{n})\) in WSNs can be aggregated by  
\[R_{p(a_{1},...,a_{n})}=\frac{\sum_{i=2}^{n-1}R_{a_{i}}}{n-2} \tag{2}\]  
Then the utility is the measurement of the trustworthiness of a social trust path, which can be defined by:  
\[\mathcal{F}_{p(a_{1},...,a_{n})}=w_{T}\times T_{p(a_{1},...,a_{n})}+w_{R}\times R _{p(a_{1},...,a_{n})} \tag{3}\]  
where \(p(a_{1},\ldots\,a_{n})\) is a social trust path with \(n\) participants \(a_{1}\),... \(a_{n}\), \(w_{T}\) and \(w_{R}\) are the weights of the aggregated trust value and the recommendation value along a social trust path between a trustor node and the target trustee node; \(0<w_{T},w_{R}<1\) and \(w_{T}+w_{R}=1\).  
The goal of the selection of OSTP between thetrustor node and the target trustee node in WSNs is to select the optimal path undertwoQoT parameters constraints, which yields the best utility with the criteria defined by the trustor node.