To improve the safety of e-commerce based on web service
a decentralized trust and reputation model is proposed.Only function expansion is to be done for implementing this model on general web service architecture.A new well registered web service can obtain opportunities by improving the initial approach of the trust and reputation value.According to the transaction condition of the web service
the trust and reputation values mainly come from different key sources in different stages.Considering the transaction amount and the time factor in other user recommending can resist collusion groups fraud behavior.Simulation results show that the proposed trust and reputation model can meet the design purpose.