In the context of the metaverse, user data privacy protection has become an important issue. In this paper, firstly, a user data privacy leakage risk assessment scheme is designed by attribute sensitivity calculation, attribute similarity calculation, and attribute association calculation. Then a data privacy protection algorithm based on differential privacy is proposed, and the differential privacy data protection algorithm and implementation mechanism are described. Finally, the performance of the differential privacy protection algorithm is evaluated by analyzing the learning performance and protection performance of the algorithm. The results show that the learning performance of the differential privacy protection model decreases with increasing