Dirichlet Distribution Based Trust Model for Malicious Node Detection in Wireless Sensor Network