User behavior clustering analysis has a wide range of applications in business intelligence, information retrieval, and image pattern recognition and fault diagnosis. Most of existing methods of user behavior have some problems such as weak generality and the lack of tags of clustering. With the increasing awareness of privacy protection, user behavior analysis also needs to support for ciphertext to protect user data. Based on clustering algorithm, homomorphic encryption technology and information security, in this paper, we propose a user behavior clustering scheme that supports automatic tags on ciphertext. Firstly, design a security protocol corresponding to the basic operations such as addition, multiplication and comparison and apply to the scheme. Then, the relevant features of the user behavior are merged with the clustering process, the latent factor model, and matrix decomposition. We have implemented our method and evaluated its performance using K-means and K-means++ clustering. The results show that the scheme can auto tags over encrypted data, and the tag also meets the actual situation, which proves the validity and generality of the scheme.