With the rapid development of global industry, photovoltaic (PV) power generation has become a research hotspot for new energy applications. Due to the limitations of the environment, the output power of PV power generation is random and fluctuating, and if directly connected to the grid, it will have a greater impact on the stability of the microgrid and power quality. The global maximum power tracking algorithm is constructed by combining artificial intelligence algorithm to track the maximum power point of PV output; based on the operating characteristics of both battery and supercapacitor, the two-stage power allocation control strategy based on fuzzy control algorithm is put forward, which improves the dynamic response speed of the system and ensures the cycle life of the system at the same time. The effectiveness of the strategy is verified by building a simulation model through Simulink.