To optimise the scheduling model for the integrated energy system (IES), the paper proposes to introduce the combined cooling, heating, and power generation system into it, and proposes a reverse learning mechanism to improve the whale optimisation algorithm (WOA). The improved-algorithm optimized the comprehensive energy system of the cogeneration system. According to the results, the WOA converges in the 200th iteration with the reverse learning mechanism, while the original algorithm takes 400 iterations to converge. To introduce the carbon trading mechanism (CTM), it could cut down the operating costs and carbon emissions of the model. The lowest operating cost of introducing traditional CTMs is 1,889 yuan. The introduction of a tiered CTM resulted in the lowest carbon emissions of 2.15 t. To reduce operating costs, it is advisable to account for carbon emissions from electric energy storage (EES) equipment, especially before the carbon trading price reaches 102 yuan/t. After 102 yuan/t, calculating the carbon emissions of EES equipment can reduce operating costs. The model established through research does not link the carbon trading market with the electricity market, and can further explore the connections between the two markets. Further achieving the dual goals of low cost and low-carbon emissions provides strong support for achieving a green and low-carbon comprehensive energy system.