# Privacy-Preserving Data Aggregation with Dynamic Billing in Fog-Based Smart Grid
## 1 Introduction  
As one of the typical application scenarios in smart cities [1], the smart grid (SG) aims to solve the problems of low reliability, frequent power outages and high carbon emissions of traditional power grids by integrating various modern emerging technologies [2, 3]. Smart meters (SMs) are the core component of the SG. They can generate real-time electricity consumption data of users and periodically (e.g., every 15 min [4]) report the data to the service provider (SP) [5], who can analyse the data to anticipate electricity demands and adjust electricity generation and distribution [6]. Such a mechanism can significantly improve the reliability, flexibility and efficiency of the power system, thereby providing higher-quality services to users [7]. Since the number of SMs in grid-covered areas is exploding [8], and the real-time electricity consumption data generated by SMs have the characteristics of being high volume, velocity as well as variety [9], transmitting large amounts of data directly to the SP imposes heavy computational and communication-related burden on the system. Meanwhile, the SP may not be able to process the massive amount of data in time [10], thus inducing network latency, which is impractical for delay-sensitive SG applications. To address latency and bandwidth issues during data analysis, there have been attempts to introduce fog computing (FC) into the SG [5, 6, 10, 11, 12, 13, 14]. FC has attracted great attention since CISCO [15] proposed the concept in 2012. As a supplement to the cloud computing model, FC enables users to realize computation, communication and storage locally by extending computing power to the network edge [16]. Moreover, FC has advantages over cloud computing, such as low latency and location awareness [17], which satisfies the delay-sensitive demand of SG applications and can improve the real-time performance and quality of service of the SG system [8]. Considering the promotion of FC for the sustainable development of SG, introducing FC into the SG is a current hot topic. In fog computing-based smart grid (FCSG), fog nodes (FNs) deployed at the edge of the network are responsible for collecting all users' electricity consumption data in their coverage area, then aggregating and forwarding these data to the SP [5]. This type of architecture relieves much of the burden on the SP [18] and achieves lower network latency and higher bandwidth. Although the FCSG is promising, it still faces serious challenges in terms of security and privacy [12], such as learned personal patterns, energy theft and impersonation [19], etc. Specifically, adversaries can infer the lifestyles and behavioural habits of users by analysing their real-time electricity consumption data to carry out some improper activities [20]. Furthermore, adversaries can also tamper with and forge users' electricity consumption data, thus threatening the stability of the SG [13]. For instance, network attacks launched by malicious adversaries caused the most significant blackout of electricity in Ukrainian history in 2015 [21]. Thus, protecting electricity consumption data has great practical importance. How to improve efficiency and performance while ensuring the security of electricity consumption data has attracted a lot of attention from both academia and industry, and many privacy-preserving schemes have been proposed. However, existing privacy-preserving schemes rarely consider dynamic billing. In the traditional grid, SP generally charges users based on fixed prices [22]. However, such billing methods cannot reflect the relationship between electricity supply and demand, and the SP is thus unable to make timely adjustments when electricity demand fluctuates, resulting in a huge waste of resources [23]. With the rapid development of SG, a real-time-prices-based billing strategy is proposed, which can guide users to adjust their consumption patterns according to dynamically changing prices and improve the efficiency of resource utilization [24].