Aiming at the transient peak when the amounts of users appear at the same time in Cloud environment, leading to the QOS of user can not be guaranteed, a heterogeneous resource clustering method based on MPI parallel computing model and SOM is proposed. Firstly, the improved MPI tree hierarchical model is designed, then the resource clustering method based on SOM is defined, in order to improve the accuracy of resource clustering, the PSO algorithm is used to the optimization of SOM parameters and the SOM has a better structure at the initial time; finally, in order to satisfy the QOS need of users, the MPI tree hierarchical structure is applied in SOM clustering algorithm based on PSO, and the specific algorism based on MPI and SOM is proposed. For verifying the method in this paper, the experiment is simulated in the Matlab environment, the experiment shows the method in this paper has the clustering precision 100%, and compared with the other methods, it has the high cluster accuracy and less executing time, therefore, it is a feasible resource clustering method in cloud environment.