At present, the social economy is entering the information age represented by computer, communication technology and network technology as the core, and the continuous development of modern information technology will certainly have a great impact on the teaching mode, content and methods of traditional accounting computerization. We aim to improve the existing higher vocational accounting teaching mode by building a multi-integrated teaching mode through federated learning based on 5G communication network as an environment for efficient information transfer. In addition, we develop a joint optimization strategy for priority-dependent task offloading, wireless bandwidth, and computational power in a distributed machine learning approach to ensure that more resources are allocated to users with higher priority while protecting user data privacy and reducing learning overhead. We have conducted extensive simulation experiments for both environments, and these simulation results demonstrate the effectiveness of our proposed solutions for different problems from different perspectives.