Abstract Under the background of dual carbon, a large number of distributed new energy sources are connected to the demand side, which leads to great risks in the operation of the power system. As an effective solution, distributed power transaction still has problems, such as high clearing time, unknown low-voltage distribution network structure, and resource scheduling ignoring user needs. Therefore, this paper proposes an optimal regulation method of demand-side resources based on distributed transactions. Based on the historical operation data of the distribution network, the eXtreme Gradient Boosting (XGBoost) algorithm is used to study the relationship between node injection power, node voltage, and node-side line power flow. It is also used to check the results of distributed transactions and design a market mechanism for rapid clearing and settlement of distributed transactions. The results of an example show that the identification of power flow distribution in a distribution network based on reinforcement learning can meet the security check requirements of distributed transaction results.