In the context of the construction of a clean and low-carbon distribution network with large-scale photovoltaic access, in order to realize the coordinated operation of distributed photovoltaics, loads, energy storage equipment and the grid, and to improve the carbon emission reduction capacity of the distribution network. Aiming at the uncertainty of photovoltaic output and load demand, an optimal configuration model for the composite energy storage system of the distribution network is proposed in this paper. First of all, this paper analyzes the characteristics of photovoltaic and load in the distribution network, and establishes the uncertainty model of photovoltaic output and load demand;Then, with the goal of minimizing the comprehensive cost of the composite energy storage system, the maximum carbon emissions, the best smoothing effect of photovoltaic power fluctuations, and the maximum energy utilization efficiency, this paper builds and solves the optimal configuration model of the composite energy storage system of the distribution network based on the probability of opportunity constraint IGDT; Finally, the effectiveness of the optimal configuration model of the composite energy storage system proposed in this paper is verified by a simulation example.