With the increasing demand for electricity, microgrid systems are facing issues such as insufficient backup capacity, frequent load switching, and frequent malfunctions, making research on microgrid resilience crucial, especially to improve system power supply reliability. This paper proposes a method for analyzing the resilience metric of new energy grid-connected microgrid system, and proposes optimization strategies to improve resilience. Firstly, a measurement method for the resilience of the microgrid system is established based on the operating characteristics of the system components. Secondly, the sensitivity relationship between system resilience and parameters is established, and an optimization model for resilience improvement strategies of microgrid systems based on parameter sensitivity is constructed. Finally, simulation verification is conducted based on the IEEE 37-node microgrid system. The results show that the proposed measurement method can scientifically and reasonably measure the resilience of the microgrid system, and the resilience improvement strategy significantly improves the operational resilience, verifying the effectiveness and robustness of the proposed analysis method.