## 1 Introduction  
The smart grid integrates various advanced technologies such as information technology, communication technology, and control technology to achieve intelligent management of the power system. With the help of high-quality power support by the smart grid, \"Eastern Data Western Calculation\" has become a reality to achieve flow across domains of data elements [1]. Smart grids are reforming towards utilizing massive data for operations and services. To this end, the existing infrastructure of the smart grid will be fully integrated with the new digital infrastructure. The emerging converged communication network of smart grid and computing first network will be the key to promoting the \"Eastern Data Western Calculation\". In the future, the smart grid will fully integrate and support the development of computing power while ensuring the transmission of electricity [2]. With the surging of artificial intelligence (AI) services (e.g., data analysis and model training), a large amount of AI data has been highly dependent on the computing first network of the smart grid. Specifically, these technologies make the smart grid suitable for many potential applications, such as industrial automation, augmented reality, real-time traffic control, smart homes, and data processing [3]. However, the model training of AI services usually requires high storage and computational resources. It is difficult to store and process massive data from a large amount of AI services in one centralized data center. Recently, distributed model training based on data parallelism effectively alleviates enormous computational and bandwidth pressures caused by computationally intensive AI services (e.g., Probabilistic Latent Semantic Analysis and Federal Learning) [4]. Edge computing can serve as an effective solution to execute distributed model training for AI services among different edge data centers in a collaborative manner. To this end, edge computing first network (ECFN) enabled smart grid has emerged [5]. It can not only provide low latency and efficient model training for AI service, but also can significantly reduce data storage and transmission costs for computational resource suppliers, thereby saving a lot of operating and maintenance costs. Notably, edge data centers in the ECFN-enabled smart grid are often deployed near users by operators and private organizations or individuals, such as third-party suppliers, idle computing resources of government and enterprises, and personal advanced edge data centers. From the economic perspective, due to the fact that most computing resource suppliers pay economic costs on investment and maintenance of edge data centers, most edge data centers care more about their own interests and may not be willing to share their own resources to support AI services. Without an incentive strategy to encourage edge data centers for resource sharing or an optimal resource scheduling strategy, it is difficult to achieve efficient collaboration among different selfish edge data centers to support AI services. Moreover, ubiquitous computational resources in the ECFN-enabled smart grid also cannot be fully scheduled, resulting in inefficient resource utilization. How to provide a principle of fair competition and promote willingness for collaboration among edge data centers of different suppliers become a crucial issue. In this paper, we mainly investigate the dynamic, collaborative computational resource scheduling based on distributed data parallelism for AI services in ECFN of smart grids. A MILP model and a DRL-based algorithm are proposed. Notably, a heuristic algorithm of pricing strategy-based computational resource scheduling algorithm is utilized in the DRL-based algorithm so as to reduce space action and facilitate the model training efficiency. The current work can be applied to the daily operation and maintenance process of the State Grid, especially when there is an imbalance in computing power in the smart grid.