5. The Efficient Dynamic Trust Evaluation Model

In this section, we present the composition of the proposed efficient dynamic trust evaluation model and the calculation procedure of trust in detail.


5.1. The Composition of the Efficient Dynamic Trust Evaluation Model

The efficient dynamic trust model proposed in this paper consists of the following four modules: direct trust module, indirect trust module, integrated trust module, and trust update module. The direct trust is calculated based on the Beta trust model. The direct trust value of sensor node is calculated by taking communication trust, data trust, and energy trust into account. The indirect trust is evaluated based on the trusted recommendations from a third party. And then the integrated trust is calculated by assigning adaptive dynamic balance weights for direct trust and indirect trust and combining them. Finally, we give an update mechanism by a sliding time window based on IOWA to complete the updating of direct trust value according to historical interaction records. The relationship among the four modules is shown in Figure 2. And the specific implementation process is as follows.


Figure 2 The relationship among the four modules.


5.2. The Calculation of Direct Trust

As we know, the evaluation of trust in WSNs is a complex process, which includes a lot of factors. In the proposed trust model, the direct trust value is calculated by taking communication trust, data trust, and energy trust into account. The communication trust measures whether sensor nodes can cooperatively perform the intended protocol. The data trust measures the trust of data created and manipulated by sensor node, which can assess the fault tolerance and consistency of data. The energy trust measures whether a node has enough residual energy to complete new communications and data processing tasks. We consider the communication behavior and data consistency to establish a trust environment against errors and attacks and combine the energy factor to prevent the low competitive nodes from participating in the network operation to ensure network security and reliable operation. Next, we give the detailed calculation procedure of direct trust.


5.2.1. The Communication Trust Based on Data Consistency

We assume that a node can monitor neighboring nodes' activities within its communication range using watchdog mechanism. For example, a node can monitor its neighbors' transmissions, and in this way we can detect whether the node is forwarding or dropping the packets. In most current trust models, they define trust as the probability that node \(i\) holds on node \(j\) to perform as expected. Assume that Beta distribution is employed as the prior distribution of interactions among sensor nodes. They monitor the communication interaction record information based on watchdog mechanism to count the number of well behaviors or malicious behaviors between nodes to calculate the trust value. The trust model at every node uses Beta probability density function to evaluate expected probability of well behavior of neighboring nodes because trust modeling problem is characterized by uncertainty. And the Beta probability density function can be represented as

\(f(x \mid \gamma, \beta)=\frac{1}{B(\gamma, \beta)} x^{\gamma-1}(1-x)^{\beta-1}\)

where \(0 \leq x \leq 1, \gamma > 0, \beta > 0\), and \(\gamma\) and \(\beta\) are two indexed parameters.

If the number of successful (well behavior) outcomes is represented by \(a\) and \(b\) represents the number of unsuccessful (malicious behavior) outcomes between nodes, the probability for outcomes can be obtained by setting the values for \(\gamma\) and \(\beta\) as follows:

\(\begin{array}{l}

\gamma=a+1, \\

\beta=b+1.

\end{array}\)

The probability expectation value for Beta probability density function is defined as

\(E(x)=\frac{\gamma}{\gamma+\beta}=\frac{a+1}{a+b+2}.\)

Equation (3) can be used for the computation of the probability expectation of successful outcomes between nodes. The probability expectation value is defined as the trust value.

Based on the above discussion, we assume that the way of future interaction is the same as that of the previous one; the probability expectation function can be represented by the mathematical expectation of Beta distribution as the communication trust. In our proposed model, the communication trust, denoted by \(TC_{ij}(t)\), is derived from the direct observations of node \(i\) on node \(j\) at time \(t\), which is defined as

\(T C_{i j}(t)=\frac{S+1}{S+F+2}\left(1-\frac{F}{W}\right)\left(1-\frac{1}{S+\delta}\right),\)

where \(S\) and \(F\) denote the total amount of successful and unsuccessful interactions between nodes \(i\) and \(j\) during \(t\), respectively. But they are different from the above discussion that just considered whether the node is forwarding or dropping the packets. In (4), the node's successful or unsuccessful interaction is accessed by communication behavior and data consistency together. The expression \((1 - F/W)\) is called punishment factor, where \(W\) is the total number of effect interaction records. The punishment factor punishes trust value by the dynamic change of the number of malicious behaviors between nodes. The expression \(1 - 1/(S + \delta)\) is called regulating function, which approaches 1 rapidly with the increasing of the number of successful interactions, where \(\delta\) is a positive constant that can be tuned to control the speed of reaching 1. It would take longer time for a node to increase its trust value for another node. The detailed realization of each part is as follows.

In, successful or unsuccessful communication between nodes is judged by the communication behaviors and data consistency together. The successful communication means that a node not only forwards the packets to its next hop neighbor but also requires forwarding the packets reliably in its true form. Otherwise, it will be considered as unsuccessful communication. The evaluated node forwards the packets to its next hop successfully based on the watchdog monitored. The data consistency based on the detection algorithm is as follows.

Following the idea introduced in, the data trust affects the trust of the sensor nodes that created and manipulated the data. The data packets have spatial correlation in WSNs; that is, the packets sent among neighboring nodes are always similar in the same area. And the difference among nodes is reduced to zero. In our proposed paper, we use the detection algorithms to assort abnormal and honest data in the network. The detection algorithm compares a localized threshold \(\lambda_i (t)\) to the difference produced by each node data and its neighbors. The node \(i\) makes a measurement independently and transfers the measurement data value \(x_i(t)\) to its neighboring node \(j\). Then, node \(i\) compares the data value \(x_i (t)\) to its neighbor's node \(j's\) value \(x_j (t)\). It is denoted as normal if \(|x_j (t) - x_i (t)| < \lambda_i (t)\) is satisfied, and else if \(|x_j (t) - x_i (t)| \geq \lambda_i (t)\) is satisfied, it is denoted as abnormal. According to commutation behavior and data consistency, we can get \(S\) and \(F\), which denote the total amount of successful and unsuccessful interactions between nodes during \(t\), respectively.

Considering that the malicious node injection false data has a large deviation from the sensing data of authentic nodes, we can detect the attacker by comparing the threshold with the difference between the neighbors and the node \(i\). The equation of the threshold \(\lambda_i(t)\) of each node \(i\) as follows:

\(\lambda_{i}(t)=\frac{1}{\left|N_{i}\right|} \displaystyle \sum_{j \in N_{i}}\left|x_{j}(t)-\frac{x_{i}(t)+\sum_{j \in N_{i}} x_{j}(t)}{\left|N_{i}\right|+1}\right|,\)

where \(N_i\) represents the neighbor set of node \(i\). The number of element in \(N_i\) is denoted by \(|N_i|\).

In, the punishment function shows strict punishment to trust value according to the number of malicious behaviors. Once the number of misbehavior behaviors increases, the trust value drops rapidly. It reflects the following trust character: "trust is easy to lose". It can quickly and accurately identify the malicious behavior.

We choose the regulating function in instead of a linear function since such a function would approach very slowly to 1 with the increasing of successful interactions which is similar to literature. According to the regulating function, it would take longer time for a node to increase one's trust value. This design can effectively restrain the trust value rapidly increasing with the sudden increasing number of successful communication interactions. It reflects the following trust character: "trust is hard to acquire". It can restrain the collusion or on-off attack.


5.2.2. The Energy Trust

The energy trust is introduced mainly to complete the assessment on the performance of a node itself. By introducing the energy factor, we can effectively avoid the low competitiveness of nodes participating in network operation. When the energy consumption of a node is lower than a certain energy threshold \(E_{th}\), the node can only complete simple basic operation to prolong the network lifetime and balance energy consumption between nodes. The energy trust is defined as

\(TE_j(t) = \begin{cases}

0, & \text {if}\ E_{res} < E_{th}, \\

1, & \text else,

\end{cases}\)

where \(E_{res}\) represents the residual energy of a node. \(E_{th}\) represents the energy threshold.


5.2.3. The Direct Trust

Based on the communication trust \(TC_{ij}(t)\) and the energy trust \(TE_j (t)\), we can obtain the direct trust between two neighbor nodes as

\(T D_{i j}(t)=\left\{\begin{array}{ll}

T C_{i j}(t), & \text { if } T E_{j}(t)=1, \\

0.5 * T C_{i j}(t), & \text { else } T E_{j}(t)=0.

\end{array}\right.\)


5.3. The Calculation of Indirect Trust

Similar to most existing related works, we also consider the indirect trust to evaluate the trust value in the proposed trust model. The indirect trust value is evaluated by the recommendations from a third party. The recommendations are composed of the common neighboring node \(k\) of node \(i\) and node \(j\), symbolized as \(N_k\). As we know, trust has the property of transitivity. In the most existing trust models, the trust value \(T_{ij}^v\) from node \(i\) to node \(j\) is calculated by the recommendation \(N_v (N_v \in N_k)\) and is notated as

\(T_{ij}^v = T_{iv} \times T_{vj},\)

where \(T_{ij}^v\) is the trust value of node \(i\) to node \(v\) to node \(j\). \(T_{iv}\) is the direct trust value of node \(i\) to the common neighbor node \(N_v\); \(T_{vj}\) is the direct trust value of the common neighbor node \(N_v\) to \(j\). But not all the recommendations are reliable. How to detect and get rid of malicious recommendations is important since it has great impact on the calculation of trust. In order to judge the credibility of recommendations to calculate indirect trust more accurately, it needs to detect dishonest recommendations and exclude them before recommendation aggregation. In our proposed model, we only choose the recommendation whose trustworthiness is higher than the specified trust threshold \(\theta (0 \leq \theta \leq 1\). Suppose there are \(k\) recommendations and their direct trust values held by node \(i\) are notated as \(T_{i1}, T_{i2},...,T_{in},...,T_{i(k-1)}, T_{ik}\). If \(T_{in} \geq \theta (n = 1, 2,...,k)\), the recommendation from \(N_n\) is accepted. Otherwise, it will be totally neglected.

Due to the above discussion, we can get the trusted recommendations. In our trust model, we assign different weights to the selected recommendations by their direct trust. Intuitively, we should give more weight to the selected recommendation from recommenders with high reputation. Hence, we allocate weights based on the trust degree of the recommenders to avoid individual preference. The following approach is taken to calculate the weight \(\omega_n\) of the selected recommendation \(N_n\):

\(\omega_{n}=\frac{T_{i n}}{\sum_{n=1}^{q} T_{i n}}, \quad n=1,2, \ldots, q\)

where \(T_{in}\) is the direct trust value of node \(i\) to the common neighbor node \(N_n\), and \(q\) is the number of the selected recommendations. And \(0 \leq \omega_n \leq 1\) and \(\sum_{n=1}^{q} \omega_n = 1\).

Finally, the indirect trust value, denoted by \(TI_{it} (t)\), is obtained:

\(T I_{i j}(t)=\displaystyle \sum_{n=1}^{q} \omega_{n} * T_{i j}^{n}, \quad n=1,2, \ldots, q\)

where \(\omega_n\) is the weight of \(T_{ij}^n\). \(T_{ij}^n\) is obtained using, which represents the trust value from node \(i\) to node \(j\) calculated by the recommendation \(N_n\).


5.4. The Integration of Trust Value

The integrated trust value \(T_{ij}(t)\), which node \(i\) holds about node \(j\) at time \(t\), is established via the following formula:

\(T_{ij}(t) =\varphi TD_{ij} (t) + (1 - \varphi) TI_{ij} (t)\)

where \(\varphi\) is the balance weight factor, which is referred to as self-confidence factor and \(\varphi \in [0, 1]\). The value of \(\varphi\) is the degree of recognition of the direct trust and indirect trust of \(i\) to \(j\). \(\varphi\) is defined using a dynamic function; the function introduced in the literature is given as

\(\varphi=f(k)=\frac{1}{2}+\frac{1}{\pi} \arctan \left(10 \times \frac{k-\mathrm{COM}_{\mathrm{th}}}{N}\right),\)

where the balance weight factor \(\varphi\) is changed dynamically with the number of communication interactions \(k\) to defect caused by allotting weights subjectively. \(N\) is the maximum interaction between \(i\) and \(j\). The specific value is determined according to the network environment and the specific requirement. \(COM_{th}\) is the threshold of communication interactions. When the communication interactions between evaluation node and evaluated node are higher than the threshold \(COM_{th}\), the weight factor becomes much more and the integrated trust value is more dependent on the direct trust value. Otherwise, the communication interactions between neighbor nodes are too small; it is difficult to decide whether the evaluated node is good or bad, and the integrated trust value is more dependent on the indirect trust value. We can dynamically adjust the importance of direct trust and indirect trust according to the dynamic weight factor function.

In the process of the integrated trust quantitative calculation, we introduce a dynamic balance weight factor to solve the weight problem of direct trust and indirect trust. The balance weight is changed dynamically with the number of communication interactions, which reflects the dynamic adaptability of the trust computing.


5.5. The Update of the Direct Trust

In our proposed model, we use a sliding time window to update the trust value, which can reflect the extent of variation of the trust value in a particular time interval.

The sliding time window is used to update the direct trust value. It consists of several time slots; each slot is a cycle time. Only interactive records within the sliding time windows are valid. We define the length of sliding window as \(m\), which reflects evaluator's emphasis on historical records. As Figure 3 shows, each sliding time window is divided into \(m\) slots from left to right. The update process of the trust value can be shown as \(T_{1}, T_{2},...,T_{m-1},T_{m}\); \(T_{2}, T_{3},...,T_{m},T_{m+1}\); \(T_{3}, T_{4},...,T_{m+1},T_{m+2}\). However, it is intuitive that old historical record has less contribution and new historical record has more influence on trust decision. We give an update mechanism using a sliding time window based on induced ordered weighted averaging operator (IOWA) to solve the problem of trust update. We use the IOWA operator to obtain the weight of each time window, which can give more accurate evaluation of the direct trust in DTEM.

Figure 3 The sliding time window.

IOWA is defined as follows: assume \(\langle v_1, a_1 \rangle, \langle v_2, a_2 \rangle,...,\langle v_m, a_m \rangle\) is two-dimensional array for \(m\), and

\(f_{W}\left(\left\langle v_{1}, a_{1}\right\rangle,\left\langle v_{2}, a_{2}\right\rangle, \ldots,\left\langle v_{m}, a_{m}\right\rangle\right)= \displaystyle \sum_{i=1}^{m} w_{i}^{*} a_{v-\operatorname{index}(i)}\)

The function \(fw\) is called the \(m\)-dimensional induced ordered weighted averaging operator generated by \(v_1, v_2,...,v_m\), abbreviated as IOWA operator, and \(v-index(i)\) is the index of the \(v_1, v_2,..., v_i,..., v_m\) in the order from large to small ones. \(W = (w_1^\ast, w_2^\ast,... w_m^\ast)^T\) is the ordered weighted vector of IOWA and satisfies \(\sum_{i=1}^m w_i^\ast = 1, 0 \leq w_i\ast \leq 1, i = 1,2,..., m\).

From, we can know that the value of \(a_1,a_2,...,a_m\) corresponds to the order in which the induced values of \(v_1,v_2,...,v_m\) in descending sorting are ordered weighted averages; the weight coefficient \(w_i^\ast\) has nothing to do with the size and position of \(a_i\) but is related to the location of the induced value \(v_i\). Hence, the model can be used to sort the historical trust value according to the time of occurrence, and the sliding time window is used as the induced value of the IOWA operator, and the IOWA operator is completely used to update the trust value.

In accordance with the occurrence time, the trust evaluation sequence of nodes \(i\) on the node \(j\) is expressed as follows: \(T = {T_1, T_1,...,T_t,...,T_m}, 0 \leq T_t \leq 1, 1 \leq t \leq m\), in which \(T\) is the trust evaluation sequence based on the sliding time window. Each value corresponds to a child window, and the time parameter is added to each of the \(T\) elements: \(\langle t_1, T_1 \rangle, \langle t_2, T_2\rangle,..., \langle t_m, T_m\rangle\), and the two-dimensional trust sequence is defined as the induced value based on the time sliding window. The trust update depends on both real-time and historical windows to complete the updating operation. It means that we know \(\langle t_1, T_1 \rangle, \langle t_2, T_2\rangle,..., \langle t_m, T_m\rangle\), obtaining \(\langle t_{m+1}, T_{m+1}\rangle\), and this is what IOWA can solve. The definition can be expressed as

\(T_{m+1}=f_{W}\left(\left\langle t_{1}, T_{1}\right\rangle,\left\langle t_{2}, T_{2}\right\rangle, \ldots,\left\langle t_{m}, T_{m}\right\rangle\right)=\displaystyle \sum_{i=1}^{m} w_{i}^{*} T_{v-\operatorname{index}(i)}\)

where \(w_{i}^{*}\) represents the importance of the trust value of the \(i\)th child window, and \(\sum_{i=1}^{m} w_{i}^{*}=1,0 \leq w_{i}^{*} \leq 1, i=1,2, \ldots, m\). So the ordered weighted vector \(W^{*} = (w_{1}^{*} w_{2}^{*},..., w_{m}^{*})^{T}\) is \(T's\) weight; the key problem of the updating mechanism of trust model is how to find the classification weight of each window.

Let \(W^{*} = (w_{1}^{*}, w_{2}^{*},..., w_{m}^{*})^{T}\) be the ordered weighted vector of any IOWA operator. The perfect method of the weighted vector is based on the maximum degree of dispersion, which can make full use of all the data information under given and/or degree. We can get the weight vector as follows:

\(\begin{array}{l}

\alpha=\text { Orness }\left(W^{*}\right)=\frac{1}{m-1} \displaystyle \sum_{i=1}^{m}(m-i) w_{i}^{*}, \\

w_{j}^{*}=\sqrt[m-1]{w_{1}^{* m-j} w_{m}^{* j-1}}, \quad 2 \leq j \leq m, \\

w_{1}^{*}\left[(m-1) \alpha+1-m w_{1}^{*}\right]^{m} \\

\quad=[(m-1) \alpha]^{m-1}\left[((m-1) \alpha-m) w_{1}^{*}+1\right], \\

w_{m}^{*}=\frac{((m-1) \alpha-m) w_{1}^{*}+1}{(m-1) \alpha+1-m w_{1}^{*}}

\end{array}\)

In addition, the relationship of trust has time decay. In the trust sequence of \(\langle t_{1}, T_{1} \rangle, \langle t_{2}, T_{2} \rangle ,..., \langle t_{m}, T_{m} \rangle\), the element of \(\langle t_{m}, T_{m}\rangle\) has the greatest influence on \(\langle t_{m+1}, T_{m+1}\rangle\), and the longer the time, the smaller the influence on trust decision. In, we can know that the calculation of the weight coefficient vector is mainly determined by two parameters: the parameters \(\alpha\) and the number of interactive history windows \(m\). According to the literature, we know that when \(\alpha \in [0.5, 1]\), the distribution of the weight coefficients satisfies the characteristic of time decay. The corresponding weight sequences in different \(m\) and \(\alpha\) are shown in Table 1. It can be seen from Table 1 that the value of the parameter \(\alpha\) reflects the forgetting degree of the history interactive experience in trust model. When \(\alpha\) is larger, the historical experience is easier to forget. And if \(\alpha = 1\), the previous history is completely forgotten. So, we can dynamically adjust \(\alpha\) to meet the different needs of the trust model. The value of parameter \(m\) responds to the number of windows of historical experience. When \(m\) is larger, the trust value is obtained more accurately. But it requires more energy consumption and storage space. So, the determined parameter \(m\) requires a combination of the actual demand and considers the restriction of WSNs in accordance with the requirements definition.


Table 1

The weight sequence in different m and α.


α = 0.5 α = 0.6 α = 0.7 α = 0.8 α = 0.9 α = 1
m = 3 {0.3333, 0.3333,<br>0.3333} {0.2384, 0.3233, 0.4384} {0.1540, 0.2921, 0.5540} {0.0819, 0.2363, 0.5540} {0.0263, 0.1474, 0.8263} {0.0, 0.0, 1.0}
m = 4 {0.25, 0.25, 0.25,<br>0.25} {0.1671, 0.2133, 0.2722, 0.3<br>474} {0.0984, 0.1647, 0.2756, 0.4<br>614} {0.0450, 0.1065, 0.2520, 0.<br>5965} {0.0103, 0.0434, 0.1821, 0.<br>7641} {0.0, 0.0, 0.0 1.0}
m = 5 {0.2, 0.2, 0.2, 0.2, <br>0.2} {0.1278, 0.1566, 0.1920,<br>0.2353, 0.2884} {0.0706, 0.1086, 0.1672,<br>0.2574, 0.3962} {0.0290, 0.0599, 0.1240,<br>0.2565, 0.5307} {0.0051, 0.0175, 0.0602, <br>0.2068, 0.7105} {0.0, 0.0, 0.0 0.0 1.0}