Energy consumption prediction can help the government to formulate building energy consumption quotas and buildings energy consumption correlation analysis can provide a clear direction for buildings energy conservation and renovation. In the study, the energy consumption data of four types of public buildings in Guangxi in the four quarters of 2021 based on five machine learning models was trained and predicted. The energy consumption data was analyzed for correlation based on two methods of influencing factor correlation analysis. Finally, based on the prediction model and correlation analysis results, suggestions for energy conservation and renovation were given to eight buildings. The results showed that compared to other models, CNN had higher prediction accuracy, and the fitting regression index was generally above 0.95. The season had little impact on the characteristics correlation, but the building type had a significant impact. The electricity consumption had a high correlation with the energy consumption of all types of buildings. Through case analysis, it was concluded that some buildings did not need energy-saving renovation for the time being, while others require multiple phases of energy reduction over several quarters to meet the requirements.