## 1 Introduction  
In recent years, with the rapid development of China's economy, energy consumption has increased, and traditional energy sources have faced huge challenges. At the same time, the smog problem has attracted increasing attention, and clean energy technologies have been valued. Photovoltaic power generation has undergone many years of development, progressing from centralized to distributed approaches, and is already a relatively mature power generation technology. With the continuous increase of installed capacity of distributed photovoltaic power generation in recent years, photovoltaic power generation has become a large-scale, decentralized feature, and many distributed photovoltaic power generators have been connected to the grid at low voltage. However, further research is required on their safety, stability, reliability, and dissipation. Microgrid systems have become a better solution to the energy supply problem in rural areas [1, 2]. With more than one billion people living in rural areas around the world, the issue of energy supply in rural areas needs more attention [3, 4]. Nearly 600 million people in China live in rural areas. In order to meet the clean energy supply needs of rural communities in western China, renewable energy-based microgrid systems have been widely used. Combined photovoltaic and energy storage microgrid systems can well solve the problem of clean energy supply in rural communities. At the same time, electric heating is used instead of coal-fired heating to achieve clean heating in rural communities. Numerous scholars have conducted significant research into energy management of photovoltaic storage microgrid systems. Generally, these systems are divided into two types: grid-connected [5] and off-grid [6]. Reference [7] focused on the PV and storage microgrid system and studied a multi-objective optimal scheduling algorithm that comprehensively considered battery cost and carbon emissions. The algorithm was also applied to microgrids with hybrid renewable generators to solve complex power management problems. Reference [8] investigated the dynamic power optimization control strategy of multiple independent distributed PV and storage systems in microgrids, and applied RTDS simulation to verify the correctness of the theory. The authors of [9] studied the dynamic power optimization strategy of distributed energy storage systems. The distributed energy storage units in the system included EV modules. Reference [10] studied the energy management algorithm of the PV and storage microgrid system based on photovoltaic power generation and load power prediction. The algorithm helped the microgrid system run more stably and reliably. In the research of rural community microgrids, the literature [11; 12] discusses the architecture of rural community microgrid systems in some countries and the specific design methods of these community microgrids. Reference [13] proposed a microgrid energy management system (EMS) to achieve optimal management of isolated rural microgrids. Reference [14] presented the improvement of rural social and economic conditions using microgrid systems to solve the problem of power supply. Reference [15] adopted the DC bus microgrid system to solve the problem of clean energy supply in rural communities. The main goal of the control strategy was to improve the penetration rate of renewable energy in the microgrid system. In terms of energy management algorithm verification, reference [16] proposed a layered energy management strategy, verified its own algorithm using a laboratory-level experimental platform, and performed a simplified simulation at a given time scale. Reference [17] used a layered multi-agent EMS structure and proposed solutions for improving the calculation speed of energy management. It also utilized a laboratory-level experimental platform to verify its own algorithm. In the actual demonstration project case, the economy of the battery energy storage system (ESS) is an important constraint.