## 3 Key Technologies in Trust Management for WSNs
### Trust Evaluation Methods
#### Weighted Average  
Most of the reviewed models [2; 5; 14; 17; 18; 28; 38; 40; 41; 45] update the trust value using the weighted average method, as shown in Equation (23):  
\[T(t)=\theta\cdot T(t-1)+(1-\theta)\cdot T(t) \tag{23}\]  
where \(\theta\) is the aging factor, \(T(t-1)\) is the trust value of a particular node in the \((t-1)^{th}\) period, and \(T(t)\) is the trust value of a particular node in the \(t^{th}\) period. [PERSON] and [PERSON] [3] considered the number of successful and unsuccessful interactions in the current evaluation period to update trust values. When both the number of successful and the number of unsuccessful interactions are greater than 0, the above weighted average algorithm is used. When the number of unsuccessful interactions is 0 and the number of successful interactions exceeds the threshold, the trust value is updated to the maximum value. When the number of successful interactions is 0, the trust value is updated to the minimum value. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Models** & **Methods** & **Comparison** \\ \hline
[2; 3; 5; 14; 17; 18; 28; 29; 38; 40; 41; 45] & Weighted average & Do not consider poor past performance \\
[10] & Improved weighted & Consider poor past \\
[30; 33; 39] & Time lapse factor & De not consider poor past performance \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Classification and comparison of trust value update methods. [PERSON] et al. [29] considered the trust values of the previous two consecutive periods of trust value updates, as shown in Equation (24). \[TT(n)=(\mu_{n-1}\cdot TT(n-1)+\mu_{n}\cdot\text{CT}(t))+(\mu_{n-2}TT(n-2)+\mu_{n- 1}\text{CT}(n-1))/2 \tag{24}\]  
where \(TT(n)\) represents the total trust value of the \(n^{th}\) evaluation period, \(\text{CT}(t)\) represents the comprehensive trust value of the \(n^{th}\) evaluation period, and \(\theta\) is the aging factor: \(\mu_{n-2}=\theta\), \(\mu_{n-1}=1-\theta\), \(\mu_{n}=2-\theta\). _Improved Weighted Average_  
[PERSON] et al. [10] used an improved trust update mechanism to give more weight to the historical trust value when the current trust value is greater than the historical trust value, as shown in Equation (25):  
\[T(t)= \begin{cases}(1-\alpha)T(t)+\alpha T(t-\Delta t),\;\;if\;T(t)\leq T(t- \Delta t)\\ (1-(\alpha+\beta))T(t)+(\alpha+\beta)T(t-\Delta t),\;\;if\;T(t)>T(t-\Delta t) \end{cases}  \tag{25}\]  
where \(T(t)\) is the new trust value computed for the current window \(\Delta t\) at time \(t\), while \(T(t-\Delta t)\) is the previous trust value calculated in the previous window at time \((t-\Delta t)\). \(\alpha\) is an aging factor, and \(\beta\) is the newly defined aging factor, with \(\alpha+\beta<1\). _Time Lapse Factor_  
[PERSON] et al. [39] used a time lapse function to dynamically balance historical trust values and current trust values. The calculation methods are shown in Equations (26) and (27):  
\[T^{n}=k\cdot ST+(1-k)\cdot T^{n-1} \tag{26}\]  
\[k= \begin{cases}1-\left(\dfrac{t_{n-1}-t_{1}}{t_{n}-t_{1}}\right)^{2},\;\;If\; t_{n}>t_{1}\\ \hskip 142.26378 pt1,\;\;otherwise\end{cases}  \tag{27}\]  
where \(ST\) represents the current trust value, \(T^{n-1}\) represents the previous trust value calculated in the previous window at time \(t_{n-1}\), and \(k\) is the time lapse function. [PERSON] et al. [30] and [PERSON] et al. [33] used a similar method to update trust values, but they replaced the time decay function with a time decay factor specific to the context of their study (underwater scenarios). Among the three methods, only the second method considers the impact of lower historical trust values. This means that nodes with poor past performance should be penalized by limiting the growth rate of their trust values. Therefore, the second method is the most effective one. For example, it can be used to defend against the on-off attack, where the attacking node or nodes evade detection by stopping the attack for a period and then resuming it.