The development of integrated energy system in rural areas has great prospects. In response to problems such as redundancy and poor flexibility of traditional integrated energy system, integrated demand response and biogas energy will be introduced to maintain the balance of supply and demand in multiple forms of energy together with energy hub. Establish an energy hub coupling matrix model to study the differences in the form of the coupling matrices for typical villages with different characteristics under different input data. A computerized model of energy hub coupling incidence matrix is proposed. The coupling incidence matrix is quickly formed under various boundary conditions, and then the corresponding coupling matrix is generated, thereby improving the efficiency of calculation and analysis of IES planning and operation. Establish an optimal configuration model of the rural integrated energy system that takes into account the coupling matrix, integrated demand response, biogas and other resources. With the goal of the lowest total cost, make decisions on the configuration plans of the corresponding resources to obtain the optimal configuration scheme. In the case study, multiple sets of initial conditions were set, and the most corresponding optimal configuration schemes were obtained respectively, which verified the effectiveness of the method.