With the large-scale penetration of distributed generation (DG), the volatility problems of active distribution networks (ADNs) have become more prominent, which can no longer be met by traditional regulation means and need to be regulated by introducing flexible resources. Soft open points (SOP) and energy storage systems (ESS) can regulate the tidal currents on spatial and temporal scales, respectively, to improve the flexibility of ADN. To this end, in-depth consideration of DG admission is given to establish flexibility assessment indicators from the power side of ADN. The conditional deep convolution generative adversarial network (C-DCGAN) is used to generate the output scenario of DG. On this basis, the SOP and ESS two-layer planning models, which take account of the potential for improvement in the flexibility of ADN, are constructed. Among them, the upper layer is the site selection and volume determination layer, which considers the economy of the system with the optimization objective of minimizing the annual integrated cost; the lower layer is the operation optimization layer, which considers the flexibility of the system and takes the highest average daily flexibility level as the optimization objective. The planning model is solved using genetic algorithm-particle swarm optimization (GA-PSO) and second-order cone programming (SOCP). The case analysis verifies the rationality and effectiveness of the planning model.