The rapid economic progress and widespread use of sophisticated technology elevate the output value per kWh of electricity consumed, underscoring the paramount importance of maintaining an uninterrupted and dependable power supply to avoid substantial economic losses for consumers and society. Investigating the reliability of urban distribution systems emerges not only as a pivotal factor in enhancing power supply quality but also as a cornerstone of electric power modernization, significantly impacting production, technology, and management within the industry while bolstering its economic and social benefits. This study adopts a multifaceted approach: firstly, establishing a methodology for grid-side storage capacity distribution to mitigate substation load factors and implement peak shaving, thereby minimizing load discrepancies. Secondly, it develops a mathematical model encompassing diverse user distributions, employing analytical techniques to derive reliability indices and optimal segment numbers tailored to different user distributions. The research proposes segment optimization based on user distributions, considering both economic viability and reliability, showcasing an interdisciplinary amalgamation of combinatorial principles and scientific computing methodologies. This approach aims to optimize segment distribution, enhancing the reliability and economic feasibility of urban distribution networks through advanced mathematical and computational techniques.