Considering the flexible capacity and privacy needs of numerous flexible energy users in the context of demand response (DR), this study establishes an influence model (IM) to describe the DR participation capabilities of users considering privacy budget. Using the designed Stackelberg game mechanism that can achieve optimal selection for DR responders from users with different characteristics described by IM, a federated learning (FL)-based optimization method that uses differential privacy (DP) as the data transmission mechanism for DR economic optimal dispatch is proposed. Ideas of controlling the number of participating users and financially compensating for the privacy leakage risk by the FL-based optimization method are the guarantees for users with private data to participate in DR. The performance of the proposed optimization method is also compared with that of the Moth-flame optimization algorithm in a case study, and the guiding value of the former in selecting among user groups with different characteristics is then discussed. Results show that the proposed method exhibits good economic benefits and universal applicability.