A method, device and medium for predicting electric vehicle charging load
By constructing a dynamic graph structure using grey constrained dynamic spectrum clustering and adaptive adjacency matrix, the problems of static spatiotemporal correlation modeling and accuracy decay of long-sequence prediction in electric vehicle charging load forecasting are solved, and the precise identification and efficient prediction of load patterns are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
- Filing Date
- 2026-01-14
- Publication Date
- 2026-06-02
AI Technical Summary
Existing electric vehicle charging load forecasting methods have shortcomings in areas such as static spatiotemporal correlation modeling, accuracy decay of long-sequence forecasts, and fragmented model structures. They are unable to accurately capture key fluctuation features of various types of charging stations and user behavior patterns, resulting in limited forecast accuracy.
This paper adopts grey restricted dynamic spectrum clustering, and replaces traditional Euclidean distance clustering with a multi-scale electric vehicle charging load prediction method. It uses a learnable adaptive adjacency matrix to construct a dynamic graph structure to explore the implicit spatiotemporal dependencies between different load patterns. Through a hierarchical architecture of clustering, graph construction, and prediction, the global prediction task is decomposed into three organically coordinated stages: pattern recognition, relationship modeling, and subspace prediction, thereby improving the accuracy and robustness of load prediction.
It achieves fine identification of load patterns, dynamically captures spatiotemporal dependencies, improves the accuracy of long-term time-series forecasting and the efficiency of feature utilization, and enhances the accuracy and robustness of load forecasting.
Smart Images

Figure CN122136796A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electric vehicle charging load prediction, and in particular to a method, device and medium for electric vehicle charging load prediction. Background Technology
[0002] As a core component of clean energy transportation, the large-scale development of electric vehicles is of great significance to promoting the clean energy transition. However, the disorderly charging behavior of large-scale electric vehicles is highly uncertain and spatiotemporally coupled, leading to high volatility and randomness in regional power grid loads, posing a potential threat to the stability and economic operation of the power system. Against this backdrop, accurate forecasting of electric vehicle charging load has become a crucial prerequisite for formulating scientific charging infrastructure plans, optimizing grid dispatch strategies, and enhancing the system's capacity to absorb renewable energy.
[0003] Currently, electric vehicle charging load prediction methods can be mainly divided into statistical learning-based methods and machine learning-based methods. Statistical learning methods, such as Monte Carlo simulation and probabilistic travel models, model by analyzing user driving patterns or charging preferences. Their principles are simple and easy to understand, but they are generally limited by data quality and sample size, making it difficult to fully capture the complex nonlinear characteristics of the load in real-world scenarios, and the prediction accuracy is insufficient to meet the needs of practical applications.
[0004] With the rapid development of artificial intelligence technology, machine learning and deep learning-based methods have become the mainstream of current research. These methods group load curves using clustering algorithms to reduce randomness or utilize deep neural networks to mine temporal dependencies and spatial correlations. However, existing technologies still have significant shortcomings: in clustering, most studies use the traditional K-means algorithm or spectral clustering methods based on Euclidean distance. Euclidean distance mainly reflects the geometric distance between points and cannot effectively measure the similarity of load curves in terms of shape and trend, resulting in insufficient granularity for identifying different electricity consumption patterns under the same electricity consumption level, poor periodicity of clustering results, and affecting the input quality of subsequent prediction models. In their paper "Regional Electric Vehicle Short-Term Charging Load Prediction Based on GLDSC-ConvAutoformer Model," Li Lianbing et al. proposed a combined prediction model that integrates grey constrained dynamic spectral clustering and an improved Autoformer model. This method utilizes a constrained dynamic time curvature distance to construct a grey relational matrix, replacing the traditional Euclidean distance as the similarity measure for spectral clustering. It then performs double convolution feature extraction on the clustered load curves, inputting them into an improved Autoformer model for cluster prediction. Finally, it obtains the overall load prediction result through summation and reconstruction. This method significantly outperforms traditional LSTM, TCN, and the original Transformer series models in terms of MAE and MSE, validating its effectiveness and superiority in short-term electric vehicle charging load prediction. However, in long-term time-series prediction tasks, existing models generally suffer from the gradient vanishing problem and limited temporal receptive field, leading to a significant decrease in prediction accuracy with increasing prediction steps. Chinese patent CN118861731A discloses an electric vehicle load prediction method based on TCN-BiGRU deep learning. This method divides typical electricity consumption patterns and charging event time periods, first clustering different types of electric vehicles and then performing secondary clustering on the results, before using a TCN-BiGRU neural network model to obtain the prediction results. However, this method separates the clustering and prediction stages, resulting in insufficient feature utilization and limited prediction accuracy.
[0005] Currently, there are numerous methods for predicting electric vehicle charging load. However, existing deep learning models are insufficient in extracting and fusing the spatiotemporal features of the load, making it difficult to accurately capture key fluctuation features under various charging station types and user behavior patterns. Therefore, they cannot effectively address the high randomness and strong spatiotemporal coupling of load sequences. Furthermore, existing methods often employ fragmented models in the clustering and prediction stages, resulting in insufficient feature utilization and limited prediction accuracy. In summary, existing technologies suffer from the following problems when predicting electric vehicle charging load: 1. Staticization of spatiotemporal correlation modeling: Existing graph neural network methods often rely on predefined, static graph structures (such as mapping directly based on the geographical location of charging stations), failing to dynamically capture the implicit, time-varying spatiotemporal dependencies between different load patterns.
[0006] 2. Decline in prediction accuracy over long time series: Existing models generally suffer from problems such as vanishing gradients and limited temporal receptive field in long time series prediction tasks, which leads to a significant decrease in prediction accuracy as the number of prediction steps increases.
[0007] 3. Fragmented model structure: The clustering and prediction stages are usually carried out independently, failing to form an organic collaborative framework of "clustering-mapping-prediction", which limits the efficiency of feature utilization and the overall performance of the model. Summary of the Invention
[0008] The purpose of this invention is to address the core problems of imprecise load pattern identification, non-dynamic complex spatiotemporal correlation modeling, and low accuracy in long-term prediction by providing a method, device, and medium for predicting electric vehicle charging load. It replaces traditional Euclidean distance clustering with grey constrained dynamic spectral clustering, utilizes a learnable adaptive adjacency matrix to construct a dynamic graph structure, and mines the implicit spatiotemporal dependencies between different load patterns. Through a hierarchical architecture of clustering, graph construction, and prediction, the global prediction task is decomposed into three organically coordinated stages: pattern recognition, relation modeling, and subspace prediction. This addresses the shortcomings of traditional methods, such as insufficient feature utilization and fragmented model structure, thereby improving the accuracy and robustness of load prediction.
[0009] The objective of this invention can be achieved through the following technical solutions: According to a first aspect of the present invention, a method for predicting the charging load of an electric vehicle is provided, the method comprising the following steps: Acquire electric vehicle charging load data and perform clustering; An adaptive correlation graph is constructed based on the clustering results. Each node in the graph corresponds to a cluster, and the node feature is the average sequence of all load curves in the cluster. The connection weights between nodes are adaptively adjusted through a learnable embedding matrix. Using an adaptive correlation graph as prior knowledge, spatiotemporal features are extracted and input into a load prediction model. The load prediction model performs subspace prediction independently for each node. Through multi-scale gated convolution, implicit micro-clustering of sequence features is performed in the time dimension to obtain deep clustering features. These features are then input into an autocorrelation mechanism to identify and aggregate periodic patterns in the time series, and finally, the prediction results of each cluster node are output. The prediction results of each cluster node are weighted and summed to obtain the global load prediction value.
[0010] The electric vehicle charging load data is preprocessed before being clustered. The preprocessing specifically involves: first, removing outliers caused by equipment failure or data transmission errors, and then standardizing and normalizing the data.
[0011] The clustering specifically includes the following steps: Calculate the initial null image of the load sequence: ,in, Represents the standardized load sequence i The value in the middle corresponds to the load value at the start time. Represents the standardized load sequence i The middle corresponds to the time. t The load value, Represents the load sequence after zeroing the initial point. i ; The similarity of load sequences is calculated using the constrained dynamic time bending distance algorithm, and a similarity matrix is obtained. The similarity matrix is input into the gray restricted dynamic spectral clustering algorithm to divide the load sequence into a preset number of clusters.
[0012] The adaptive adjustment of connection weights between nodes using a learnable embedding matrix specifically involves: Two learnable embedding matrices are initialized using the Xavier initialization method. Connection weights between nodes are generated using a learnable adaptive adjacency matrix, as shown in the formula: , in, This represents the dynamic connection weights between nodes. All are learnable node embedding matrices, where For the number of nodes, For embedded dimensions, and With identical structures, serving as the source node and target node respectively, their matrix product... ReLU represents the correlation score between all node pairs, and ReLU represents the non-linear activation function, while softmax represents the normalization function.
[0013] The spatiotemporal feature extraction employs a spatiotemporal feature extraction layer that integrates a multi-head attention mechanism and a graph convolutional network. The multi-head attention mechanism captures key temporal dependencies from long-term historical sequences, while the graph convolutional network operates on an adaptive correlation graph, effectively aggregating spatial information of adjacent nodes to achieve deep fusion and collaborative extraction of spatiotemporal features.
[0014] The load prediction model uses multiple one-dimensional gated convolutional kernels with different receptive fields in parallel to capture patterns at different temporal granularities: , in, The input sequence for the load forecasting model, 、 For two independent convolutions, both have a kernel size of 1. One-dimensional convolution operation, Is it capturing the first Latent states with characteristics of various time scales. That is, the S-type activation function compresses the output of the first convolution to the [0,1] interval, which is used as the gate signal; That is, the hyperbolic tangent activation function compresses the output of the second convolution to the interval [-1, 1], which is then used as candidate features. This indicates element-wise multiplication.
[0015] The autocorrelation mechanism described above performs the following steps: For the input sequence X of the autocorrelation mechanism, its autocorrelation is calculated using a method based on the Fast Fourier Transform: , in, It's a time delay. and These represent the Fourier transform and the inverse Fourier transform, respectively. The underscore indicates element-wise multiplication, and the overline indicates the conjugate complex number. From the calculated autocorrelation results Among them, the one with the highest relevance score is selected. One delay: , This indicates the highest relevance score. k One index; According to the selection Each time delay is applied to shift the original sequence X accordingly, and then the sequences are fused using an attention mechanism. , in, It's a time delay. The corresponding correlation score, It is a sequence Backward time shift The sequence obtained after 1 time step It is a learnable parameter matrix. It is the periodic information representation obtained from the final aggregation.
[0016] When performing a weighted summation of the prediction results for each cluster node, the weights are determined based on the proportion of the number of original load curves contained in each cluster node to the total number of load curves.
[0017] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.
[0018] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0019] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention innovatively proposes to construct a dynamic graph structure using clusters as nodes, abandoning the traditional static graph construction method based on the geographical location or fixed association of charging stations. Each node corresponds to a load pattern obtained through gray restricted dynamic spectrum clustering, and the node feature is the average sequence of all load curves within the cluster. The key breakthrough lies in generating an adaptive adjacency matrix through two learnable embedding matrices: instead of predefining the node connection relationship, the graph structure can dynamically adjust the connection weights between nodes entirely through matrix multiplication, ReLU nonlinear activation, and softmax normalization. This design enables the model to accurately capture the complex spatiotemporal correlations between different load patterns, breaking through the limitations of traditional methods that rely on prior knowledge.
[0020] (2) This invention constructs a unique hierarchical architecture with two clustering stages, realizing a complete analysis process from macroscopic pattern segmentation to microscopic feature clustering. The first clustering uses gray restricted dynamic spectrum clustering to perform macroscopic pattern segmentation of the load curve, completing coarse-grained behavioral pattern recognition; the second clustering is implicitly performed in the prediction stage, achieving microscopic feature clustering in the time dimension through multi-scale gated convolution. By using convolution kernels with different receptive fields in parallel, short-term, medium-term, and long-term time features are captured respectively. These latent states at different scales essentially perform secondary clustering of the time series at the feature level according to periodicity and volatility, forming a deep analysis system from macroscopic behavioral patterns to microscopic time features, thereby improving the accuracy of load prediction. Attached Figure Description
[0021] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a schematic diagram of the electric vehicle charging load prediction process of the present invention; Figure 3 This is a schematic diagram of electric vehicle charging load prediction results in one embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0023] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0024] Example 1 This embodiment provides a method for predicting the charging load of electric vehicles, such as... Figure 1 As shown, it includes the following steps: S1: Acquire electric vehicle charging load data and perform clustering.
[0025] S11: Collect electric vehicle charging load data and preprocess the raw data. First, remove outliers caused by equipment failure or data transmission errors, and then standardize and normalize the data to provide high-quality, standardized input for subsequent model training.
[0026] S12, Grey Limited Dynamic Spectral Clustering (GLDSC).
[0027] Clustering is performed on the standardized load curves to extract load patterns with trends and periodicity. For example... Figure 2 As shown, firstly, the initial null image of the load sequence is calculated: ,in, Represents the standardized load sequence i The value in the middle corresponds to the load value at the start time. Represents the standardized load sequence i The middle corresponds to the time. t The load value, Represents the load sequence after zeroing the initial point. i .
[0028] Then, the Limited Dynamic Time Warping (LDTW) algorithm is used to calculate curve similarity. The LDTW distance calculation formula is: , in These represent two load sequences to be compared. 、 Representing sequences respectively At any moment and Data points, This is a regular path that satisfies window width and slope constraints, and the path specifies the sequence. and The alignment of data points between them.
[0029] The similarity matrix is obtained by calculating the similarity matrix using the above formula. The similarity matrix is then input into the gray restricted dynamic spectrum clustering algorithm to divide the load sequence into a preset number of clusters.
[0030] S2. An adaptive correlation graph is constructed based on the clustering results. Each node in the graph corresponds to a cluster. The node feature is the average sequence of all load curves in the cluster. The connection weights between nodes are adaptively adjusted through a learnable embedding matrix.
[0031] like Figure 2As shown, this embodiment does not predefine the connection relationships between nodes. Instead, it uses two learnable embedding matrices, initialized using the Xavier method, to ensure training stability and convergence efficiency. The ReLU function introduces nonlinear activation to guarantee the non-negativity of edge weights; the softmax function normalizes the edge weights, enabling the adjacency matrix to dynamically represent the relative influence strength between nodes. This design allows the graph structure to no longer rely on prior knowledge, but rather adaptively adjusts connection weights through a data-driven approach, thereby accurately capturing the complex spatiotemporal relationships between load patterns. Edge weights are generated using a learnable adaptive adjacency matrix, with the following formula: , in, This represents the dynamic connection weights between nodes. All are learnable node embedding matrices, where For the number of nodes, For embedded dimensions, and With identical structures, serving as the source node and target node respectively, their matrix product... ReLU represents the computation of correlation scores between all pairs of nodes, thereby dynamically constructing spatial dependencies between nodes, rather than relying on a predefined static graph structure. ReLU represents a non-linear activation function, and softmax represents a normalization function.
[0032] S3 uses an adaptive correlation graph as prior knowledge to extract spatiotemporal features.
[0033] This embodiment uses an adaptive correlation graph as prior knowledge and employs a spatiotemporal feature extraction layer that integrates a multi-head attention mechanism and a graph convolutional network to extract spatiotemporal features, guiding the model to focus on key nodes and output weighted features. The multi-head attention mechanism is responsible for capturing key temporal dependencies from long-term historical sequences, while the graph convolutional network operates on this dynamic graph structure, effectively aggregating spatial information of adjacent nodes (i.e., correlation load patterns) to achieve deep fusion and collaborative extraction of spatiotemporal features. The temporal and spatial features are fused into a dynamic feature representation matrix, as shown in the formula: , in The fused feature matrix is obtained by concatenating the outputs of all attention heads along the feature dimension. For the first The output of each attention head, The total number of attention heads.
[0034] Chebyshev polynomial graph convolution is used to mine spatial features. The formula is as follows: , in, This is the node feature matrix output after the graph convolution operation. To standardize the Laplace matrix, For the first Trainable parameters corresponding to an order polynomial, For Chebyshev polynomials, It is the order.
[0035] S4. The spatiotemporal features are input into the load prediction model. The load prediction model performs subspace prediction independently for each node. Through multi-scale gated convolution, the sequence features are implicitly clustered in the time dimension to obtain deep clustering features. These features are then input into the autocorrelation mechanism to identify and aggregate the periodic patterns in the time series, and finally output the prediction results of each cluster node.
[0036] After completing the first preliminary clustering of load patterns, the model further deepens feature extraction and prediction through a second clustering. The first clustering is achieved in step S1 using gray constrained dynamic spectrum clustering to perform macroscopic pattern division of the load curve; the second clustering is implicitly performed in the prediction stage, independently performing subspace prediction for each cluster node, and implicitly performing micro-clustering of sequence features in the time dimension through multi-scale gated convolution, thereby performing more refined clustering analysis of load behavior within the subspace.
[0037] Assume the input sequence is Multiple one-dimensional gated convolutional kernels with different receptive fields are used in parallel to capture patterns at different temporal granularities: , in Is it capturing the first Latent states with characteristics of various time scales. The feature sequence is input to this module. , For two independent convolutions, both have a kernel size of 1. The one-dimensional convolution operation is used to generate the gated signal and candidate features, respectively. That is, the S-type activation function compresses the output of the first convolution to the [0,1] interval, which is used as the gate signal; That is, the hyperbolic tangent activation function compresses the output of the second convolution to the interval [-1, 1], which is then used as candidate features. This indicates element-wise multiplication.
[0038] These features at different scales This can be viewed as a secondary clustering of time series at the feature level based on periodicity and volatility. Subsequently, these features are fused and input into an autocorrelation mechanism to further enhance the identification and aggregation of periodic phases.
[0039] The autocorrelation mechanism aims to efficiently identify and aggregate periodic patterns in time series, and mainly includes the following three core steps: (1) For an input sequence X with autocorrelation mechanism, its autocorrelation can be efficiently calculated by a method based on Fast Fourier Transform (FFT).
[0040] , in, It's a time delay. and These represent the Fourier transform and the inverse Fourier transform, respectively. This indicates element-wise multiplication, and the overline indicates a conjugate complex number. The purpose of this step is to quickly obtain the correlation score between X and itself at different time delays.
[0041] (2) From the calculated autocorrelation results Among them, the one with the highest relevance score is selected. A delay, delay This represents the most significant period length in the sequence.
[0042] , in, This indicates the highest relevance score. Indexes.
[0043] (3) Based on the selected top-k delays, the original sequence X is time-shifted (Rolled) accordingly, and then the information of these delay sequences is aggregated. This aggregation is not a simple weighted average, but is fused through an attention mechanism, allowing the model to learn how to extract valuable parts from historical information of different periods.
[0044] , in, It's a time delay. The corresponding correlation score, It is a sequence Backward time shift The sequence obtained after 1 time step It is a learnable parameter matrix. This is the final aggregated representation of periodic information. This process weights and fuses information from historical moments with the same phase into the current moment.
[0045] In summary, this embodiment makes key improvements to the Autoformer framework: on the one hand, it uses multi-scale gated convolution to simultaneously capture short-term, medium-term, and long-term temporal features; on the other hand, it introduces an autocorrelation mechanism to more efficiently identify and utilize periodic patterns in the load sequence.
[0046] S5 performs a weighted summation of the prediction results for each cluster node to obtain the global load prediction value, ensuring that the contribution of user groups with different behavioral patterns to the total load is reasonably reflected.
[0047] In this embodiment, the weights are determined based on the proportion of original curves contained in each cluster, and the formula for calculating the global load prediction value is as follows: , in This is the final global load forecast obtained through weighted summation. The total number of clusters, , is the The weights of each cluster node, It is the first Independent prediction results for each cluster node, For clusters i The number of curves.
[0048] Example 2 This embodiment uses electric vehicle charging load data from 50 charging stations in a city over a year as an example to illustrate the effectiveness of the method in Embodiment 1. The data sampling interval is 30 minutes, with a total of 48 time points per day. Outlier data points exceeding three times the standard deviation are removed using the 3σ criterion. Data standardization employs the Z-score standardization method, scaling the data to a distribution with a mean of 0 and a standard deviation of 1. The formula is: , in, This is the average load. The standard deviation is denoted as .
[0049] The optimal number of clusters was determined using the silhouette coefficient method, iterating through cluster numbers from 2 to 12, and finally determining the optimal number of clusters k=5. Spectral clustering was then performed, dividing the load curves into 5 clusters, where clusters 0, 2, 3, and 4 exhibit clear trends and periodicity, while cluster 1 is a residual noise cluster (containing a small number of curves). The constrained dynamic time bending distance algorithm was used to calculate curve similarity, with a window width of 3 and a slope of 1.
[0050] Using the five clusters obtained in the previous step as nodes, a dynamic graph structure is constructed to obtain an adaptive correlation graph. The feature of each node is represented by the average sequence of all load curves within its cluster.
[0051] We employ a multi-head attention mechanism, setting the number of heads H=3. We capture long-term temporal dependencies and introduce residual attention connections to mitigate gradient vanishing.
[0052] We set up gated convolutional units with kernel sizes of 3, 5, and 7 in parallel to capture short-term, medium-term, and long-term temporal features. We predict independently for each cluster node and add a double one-dimensional convolutional layer on top of the Autoformer (the first layer has 3×1 kernels and 7 kernels, and the second layer has 2×1 kernels and 5 kernels) to enhance local feature extraction.
[0053] Finally, the prediction results of the five cluster nodes are weighted and summed according to the number of original curves they contain, and the global charging load prediction value is reconstructed.
[0054] Validation was performed using the Dundee dataset, which was partitioned into training, validation, and test sets in a 6:2:2 ratio. Model parameters: 4 encoder layers, 1 decoder layer, 8 multi-head attention heads, 48 model dimensions, 32 batch size, and a learning rate of 0.001. Training was conducted for 3000 epochs, with the learning rate multiplied by 0.9 at epochs 1000 and 2000. The training results are shown in the image below. Figure 3 As shown.
[0055] The results of the prediction performance comparison with the baseline method are shown in Table 1.
[0056] Table 1. Comparison of prediction performance with baseline methods As shown in Table 1, the method of the present invention is significantly better than the comparative method in terms of MAE, MAPE and RMSE, and the training time is shorter, which verifies its efficiency and accuracy.
[0057] Example 3 To verify the universality and robustness of the method in different scenarios, charging load data from 80 public charging stations in a certain area of a city for nine consecutive months were selected as the external validation dataset. The data sampling interval was 15 minutes, with a total of 96 time points per day. Simultaneously, meteorological data (including temperature, humidity, wind speed, etc.) and date type (weekday / weekend / holiday) were collected as auxiliary features for the corresponding time periods. In the preprocessing stage, the 3σ criterion was used to remove outliers, and Z-score standardization was applied to both the load and meteorological data.
[0058] After data preprocessing, the load curves were clustered using the same Grey Restricted Dynamic Spectrum Clustering (GLDSC) method as in Example 1. The optimal number of clusters was determined to be 6 using the silhouette coefficient method, dividing all load curves into 6 clusters with clear behavioral patterns.
[0059] Using six clusters as nodes, a dynamic graph structure is constructed through a learnable embedding matrix to obtain an adaptive correlation graph. The node features are the average sequence of load curves within each cluster.
[0060] The number of multi-head attention heads in the spatiotemporal feature extraction layer is set to 4, and the graph convolution uses Chebyshev multinomials (K=3). In the prediction module, multi-scale gated convolutional units with kernel sizes of 3, 5, and 7 are used in parallel, and an autocorrelation mechanism is introduced in the improved Autoformer framework.
[0061] The dataset was divided into training, validation, and test sets in a 7:2:1 ratio. Key model parameters were set as follows: encoder layers 3, decoder layers 2, model dimension 64, batch size 16, and learning rate 0.0005. Training was performed for 4000 epochs, with the learning rate decaying to 0.8 at epochs 1500 and 3000.
[0062] To comprehensively evaluate performance, the method of this invention was compared with several mainstream prediction models on the same dataset, including LSTM, TCN, Transformer, Informer, Autoformer, GraphWaveNet, and the recently published Ada-STNet model. All comparison models used the same input data and training-validation-test set split, and were trained using their reported optimal parameters. The prediction performance comparison results are shown in Table 2. It is evident that the method of this invention has higher prediction accuracy, shorter training time, and higher feature utilization efficiency.
[0063] Table 2 Comparison of Predictive Performance Example 4 The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0064] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0065] The processing unit executes the various methods and processes described above, such as methods S1 to S5. For example, in some embodiments, methods S1 to S5 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1 to S5 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S5 by any other suitable means (e.g., by means of firmware).
[0066] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0067] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0068] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0069] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting the charging load of electric vehicles, characterized in that, The method includes the following steps: Acquire electric vehicle charging load data and perform clustering; An adaptive correlation graph is constructed based on the clustering results. Each node in the graph corresponds to a cluster, and the node feature is the average sequence of all load curves in the cluster. The connection weights between nodes are adaptively adjusted through a learnable embedding matrix. Using an adaptive correlation graph as prior knowledge, spatiotemporal features are extracted and input into a load prediction model. The load prediction model performs subspace prediction independently for each node. Through multi-scale gated convolution, implicit micro-clustering of sequence features is performed in the time dimension to obtain deep clustering features. These features are then input into an autocorrelation mechanism to identify and aggregate periodic patterns in the time series, and finally, the prediction results of each cluster node are output. The prediction results of each cluster node are weighted and summed to obtain the global load prediction value.
2. The electric vehicle charging load prediction method according to claim 1, characterized in that, The electric vehicle charging load data is preprocessed before being clustered. The preprocessing specifically involves: first, removing outliers caused by equipment failure or data transmission errors, and then standardizing and normalizing the data.
3. The electric vehicle charging load prediction method according to claim 1, characterized in that, The clustering specifically includes the following steps: Calculate the initial null image of the load sequence: ,in, Represents the standardized load sequence i The value in the middle corresponds to the load value at the start time. Represents the standardized load sequence i The middle corresponds to the time. t The load value, Represents the load sequence after zeroing the initial point. i ; The similarity of load sequences is calculated using the constrained dynamic time bending distance algorithm, and a similarity matrix is obtained. The similarity matrix is input into the gray restricted dynamic spectral clustering algorithm to divide the load sequence into a preset number of clusters.
4. The electric vehicle charging load prediction method according to claim 1, characterized in that, The adaptive adjustment of connection weights between nodes using a learnable embedding matrix specifically involves: Two learnable embedding matrices are initialized using the Xavier initialization method. Connection weights between nodes are generated using a learnable adaptive adjacency matrix, as shown in the formula: , in, This represents the dynamic connection weights between nodes. All are learnable node embedding matrices, where For the number of nodes, For embedded dimensions, and With identical structures, serving as the source node and target node respectively, their matrix product... ReLU represents the correlation score between all node pairs, and ReLU represents the non-linear activation function, while softmax represents the normalization function.
5. The electric vehicle charging load prediction method according to claim 1, characterized in that, The spatiotemporal feature extraction employs a spatiotemporal feature extraction layer that integrates a multi-head attention mechanism and a graph convolutional network. The multi-head attention mechanism captures key temporal dependencies from long-term historical sequences, while the graph convolutional network operates on an adaptive correlation graph, effectively aggregating spatial information of adjacent nodes to achieve deep fusion and collaborative extraction of spatiotemporal features.
6. The electric vehicle charging load prediction method according to claim 1, characterized in that, The load prediction model uses multiple one-dimensional gated convolutional kernels with different receptive fields in parallel to capture patterns at different temporal granularities: , in, The input sequence for the load forecasting model, 、 For two independent convolutions, both have a kernel size of 1. One-dimensional convolution operation, Is it capturing the first Latent states with characteristics of various time scales. That is, the S-type activation function compresses the output of the first convolution to the [0,1] interval, which is used as the gate signal; That is, the hyperbolic tangent activation function compresses the output of the second convolution to the interval [-1, 1], which is then used as candidate features. This indicates element-wise multiplication.
7. The electric vehicle charging load prediction method according to claim 1, characterized in that, The autocorrelation mechanism described above performs the following steps: For the input sequence X of the autocorrelation mechanism, its autocorrelation is calculated using a method based on the Fast Fourier Transform: , in, It's a time delay. and These represent the Fourier transform and the inverse Fourier transform, respectively. The underscore indicates element-wise multiplication, and the overline indicates the conjugate complex number. From the calculated autocorrelation results Among them, the one with the highest relevance score is selected. One delay: , This indicates the highest relevance score. k One index; According to the selection Each time delay is applied to shift the original sequence X accordingly, and then the sequences are fused using an attention mechanism. , in, It's a time delay. The corresponding correlation score, It is a sequence Backward time shift The sequence obtained after 1 time step It is a learnable parameter matrix. It is the periodic information representation obtained from the final aggregation.
8. The electric vehicle charging load prediction method according to claim 1, characterized in that, When performing a weighted summation of the prediction results for each cluster node, the weights are determined based on the proportion of the number of original load curves contained in each cluster node to the total number of load curves.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.