Raspiberry pi is an important edge device in edge computing, with some data storage and data analysis computing capabilities, providing user terminals with resources for edge computing, but compared to cloud storage and computing power, computing resources on are extremely limited. At the same time, due to the randomness of the amount of tasks received by the user upload, it is possible that some devices carry a large amount of tasks, while some devices carry fewer tasks, which can cause the problem of uneven load between charging piles. Therefore, we need to take advantage of the collaborative approach to the sharing of computing resources. In this context, this paper introduces a game theory-based edge computing resource allocation algorithm, which achieves the lowest "cost" of each LAN, and makes it meet the energy consumption constraints in the long-term optimization process, and finally achieves load balancing within the network.