This paper proposes a method for optimal allocation of grid-side energy storage considering static security, which is based on stochastic power flow analysis under semi-invariant method. . Advanced energy storage systems (ESS) are critical for mitigating these challenges, with gravity energy storage systems (GESS) emerging as a promising solution due to their scalability, economic viability, and environmental benefits. Firstly,according to the load, wind power and photovoltaic probability model, a system stochastic power flow. . A grid-side power station in Huzhou has become China's first power station utilizing lead-carbon batteries for energy storage. Starting operation in October 2020, the 12MW power station provides system stability for the Huzhou Changxing Power Grid to enhance the capacity of frequency and voltage. . Battery storage power stations store electrical energy in various types of batteries such as lithium-ion, lead-acid, and flow cell batteries. These facilities require efficient operation and management functions, including data collection capabilities, system control, and management capabilities.