## 4 Proposed Trust-Based Optimized Reporting Scheme
### Trust Calculation Mechanism
#### 4.2.2 Direct Trust  
When a source node (trustor) interacts with its immediate neighbor nodes (trustees) in the network, the direct trust can be calculated using [26] through a consideration of energy-related parameters. The direct trust NT\({}_{\text{d}}\) is calculated by the combination of energy, unselfishness, honesty, and dishonesty trust values, as shown in (1):  
\[\text{NT}_{\text{d}}=\text{T}_{\text{e}}+\text{T}_{\text{u}}+\text{T}_{\text {h}}-\text{T}_{\text{dh}}, \tag{1}\]  
where NT\({}_{\text{d}}\) refers to the direct trust, T\({}_{\text{e}}\) is the energy trust value, T\({}_{\text{u}}\) is the unselfishness trust value, T\({}_{\text{h}}\) is the honesty trust value, and T\({}_{\text{dh}}\) is the dishonesty trust value. The trust value \(\rm T_{e}\) refers to the residual energy of the specific node in the network. It can be calculated by subtracting the current energy \(\rm E_{c}\) of the node from its initial energy \(\rm E_{i}\), as in (2). \[\rm T_{e}=E_{i}+E_{c}. \tag{2}\]  
The trust value of unselfishness \(\rm T_{u}\) can be computed using the trust value for energy and the number of successful tasks (STs) out of a total \"n\" communication, as shown in (3). \[\rm T_{u}=T_{e}\times ST. \tag{3}\]  
Both of the energy-aware parameters, i.e., energy (\(\rm T_{e}\)) and unselfishness (\(\rm T_{u}\)), are significant in evaluating the trustworthiness of nodes in communication in the network. This approach is designed to minimize energy consumption during trust evaluations, contributing to overall cost efficiency. As illustrated in Figure 2, node A would exhibit a lower trust value for unselfishness toward node B if node B fails to respond to pending tasks despite having sufficient energy. This energy-centric approach ensures that the trustworthiness assessment incorporates considerations for the nodes' energy reserves and responsiveness, promoting an energy-efficient trust calculation mechanism within the IoT network. Conversely, if node B responds to pending tasks from node A with nominal energy, node A would assign a higher trust value for unselfishness to node B. Additionally, node A calculates the trust values for honesty (\(\rm T_{h}\)) and dishonesty (\(\rm T_{dh}\)) for node B based on the number of successful tasks (STs) or unsuccessful tasks (UTs) completed by node B. Equations (4) and (5) describe the honesty and dishonesty parameters more precisely. \[\rm T_{h}=\frac{ST}{ST+UT}. \tag{4}\]  
\[\rm T_{dh}=\frac{UT}{ST+UT}. \tag{5}\]  
Trust value for honesty (\(\rm T_{h}\)) is computed by dividing the number of successful tasks by the total number of tasks. Similarly, the trust value for dishonesty (\(\rm T_{dh}\)) is evaluated by dividing the number of unsuccessful tasks by the total number of tasks. The direct trust (\(\rm NT_{d}\)) of each node would be higher if the trust value for \(\rm T_{h}\) and the trust value for \(\rm T_{dh}\) is low, and vice versa. Algorithm 1 computes the direct trust (\(\rm NT_{d}\)) for a target node based on its trustworthiness regarding energy, unselfishness, honesty, and dishonesty. It checks if the target  
Figure 2: Direct trust calculation: node A assesses node B’s trustworthiness. node is an immediate neighbor and verifies the existence of trust values associated with it. If absent, \(\rm NT_{d}\) is calculated using formulas involving energy (\(\rm T_{e}\)), unselfishness (\(\rm T_{u}\)), honesty (\(\rm T_{h}\)), and dishonesty (\(\rm T_{dh}\)). The algorithm keeps track of the cumulative direct trust values (\(\rm NT_{d}\)) for each node ID and counts the computations conducted for individual nodes. Once \(\rm NT_{d}\) is calculated, it updates the direct trust values using a mechanism that prioritizes recent assessments over older ones. Ultimately, this algorithm assesses the direct trustworthiness of a target node within the network based on specific trust parameters, employing a system that values recent evaluations.