With the proposal of "dual-carbon" goal in China,the decarbonization of energy consumption in public buildings has become a key research area,in which optimizing the scheduling strategy for energy supply systems based on the prediction results of hot and cold loads is an effective technological means to achieve the "on-demand energy supply". A hot and cold load prediction model for public buildings is constructed based on the thermal resistance method. According to the load prediction results,control optimization is performed on the parameters of an energy supply system by improved particle swarm algorithm(PSO), with the objectives of minimizing operating costs,reducing environmental costs and prolonging the service life of units. After iterative optimization on the parameters including the load of the combined cold-heat-power supply system, temperatures and flow rates of supply and return water, openings of valves and number of operating pump units, an optimal operation strategy under all operation conditions is proposed. A public building taking the proposed optimal operation strategy to update its heating system can reduce the power consumption of pump units by 10.66% and cut the operating cost by 21.52%, while meeting the heating demand of the building, balancing the hydraulic conditions and extending the operating life of the units. The consistency of the test results and the theoretical data proves the feasibility and effectiveness of the method proposed,providing an effective reference for on-demand heat supply and energy-saving operation of public buildings.