Electric vehicle charging demand prediction method and system and electronic equipment
By constructing a MIFM prediction model based on graph attention network and Transformer architecture, the problems of insufficient spatial correlation mining and lack of constraints in weight learning in electric vehicle charging demand prediction are solved, realizing dynamic integration of spatiotemporal information and improving prediction accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA THREE GORGES UNIV
- Filing Date
- 2026-01-16
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies for predicting electric vehicle charging demand suffer from insufficient spatial correlation mining, limited data, lack of constraints in weight learning, and insufficient prediction accuracy. In particular, they struggle to achieve dynamic adjustment of graph structures and effective integration of information in complex urban spatial interaction scenarios.
A deep hybrid model based on graph attention network and Transformer architecture is adopted, which combines multilayer perceptron, embedding layer, stacked graph attention network and adaptive Kalman filter fusion strategy to construct MIFM prediction model. The model parameters are optimized by regularization constraint module to realize dynamic integration and prediction of spatiotemporal information.
It significantly improves the accuracy and robustness of electric vehicle charging demand forecasting, can adapt to dynamic data changes, capture complex spatiotemporal dependencies, and improve the stability and reliability of forecasts.
Smart Images

Figure CN121998180A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning prediction technology, and in particular to a method, system and electronic device for predicting electric vehicle charging demand. Background Technology
[0002] With the advancement of urbanization and the increasing demand for environmental sustainability, the penetration rate of electric vehicles continues to rise. Charging demand forecasting has become a key link in optimizing resource allocation, alleviating peak queuing pressure, avoiding charging pile overload, and reducing the impact of grid load. Essentially, it is a complex spatiotemporal forecasting problem. The core challenge lies in accurately representing the intricate spatial dependencies between geographically dispersed charging stations, while also dealing with the forecasting uncertainty brought about by dynamic data changes.
[0003] Existing technologies suffer from the following drawbacks: 1. Early reliance on models such as Long Short-Term Memory (LSTM) and Transformer neglects spatial correlations between sites, resulting in insufficient prediction accuracy in complex urban spatial interaction scenarios. 2. Subsequent introduction of Graph Neural Networks (GNNs) models (such as STID, ASTGRN, and GraphWaveNet) still suffers from deficiencies in spatial relationship fusion and dynamic adaptation: most employ simple linear fusion methods, neglecting the guiding role of temporal information, and the graph structure remains fixed after training, making it impossible to dynamically adjust the correlation strength between nodes based on real-time input during the inference phase. 3. Weight learning lacks effective constraint and balancing mechanisms. While existing methods (such as PGCN and G-STAN) introduce some dynamic mechanisms, they lack independent constraint modules. When the data contains noise or pattern shifts, the learned relationship strength is prone to instability, leading to information redundancy or insufficient generalization.
[0004] In summary, how to effectively integrate multi-source spatiotemporal information, achieve dynamic inference of graph structures, and impose effective constraints on the learning process to improve prediction accuracy and robustness has become a key issue that urgently needs to be addressed in the field of electric vehicle charging demand forecasting. Summary of the Invention
[0005] The main objective of this invention is to provide a method, system, and electronic device for predicting electric vehicle charging demand, which solves the problems of insufficient spatial correlation mining, limited data, lack of constraints in weight learning, and insufficient prediction accuracy in the prior art.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for predicting electric vehicle charging demand, comprising the following steps: Acquire historical observation data and corresponding temporal characteristic data of electric vehicle charging stations; A MIFM prediction model is constructed by inputting the historical observation data and corresponding temporal feature data, and obtaining the prediction results. The MIFM prediction model is a deep hybrid model based on graph attention networks and Transformer architecture. The overall architecture adopts an encoder-decoder spatiotemporal prediction architecture. The front end processes the initial features through a multilayer perceptron and embedding layer. The middle part adopts a parallel dynamic graph learning structure. The back end combines a stacked graph attention network and a temporal decoding module based on a Transformer encoder to perform spatial and temporal modeling, respectively. Specifically, it includes: The initial input information encoding module receives initial data and performs parallel embedding processing to construct a unified input representation containing node-specific adaptive embeddings. The spatiotemporal information dynamic fusion module acquires the unified input representation and captures explicit geospatial dependencies and implicit functional correlations in parallel through a dual-channel dynamic graph learning mechanism. It then uses an adaptive Kalman filter fusion strategy to dynamically integrate multi-layer spatiotemporal features to generate an enhanced fusion signal. The spatiotemporal dependency modeling and prediction module uses a stacked graph attention network to learn spatial relationship representations based on the enhanced fusion signal and captures temporal dynamics through a Transformer encoder-based temporal decoding module to generate charging demand prediction results for future time steps.
[0007] The preferred approach also includes training the MIFM prediction model and retaining the optimal MIFM prediction model: A regularization constraint module based on relevant information principles is introduced to construct a regularized loss function that includes structural entropy constraints and divergence constraints. This regularized loss function is then combined with the prediction loss function to guide the learning of attention weights and connection strengths, thereby optimizing the model parameters.
[0008] In a preferred embodiment, the parallel embedding processing of the historical observation data and the time feature data using the initial input information encoding module includes: The original charging pile occupancy rate data is mapped into high-dimensional basic feature embeddings through a fully connected layer; The time of day (ToD) and the day of week (DoW) are mapped to ToD embeddings and DoW embeddings respectively using a learnable embedding matrix; Introduce learnable adaptive embedding parameters to capture node-specific aperiodic temporal patterns; After concatenating the basic feature embedding, the ToD embedding, the DoW embedding, and the adaptive embedding parameters, the unified input representation is obtained through a fully connected layer and an activation function, as shown in the formula: ; in This is the original charging pile occupancy rate data; Basic feature embedding; Time embeddings for the time of day and the day of week, respectively; Node-specific adaptive embedding; For the comprehensive feature tensor; This is the unified input representation; Indicates a fully connected layer; This indicates a splicing operation.
[0009] In the preferred embodiment, the parallel capture of explicit geospatial dependencies and implicit functional correlations through a dual-channel dynamic graph learning mechanism includes: The dynamic filtering graph neural network unit learns the dynamic filtering matrix and combines it with the static adjacency matrix to generate the dynamic adjacency weight matrix. The formula is as follows: ; in, Indicates the weighting coefficient. Represents the original static adjacency matrix. Represents a linear transformation layer. Represents a learnable filter matrix; The implicit functional correlations between nodes are inferred using a data-driven computing unit based on a multi-head self-attention mechanism, generating implicit functional correlation features. This is specifically achieved through the following formula: ; in, This represents the currently calculated similarity matrix. This represents the node representation after processing by the multi-head attention mechanism. Indicates the attention dimension; To learnable parameters The generated gate value; This represents the similarity weight matrix from the previous training round; This is the adjusted implicit correlation weight matrix; These are intermediate features that have undergone activation processing; It is a learnable influence factor.
[0010] In the preferred embodiment, the dynamic integration of multi-layer spatiotemporal features using an adaptive Kalman filter fusion strategy includes: Temporal features are extracted using a parallel temporal signal extractor and then combined with the dynamic adjacency weight matrix and the implicit functional correlation features to obtain spatiotemporal fusion features, specifically achieved through the following formula: ; in, This represents a learnable impact factor; Calculate the variance tensor of the spatiotemporal fusion features. As a measure of observation uncertainty, and based on the variance tensor, the precision weight tensor is calculated. ; The enhanced fused signal is obtained by weighting and fusing features from different layers using the precision weight tensor, specifically through the following formula: ; in, Corresponding to the characteristic observation, These are learnable parameters.
[0011] In the preferred embodiment, the step of using a stacked graph attention network to learn spatial relationship representations based on the enhanced fusion signal, and capturing temporal dynamics through a temporal decoding module to generate charging demand prediction results for future time steps includes: The enhanced fusion signal is input to a K-layer stacked graph attention network, where each layer uses a multi-head attention mechanism to dynamically calculate the attention score between nodes based on the feature representation of the previous layer. The multi-head attention score is fused through a learnable linear transformation and normalized to obtain the final attention weight. The attention weight is then used to weight and aggregate the node features, and combined with residual connections to form the output of the layer, thereby extracting spatially enhanced features containing complex spatial dependencies layer by layer. The spatial augmentation features are input into an L-layer temporal decoding module based on a Transformer encoder architecture. Each layer processes the features through sequentially connected multi-head self-attention sublayers and bit-by-bit feedforward network sublayers. Residual connections and layer normalization are applied after each sublayer to capture long and short-term temporal dependencies. The output features of the last layer of the time-series decoding module are obtained, and the output features are mapped to the prediction target space through a fully connected layer to obtain the predicted charging demand value of the target in the future time step.
[0012] In the preferred scheme, the predicted charging demand for the target future time step is obtained using the following formula: ; ; ; In the formula, For the first Layer nodes and Attention weights between them; Attention score; For the first Output features of layered graph attention networks; This is the attention weight matrix; These are the weighting coefficients; for The final output characteristics of the layer-time decoding module; The charging demand prediction result.
[0013] In the preferred embodiment, the introduction of a regularization constraint module based on relevant information principles includes: Construct a graph attention weight regularization term to preserve key spatial relationships by minimizing the structural entropy of the attention weight matrix and maximizing the log-likelihood of edges in the original graph. An adaptive weight regularization term is constructed to maintain the consistency of dependencies by minimizing the entropy of the node-related structure and the KL divergence between the learned correlation representation and the physically connected graph structure representation. A smooth transition mechanism is used to gradually transition the simplified regularization loss to the full regularization loss, as shown in the formula: ; in, The weight coefficients increase from 0 to 1 with each training round; To simplify the regularization loss; For graph attention weight matrix Structural entropy constraint term; For implicit correlation weight matrix The adaptive weight regularization term.
[0014] Secondly, the present invention provides an electric vehicle charging demand forecasting system, applicable to the aforementioned electric vehicle charging demand forecasting method, comprising: The data acquisition module is used to acquire historical observation data and corresponding time characteristic data of electric vehicle charging stations; The module construction and prediction module is used to construct the MIFM prediction model. It takes the historical observation data and corresponding temporal feature data as input and obtains the prediction results. The MIFM prediction model is a deep hybrid model based on graph attention networks and a Transformer architecture. It adopts an encoder-decoder spatiotemporal prediction architecture. The front end processes initial features through a multilayer perceptron and embedding layers. The middle layer uses a parallel dynamic graph learning structure. The back end combines a stacked graph attention network and a Transformer encoder-based temporal decoding module to perform spatial and temporal modeling, respectively. Specifically, it includes: The initial input information encoding module receives initial data and performs parallel embedding processing to construct a unified input representation containing node-specific adaptive embeddings. The spatiotemporal information dynamic fusion module acquires the unified input representation and captures explicit geospatial dependencies and implicit functional correlations in parallel through a dual-channel dynamic graph learning mechanism. It then uses an adaptive Kalman filter fusion strategy to dynamically integrate multi-layer spatiotemporal features to generate an enhanced fusion signal. The spatiotemporal dependency modeling and prediction module uses a stacked graph attention network to learn spatial relationship representations based on the enhanced fusion signal and captures temporal dynamics through a Transformer encoder-based temporal decoding module to generate charging demand prediction results for future time steps.
[0015] Thirdly, the present invention provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor is configured to implement, when executing the computer program, a method for predicting electric vehicle charging demand as described above.
[0016] This invention provides a method for predicting electric vehicle charging demand. It acquires historical observation data and corresponding temporal feature data, inputs them into a constructed MIFM prediction model, and uses an initial input information encoding module to transform multi-source heterogeneous data into a unified input representation through parallel embedding processing. The dual-channel mechanism of the spatiotemporal information dynamic fusion module enables parallel capture of explicit geospatial dependencies and implicit functional correlations. An adaptive Kalman filter fusion strategy dynamically integrates multi-layered spatiotemporal features to generate an enhanced fusion signal, improving the effectiveness and reliability of the features. The combination of a stacked graph attention network and a temporal decoding module strengthens spatial relationship learning and temporal dynamic capture capabilities, respectively, achieving deep modeling of complex spatiotemporal dependencies and significantly improving the accuracy of charging demand prediction for future time steps. Attached Figure Description
[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a flowchart illustrating the electric vehicle charging demand forecasting method of the present invention. Figure 2 This is a schematic diagram of the overall architecture of the Multi-Information Fusion Model (MIFM) of this invention; Figure 3 This is a structural diagram of the regularization module of the present invention; Figure 4 This is a comparison chart of the predicted values between the various models of this invention; Figure 5 This is a comparison diagram of the ablation experiments of this invention; Figure 6 This represents the difference in the model's reasoning before and after the present invention. Detailed Implementation
[0018] Example 1 like Figure 1-6 As shown, a method for predicting electric vehicle charging demand includes the following steps: S1: Obtain historical observation data and corresponding time characteristic data of electric vehicle charging stations.
[0019] S2: Construct the MIFM prediction model, input historical observation data and corresponding temporal feature data, and obtain the prediction results. The MIFM prediction model is a deep hybrid model based on Graph Attention Network (GAT) and Transformer architecture. The overall architecture adopts an encoder-decoder spatiotemporal prediction architecture. The front end processes the initial features through a multilayer perceptron (MLP) and embedding layer. The middle part adopts a parallel dynamic graph learning structure. The back end combines a stacked graph attention network (Stacked GAT) and a Transformer encoder-based temporal decoding module (TSDM) to perform spatial and temporal modeling respectively. Specifically, it includes: The initial input information encoding module receives initial data and performs parallel embedding processing to construct a unified input representation that includes node-specific adaptive embedding. The spatiotemporal information dynamic fusion module acquires the unified input representation, captures explicit geospatial dependencies and implicit functional correlations in parallel through a dual-channel dynamic graph learning mechanism, and dynamically integrates multi-layer spatiotemporal features using an adaptive Kalman filter fusion strategy to generate an enhanced fusion signal. The spatiotemporal dependency modeling and prediction module uses a stacked graph attention network to learn spatial relationship representations based on the enhanced fusion signal, and captures temporal dynamics through a Transformer encoder-based temporal decoding module to generate charging demand prediction results for future time steps.
[0020] In this embodiment, historical observation data and corresponding temporal feature data are acquired and input into the constructed MIFM prediction model. The initial input information encoding module transforms multi-source heterogeneous data into a unified input representation through parallel embedding processing. The dual-channel mechanism of the spatiotemporal information dynamic fusion module enables parallel capture of explicit geospatial dependencies and implicit functional correlations. The adaptive Kalman filter fusion strategy dynamically integrates multi-layer spatiotemporal features to generate an enhanced fusion signal, improving the effectiveness and reliability of the features. The combination of the stacked graph attention network and the temporal decoding module strengthens the spatial relationship learning and temporal dynamic capture capabilities, respectively, realizing deep modeling of complex spatiotemporal dependencies and significantly improving the accuracy of future time step charging demand prediction.
[0021] This embodiment further illustrates the technical solution through the following implementation scenarios.
[0022] First, define the problem: the charging network is... It consists of several nodes, each corresponding to a charging area. The goal is to utilize past... Historical observation data at each time step and corresponding time features Predicting the future Charging demand at each time step .
[0023] In practice, the Initial Input Information Encoding Module (TFEM) constructs a comprehensive input representation by processing multiple types of feature embeddings in parallel.
[0024] This embodiment is applied to the Shenzhen Electric Vehicle Charging Network Dispatch System.
[0025] (I) Step S1 Data Acquisition System coverage: 247 traffic area nodes were selected in Shenzhen, covering a total of 18,061 public charging piles.
[0026] Time span: Continuous historical observation data were obtained from June 19, 2022 to July 18, 2022 (30 days in total).
[0027] Sampling frequency: The data sampling frequency is 5 minutes / time (i.e., time step T=5 minutes, a total of 288 time steps throughout the day).
[0028] Data scale: The historical observation data matrix has dimensions of [8640, 247] (8640 time slices × 247 nodes).
[0029] Predictive task settings: Based on data from the past 12 time steps (i.e., 60 minutes, corresponding to S=12), predict the charging demand for the next 6, 9, 12, 15, and 18 time steps.
[0030] Feature data details: Charging pile occupancy rate: Raw data normalized to the range of 0-1.
[0031] Time Feature (ToD): A time of day, ranging from 0 to 287 (corresponding to 288 five-minute intervals within 24 hours).
[0032] Date feature (DoW): Number of days in a week, ranging from 0 to 6 (corresponding to Monday to Sunday).
[0033] (II) Construction and Prediction of MIFM Prediction Model The MIFM model proposed in this embodiment is a deep hybrid model based on Graph Attention Network (GAT) and Transformer architecture.
[0034] The specific model structure and improvements are as follows: Basic Architecture: The model adopts an encoder-decoder spatiotemporal prediction architecture. The front end uses a multilayer perceptron (MLP) and embedding layers to process initial features; the middle part uses a parallel dynamic graph learning structure; the back end combines a stacked graph attention network (Stacked GAT) for spatial modeling and a Transformer encoder-based temporal decoding module (TSDM) for temporal modeling.
[0035] Specific improvements: Dual-channel Dynamic Graph Learning: Unlike traditional fixed graph structures, this model simultaneously incorporates explicit geospatial dependencies (based on physical connectivity) and implicit functional dependencies (based on data-driven inference using multi-head attention), solving the problem that static graphs cannot capture dynamic changes.
[0036] Adaptive Kalman Filter Fusion (AKFM): Introducing the precision weighting concept from Kalman filtering, it dynamically adjusts the fusion weights of different channel signals by calculating the variance of features, thereby achieving adaptive optimal fusion of spatiotemporal information.
[0037] PRI-based Regularization: The model introduces an independent constraint module, the Related Information Regularization Module (RIRM). It utilizes information entropy and KL divergence to construct a loss function, constraining attention weights and graph structure generation. This preserves key information while suppressing redundancy and preventing overfitting.
[0038] The preferred approach also includes training the MIFM prediction model and retaining the optimal MIFM prediction model: A regularization constraint module based on relevant information principles is introduced to construct a regularized loss function that includes structural entropy constraints and divergence constraints. This regularized loss function is then combined with the prediction loss function to guide the learning of attention weights and connection strengths, thereby optimizing the model parameters.
[0039] This embodiment constructs a regularized loss function that includes structural entropy constraints and divergence constraints. The regularized loss function is combined with the prediction loss function to optimize the model parameters, thereby achieving a balance between learning stability and dynamic adaptability. This improves the robustness of the model in scenarios with noisy data or pattern shifts, and thus enhances the stability and reliability of the optimal model's prediction performance.
[0040] 1. Initial Input Information Encoding Processing In the preferred scheme, the historical observation data and time feature data are embedded in parallel using the initial input information encoding module, including: Basic Feature Embedding: Applying a linear projection layer to embed the original charging pile occupancy data Mapping to a high-dimensional feature space yields the basic feature embedding. The calculation formula is as follows: ; in, This represents a predefined feature dimension. Indicates a fully connected layer. These correspond to batch size, number of charging stations, and historical time steps, respectively.
[0041] Temporal Feature Embedding: Construct a learnable embedding matrix, and use the learnable embedding matrix to map the time of day (ToD) and the days of the week (DoW) to ToD embeddings and DoW embeddings, respectively; utilize the learnable embedding matrix... Map time indexes to ToD embeddings For DoW features, the embedding matrix is used. Map the weekday index to a DoW embedding .
[0042] Node Adaptive Embedding: To simulate the unique, non-periodic temporal patterns of each node, a learnable adaptive embedding parameter is introduced. The parameters enable the model to capture complex time dependencies beyond simple periodic patterns.
[0043] Unified Feature Generation: After concatenating the basic feature embedding, ToD embedding, DoW embedding, and adaptive embedding parameters, a unified input representation is obtained through a fully connected layer and activation function. The formula is as follows: ; in, This is the original charging pile occupancy rate data; Basic feature embedding; Time embeddings for the time of day and the day of week, respectively; Node-specific adaptive embedding; For the comprehensive feature tensor; To standardize input representation; Indicates a fully connected layer; This indicates a splicing operation.
[0044] This embodiment maps the original charging pile occupancy rate data into high-dimensional basic feature embeddings through a fully connected layer, realizing the dimensionality increase and feature extraction of the original data, mining deep semantic information of the data, designing a dedicated learnable embedding matrix for ToD and DoW time features, accurately capturing the periodic time pattern of charging demand, conforming to the time pattern of electric vehicle charging behavior, introducing node-specific adaptive embedding parameters, effectively capturing the unique non-periodic time pattern of each charging station, solving the problem of insufficient characterization of individual node differences in traditional models, and deeply integrating multiple types of embedded features into a unified input representation through the combination of splicing, fully connected layers, and activation functions, achieving feature complementarity and improving the information density and representation ability of the input data.
[0045] 2. Dynamic fusion processing of spatiotemporal information In this embodiment, the spatiotemporal information dynamic fusion module adopts a parallel three-layer architecture, with each layer containing a parallel time-series signal extractor (PTSE), a dynamic filtering graph neural network unit (DFGM), and a data-driven computation unit (DDCM).
[0046] Part 1: Parallel Temporal Signal Extraction (PTSE). Each layer utilizes a multilayer perceptron (MLP) with the same structure but different regularization parameters (such as the Dropout rate) to process the temporal signal in parallel, generating three different feature representations. : ; Part 2: Explicit Geospatial Dependency (DFGM). DFGM learns to dynamically adjust the physical connection strength between nodes and maintains a learnable filtering matrix. and compare it with the static adjacency matrix Combined, a dynamically adjusted adjacency weight matrix is generated. The calculation formula is as follows: ; in, Indicates the weighting coefficient. Represents the original static adjacency matrix. Represents a linear transformation layer. This represents a learnable filter matrix.
[0047] Part 3: Implicit Functional Correlation (DDCM). DDCM employs a data-driven strategy to infer the functional correlations between nodes. It utilizes a multi-head self-attention mechanism to process input features. Transform to the latent attention space and calculate the node similarity matrix. : ; in, This represents the currently calculated similarity matrix. This represents the node representation after processing by the multi-head attention mechanism. Indicates the attention dimension; These are intermediate features that have undergone activation processing; It is a learnable influence factor.
[0048] To ensure the stability of weight updates, a gating mechanism is applied for adjustment. The implicit correlation weight matrix is obtained. : ; in, To learnable parameters The generated gate value; This represents the similarity weight matrix from the previous training round; This is the adjusted implicit correlation weight matrix.
[0049] Utilize what you have learned By modulating the node representation and combining it with residual connections, implicit functionally related features are obtained. : ; in, These are features that have undergone Tanh activation processing. It is a learnable influencing factor.
[0050] In this embodiment, the dual-channel parallel capture mechanism takes into account both explicit geographical relationships and implicit functional associations, comprehensively covering the dependency types between charging stations and improving the reliability of implicit functional related features.
[0051] Part Four: Adaptive Kalman Filter Fusion (AKFM). Subsequently, the model performs adaptive fusion. First, the temporal features of each layer are... With explicit dynamic adjacency matrix Relationship matrix with implicit function Fusion yields spatiotemporal fusion characteristics. .
[0052] like Figure 6 As shown, it contains three subgraphs: (a) the original static adjacency matrix, (b) the dynamic adjacency matrix after training, and (c) the difference between the adjacency matrices before and after model inference. It intuitively presents the dynamic optimization effect of the dual-channel dynamic graph learning mechanism on the graph structure, and shows the model's ability to capture dynamic dependencies.
[0053] In the preferred scheme, an adaptive Kalman filter fusion strategy is used to dynamically integrate multi-layer spatiotemporal features, including: Temporal features are extracted using a parallel temporal signal extractor and then combined with dynamic adjacency weight matrix and implicit functional correlation features to obtain spatiotemporal fusion features, specifically achieved through the following formula: ; in, This represents the learnable impact factor.
[0054] Inspired by the precision weighting concept in Kalman filtering, this embodiment treats the variance of different feature components as a measure of observation uncertainty and calculates the variance tensor of the spatiotemporal fusion features. And calculate the precision weight tensor based on the variance tensor. The fusion rules are defined as follows: ; in, These are learnable parameters.
[0055] The enhanced fused signal is obtained by weighting and fusing features from different layers using a precision weight tensor, specifically implemented through the following formula: ; in, Corresponding to the characteristic observation value.
[0056] This embodiment achieves precise matching and fusion of temporal features with spatial and functional features, generating spatiotemporal fusion features rich in multidimensional information. The variance tensor of the spatiotemporal fusion features is used as a measure of observation uncertainty to accurately quantify the reliability of the features. Based on the precision weight tensor calculated by variance, features at different levels are weighted and fused, so that features with high reliability (small variance) receive higher weights, realizing the "optimal fusion" of features, effectively filtering redundant information and noise, and improving the accuracy of the enhanced fusion signal.
[0057] This embodiment employs the dynamic adjustment characteristics of the adaptive Kalman filter fusion strategy, enabling the feature fusion process to adapt to dynamic changes in data and improving the timeliness and adaptability of the fused features.
[0058] 3. Spatiotemporal Dependency Modeling and Prediction Result Generation In generating fusion features After that, the model enters the deep spatiotemporal dependency modeling stage.
[0059] In the preferred embodiment, a stacked graph attention network is used to learn spatial relationship representations based on enhanced fused signals, and a temporal decoding module is used to capture temporal dynamics to generate charging demand prediction results for future time steps, including: Spatial relationship modeling: using K-layer stacked graph attention network (GAT). The enhanced fusion signal is input into the K-layer stacked graph attention network, the first... Layer based on features of the previous layer Dynamically learn node connection strength. Calculate attention scores using a multi-head attention mechanism. The final attention weights are obtained by fusion and Softmax normalization. : .
[0060] Using attention weight matrix Perform weighted aggregation and combine it with residual joins: ; By stacking Layer by layer, GAT gradually integrates information from different spatial neighborhoods.
[0061] Temporal dynamic capture and prediction: GAT output features Input to The Layer Timing Decoding (TSDM) module is based on the Transformer encoder architecture. Each layer contains a multi-head self-attention sublayer and a bit-by-bit feedforward network (FFN), and applies Layer Normalization (LayerNorm). .
[0062] Final layer output Prediction results are generated using a fully connected layer: ; In the formula, For the first Layer nodes and Attention weights between them; Attention score; For the first Output features of layered graph attention networks; This is the attention weight matrix; These are the weighting coefficients; for The final output characteristics of the layer-time decoding module; This is the result of the charging demand forecast.
[0063] In this embodiment, the combined architecture ensures efficient capture of complex spatiotemporal dependencies.
[0064] like Figure 5 As shown, the model performance metrics of different module combinations (such as removing dual channels, removing AKFM, removing PRI regularization, etc.) are presented, quantifying the contribution of each core innovative module to the prediction accuracy and verifying the rationality of the overall architecture.
[0065] In this embodiment, the fully connected layer maps the output features of the timing decoding module to the prediction target space, achieving a precise conversion from features to prediction results. This ensures that the predicted values match the dimensions and approximate the actual charging demands, thus improving the accuracy of the prediction. Figure 4 The figure shows a comparison of the predicted values of each model: a horizontal comparison of the numerical results of the MIFM model and traditional models (such as LSTM, basic GNN, etc.) under the same prediction task, which intuitively demonstrates the superiority of the MIFM model in the accuracy of charging demand prediction through the data differences.
[0066] 3. Model Training and Optimization To constrain attention weights Node correlation matrix In this study, this disclosure introduces a regularization module (RIRM) based on the relevant information (PRI) principle.
[0067] In the preferred scheme, a regularization constraint module based on relevant information principles is introduced, including: A graph attention weight regularization term is constructed. By minimizing the structural entropy of the attention weight matrix and maximizing the log-likelihood of edges in the original graph, key spatial relationships are preserved. This avoids the model from overemphasizing secondary associations and ignoring core dependencies, thus improving the accuracy of spatial relationship representation.
[0068] An adaptive weight regularization term is constructed to maintain the consistency of dependencies by minimizing the entropy of the node-related structure and the KL divergence between the learned correlation representation and the physically connected graph structure representation; this enhances the interpretability and rationality of the model. A smooth transition mechanism is adopted to gradually transition the simplified regularization loss to the full regularization loss. The formula is: ; in, The weight coefficients increase from 0 to 1 with each training round; To simplify the regularization loss; For graph attention weight matrix Structural entropy constraint term; For implicit correlation weight matrix The adaptive weight regularization term.
[0069] It consists of two parts: ; in, By minimizing structural entropy And maximize the log-likelihood of edges existing in the original graph. This is to encourage the generation of sparse structures that focus on important connections. By minimizing the entropy of the node-related structure KL divergence between different graph structure representations This enables the model to learn consistent and information-rich dependencies.
[0070] Considering the instability in the early stages of training, a simplified PRI loss was designed. And adopt a smooth transition mechanism: ; in, The activation value increases from 0 to 1 with each training epoch. This progressive activation strategy prevents the model from converging prematurely to a suboptimal structure, ensuring a stable learning trajectory.
[0071] Model parameter optimization: Combined with the prediction loss function, the Adam optimizer (learning rate = 1e-4, decay rate = 1e-6) is used to optimize the model parameters. After 1000 rounds of iterative training, the optimal model with the smallest prediction error on the validation set is retained.
[0072] The regularization constraint module in this embodiment makes the constraint process quantifiable and controllable, guides the learning of attention weights and connection strengths, optimizes model parameters, and improves the model's generalization ability and robustness.
[0073] Example 2 Further illustrating with reference to Embodiment 1, an electric vehicle charging demand forecasting system, applicable to an electric vehicle charging demand forecasting method of the embodiment, includes: The data acquisition module is used to acquire historical observation data and corresponding time characteristic data of electric vehicle charging stations; The module construction and prediction module is used to build the MIFM prediction model. It takes historical observation data and corresponding temporal feature data as input and obtains the prediction results. The MIFM prediction model is a deep hybrid model based on graph attention networks and the Transformer architecture. It adopts an encoder-decoder spatiotemporal prediction architecture. The front end processes initial features through a multilayer perceptron and embedding layers. The middle layer uses a parallel dynamic graph learning structure. The back end combines a stacked graph attention network and a Transformer encoder-based temporal decoding module to perform spatial and temporal modeling, respectively. Specifically, it includes: The initial input information encoding module receives initial data and performs parallel embedding processing to construct a unified input representation that includes node-specific adaptive embedding. The spatiotemporal information dynamic fusion module acquires the unified input representation, captures explicit geospatial dependencies and implicit functional correlations in parallel through a dual-channel dynamic graph learning mechanism, and dynamically integrates multi-layer spatiotemporal features using an adaptive Kalman filter fusion strategy to generate an enhanced fusion signal. The spatiotemporal dependency modeling and prediction module uses a stacked graph attention network to learn spatial relationship representations based on the enhanced fusion signal, and captures temporal dynamics through a Transformer encoder-based temporal decoding module to generate charging demand prediction results for future time steps.
[0074] This embodiment provides the working process, working details and technical effects of an electric vehicle charging demand forecasting method, which can be referred to in Embodiment 1 and will not be repeated here.
[0075] Example 3 This application provides an electronic device, including a memory and a processor; Memory is used to store computer programs.
[0076] The processor is used to implement the electric vehicle charging demand prediction method of Embodiment 1 when executing a computer program, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0077] For specific examples, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out memory (FIFO), and / or last-in-first-out memory (FILO), etc.; the processor may be limited to microprocessors of the STM32F105 series, ARM (Advanced RISC Machines), x86 architecture processors, or processors with integrated NPU (neural-network processing units).
[0078] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A method for predicting electric vehicle charging demand, characterized in that, Includes the following steps: Acquire historical observation data and corresponding temporal characteristic data of electric vehicle charging stations; A MIFM prediction model is constructed by inputting the historical observation data and corresponding temporal feature data, and obtaining the prediction results. The MIFM prediction model is a deep hybrid model based on graph attention networks and Transformer architecture. The overall architecture adopts an encoder-decoder spatiotemporal prediction architecture. The front end processes the initial features through a multilayer perceptron and embedding layer. The middle part adopts a parallel dynamic graph learning structure. The back end combines a stacked graph attention network and a temporal decoding module based on a Transformer encoder to perform spatial and temporal modeling, respectively. Specifically, it includes: The initial input information encoding module receives the initial data and performs parallel embedding processing to construct a unified input representation that includes node-specific adaptive embedding; The spatiotemporal information dynamic fusion module acquires the unified input representation, captures explicit geospatial dependencies and implicit functional correlations in parallel through a dual-channel dynamic graph learning mechanism, and dynamically integrates multi-layer spatiotemporal features using an adaptive Kalman filter fusion strategy to generate an enhanced fusion signal. The spatiotemporal dependency modeling and prediction module uses a stacked graph attention network to learn spatial relationship representations based on the enhanced fusion signal, and captures temporal dynamics through a Transformer encoder-based temporal decoding module to generate charging demand prediction results for future time steps.
2. The electric vehicle charging demand forecasting method according to claim 1, characterized in that, This also includes training the MIFM prediction model and retaining the optimal MIFM prediction model: A regularization constraint module based on relevant information principles is introduced to construct a regularized loss function that includes structural entropy constraints and divergence constraints. This regularized loss function is then combined with the prediction loss function to guide the learning of attention weights and connection strengths, thereby optimizing the model parameters.
3. The electric vehicle charging demand forecasting method according to claim 1, characterized in that, The parallel embedding process of the historical observation data and the time feature data using the initial input information encoding module includes: The original charging pile occupancy rate data is mapped into high-dimensional basic feature embeddings through a fully connected layer; The time of day (ToD) and the day of week (DoW) are mapped to ToD embeddings and DoW embeddings respectively using a learnable embedding matrix; Introduce learnable adaptive embedding parameters to capture node-specific aperiodic temporal patterns; After concatenating the basic feature embedding, the ToD embedding, the DoW embedding, and the adaptive embedding parameters, the unified input representation is obtained through a fully connected layer and an activation function, as shown in the formula: ; in This is the original charging pile occupancy rate data; Basic feature embedding; Time embeddings for the time of day and the day of week, respectively; Node-specific adaptive embedding; For the comprehensive feature tensor; This is the unified input representation; Indicates a fully connected layer; This indicates a splicing operation.
4. The electric vehicle charging demand forecasting method according to claim 1, characterized in that, The method of capturing explicit geospatial dependencies and implicit functional correlations in parallel through a dual-channel dynamic graph learning mechanism includes: The dynamic filtering graph neural network unit learns the dynamic filtering matrix and combines it with the static adjacency matrix to generate the dynamic adjacency weight matrix. The formula is as follows: ; in, Indicates the weighting coefficient. Represents the original static adjacency matrix. Represents a linear transformation layer. Represents a learnable filter matrix; The implicit functional correlations between nodes are inferred using a data-driven computing unit based on a multi-head self-attention mechanism, generating implicit functional correlation features. This is specifically achieved through the following formula: ; in, This represents the currently calculated similarity matrix. This represents the node representation after processing by the multi-head attention mechanism. Indicates the attention dimension; To learnable parameters The generated gate value; This represents the similarity weight matrix from the previous training round; This is the adjusted implicit correlation weight matrix; These are intermediate features that have undergone activation processing; It is a learnable influence factor.
5. The electric vehicle charging demand forecasting method according to claim 1, characterized in that, The method of dynamically integrating multi-layer spatiotemporal features using an adaptive Kalman filter fusion strategy includes: Temporal features are extracted using a parallel temporal signal extractor and then combined with the dynamic adjacency weight matrix and the implicit functional correlation features to obtain spatiotemporal fusion features, specifically achieved through the following formula: ; in, This represents a learnable impact factor; Calculate the variance tensor of the spatiotemporal fusion features As a measure of observation uncertainty, and based on the variance tensor, the precision weight tensor is calculated. ; The enhanced fused signal is obtained by weighting and fusing features from different layers using the precision weight tensor, specifically through the following formula: ; in, Corresponding to the characteristic observation, These are learnable parameters.
6. The electric vehicle charging demand forecasting method according to claim 1, characterized in that, The method of using a stacked graph attention network to learn spatial relationship representations based on the enhanced fused signal, and capturing temporal dynamics through a temporal decoding module to generate charging demand prediction results for future time steps includes: The enhanced fusion signal is input into a K-layer stacked graph attention network, where each layer uses a multi-head attention mechanism to dynamically calculate the attention score between nodes based on the feature representation of the previous layer. The multi-head attention score is fused through a learnable linear transformation and normalized to obtain the final attention weight. The attention weight is then used to weight and aggregate the node features, and combined with residual connections to form the output of the layer, thereby extracting spatially enhanced features containing complex spatial dependencies layer by layer. The spatial augmentation features are input into an L-layer temporal decoding module based on a Transformer encoder architecture. Each layer processes the features through sequentially connected multi-head self-attention sublayers and bit-by-bit feedforward network sublayers. Residual connections and layer normalization are applied after each sublayer to capture long and short-term temporal dependencies. The output features of the last layer of the time-series decoding module are obtained, and the output features are mapped to the prediction target space through a fully connected layer to obtain the predicted charging demand value of the target in the future time step.
7. The electric vehicle charging demand forecasting method according to claim 6, characterized in that, The predicted charging demand for the target future time step is obtained using the following formula: ; ; ; In the formula, For the first Layer nodes and Attention weights between them; Attention score; For the first Output features of layered graph attention networks; This is the attention weight matrix; These are the weighting coefficients; for The final output characteristics of the layer-time decoding module; The charging demand prediction result.
8. The electric vehicle charging demand forecasting method according to claim 2, characterized in that, The introduced regularization constraint module based on relevant information principles includes: Construct a graph attention weight regularization term to preserve key spatial relationships by minimizing the structural entropy of the attention weight matrix and maximizing the log-likelihood of edges in the original graph. An adaptive weight regularization term is constructed to maintain the consistency of dependencies by minimizing the entropy of the node-related structure and the KL divergence between the learned correlation representation and the physically connected graph structure representation. A smooth transition mechanism is used to gradually transition the simplified regularization loss to the full regularization loss, as shown in the formula: ; in, The weight coefficients increase from 0 to 1 with each training round; To simplify the regularization loss; For graph attention weight matrix Structural entropy constraint term; For implicit correlation weight matrix The adaptive weight regularization term.
9. An electric vehicle charging demand forecasting system, characterized in that, An electric vehicle charging demand forecasting method applicable to any one of claims 1-8, comprising: The data acquisition module is used to acquire historical observation data and corresponding time characteristic data of electric vehicle charging stations; The module construction and prediction module is used to construct the MIFM prediction model. It takes the historical observation data and corresponding temporal feature data as input and obtains the prediction results. The MIFM prediction model is a deep hybrid model based on graph attention networks and a Transformer architecture. It adopts an encoder-decoder spatiotemporal prediction architecture. The front end processes initial features through a multilayer perceptron and embedding layers. The middle layer uses a parallel dynamic graph learning structure. The back end combines a stacked graph attention network and a Transformer encoder-based temporal decoding module to perform spatial and temporal modeling, respectively. Specifically, it includes: The initial input information encoding module receives initial data and performs parallel embedding processing to construct a unified input representation containing node-specific adaptive embeddings. The spatiotemporal information dynamic fusion module acquires the unified input representation and captures explicit geospatial dependencies and implicit functional correlations in parallel through a dual-channel dynamic graph learning mechanism. It then uses an adaptive Kalman filter fusion strategy to dynamically integrate multi-layer spatiotemporal features to generate an enhanced fusion signal. The spatiotemporal dependency modeling and prediction module uses a stacked graph attention network to learn spatial relationship representations based on the enhanced fusion signal and captures temporal dynamics through a Transformer encoder-based temporal decoding module to generate charging demand prediction results for future time steps.
10. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to, when executing the computer program, implement a method for predicting electric vehicle charging demand as described in any one of claims 1 to 8.
Citation Information
Cited By
A traffic flow prediction method and system based on multi-view spatio-temporal modeling
CN122176930A