Research Article

GT-Bidding: Group Trust Model of P2P Network Based on Bidding

Algorithm 2

Selection of guarantee service peer.
Input: sequence of service peer {Service}, request peer Ri, and its group id Gi
Output: a set of guarantee sequence for each service peer
(1)for each Sj ⊆ {Service}
(2)if (Gi =  = Gj) //Gi is the group of Ri
(3)    ⟵ formulas (1) and (2)
(4)else
(5)    ⟵ formulas (4) and (5)
(6)end if
(7)if () //α is the threshold of trust
(8)  {
(9)    ⟶ Application (Sj|Gj, Ri|Gi)
(10)    ⟶ Response () // is the guarantee peer
(11)   if (RGR > β) //β is the threshold
(12)    Notify (Sj|Gj, )
(13)   else
(14)    break
(15)   end if
(16)  }
(17)  end if
(18)end for