Cloud-Edge Collaborative and Graph Neural Network Based Load Forecasting for Battery EV Car Charging Stations

With the rapid global adoption of battery EV cars, driven by environmental concerns and technological advancements, the demand for efficient charging infrastructure has surged. Battery EV car charging stations (EVCS) are becoming critical nodes in the power grid, but their fluctuating loads pose significant challenges to grid stability and operational efficiency. Accurate short-term load forecasting for these stations is essential for optimizing energy distribution, preventing overloads, and enhancing user experience. However, traditional forecasting methods often struggle with the high volatility, non-stationarity, and spatial dependencies inherent in battery EV car charging data. Moreover, privacy concerns and computational limitations hinder the collaborative use of data from multiple stations, which could otherwise improve prediction accuracy. In this article, I propose a novel cloud-edge collaborative framework integrated with graph neural networks (GNNs) to address these issues. This approach leverages distributed data while preserving privacy, reduces server burdens, and captures complex spatiotemporal patterns for superior forecasting performance. The framework includes a privacy-preserving module based on embedding transformations, a dynamic graph structure generation method using clustering, and personalized GNN models at the edge. Through extensive experiments on real-world datasets, I demonstrate that this method outperforms existing benchmarks, offering a scalable and secure solution for battery EV car charging load prediction.

The proliferation of battery EV cars is transforming transportation sectors worldwide, with sales accounting for 18% of global car sales in 2023. This growth necessitates robust charging networks, but the unpredictable nature of battery EV car charging behavior—influenced by factors like weather, time of day, and user habits—complicates grid management. Load forecasting for battery EV car charging stations typically involves time-series analysis, but conventional statistical models (e.g., ARIMA) fail to capture nonlinear relationships. Machine learning techniques, such as support vector machines (SVM) and artificial neural networks (ANNs), have shown promise, yet they often ignore spatial correlations between stations. Deep learning models, including recurrent neural networks (RNNs), long short-term memory (LSTM), and gated recurrent units (GRUs), improve temporal modeling but still lack mechanisms to incorporate geographical or topological dependencies. Graph neural networks (GNNs) have emerged as a powerful tool for handling relational data, making them ideal for modeling interactions between battery EV car charging stations. However, GNN-based approaches require graph-structured data, which is often unavailable, and raise privacy issues when aggregating data from multiple sources. Additionally, centralized processing of large-scale battery EV car charging data strains cloud servers and increases latency. To overcome these hurdles, I introduce a cloud-edge collaborative multispatio-temporal enhanced model (CEC-MSTEM) that combines edge computing for local processing with cloud-based graph generation, ensuring privacy protection through embedding-based encryption. This framework not only enhances forecasting accuracy but also supports scalable deployment for the expanding network of battery EV car charging infrastructure.

The core of my method lies in a hybrid architecture where each battery EV car charging station acts as an edge client, while a trusted cloud server orchestrates collaborative learning. Let \( N \) denote the total number of battery EV car charging stations, with historical load data for the \( i \)-th station represented as \( X_i = [x_0, x_1, \ldots, x_t] \in \mathbb{R}^t \), where \( t \) is the time span. The aggregated data from all stations is \( X = [X_1, X_2, \ldots, X_N] \). To prepare for forecasting, I segment the data into fixed-length sequences of length \( l \), yielding slices such as \( X_i = [x_0, x_1, \ldots, x_{l-1}], \ldots, [x_{t-l+1}, x_{t-l+2}, \ldots, x_t] \). The cloud-edge framework operates in two main phases: cloud-side graph structure generation and client-side prediction. On the cloud, after receiving encrypted data from edge clients, a privacy-preserving module applies an embedding transformation to reconstruct input data, mitigating privacy risks. The embedding layer consists of two fully connected layers, formulated as:

$$ \tilde{X} = W_2(W_1 X + b_1) + b_2 $$

Here, \( \tilde{X} \) is the embedded representation matrix with the same dimensions as the original input \( X \), \( W_1 \in \mathbb{R}^{n_{\text{hide}} \times l} \) and \( W_2 \in \mathbb{R}^{l \times n_{\text{hide}}} \) are weight matrices, \( n_{\text{hide}} \) is the hidden layer dimension, and \( b_1, b_2 \) are bias vectors. This transformation obscures sensitive battery EV car charging patterns while retaining essential features for downstream tasks. Next, a feature extraction module uses a 1D convolutional layer to capture temporal patterns from the embedded data. The convolution operation for the \( e \)-th embedded sequence is defined as:

$$ (X_e * w)[a] = \sum_{k=0}^{K-1} X_e[a – k] \cdot w[k] $$

where \( w \) is the convolution kernel of size \( K \), and padding is applied to maintain sequence length. The extracted features are then fed into a dynamic graph structure representation generation module, which employs K-Means clustering to group similar battery EV car charging patterns across stations. For a given time period, feature sequences are standardized using z-score normalization: \( X_i^* = (X_i – \mu) / \sigma \), where \( \mu \) and \( \sigma \) are the mean and standard deviation of all samples. Clustering is performed with the Davies–Bouldin index as the loss function to optimize compactness and separation:

$$ L_r = \frac{1}{m} \sum_{y=1}^{m} \max_{z \neq y} \frac{ \frac{1}{n_y} \sum_{p=1}^{n_y} \| x_{y,p} – c_y \|_2 + \frac{1}{n_z} \sum_{q=1}^{n_z} \| x_{z,q} – c_z \|_2 }{ \| c_y – c_z \|_2 } $$

Here, \( m \) is the number of clusters, \( n_y \) and \( n_z \) are sample counts in clusters \( y \) and \( z \), \( x_{y,p} \) and \( x_{z,q} \) are samples, and \( c_y, c_z \) are cluster centroids. The overall loss for cloud training combines reconstruction error and clustering loss: \( L = L_c + L_r \), where \( L_c = \frac{1}{n} \sum_{e=1}^n \| Y_e – \hat{Y}_e \|_2^2 \) is the mean squared error for reconstructing input sequences. The resulting graph structure \( G(V, E) \), with vertices \( V \) as feature sequences and edges \( E \) connecting them, is distributed back to relevant edge clients based on cluster membership.

On the client side, each battery EV car charging station integrates the cloud-provided graph features with local data. A feature aggregation module first extracts local features \( P \) from raw load data using a 1D convolutional layer, then standardizes both local and cloud features \( Q \) using merged statistics: \( P^* = (P – \mu’) / \sigma’ \) and \( Q^* = (Q – \mu’) / \sigma’ \), where \( \mu’ \) and \( \sigma’ \) are the mean and standard deviation of combined samples. The aggregated feature matrix is \( G = P^* \oplus Q^* \), with \( \oplus \) denoting concatenation. This enriched input is passed to a personalized multispatio-temporal enhanced model (MSTEM) for forecasting. The MSTEM combines multi-scale graph learning and temporal enhancement neural networks to capture spatiotemporal dependencies. For multi-scale graph learning, input data is partitioned into different scales: \( X_s = S(X, s) \) for \( s \in S \), where \( S \) is a set of scaling factors. Graph convolution is applied at each scale:

$$ H_s = \sigma \left( B \left( \tilde{D}^{-\frac{1}{2}} \tilde{A} \tilde{D}^{-\frac{1}{2}} X_s W_s^1 \right) \right) $$

$$ R_s = D(H_s^1; p) $$

$$ G_s = \tilde{D}^{-\frac{1}{2}} \tilde{A} \tilde{D}^{-\frac{1}{2}} R_s W_s^2 $$

where \( \tilde{A} \) is the adjacency matrix with self-loops, \( \tilde{D} \) is the degree matrix, \( W_s^1, W_s^2 \) are weight matrices, \( \sigma(\cdot) \) is the ReLU activation, \( B(\cdot) \) is batch normalization, and \( D(\cdot) \) is dropout with probability \( p \). The outputs are combined via element-wise addition: \( G_{\text{out}} = \sum_{s \in S} G_s W_s^L \). Simultaneously, a temporal enhancement neural network with LSTM units models long-term dependencies:

$$ f_t = \sigma(W_f^l \cdot [h_{t-1}, x_t] + b_f^l) $$

$$ r_t = \sigma(W_r^l \cdot [h_{t-1}, x_t] + b_r^l) $$

$$ \tilde{c}_t = \tanh(W_c^l \cdot [h_{t-1}, x_t] + b_c^l) $$

$$ c_t = f_t * c_{t-1} + r_t * \tilde{c}_t $$

$$ o_t = \sigma(W_o^l \cdot [h_{t-1}, x_t] + b_o^l) $$

$$ h_t = o_t * \tanh(c_t) $$

A residual fusion mechanism preserves original signals: \( L_{\text{out}} = \tilde{X}_\eta + (X W^{lo}) \), where \( \tilde{X}_\eta \) is historical load. The final forecast \( Z \) is computed as:

$$ Z = (W_1^{\text{out}} G_{\text{out}}) + (W_2^{\text{out}} h_t) + L_{\text{out}} $$

Predictions are thresholded to set unrealistically low values to zero, reflecting real-world battery EV car charging behavior. This client-side model is trained locally using mean squared error loss and the Adam optimizer, with parameters updated over multiple epochs until convergence.

To evaluate the proposed CEC-MSTEM framework, I conducted experiments on the Perth EV charging dataset, which includes both slow and fast battery EV car charging records. The dataset spans three years, with hourly average load values derived from charging events. For slow charging, there are 3 stations with 34,306 data points each, while fast charging involves 13 stations with 34,313 data points each. Data was split into 70% for training, 20% for validation, and 10% for testing. Input sequences consisted of 24 historical hourly values to predict the next 6 hours, aligning with short-term forecasting needs. The model was implemented using PyTorch on a server with an NVIDIA GeForce RTX 3080 Ti GPU and Intel Xeon Silver 4214R CPU. Cloud-side parameters included an embedding layer with hidden size 32, a 1D convolutional layer with kernel size 9, and clustering numbers set to 2 for slow charging and 4 for fast charging based on the elbow method. Client-side training used a learning rate of 0.01, batch size of 32, and 100 epochs per station. I compared CEC-MSTEM against six benchmark models: LSTM, GRU, DLinear, GCN, STGCN, and the original MSTEM. Performance was assessed using five metrics: mean absolute error (MAE), root mean square error (RMSE), mean squared error (MSE), relative absolute error (RAE), and relative squared error (RSE), defined as:

$$ E_{\text{MA}} = \frac{1}{n} \sum_{e=1}^n | Y_e – \hat{Y}_e | $$

$$ E_{\text{RMS}} = \sqrt{ \frac{1}{n} \sum_{e=1}^n (Y_e – \hat{Y}_e)^2 } $$

$$ E_{\text{MS}} = \frac{1}{n} \sum_{e=1}^n (Y_e – \hat{Y}_e)^2 $$

$$ E_{\text{RA}} = \frac{ \sum_{e=1}^n | Y_e – \hat{Y}_e | }{ \sum_{e=1}^n | Y_e – \bar{Y}_e | } $$

$$ E_{\text{RS}} = \frac{ \sum_{e=1}^n (Y_e – \hat{Y}_e)^2 }{ \sum_{e=1}^n (Y_e – \bar{Y}_e)^2 } $$

where \( Y_e \) is the actual load, \( \hat{Y}_e \) is the predicted load, and \( \bar{Y}_e \) is the mean of predictions. Results for slow and fast battery EV car charging datasets are summarized in Tables 1 and 2, with best values highlighted.

Method MAE (kWh) RMSE (kWh) MSE (kWh²) RAE (%) RSE (%)
LSTM 0.435 1.569 2.462 0.764 1.040
GRU 0.436 1.569 2.462 0.765 1.040
DLinear 0.386 1.393 1.940 0.719 0.923
GCN 0.435 1.570 2.464 0.764 1.040
STGCN 0.468 1.565 2.448 0.792 1.036
MSTEM 0.393 1.435 2.059 0.725 0.951
CEC-MSTEM 0.380 1.007 1.962 0.489 0.628

Table 1: Prediction errors on the slow battery EV car charging dataset. CEC-MSTEM achieves the best performance in most metrics.

Method MAE (kWh) RMSE (kWh) MSE (kWh²) RAE (%) RSE (%)
LSTM 2.114 6.211 38.571 0.791 1.062
GRU 2.102 6.151 37.840 0.789 1.052
DLinear 1.916 5.335 28.458 0.753 0.912
GCN 2.116 6.214 38.608 0.791 1.063
STGCN 2.244 6.110 37.335 0.814 1.045
MSTEM 1.898 5.206 27.099 0.749 0.890
CEC-MSTEM 1.856 4.444 26.650 0.733 0.945

Table 2: Prediction errors on the fast battery EV car charging dataset. CEC-MSTEM shows significant improvements, especially in RMSE and MSE.

The results demonstrate that CEC-MSTEM consistently outperforms benchmarks across both datasets. For slow battery EV car charging, it reduces MAE by 1.5% and RMSE by 27.7% compared to the next-best DLinear model, while for fast battery EV car charging, it achieves a 2.2% lower MAE and 14.6% lower RMSE than MSTEM. These gains highlight the effectiveness of cloud-edge collaboration in capturing spatial dependencies and enhancing prediction accuracy for battery EV car charging loads. Moreover, the framework’s privacy-preserving embedding layer ensures data security without compromising feature quality, addressing a critical concern in multi-station forecasting. To further validate the impact of the cloud-edge framework, I conducted ablation studies by comparing GNN-based models with and without the collaborative components. As shown in Table 3, integrating the framework consistently improves performance, underscoring its value in real-world battery EV car charging scenarios.

Method MAE (kWh) RMSE (kWh) MSE (kWh²) RAE (%) RSE (%)
GCN 0.435 1.570 2.464 0.764 1.040
CEC-GCN 0.398 0.991 1.839 0.509 0.635
STGCN 0.468 1.565 2.448 0.792 1.036
CEC-STGCN 0.497 1.116 2.361 0.574 0.709
MSTEM 0.393 1.435 2.059 0.725 0.951
CEC-MSTEM 0.380 1.007 1.962 0.489 0.628

Table 3: Ablation study on the slow battery EV car charging dataset, showing improvements with cloud-edge collaboration.

From a computational perspective, the CEC-MSTEM framework is efficient for battery EV car charging station operations. Each local training epoch averages 14.43 seconds, with inference requiring only 0.98 seconds per station post-training, enabling real-time forecasting. The cloud-edge distribution reduces communication overhead compared to federated learning, as only encrypted embeddings and graph features are exchanged initially, rather than frequent model updates. This scalability is crucial as the number of battery EV car charging stations grows globally. Additionally, the dynamic graph generation adapts to changing patterns, such as seasonal variations in battery EV car usage, ensuring robust performance over time. The clustering approach effectively groups stations with similar load profiles, even if geographically distant, capturing non-linear relationships that traditional methods miss. For instance, urban battery EV car charging stations might exhibit peak loads during commute hours, while suburban stations show different patterns; the graph structure encodes these similarities, allowing models to leverage cross-station insights.

However, there are limitations to consider. The framework assumes a trusted cloud server, which may not always be available in decentralized environments. Future work could explore blockchain-based mechanisms for enhanced security. Moreover, the clustering step requires predefining the number of clusters, which might not optimal for all battery EV car charging datasets; adaptive clustering algorithms could be integrated. The model also relies on historical data quality, and anomalies like holidays or extreme weather could affect predictions—incorporating external factors (e.g., temperature, events) could improve accuracy. Despite these, the proposed method represents a significant advancement for battery EV car charging load forecasting, balancing privacy, efficiency, and precision.

In conclusion, I have presented a cloud-edge collaborative graph neural network framework for short-term load forecasting of battery EV car charging stations. By combining embedding-based privacy protection, dynamic graph structure generation, and personalized MSTEM models, the approach addresses key challenges in data sharing, computational load, and prediction accuracy. Experimental results on real datasets confirm its superiority over state-of-the-art methods, with notable reductions in error metrics. As battery EV car adoption accelerates, such scalable and secure forecasting solutions will be vital for grid stability and sustainable energy management. The framework’s flexibility allows extension to other distributed energy resources, paving the way for smarter urban infrastructure. Ultimately, advancing battery EV car charging forecasting not only supports the transition to electric mobility but also contributes to a resilient and efficient power ecosystem.

Scroll to Top