In response to the contradiction between the sharp increase in flexible demand and the scarcity of flexible resources in the power system,the electricity market bidding trading mechanism has become an effec-tive balance solution.Double-layer optimization model is established in the article that considers the participa-tion of load aggregators in demand side flexible resource trading.When the flexible resources on the power sup-ply side cannot meet the safe and economic operation of the power grid,the upper level model,under the con-straints of power supply guarantee and new energy consumption guarantee,aims to minimize the cost of utilizing flexible resources on the demand side,and obtains the demand side flexibility demand.The lower level model,while meeting the flexibility resource shortage of the upper level model,takes the maximum total revenue of the load aggregator as the objective function,obtains the aggregation response potential of the load aggregator based on reducible and transferable loads,and participates in the optimization of centralized bidding and unified clear-ing in the electricity market.Finally,simulation analysis was conducted based on provincial power grid data with a high proportion of new energy access.The results show that the proposed two-layer optimization model can meet the demand for flexible resources while improving the revenue of load aggregators.