This study integrates machine learning and optimization algorithms to manage data center energy consumption.It utilizes Long Short-Term Memory(LSTM)models for energy prediction and Particle Swarm Optimization(PSO)for optimizing resource allocation.Experimental results demonstrate significant reductions in data center energy consumption post-optimization,with effective control over average CPU utilization and internal temperatures,resulting in substantial cost savings.The intelligent management approach proposed in this study offers a feasible solution for enhancing resource efficiency and reducing operational costs in data center energy management.