To address the issue that limited edge resources of the existing Edge Server Providers (ESPs) reduce the Quality of Service (QoS)of hierarchical federated learning edge nodes, a dynamic Edge Federated Framework (EFF)was proposed by considering the potential edge federation probability among edge servers. In the proposed framework, different ESPs cooperated to provide additional edge resources for hierarchical federated learning, which suffered from reduced model training efficiency due to client heterogeneity or Non-Independent and Identically Distributed (Non-IID)data. Firstly, decisions were offloaded by quantifying the communication model, and offloading tasks were assigned to the edge servers of other ESPs within the framework, so as to meet the elastic demand of edge resources. Secondly, the Multi-round Iterative EFF Participation Strategy (MIEPS)algorithm was used to solve the evolutionary game equilibrium solution among ESPs, thereby finding an appropriate resource allocation strategy. Finally, the existence, uniqueness, and stability of the equilibrium point were validated through theoretical and simulation experiments. Experimental results show that compared to non-federation and pairwise federation strategies, the tripartite EFF constructed using MIEPS algorithm improves the prediction accuracy of the global model trained on Independent and Identically Distributed (IID) datasets by 1.5 and 1.0 percentage points, respectively, and the prediction accuracy based on Non-IID datasets by 2.1 and 0.7 percentage points, respectively. Additionally, by changing the resource allocation method of ESP, it is validated that EFF can distribute the rewards of ESP fairly, encouraging more ESPs to participate and forming a positive cooperation environment.