In the context of the"dual carbon"strategy,this paper addresses the optimization of wind-solar-energy storage capacity configuration in microgrids by proposing a dual-layer optimization model.With the overarching ob-jective of maximizing net profit throughout the microgrid's planned lifecycle and considerations related to constraints on carbon emission quotas and transformer capacity on the source side,the model aims to reduce electricity purchas-ing of main grid and lower the overall carbon footprint of the system.On the load side,demand response is intro-duced,and users are guided to modify their electricity consumption patterns under time-of-use pricing,leading to an optimized load curve and improved economic efficiency for the microgrid.The dual-layer optimization model is solved using LINGO,a nonlinear programming tool.Through case studies,the planning outcomes considering differ-ent proportions of transferable and unloadable loads,as well as varying constraints on carbon emission quotas and transformer capacities.The results demonstrate the effectiveness of the proposed model.