A load prediction method and system for electric vehicle charging stations based on attention-based spatiotemporal multi-graph convolutional networks
By constructing an attention-based spatiotemporal multi-graph convolutional network, the spatiotemporal correlation of electric vehicle charging stations is captured, solving the problem of insufficient prediction accuracy in existing technologies and achieving more accurate charging load prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2026-03-10
AI Technical Summary
Existing graph neural network models fail to fully utilize spatiotemporal features and important information in electric vehicle charging station load forecasting, resulting in insufficient prediction accuracy.
An attention-based spatiotemporal multi-graph convolutional network is adopted. By constructing a temporal convolutional network, a temporal and spatial attention mechanism, and a multi-graph convolutional network, the spatiotemporal correlation of charging stations is captured, and physical and virtual graphs are constructed to predict charging load.
It improves the accuracy of charging load forecasting, enabling more accurate prediction of load changes at electric vehicle charging stations and optimizing resource scheduling and power distribution.
Smart Images

Figure CN117273076B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric vehicles, in particular to an electric vehicle charging station load prediction method and system based on a spatio-temporal multi-graph convolution network. BACKGROUND
[0002] With the depletion of fossil energy and the increasing environmental pollution, electric vehicles as a new type of efficient and green transportation tool have been widely promoted, and the number of related supporting charging facilities has also grown rapidly. In the process of deploying a large number of electric vehicle charging stations, charging load prediction can help charging stations optimize resource scheduling and planning, rationally allocate power resources, and ensure the economic operation of charging stations, which is crucial to the economic operation of charging stations and the stable operation of power systems.
[0003] In areas where charging stations are built, charging stations connect power networks and transportation networks, so charging load prediction needs to consider not only the historical load of charging stations in the time dimension, but also the geographical location information of neighboring charging stations in the spatial dimension. A prediction method of a graph neural network in the prior art cascades a graph convolution layer and a long short-term memory layer to predict spatio-temporal charging load, but the model uses a connection graph based on a fixed position topology, relies on mutual connection relationships, and cannot fully extract correlations, and the model does not pay attention to the changing spatio-temporal features and important information in the training stage, which has a significant impact on the accuracy of load prediction. SUMMARY
[0004] In view of the deficiencies in the prior art, in order to improve the prediction accuracy of the charging load of each charging station, the present application provides an electric vehicle charging station load prediction method and system based on a spatio-temporal multi-graph convolution network, which considers influencing factors such as historical load, weather information, holiday information and electricity price information, fully excavates the spatio-temporal correlation of charging load, captures spatio-temporal dynamic characteristics, and collaboratively predicts the charging load of each electric vehicle charging station in the time dimension and the spatial dimension, thereby improving the prediction accuracy of the charging load.
[0005] To solve the above technical problems, the technical scheme provided by the present application is as follows:
[0006] An electric vehicle charging station load prediction method based on a spatio-temporal multi-graph convolution network, comprising the following steps:
[0007] Step S1, obtaining a data set of historical load, meteorological data, date and economic factors of charging stations in a certain area, and screening the features of the data as input data;
[0008] Step S2, capturing the features of the input data in the time dimension by constructing a time convolution network component;
[0009] Step S3, the output of the time convolution network component is subjected to an attention mechanism component, i.e., a time attention mechanism and a space attention mechanism, which respectively capture important information of data in the time and space dimensions, including historical load of charging stations in a certain area, meteorological data, date and economic factors;
[0010] Step S4, a physical graph of geographical position correlation and a virtual graph of charging load correlation between charging stations in an area are constructed to obtain a multi-graph convolution network component; the time convolution network component, the attention mechanism component and the multi-graph convolution component are encapsulated into a space-time module, and a space-time convolution layer is obtained by stacking multiple space-time modules;
[0011] Step S5, historical data of charging load of charging stations in a certain area in a predetermined time period are taken, input features are selected, a training set, a verification set and a test set are constructed, the training set is input into the attention-based space-time multi-graph convolution network model, the model is trained, and the verification set is used to adjust hyperparameters; after testing with the test set, a mature attention-based space-time multi-graph convolution network electric vehicle charging station load prediction model is obtained;
[0012] Step S1 specifically includes the following steps:
[0013] 1a). Take historical data of charging load of charging stations in a certain area in a predetermined time period, and the data types include historical load, meteorological data, date and economic factors;
[0014] 1b). The maximum information coefficient (MIC) is used to analyze the linear or nonlinear correlation between two variables, and the threshold for screening features is that the maximum information number with the predicted load is greater than or equal to 0.3;
[0015]
[0016] wherein I mic is the maximum information coefficient; p a (·) represents the joint probability density; d x and d y represent two different feature variables; a x represents the number of grids divided along the x-axis; and b y represents the number of grids divided along the y-axis.
[0017] Step S2 specifically includes the following steps:
[0018] 2a). The screened feature data are input into an input layer composed of linear convolution, which is used to convert the data into multi-dimensional information data;
[0019] 2b). The multi-dimensional information data is sent into a space-time convolution layer, which is composed of a time convolution, an attention mechanism and a multi-graph convolution network component; the time convolution is used to capture information of the multi-dimensional information data in the time dimension, and a dilated causal convolution is selected here, which has the form:
[0020]
[0021] where t represents the time step; represents the input data sequence, which is the feature value obtained after MIC screening; represents the filter; the symbol * represents the standard convolution operation; the dilated coefficient d s represents the interval of the jump; S represents the size of the convolution kernel; s is the convolution kernel number;
[0022] 2c). The dilated causal convolution is combined with the gating mechanism to obtain a time convolution component:
[0023] H g =σ a (ψ1*χ)⊙σ b (ψ2*χ) (3)
[0024] where H g represents the output of the time convolution component; χ represents the input data, which is the dilated causal convolution result; ⊙ represents the element-wise multiplication operator; σ a represents the sigmoid activation function; σ b represents the tangent hyperbolic activation function; ψ1 and ψ2 represent the parameters of the model.
[0025] Step S3 specifically includes the following steps:
[0026] 3a). There is a correlation between the charging loads at different time steps, and the correlation of the charging loads in the time dimension is dynamic. A time attention mechanism is introduced to adaptively assign the importance of different features to the input, represented as E e :
[0027]
[0028] where E e is a time attention matrix; represents the input of the rth space-time block, N is the number of charging stations; C r-1 is the number of characteristic quantities, T r-1 is the time value, X Tr-1 is the value of all charging stations and characteristics at time T r-1 ; and are learnable parameters;
[0029] Obtain the correlation matrix E of the time dimension e Then, E e in E i,j is sent into the softmax function to calculate the normalized attention distribution E' i,j :
[0030]
[0031] where E' i,j is an element in the normalized time attention matrix, representing the correlation weight between time i and time j; E i,j is an element in the time attention matrix E e ;
[0032] The input data is multiplied by the normalized attention distribution, so as to assign importance values to the data of each time step, and the output value is calculated as follows:
[0033]
[0034] where N is the number of charging stations, C r-1 is the number of features, and T r-1 is the time value; is the data of the charging load at T r-1 after time attention processing;
[0035] 3b). Since the mutual dependence between the charging loads of different sites is highly dynamic, a spatial attention mechanism is adopted to capture the different characteristics between the charging stations, and a spatial correlation matrix is formed, denoted as S s :
[0036]
[0037] where S s is the spatial attention matrix; is a learnable parameter;
[0038] Then, the softmax function is used to normalize the spatial correlation matrix:
[0039]
[0040] where S' i,j is an element in the normalized spatial attention matrix, representing the correlation weight between charging station i and charging station j; S i,j is an element of the spatial attention matrix;
[0041] 3c). The attention matrix of the spatial dimension is applied to the adjacency matrix in the graph convolution to automatically obtain the best performance under different weights.
[0042] Step S4 specifically comprises the following steps:
[0043] 4a). Define the distance matrix A consisting of d , which represents the geometric position correlation between charging stations:
[0044]
[0045] wherein is the distance matrix element; d i,j represents the distance between stations i and j; the parameters and ε d represent the threshold value for defining the sparse matrix to reduce the time and space complexity;
[0046] 4b). Find the Euclidean distance of the charging load between stations i and j Use the similarity element to represent the similar load due to similar charging mode, and finally define the similarity matrix consisting of
[0047]
[0048]
[0049] wherein is the Euclidean distance of the charging load between stations i and j; x t,i represents the charging load of charging station i at time step t, and T is the total time length; x t,j represents the charging load of charging station j at time step t; σ S represents the decay rate for controlling the observation value;
[0050] 4c). Construct the generated physical graph from the distance matrix, construct the generated virtual graph from the similarity matrix, combine the physical graph and the virtual graph in a new fusion graph, and generate a new graph by weighted sum of elements in different graphs to obtain a multi-graph convolution network component; specifically as follows:
[0051] L = D - A is the Laplacian matrix of the graph signal representation, wherein A is the adjacency matrix and D is the degree matrix; standardization is performed to obtain wherein I N is the unit matrix; the diagonal matrix represents the degree matrix, which is calculated as D ii = ∑ j A ij , wherein A ij is the i-th row and j-th column element in A, and D ii The element in row i and column i of D;
[0052] Rewriting L in eigenvalue decomposition form yields L = UΛU, where U represents the eigenvector matrix. A diagonal matrix representing eigenvalues;
[0053] For a charging load data sequence with a given time step t The Fourier transform of a data graph can be represented as: Its inverse transform is expressed as Where U is an orthogonal matrix based on Laplace's theorem;
[0054] The convolutional form can be represented as:
[0055] g θ * G x = F -1 (F(g θ )⊙F(x))=g θ (L)x=g θ (UΛU T )x=Ug θ (Λ)U T x (12)
[0056] Where F(·) and F -1 (·) represents the Fourier function and its inverse transform; * G Represents graph convolution operation; g θ denoted by ; x represents the input charging load data sequence; L is the Laplacian matrix of the graph; U represents the eigenvector matrix of Laplacian theorem; Λ represents the diagonal matrix of eigenvalues;
[0057] Classical spectral convolution has a large computational cost, with a time complexity of O(N). 2 Using Chebyshev polynomial function transformation to obtain Chebyshev graph convolution can reduce computational complexity, as shown in the following equation:
[0058]
[0059] in λ max G represents the largest eigenvalue of L; θ Represents the convolution kernel; * G Represents graph convolution operation; Represents the polynomial coefficients; k represents the order of the current neighbor information update; K represents the total order of the neighbor information update; x is the charging load data sequence; ⊙ represents the element-wise multiplication operator; S s ' is the standardized spatial attention matrix;
[0060] According to Chebyshev polynomial theory, the function is represented as T k(x)=2xT k-1 (x)-T k-2 (x), where T0(x) = 1, T1(x) = x; the amount of data captured at the node center is controlled by adjusting the parameter K;
[0061] Applying a linear rectified function (ReLU) σ to the graph convolutional layer c σ c (g θ * G x);
[0062] In time slice T r-1 The graph convolution result obtained from the r-th layer is:
[0063]
[0064] in Input data; The charging load after time attention processing in T r-1 Data at the time;* G Represents graph convolution operation; g θ Denotes the convolution kernel, σ c It is a linear rectified function (ReLU); thus enabling the nodes in the graph to update using their own data and that of their neighbors;
[0065] From distance matrix A d The result of the physical graph convolution is as follows:
[0066]
[0067] Where L d The Laplace matrix of the physical graph; The result of convolution of the physical graph;
[0068] From similarity matrix A s The virtual graph convolution result is obtained:
[0069]
[0070] Where L s The Laplace matrix of the virtual graph; The result of virtual graph convolution;
[0071] The weight parameters are multiplied by the convolution of each graph and summed to obtain the output of the multi-graph convolutional network component.
[0072]
[0073]
[0074] in is the multi-graph convolution result; W d and W s denote learnable parameters; W' d and W' s denote the normalized weight parameters of the physical graph and the virtual graph; σ d is the softmax function;
[0075] 4d). Encapsulate the temporal convolution network component, the attention mechanism component and the multi-graph convolution network component into a spatio-temporal module; stack the spatio-temporal modules to form a spatio-temporal convolution layer to expand the receptive field and capture the correlation at different time levels; add a skip connection to the spatio-temporal module to extract different features in each spatio-temporal module, thereby aggregating data and transmitting to the output layer; and use a residual connection for the spatio-temporal convolution layer to solve the problem of network degradation;
[0076] 4e). Send the data output by the spatio-temporal convolution layer into the output layer, which is composed of two linear convolution functions and two ReLU activation functions, to reduce the data to the output dimension, thereby obtaining the prediction results of the charging load of each charging station at different times.
[0077] Step S5 specifically includes the following steps:
[0078] 5a). Take the historical data of the charging load of charging stations in a certain area for a predetermined period of time, select input features, and construct a training set, a validation set and a test set;
[0079] 5b). Put the training set into the attention-based multi-graph convolution network to obtain the prediction results of the charging load of each charging station at different times; construct a loss function to train and optimize the parameters of the attention-based spatio-temporal multi-graph convolution network model;
[0080]
[0081] wherein loss denotes the loss function; denotes the actual value of the charging load at charging station n at time step t, denotes the predicted value of the charging load at charging station n at time step t; T denotes the total time step of the predicted value; N denotes the number of charging stations;
[0082] 5c). Evaluate the prediction performance of the attention-based spatio-temporal multi-graph convolution network model (STMGCN) and select mean squared error (MSE), mean absolute error (MAE), mean percentage error (MAPE) and root mean squared error (RMSE) as the measurement indicators:
[0083]
[0084]
[0085]
[0086]
[0087] where MSE is the mean square error, MAE is the mean absolute error, MAPE is the mean percentage error, and RMSE is the root mean square error; denotes the actual value of the charging load at the charging station n at the time step t, denotes the predicted value of the charging load at the charging station n at the time step t; T denotes the total time step of the predicted value; and N denotes the number of charging stations.
[0088] The electric vehicle charging station load prediction system based on the attention spatiotemporal multi-graph convolution network comprises a data acquisition module, a feature extraction module and a load prediction module.
[0089] The data acquisition module is used to acquire historical load, meteorological data, date and economic factor data of charging stations in a set time and region, and store the data in a database.
[0090] The feature extraction module is used to filter feature data required by the network model from the acquired data, and then perform standardization processing to serve as input data.
[0091] The load prediction module is used to construct a multi-graph convolution network model based on attention, capture features of input data in the time dimension through construction of a time convolution network component; capture important information of data in the time and space dimensions through an attention mechanism component, i.e., a time attention mechanism and a space attention mechanism, respectively; construct a physical graph of geographical position correlation and a virtual graph of charging load correlation between charging stations in a region to obtain a multi-graph convolution network component; encapsulate the time convolution network component, the attention mechanism component and the multi-graph convolution component into a spatiotemporal module, obtain a spatiotemporal convolution layer through stacking of multiple spatiotemporal modules, select input features of historical data of charging loads of charging stations in a region in a predetermined time period, construct a training set, a validation set and a test set, input the training set into the spatiotemporal multi-graph convolution network model based on attention, train the model, and adjust hyperparameters by using the validation set; and obtain a mature electric vehicle charging station load prediction model based on the attention spatiotemporal multi-graph convolution network through testing of the test set.
[0092] Compared with the prior art, the electric vehicle charging station load prediction system based on the attention spatiotemporal multi-graph convolution network has the following beneficial effects:
[0093] The application considers the correlation of the time dimension and the space dimension of the charging load, and constructs a spatiotemporal graph structure load model of the charging load containing traffic and geographical location factors. The time characteristics of the data are captured through the gated causal convolution, the spatiotemporal attention mechanism is combined with the convolution operation, and a spatiotemporal multi-graph convolution network based on a physical graph and a virtual graph is introduced, which can directly extract the dynamic correlation characteristics of the charging load in the time and space dimensions, and realizes the collaborative prediction of the charging load of each electric vehicle charging station.
[0094] Compared with the prediction method of the charging load graph neural network in the prior art, different graphs are constructed based on geographical location and human domain knowledge in the application to capture different dependency relationships between charging stations. Moreover, the spatiotemporal attention mechanism is adopted to directly focus on important data, and the prediction accuracy is improved. BRIEF DESCRIPTION OF DRAWINGS
[0095] The accompanying drawings are included to provide a further understanding of the application, and constitute a part of the specification, together with the embodiments of the application, for explaining the application, and do not constitute a limitation on the application. In the drawings:
[0096] Figure 1 The spatiotemporal distribution diagram of the charging load of each charging station of the application;
[0097] Figure 2 The workflow diagram of the application;
[0098] Figure 3 The overall structure diagram of the application;
[0099] Figure 4 The maximum information coefficient diagram of each data feature of the application;
[0100] Figure 5 The index comparison diagram of the load prediction of different models of the application. DETAILED DESCRIPTION
[0101] The application proposes an electric vehicle charging station load prediction method and system based on an attention spatiotemporal multi-graph convolution network, including the following steps:
[0102] As shown in Figure 1 , the charging station links the power system and the traffic system, and the charging load thereof is not only affected by the driver behavior, but also affected by the above two systems, including traffic, weather and mutual location factors. Therefore, the prediction of the charging load not only needs to consider the time dimension information of itself, but also needs to focus on the space dimension information of the adjacent area charging station. Based on the historical load and geographical information of the charging station, the application proposes a load prediction method based on an attention spatiotemporal multi-graph convolution network, which is used for predicting the time and space charging load of the charging station.
[0103] As Figure 2 shown, it is a workflow diagram of the present application, comprising the following steps:
[0104] (1) Step S1, obtaining the historical load, meteorological data, date and economic factor data set of charging stations in a certain area, and screening the characteristics of the data as input data.
[0105] (2) Step S2, capture the features of the input data in the time dimension by constructing a time convolution network component.
[0106] (3) Step S3, the output of the time convolution network component is subjected to an attention mechanism component-time attention mechanism and spatial attention mechanism, which respectively captures important information of the data in the time and space dimensions, including the historical load, meteorological data, date and economic factors of the charging stations in a certain area.
[0107] (4) Step S4, construct a physical graph of the geographical position correlation and a virtual graph of the charging load correlation between charging stations in a certain area, and obtain a multi-graph convolution network component. Encapsulate the time convolution network component, the attention mechanism component and the multi-graph convolution component into a space-time module, and obtain a space-time convolution layer by stacking multiple space-time modules.
[0108] (5) Step S5, take the historical data of the charging load of the charging stations in a certain area in a predetermined time period, select the input features, construct the training set, the validation set and the test set, input the training set into the attention-based space-time multi-graph convolution network model, train the model, and adjust the hyperparameters using the validation set. After testing with the test set, a mature attention-based space-time multi-graph convolution network electric vehicle charging station load prediction model is obtained.
[0109] (6) Step S6, use the mature attention-based space-time multi-graph convolution network electric vehicle charging station load prediction model to establish a space-time charging load prediction system to predict the charging load of the charging stations in the area.
[0110] As Figure 3 shown, it is a whole structure diagram of the present application.
[0111] Step S1 specifically comprises the following steps:
[0112] 1a). Take the historical data of the charging load of the charging stations in a certain area in a predetermined time period, and the data types include historical load (charging power), meteorological data (temperature, wind direction, wind speed, air pressure, humidity and rainfall probability), date (time, week and holiday) and economic factor (electricity price).
[0113] 1b). The lower correlation of the features will limit the improvement of the prediction performance, while too many features will increase the size of the input data, which will greatly increase the complexity of the network and the training time. Therefore, the maximum information coefficient (MIC) is used to analyze the linear or nonlinear correlation between two variables, and the threshold for screening features is that the maximum information number of the predicted load is greater than or equal to 0.3. As shown in FIG. 1b, label A represents the historical charging load; B represents the temperature; C represents the wind direction; D represents the wind speed; E represents the air pressure; F represents the humidity; G represents the rainfall probability; H represents the time; I represents the day of the week; J represents the holiday; K represents the electricity price; and L represents the predicted load. Figure 4
[0114]
[0115] where I mic is the maximum information coefficient; p a (·) represents the joint probability density; d x and d y represent two different feature variables; a x and b y represent the number of grids divided along the x-axis and the y-axis, respectively.
[0116] Step S2 specifically comprises the following steps:
[0117] 2a). The screened feature data is sent to the input layer, which is composed of linear convolution, for converting the data into multi-dimensional information data;
[0118] 2b). The multi-dimensional information data is sent to the space-time convolution layer, which is composed of a time convolution, an attention mechanism and a multi-graph convolution network component. The time convolution is used to capture the information of the multi-dimensional information data in the time dimension, and a dilated causal convolution is selected here, which has the form:
[0119]
[0120] where t represents the time step; represents the input data sequence, i.e., the feature values screened by MIC; represents the filter; the symbol * represents the standard convolution operation; the dilated coefficient d s represents the interval of the jump; S represents the size of the convolution kernel, and s is the serial number of the convolution kernel.
[0121] 2c). The dilated causal convolution is combined with the gating mechanism to obtain the time convolution component:
[0122] H g = σ a (ψ1*χ)⊙σ b (ψ2*χ)
[0123] where Hg denotes the output of the time convolution component; χ denotes the input data, which is the hole causal convolution result here; ⊙ denotes the element-wise multiplication operator; σ a and σ b denote sigmoid and tangent hyperbolic activation functions, respectively; ψ1 and ψ2 denote parameters of the model.
[0124] Step S3 specifically comprises the following steps:
[0125] 3a). There is a correlation between the charging loads at different time steps, that is, the correlation of the charging loads in the time dimension is dynamic, so a time attention mechanism is introduced to adaptively assign the importance of different features to the input, which can be expressed as E e :
[0126]
[0127] where E e is a time attention matrix; denotes the input of the rth spatio-temporal block, N is the number of charging stations, C r-1 is the number of characteristic quantities, T r-1 is the time value, is the value of all charging stations and features at time T r-1 ; and are learnable parameters.
[0128] After obtaining the correlation matrix E e in the time dimension, E e in E i,j is sent to the softmax function to calculate the normalized attention distribution E i ' ,j :
[0129]
[0130] where E′ i,j is an element in the normalized time attention matrix, representing the correlation weight between time i and time j; E i,j is an element in the time attention matrix E e .
[0131] The input data is multiplied by the normalized attention distribution to assign an importance value to the data at each time step, and the output value is calculated as follows:
[0132]
[0133] where N is the number of charging stations; C r-1is the number of features; T r-1 is the time value; is the data of charging load after time attention processing at T r-1 .
[0134] 3b). Due to the high dynamicity of the interdependence between charging loads of different sites, a spatial attention mechanism is adopted to capture the different characteristics between charging stations. The spatial correlation matrix is constructed as S s :
[0135]
[0136] where S s is the spatial attention matrix; is the learnable parameter.
[0137] Then the spatial correlation matrix is normalized by using the softmax function:
[0138]
[0139] where S′ i,j is an element in the normalized spatial attention matrix, representing the correlation weight between charging station i and charging station j; S i,j is the element of the spatial attention matrix.
[0140] 3c). The attention matrix of the spatial dimension is applied to the adjacency matrix in the graph convolution to automatically obtain the best performance under different weights.
[0141] Step S4 specifically comprises the following steps:
[0142] 4a). First, the distance matrix A d composed of is defined using the threshold Gaussian kernel function, representing the geometric position correlation between charging stations:
[0143]
[0144] where is the distance matrix element; d i,j represents the distance between sites i and j; parameters and ε d represent the threshold value for defining the sparse matrix to reduce the time and space complexity.
[0145] 4b). The physical graph composed of the distance matrix cannot fully reflect the correlation between the charging stations. First, find the Euclidean distance of the charging load between sites i and j Then use the similarity element to represent the similarity of the load due to the similar charging pattern, and finally define the similarity matrix composed of
[0146]
[0147] where is the Euclidean distance of the charging load between sites i and j; x t,i represents the charging load of charging station i at time step t, T is the total time length; x t,j represents the charging load of charging station j at time step t; σ S is used to control the decay rate of the observation value.
[0148] 4c). Construct a generated physical graph from the distance matrix, a generated virtual graph from the similarity matrix, combine the physical graph and the virtual graph in a new fusion graph, and generate a new graph by weighted summation of elements in different graphs to obtain a multi-graph convolution network component. Specifically, it is described as follows:
[0149] L = D - A is the Laplacian matrix of the signal representation of the graph, where A is the adjacency matrix and D is the degree matrix; standardizing it obtains where I N is the unit matrix; the diagonal matrix represents the degree matrix, and is calculated as D ii = ∑ j A ij , where A ij is the i-th row and j-th element of A, and D ii is the i-th row and i-th element of D.
[0150] Rewrite L into the eigenvalue decomposition form to obtain L = UΛU, U represents the eigenvector matrix, Λ represents the diagonal matrix of eigenvalues.
[0151] For the charging load data sequence of a given time step t The Fourier transform of the data graph can be represented as The inverse transform is represented as where U is an orthogonal matrix based on the Laplace theorem.
[0152] According to the spectral convolution operation theory, the convolution form can be represented as:
[0153] g θ * G x = F -1 (F(g θ )⊙F(x)) = g θ (L)x = g θ (UΛUT )x=Ug θ (Λ)U T x
[0154] Where F(·) and F -1 (·) represents the Fourier function and its inverse transform; * G Represents graph convolution operation; g θ denoted by ; x represents the input charging load data sequence; L is the Laplacian matrix of the graph; U represents the eigenvector matrix of Laplacian theorem; Λ represents the diagonal matrix of eigenvalues.
[0155] Classical spectral convolution has a large computational cost, with a time complexity of O(N). 2 Using Chebyshev polynomial function transformation to obtain Chebyshev graph convolution can reduce computational complexity, as shown in the following equation:
[0156]
[0157] in λ max G represents the largest eigenvalue of L; θ Represents the convolution kernel; * G Represents graph convolution operation; Represents the polynomial coefficients; k represents the order of the current neighbor information update; K represents the total order of the neighbor information update; x is the charging load data sequence; ⊙ represents the element-wise multiplication operator; S′ s This is a standardized spatial attention matrix.
[0158] According to Chebyshev polynomial theory, the function can be represented as T k (x)=2xT k-1 (x)-T k-2 (x), where T0(x) = 1 and T1(x) = x. The amount of data captured at the node center is controlled by adjusting the parameter K.
[0159] Applying a linear rectified function (ReLU) σ to the graph convolutional layer c σ c (g θ * G x). Therefore, in time slice T r-1 The graph convolution result obtained from the r-th layer is:
[0160]
[0161] in Input data; The charging load after time attention processing in T r-1 Data at the time;* G Represents graph convolution operation; gθ denotes the convolution kernel, σ c is a linear rectifier function (ReLu). Thus, the nodes in the graph can be updated by the data of themselves and their neighbors.
[0162] Therefore, the distance matrix A d The physical graph convolution result is obtained as follows:
[0163]
[0164] where L d is the Laplacian matrix of the physical graph; is the physical graph convolution result.
[0165] The similarity matrix A s The virtual graph convolution result is obtained as follows:
[0166]
[0167] where L s is the Laplacian matrix of the virtual graph; is the virtual graph convolution result.
[0168] Then the weight parameters are multiplied by the convolution of each graph and summed to obtain the output of the multi-graph convolution network component
[0169]
[0170] W′ d ,W′ s = σ d (W d ,W s )
[0171] where is the multi-graph convolution result; W d and W s represent the learnable parameters; W′ d and W′ s represent the normalized weight parameters of the physical graph and the virtual graph, reflecting the influence degree of different graphs; σ d is a softmax function.
[0172] 4d). Encapsulate the time convolution network component, the attention mechanism component and the multi-graph convolution network component into a spatiotemporal module. Stack the spatiotemporal modules to form a spatiotemporal convolution layer to expand the receptive field and capture the correlation at different time levels. Add a skip connection to the spatiotemporal module to extract different features in each spatiotemporal module, thereby aggregating data and transmitting to the output layer. And use a residual connection for the spatiotemporal convolution layer to solve the problem of network degradation.
[0173] 4e). The data output by the spatio-temporal convolution layer is sent into the output layer, which is composed of two linear convolution functions and two ReLU activation functions, to reduce the data to the output dimension, obtaining the prediction results of the charging load of each charging station at different times.
[0174] Step S5 specifically includes the following steps:
[0175] 5a). Take the historical data of the charging load of charging stations in a certain area for a predetermined period of time, select input features, and construct training set, validation set and test set.
[0176] 5b). Put the training set into the attention-based multi-graph convolution network to obtain the prediction results of the charging load of each charging station at different times. Construct a loss function to train and optimize the parameters of the attention-based spatio-temporal multi-graph convolution network model.
[0177]
[0178] wherein loss represents the loss function; represents the actual value of the charging load at charging station n at time step t, represents the predicted value of the charging load at charging station n at time step t; T represents the total time step of the predicted value; N represents the number of charging stations.
[0179] 5c). In order to evaluate the prediction performance of the attention-based spatio-temporal multi-graph convolution network model (STMGCN), mean square error (MSE), mean absolute error (MAE), mean percentage error (MAPE) and root mean square error (RMSE) are selected as the measurement indicators, and the smaller the indicator value, the better the prediction performance of the model:
[0180]
[0181]
[0182]
[0183]
[0184] wherein MSE is the mean square error, MAE is the mean absolute error, MAPE is the mean percentage error, and RMSE is the root mean square error; represents the actual value of the charging load at charging station n at time step t, represents the predicted value of the charging load at charging station n at time step t; T represents the total time step of the predicted value; N represents the number of charging stations.
[0185] Step S6 specifically includes the following steps:
[0186] 6a). Establish a spatiotemporal charging load prediction system, which mainly includes: a data acquisition module, a feature extraction module, and a load prediction module.
[0187] The data acquisition module is used to collect data on charging power, temperature, wind direction, wind speed, air pressure, humidity, rainfall probability, time, day of the week, holidays, and electricity price of each charging station within a set time and area, and stores the data in the database.
[0188] The feature extraction module is used to filter the feature data required by the network model from the collected data and then perform standardization processing.
[0189] The load prediction module is used to build an attention-based multi-graph convolutional network model, responsible for predicting the spatiotemporal distribution of charging load for the next day using feature data extracted from the previous day. It requires two devices: a storage medium and a computing device.
[0190] The storage medium is used to store the input feature dataset and the electric vehicle charging station load prediction method based on attention-based spatiotemporal multi-graph convolutional networks.
[0191] The computing device is used to process and execute programs stored in the execution memory to implement a load prediction method for electric vehicle charging stations based on attention-based spatiotemporal multi-graph convolutional networks.
[0192] 6b). To verify the superiority of the attention-based spatiotemporal multi-graph convolutional network model, two types of models were used for comparison, such as... Figure 5 As shown, traditional time series methods (or statistical models) and neural network methods are used to illustrate the results. HA stands for Historical Mean, ARIMA for Autoregressive Integral Moving Average, FNN for Feedforward Neural Network, LSTM for Long Short-Term Memory, GRU for Gated Recurrent Unit, CNN-LSTM for Convolutional Neural Network-Long Short-Term Memory, and STMGCN for Attention-Based Spatiotemporal Multi-Graph Convolutional Network. Among these, time series methods include HA and ARIMA; neural network methods include FNN, LSTM, GRU, and CNN-LSTM.
[0193] The load forecasting results of different models are compared in Table 1 below:
[0194] Table 1 Comparison of various model indicators
[0195]
[0196]
[0197] As shown in Table 1, the model of this invention addresses the multi-dimensional spatiotemporal charging station load prediction problem by utilizing an attention mechanism and a multi-graph convolutional neural network to improve prediction accuracy, demonstrating superior performance in load prediction. Furthermore, as...Figure 5 According to the multi-step load prediction results of each model shown, the application can extract the dynamic time mode of the charging load in long-term prediction.
[0198] For the method for predicting the charging load, in addition to the load prediction based on the attention-based spatiotemporal multi-graph convolution network, the gated dilated causal convolution is used to capture the features of the data in the time dimension, and the LSTM (Long Short-Term Memory Network), GRU (Gated Recurrent Unit), and CNN-LSTM (Convolutional Neural Network and Long Short-Term Memory Network) can be used to capture the features of the data in the time dimension to predict the charging load sequence. Name explanation:
[0199] (1) Sigmoid activation function: used for the output of hidden layer neurons, with a value range of (0, 1), which can map a real number to the interval (0, 1), and can be used for binary classification.
[0200] (2) tangent hyperbolic activation function: hyperbolic tangent function, which compresses a real number to the range of [-1, 1], this kind of function has smoothness and asymptoticity, and is monotonous.
[0201] (3) ReLU activation function: is a piecewise linear function, for values greater than zero, this function is linear, which means that when training a neural network using backpropagation, it has many ideal properties of linear activation functions. However, it is also a nonlinear function because negative values are always output as zero. Since the rectified function is linear in half of the input domain and nonlinear in the other half, it is called a piecewise linear function.
[0202] (4) softmax function: also known as the normalized exponential function. It is an extension of the binary classification function Sigmoid to multiple classifications, and the purpose is to display the results of multiple classifications in the form of probability, which maps the outputs of multiple neurons to the interval (0, 1).
[0203] The contents not described in detail in the specification belong to the prior art known to those skilled in the art.
[0204] Finally, it should be pointed out that: the above only describes the preferred examples of the application, and is not used to limit the application, although the application has been described in detail with reference to the foregoing examples, those skilled in the art can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the application shall be included in the protection scope of the application.
Claims
1. A method for electric vehicle charging station load forecasting based on a spatio-temporal multi-graph convolutional network with attention, characterized in that, The method comprises the following steps: Step S1, obtaining a data set of historical load, meteorological data, date and economic factors of charging stations in a certain area, and screening the characteristics of the data as input data; Step S2, capturing the characteristics of the input data in the time dimension by constructing a time convolution network component; Step S3, passing the output of the time convolution network component through an attention mechanism component, namely a time attention mechanism and a space attention mechanism, to capture important information of the data in the time and space dimensions, including historical load, meteorological data, date and economic factors of charging stations in a certain area; Step S4, constructing a physical graph of geographical position correlation and a virtual graph of charging load correlation between charging stations in the area to obtain a multi-graph convolution network component; encapsulating the time convolution network component, the attention mechanism component and the multi-graph convolution component into a space-time module, and obtaining a space-time convolution layer by stacking multiple space-time modules; Step S5, taking historical data of charging load of charging stations in a certain area in a predetermined time period, selecting input characteristics, constructing a training set, a validation set and a test set, inputting the training set into the attention-based space-time multi-graph convolution network model, training the model, and adjusting the hyperparameters by using the validation set; After testing the test set, a mature attention-based space-time multi-graph convolution network electric vehicle charging station load prediction model is obtained; The step S1 specifically comprises the following steps: 1a). Taking historical data of charging load of charging stations in a certain area in a predetermined time period, and the data types include historical load, meteorological data, date and economic factors; 1b). Using the maximum information coefficient to analyze the linear or nonlinear correlation between two variables, and taking the maximum information number greater than or equal to 0.3 with the predicted load as the threshold for screening characteristics; ; wherein is the maximum information coefficient; denotes the joint probability density; denotes the number of bins along axis; denotes the number of bins along axis; and denotes the values of two different feature variables; The step S2 specifically comprises the following steps: 2a). Sending the screened characteristic data into the input layer, which is composed of linear convolution, for converting the data into multi-dimensional information data; 2b). Sending the multi-dimensional information data into the space-time convolution layer, which is composed of a time convolution, an attention mechanism and a multi-graph convolution network component; using the time convolution to capture the information of the multi-dimensional information data in the time dimension, and in this embodiment, a hollow causal convolution is selected, which has the form of: ; wherein t denotes a time step; denotes an input data sequence, i.e. the feature values obtained after MIC screening; denotes a filter; symbol denotes a standard convolution operation; dilation factor denotes the interval of the skip; denotes the size of the convolution kernel; is the convolution kernel index; 2c). Combining the hollow causal convolution with the gating mechanism to obtain the time convolution component: ; wherein represents an output of a temporal convolution component; represents input data, which is a causal convolution result; represents an element-wise multiplication operator; represents a sigmoid activation function; represents a tangent hyperbolic activation function; and represents a parameter of the model; The step S3 specifically comprises the following steps: 3a). There is a correlation between charging loads of different time steps, and the correlation of charging loads in the time dimension is dynamic. Introduce a time attention mechanism to adaptively assign the importance of different features to the input, represented as : ; wherein is a time attention matrix; represents the input of the th space-time block, is the number of charging stations; is the number of feature quantities, is a time value, is the value of all charging stations and features at time ; and and are learnable parameters. Obtaining a correlation matrix of the time dimension After, In, is fed into a softmax function to compute a normalized attention distribution : ; wherein is an element in the standardized temporal attention matrix, representing the relevance weight between time and time ; is an element in the temporal attention matrix ; Multiplying the input data with the standardized attention distribution to assign an importance value to the data of each time step, and the output value is calculated as follows: ; wherein, , is the number of charging stations, is the number of features, is the time value; is the data at time t for the charging load after attention processing over time; is the data at time t for the charging load after attention processing over time; 3b). Since the interdependence between the charging load of different sites is highly dynamic, a spatial attention mechanism is adopted to capture the different characteristics between the charging stations, and a spatial correlation matrix is constructed, denoted as : ; wherein is a spatial attention matrix; is a learnable parameter; Then, the softmax function is used to standardize the space-related matrix: ; wherein is an element of the normalized spatial attention matrix, representing the relevance weight between the charging station and the charging station ; is an element of the spatial attention matrix; 3c). Applying the space dimension attention matrix to the adjacency matrix in the graph convolution to automatically obtain the best performance under different weights; The step S4 specifically comprises the following steps: 4a). A distance matrix D consisting of is defined using a thresholded Gaussian kernel function representing the geometrical position correlation between charging stations: ; wherein is a distance matrix element; denotes the distance between sites and ; parameters and denote threshold values for defining a sparse matrix to reduce time and space complexity; 4b). Find sites and between which the Euclidean distance of charging load is minimum, using similarity elements to represent similar load due to similar charging pattern, and finally define a similarity matrix consisting of : ; ; wherein is the Euclidean distance between the charging load of the sites and ; denotes the charging load of the charging station at time step , is the total length of time; denotes the charging load of the charging station at time step ; denotes the decay rate for controlling the observation value; 4c). Constructing a physical graph from a distance matrix and a virtual graph from a similarity matrix, combining the physical graph and the virtual graph in a new fusion graph, and generating a new graph by weighted summation of elements in different graphs to obtain a multi-graph convolution network component; specifically as follows: is the Laplacian matrix of the signal representation of the graph, where is the adjacency matrix, is the degree matrix; normalizing it gives where is the identity matrix; diagonal matrix is represented as the degree matrix, computed as where is the element in the row column of is the element in the row column of To Rewriting in the eigenvalue decomposition form gives denotes the eigenvector matrix, denotes the diagonal matrix of eigenvalues; for a given time step of charging load data sequence The Fourier transform of the data graph can be expressed as The inverse transform is expressed as where is an orthogonal matrix based on the Laplace theorem; The convolution form can be represented as: ; wherein and denotes the Fourier function and its inverse; denotes a graph convolution operation; denotes a convolution kernel; denotes an input sequence of charging load data; is a Laplacian matrix of a graph; denotes an eigenvector matrix of the Laplace theorem; denotes a diagonal matrix of eigenvalues; The classical spectral convolution operation has large amount of calculation and complex computation The Chebyshev polynomial function transformation can reduce the computation complexity, and the Chebyshev graph convolution can be obtained, as shown in the following formula: ; wherein, denotes the largest eigenvalue of denotes a convolution kernel; denotes a graph convolution operation; denotes a polynomial coefficient; denotes the order of information update of the current neighbor; denotes the total order of neighbor information update; is a charging load data sequence; denotes an element-wise multiplication operator; is a normalized spatial attention matrix; According to Chebyshev polynomial theory, the function is represented as where ; the amount of data captured at the node center is controlled by adjusting the parameter ; Using a linear rectifier function for graph convolution layers , resulting in ; In the time slice Obtained the first The graph convolution result of the layer is: ; wherein is the input data; is the data at time t after attention processing of the charging load; is the data at time t after attention processing of the charging load; denotes a graph convolution operation; denotes a convolution kernel, is a rectified linear unit (ReLu); further such that the nodes in the graph are updated by their own and their neighbors' data; from the distance matrix the physical map convolution result: ; wherein is a Laplacian matrix of the physical graph; is a physical graph convolution result; from the similarity matrix a virtual graph convolution result: ; wherein is a Laplacian matrix of the virtual graph; is a virtual graph convolution result; multiplying the weight parameters by the convolution of each graph and summing to obtain an output of the multi-graph convolution network component : ; ; wherein is a multi-graph convolution result; and denote learnable parameters; and denote normalized weight parameters for the physical and virtual graphs; is a softmax function; 4d) encapsulate the time convolution network component, the attention mechanism component and the multi-graph convolution network component into a spatiotemporal module; stack the spatiotemporal modules to form a spatiotemporal convolution layer to expand the receptive field and capture the correlation at different time levels; add a skip connection to the spatiotemporal module to extract different features in each spatiotemporal module, thereby aggregating data and transmitting to the output layer; and use a residual connection for the spatiotemporal convolution layer to solve the problem of network degradation; 4e) input the data output by the spatiotemporal convolution layer into the output layer, which is composed of two linear convolution functions and two ReLU activation functions, to reduce the data to the output dimension and obtain the prediction results of the charging load of each charging station at different times.
2. The attention-based spatio-temporal multi-graph convolutional network-based electric vehicle charging station load forecasting method according to claim 1, characterized in that, The step S5 specifically comprises the following steps: 5a) take the historical data of the charging load of the charging stations in a certain region in a predetermined period of time, select input features, and construct a training set, a validation set and a test set; 5b) input the training set into the attention-based multi-graph convolution network to obtain the prediction results of the charging load of each charging station at different times; construct a loss function, and train and optimize the parameters of the attention-based spatiotemporal multi-graph convolution network model; ; in Represents the loss function; Indicates the time step Charging station The actual value of the charging load at the location, Indicates the time step Charging station Predicted charging load at the location; This represents the total time step of the predicted value; Indicates the number of charging stations; 5c) evaluate the prediction performance of the attention-based spatiotemporal multi-graph convolution network model, and select mean square error, mean absolute error, mean percentage error and root mean square error as the measurement indicators: ; ; ; ; wherein is the mean squared error, is the mean absolute error, is the mean percentage error, is the root mean squared error; denotes the actual value of the charging load at the charging station at time step denotes the predicted value of the charging load at the charging station at time step denotes the predicted value of the charging load at the charging station at time step denotes the total time steps of the predicted values; denotes the number of charging stations.
3. A load prediction system for electric vehicle charging stations based on an attention-based spatio-temporal multi-graph convolutional network, adopting the load prediction method for electric vehicle charging stations based on an attention-based spatio-temporal multi-graph convolutional network according to claim 1 or 2, characterized in that, It comprises: a data collection module, a feature extraction module and a load prediction module; The data collection module is used to collect the historical load, meteorological data, date and economic factors of the charging stations in a set time and region, and store them in a database; The feature extraction module is used to filter the feature data required by the network model from the collected data, and then perform standardization processing as input data; The load prediction module is used to construct an attention-based multi-graph convolution network model, which captures the features of the input data in the time dimension by constructing a time convolution network component; the output of the time convolution network component is subjected to an attention mechanism component, i.e. a time attention mechanism and a spatial attention mechanism, which respectively capture important information of the data in the time and spatial dimensions; construct a physical graph of the geographical position correlation and a virtual graph of the charging load correlation between the charging stations in the region to obtain a multi-graph convolution network component; encapsulate the time convolution network component, the attention mechanism component and the multi-graph convolution component into a spatiotemporal module, obtain a spatiotemporal convolution layer by stacking multiple spatiotemporal modules; take the historical data of the charging load of the charging stations in a certain region in a predetermined period of time, select input features, and construct a training set, a validation set and a test set; input the training set into the attention-based spatiotemporal multi-graph convolution network model to train the model, and adjust the hyperparameters using the validation set; After testing with the test set, a mature attention-based spatiotemporal multi-graph convolution network electric vehicle charging station load prediction model is obtained.
Citation Information
Patent Citations
Multi-charging-station cooperative load prediction method and device
CN115080795A