Aiming at the problems of multi-factor coupling, significant time series fluctuation and complex transition path constraints in the evolution of energy consumption structure, this paper constructs a computational research framework combining trend prediction and path optimization. By integrating multi-source data such as energy consumption, economic growth, industrial structure, carbon emission constraints and policy variables, a time-series prediction model for the changes in the proportion of coal, oil, natural gas and non-fossil energy is established, and a low-carbon path optimization model considering transition costs, carbon emission reduction effects and energy security is further constructed. On this basis, a joint intelligent solution strategy is introduced to improve the optimization efficiency in complex constraint scenarios. Experimental results show that the prediction accuracy of the proposed model is high, the RMSE is reduced to 0.021, and the MAPE is 3.84%. After optimization, the cumulative carbon emissions are reduced by 13.4% compared with the continuation path, and the proportion of non-fossil energy will increase to 43.0% in 2035. The research results can provide computational support for energy structure adjustment and low-carbon transition decision-making.