The invention belongs to the technical field of wireless sensor network security, and discloses a trust model based on an isolated forest in UASNs. Firstly, trust items needing to be evaluated are divided into four types including communication trust, data trust, energy trust and environment trust, and particularly, in the data trust calculation process, the similarity between overall data distribution and theoretical data distribution in UASNs is considered besides the difference between a single node and overall data distribution. Due to the fact that environmental noise can influence communication and data transmission between nodes, energy changes are caused, evaluation errors of other trust items can be reduced by increasing environmental trust, and the accuracy of malicious detectionis improved. Then, the four trust items as a trust training set is taken, and a node trust model is established by adopting an isolated forest algorithm; and finally, reliability evaluation is performed on the nodes in the UASNs based on the node trust model, attacks of abnormal nodes and malicious nodes in the UASNs are effectively detected, and network security threats are reduced.