# A Hierarchical Blockchain-Based Trust Measurement Method for Drone Cluster Nodes
## 2 Trust Metric Model of Unmanned Aerial Vehicle Cluster Nodes Based on Hierarchical Blockchain
### A Dynamic Evaluation Method for Drone Node Trust Based on Task Perception
#### 2.2.3 Comprehensive Trust Calculation and Update  
(1) Integrated trust calculation  
The calculation of comprehensive trustworthiness requires the fusion of direct trust and indirect trust. Evaluating a node's trustworthiness involves considering its historical service trust sequence \(T\left(T^{t_{1}},T^{t_{2}},\dots,T^{t_{n}}\right)\), with historical trust records decaying based on dynamic trust factors. Setting the weights of direct trust and recommended trust for a node based on empirical knowledge would introduce subjectivity into the calculation of comprehensive trustworthiness. Information entropy, as a method to measure the utility values of various indicators, can be used to determine the corresponding weights of the indicators to overcome the limitations of empirically determining weights. The calculation of the historical trust value decreases with the increase in time, and the record of the recent trust value can better reflect the cooperation probability of nodes. Therefore, the timeliness of trust should also be taken into account when calculating direct trust. In this paper, the dynamic trust attenuation factors that present the timeliness of trust can be expressed as  
\[FR(\lambda,t_{k})=e^{-\lambda\cdot L(t-t_{k})}, \tag{2}\]  
where \(\lambda\) and \(L(t-t_{k})\) are two independent variables. \(\lambda\) is the rate adjustment factor, and \(0<\lambda\leq 1\). The value of \(\lambda\) can be adjusted according to the specific application scenario. \(L(t-t_{k})\) is the time update function, representing the time elapsed from the occurrence of the \(k\)-th historical trust record to the current time \(t\). \(t_{k}\) denotes the moment when the trust value of the node is evaluated for the \(k\)-th time. The comprehensive trustworthiness value \(T_{j}^{total}\) of node \(j\) is calculated using  
\[T_{j}^{total}=w_{d}\cdot T_{ij}^{d}+w_{re}\cdot T_{ij}^{tr}+\sum_{i=1}^{n}FR( \beta_{i},t_{i})\cdot T^{t_{i}}, \tag{3}\]  
where \(w_{d}\) and \(w_{re}\) are the adaptive weights of direct trust and recommended trust, respectively. where \(H\Big{(}Tij^{d}\Big{)}\) and \(H(Tij^{re})\) are the information entropy of direct trust and recommended trust, respectively. (2) Trust renewal  
When the UAV group reaches the trust update time, the trust record is updated according to the following rules. 1. The evaluation node first calculates the direct trust degree and indirect trust degree of the node to be evaluated. 2. The evaluation node queries the historical trust degree of the node to be evaluated from the first-level blockchain of the trust management area. 3. The evaluation node calculates the comprehensive trust based on direct trust, indirect trust, and historical trust. 4. After evaluating the trust of all surrounding nodes, the trust record is stored in the tier-1 blockchain. 3. Trust calculation process  
The pseudo-code flow of the evaluation algorithm can be expressed as in Algorithm 1.