Electric vehicle charging prediction method based on multilayer graph attention and wavelet attention

Through the electric vehicle charging prediction method of multi-layer graph attention and wavelet attention, the problem of insufficient accuracy and real-timeness of charging demand prediction in the prior art is solved, multi-scale modeling and dynamic feature extraction of the charging network are realized, and the accuracy and adaptability of electric vehicle charging prediction are improved.

CN120509546APending Publication Date: 2025-08-19WUHAN UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510682485.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing electric vehicle charging demand prediction methods have shortcomings in terms of accuracy, computational complexity and stability, and it is difficult to effectively reflect the nonlinear and multimodal characteristics of charging demand, especially in extreme climates and emergencies, and high computational complexity is difficult to meet ultra-short-term prediction needs.

Method used

The charging prediction method of electric vehicles based on multi-layer graph attention and wavelet attention is adopted. By obtaining the occupancy rate, charging electricity price and location data of the charging station, a multi-variable fusion encoder and a multi-wavelet domain decoder are used, and a multi-layer multi-head graph attention and wavelet attention mechanism is combined to achieve multi-scale modeling and dynamic feature extraction of charging needs.

Benefits of technology

It significantly improves the accuracy and real-timeness of electric vehicle charging demand forecasts, can better capture the global spatio-temporal characteristics of the charging network, adapt to changes in complex urban environments, and support electric vehicle charging planning and grid load management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509546A_ABST
    Figure CN120509546A_ABST
Patent Text Reader

Abstract

The invention discloses an electric vehicle charging prediction method based on multilayer graph attention and wavelet attention, and belongs to the technical field of charging prediction. The method comprises the following steps: acquiring target data, wherein the target data comprises an occupancy rate of a target charging station, a charging electricity price, a position coordinate of the target charging station and a distance; inputting the target data into a multivariable fusion encoder to obtain a first feature; inputting the first feature into a multi-wavelet domain decoder to obtain a wavelet component; and inputting the wavelet component into an inverse wavelet transform module to obtain a charging demand prediction value, and the method improves the accuracy and real-time performance of electric vehicle charging demand prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of charging prediction technology, and in particular relates to an electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention. Background Art

[0002] The use of electric vehicles (EVs) is rapidly increasing, and charging infrastructure is expanding. Accurately predicting EV charging demand is crucial for rationally planning charging station deployment, balancing grid load, and mitigating peak risks. However, because charging demand is influenced by multiple factors, including user travel behavior, infrastructure distribution, and extreme climate, its spatiotemporal characteristics exhibit significant nonlinear and multimodal characteristics. This multi-dimensional dynamic coupling effect makes accurately predicting charging demand a challenging task. Therefore, designing charging demand prediction methods that are adaptable to dynamic environments has become a crucial issue for achieving the safe operation of new power systems and the low-carbon transformation of urban transportation.

[0003] Existing methods for forecasting electric vehicle charging demand primarily fall into traditional statistical models, shallow machine learning methods, and deep learning models. For example, while exponential smoothing successfully captures long-term trends, it's insensitive to short-term fluctuations caused by extreme weather and emergencies, making it difficult to reveal nonlinear changes in demand. Another example is using population mobility and traffic data to explain changes in charging demand. However, these models assume a linear relationship between variables and therefore fail to fully reflect the complex nonlinear interactions caused by multiple external disturbances. Consequently, existing electric vehicle charging forecasting methods suffer from low accuracy, high computational complexity, and poor stability. Summary of the Invention

[0004] This application aims to solve at least one of the technical problems existing in the prior art. To this end, this application proposes an electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention, which improves the accuracy and real-time performance of electric vehicle charging demand prediction.

[0005] In a first aspect, the present application provides an electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention, the method comprising:

[0006] Acquire target data, the target data including occupancy rate of the target charging station, charging electricity price, location coordinates and distance of the target charging station;

[0007] Input the target data into the multivariate fusion encoder to obtain the first feature;

[0008] Inputting the first feature into a multi-wavelet domain decoder to obtain a wavelet component;

[0009] The wavelet components are input into an inverse wavelet transform module to obtain a charging demand prediction value.

[0010] According to one embodiment of the present application, inputting the target data into a multivariate fusion encoder to obtain the first feature includes:

[0011] Input the target data into the embedding layer to obtain temporal sequence features and spatial static features;

[0012] Inputting the temporal sequence features and spatial static features into a convolutional layer to obtain convolved features;

[0013] The convolved features are input into the multi-layer multi-head graph attention layer to obtain the first feature.

[0014] According to one embodiment of the present application, inputting the target data into the embedding layer to obtain temporal sequence features and spatial static features includes:

[0015] The occupancy rate and charging electricity price of the target charging station are stacked into a three-dimensional tensor along the time series, and the three-dimensional tensor is subjected to a two-dimensional convolution process to obtain a time series feature;

[0016] A weighted adjacency matrix is constructed based on the location coordinates and distance of the target charging station to obtain spatial static features.

[0017] According to one embodiment of the present application, inputting the convolved features into a multi-layer multi-head graph attention layer to obtain the first feature includes:

[0018] The convolved features are input into the multi-layer multi-head graph attention layer, and the second feature is obtained through attention coefficient and weighted fusion;

[0019] Inputting the second feature into the first LSTM network, performing multi-level spatial extraction on the second feature to obtain a third feature;

[0020] The third feature is input into the first fully connected layer to obtain the first feature.

[0021] According to one embodiment of the present application, inputting the first feature into a multi-wavelet domain decoder to obtain a wavelet component includes:

[0022] Inputting the first feature into a wavelet attention mechanism layer, mapping the first feature into the wavelet domain to obtain a contextual embedding feature;

[0023] The context embedding features are input into the second LSTM network, and the context embedding features are subjected to deep abstract extraction to obtain a wavelet component containing prediction information.

[0024] According to one embodiment of the present application, inputting the first feature into a wavelet attention mechanism layer to obtain a contextual embedding feature includes:

[0025] Inputting the first feature into an enhancement network, generating time-frequency representations corresponding to different time scales through dynamic weight allocation and summation operations, and obtaining enhanced features;

[0026] The enhanced features are input into a convolutional network, a convolution operation is performed on the enhanced features, and context embedding information at different scales is extracted to obtain context embedding features.

[0027] According to one embodiment of the present application, inputting the wavelet component into an inverse wavelet transform module to obtain a charging demand prediction value includes:

[0028] Inputting the wavelet component into the second fully connected layer for recovery to obtain a time domain charging demand sequence;

[0029] The time-domain charging demand sequence is trimmed of redundant segments caused by signal expansion to obtain a charging demand prediction value.

[0030] In a second aspect, the present application provides an electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention, the device comprising:

[0031] An acquisition module is used to acquire target data, wherein the target data includes an occupancy rate of a target charging station, a charging electricity price, and a location coordinate and distance of the target charging station;

[0032] A first processing module is used to input the target data into a multivariate fusion encoder to obtain a first feature;

[0033] A second processing module, configured to input the first feature into a multi-wavelet domain decoder to obtain a wavelet component;

[0034] The prediction module is used to input the wavelet component into the inverse wavelet transformation module to obtain a charging demand prediction value.

[0035] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention as described in the first aspect above is implemented.

[0036] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention as described in the first aspect above.

[0037] In a fifth aspect, the present application provides a chip comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention as described in the first aspect.

[0038] In a sixth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention as described in the first aspect above.

[0039] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become obvious from the description below, or will be learned through practice of the present application.

[0040] The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention provided by the present invention has the following advantages over the prior art:

[0041] (1) The present invention obtains the occupancy rate, charging electricity price, location coordinates and distance of the target charging station and inputs them into the multivariate fusion encoder to obtain the first feature. The multi-layer multi-head graph attention mechanism can cross the local neighborhood, aggregate remote node information, and characterize the spatial dependence and differences between various regions in the charging network. The first feature is input into the multi-wavelet domain decoder to obtain the wavelet component. The time-frequency wavelet transform can separate the long-term trend and short-term fluctuation in the charging demand data at multiple scales, so that the global dynamic characteristics can be more fully expressed. By combining the encoder-decoder architecture, the joint modeling of local details and global spatiotemporal dynamics is realized, which significantly improves the ability to capture the global spatiotemporal characteristics in complex urban charging demand, provides more reliable technical support for electric vehicle charging planning, urban charging facility planning and grid load management, and improves the accuracy of electric vehicle charging demand prediction.

[0042] (2) The present invention obtains temporal sequence features and spatial static features by inputting target data into the embedding layer, which can effectively capture the dynamic relationship between temporal and spatial information and improve the accuracy and diversity of feature representation. By inputting the convolved features into the multi-layer multi-head graph attention layer, it can fully integrate the advantages of temporal and spatial information. By introducing the multi-layer multi-head graph attention mechanism to dynamically adjust the graph adjacency weights, the adaptive modeling of the spatial dependency relationship between charging stations is realized, which can more accurately capture the inconsistency and mutation of demand behavior in urban areas, significantly improve the model's ability to identify and model spatial structural heterogeneity, and improve the accuracy of charging demand prediction.

[0043] (3) By inputting the first feature into the enhanced network, the present invention can effectively improve the representation ability of the feature, extract more discriminative feature information, and enhance the representation effect of the data. By inputting the enhanced feature into the convolutional network, the context information is further extracted and optimized to obtain more accurate context embedding features. By introducing the wavelet attention mechanism, the key scale information can be automatically identified and weighted extracted, realizing the joint modeling of long-term trends and short-term fluctuations, effectively alleviating the frequency band aliasing problem in time series modeling, improving the response capability to rapidly changing loads in short-term scenarios, and improving the adaptability to multimodal influencing factors in cities. It can realize the prediction of electric vehicle charging demand in real data scenarios of super-large and diversified cities. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0045] Figure 1 1 is a flow chart of an electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention provided in an embodiment of the present application;

[0046] Figure 2 This is a schematic diagram of the structure of the electric vehicle charging demand prediction model provided in an embodiment of the present application;

[0047] Figure 3 Schematic diagram of the structure of the wavelet attention mechanism provided in the embodiment of the present application;

[0048] Figure 4 This is a schematic diagram of the structure of the multi-layer multi-head graph attention mechanism provided in an embodiment of the present application;

[0049] Figure 5 Schematic diagram of the structure of an electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention provided in an embodiment of the present application;

[0050] Figure 6 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the accompanying drawings in the embodiments of this application to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0052] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0053] In conjunction with the accompanying drawings, the following detailed description is given of the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention, the electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention, the electronic device and the readable storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.

[0054] Among them, the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention can be applied to the terminal, and can be specifically executed by hardware or software in the terminal.

[0055] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but a desktop computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).

[0056] In the following embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse, and a joystick.

[0057] The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention provided in the embodiment of the present application can be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablets, computers, cameras and wearable devices, etc. The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention provided in the embodiment of the present application is explained below using an electronic device as an example of the execution subject.

[0058] Although existing time series forecasting methods have made significant progress in the accuracy of EV charging demand forecasting, some key challenges still exist:

[0059] (1) Most existing methods rely on static adjacency graphs or regular network structures for modeling, which makes it difficult to reflect the differences and dynamic coupling characteristics of charging demand in different regions. Since electric vehicle user behavior is driven by multiple factors (such as geographical location, electricity price fluctuations, and traffic structure), a single static topological network cannot perceive the real-time changes in spatial relationships, which in turn leads to a slow response of the prediction model to regional mutations or migration patterns, resulting in a decline in prediction performance.

[0060] (2) Electric vehicle charging load data is often highly cyclical and unstable, with low-frequency trends (such as daily and weekly cycles) and high-frequency fluctuations (such as sudden peak loads). Existing forecasting often uses a single-time domain modeling strategy, which lacks the ability to separate the characteristics of different frequency bands in the signal and is difficult to fully capture the co-evolution of global trends and local dynamics. This leads to large volatility and unstable accuracy in the short-term forecast stage, affecting the robustness of the actual scheduling system.

[0061] (3) Most existing models use a single time series as their core input, ignoring the interactions between various external factors involved in charging behavior (such as weather, electricity prices, and travel behavior). Although some graph neural network-based methods have certain spatial modeling capabilities, they do not effectively integrate multimodal attributes and frequency domain features, and lack the ability to dynamically adapt to environmental changes in complex scenarios, resulting in limited generalization performance.

[0062] (4) Existing high-precision models often rely on long-sequence training and complex network structures, resulting in heavy computational burdens in the inference phase, making it difficult to meet the ultra-short-term prediction needs of large-scale urban charging networks. In particular, when dealing with ultra-short-term prediction tasks at the 5-minute level, traditional models suffer from high latency and slow response, which is not conducive to the rapid response of dynamic scheduling and load balancing systems.

[0063] (5) Existing prediction models used in the charging field generally have insufficient ability to model essential characteristics. Specifically, they usually borrow general spatiotemporal prediction models, but fail to fully consider the multi-scale time-frequency characteristics and complex spatial heterogeneity contained in charging demand data. As a result, the model responds slowly to sudden changes and has large error fluctuations in the short-term prediction stage, thereby reducing its robustness and practicality in actual energy scheduling and load management.

[0064] Figure 1 is a flow chart of an electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention provided in an embodiment of the present application, such as Figure 1 As shown, the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention includes: step 110, step 120, step 130 and step 140.

[0065] Step 110: Acquire target data, including the occupancy rate, charging electricity price, location coordinates, and distance of the target charging station;

[0066] It is easy to understand that obtaining target data and inputting the target data into the electric vehicle charging demand prediction model, Figure 2 This is a schematic diagram of the structure of the electric vehicle charging demand prediction model provided by the embodiment of the present application. Figure 2 As shown in Figure 1, the electric vehicle charging demand forecasting model includes an MFE (Multivariate Fusion Encoder), a WDD (Wavelet domain decoder), and an IWTM (Inverse wavelet transform module). The MFE is used to integrate a multi-layer graph attention mechanism with a time series modeling unit to process multi-source heterogeneous data. The WDD performs wavelet domain decomposition and scale modeling for time-frequency decoding paths corresponding to different frequency scales. The IWTM is responsible for reconstructing the signal into the time domain and generating the forecast results.

[0067] The target data includes the occupancy rate of the target charging station, the charging electricity price, the location coordinates of the target charging station, and the distance to the target charging station. Occupancy and Price are time series features that dynamically represent the state changes of the charging station at different times; Location and Distance are spatial static features used to construct the topological relationship between charging stations.

[0068] Step 120: Input the target data into a multivariate fusion encoder to obtain a first feature;

[0069] In some embodiments, inputting the target data into a multivariate fusion encoder to obtain the first feature includes:

[0070] Input the target data into the embedding layer to obtain temporal sequence features and spatial static features;

[0071] Inputting the temporal sequence features and spatial static features into a convolutional layer to obtain convolved features;

[0072] The convolved features are input into the multi-layer multi-head graph attention layer to obtain the first feature.

[0073] In some embodiments, inputting the target data into the embedding layer to obtain temporal sequence features and spatial static features includes:

[0074] The occupancy rate and charging electricity price of the target charging station are stacked into a three-dimensional tensor along the time series, and the three-dimensional tensor is subjected to a two-dimensional convolution process to obtain a time series feature;

[0075] A weighted adjacency matrix is constructed based on the location coordinates and distance of the target charging station to obtain spatial static features.

[0076] It's easy to understand that MFE aims to efficiently extract the spatiotemporal characteristics of EV charging demand from multi-source data. MFE comprises an embedding layer, a convolutional layer (Conv2D), and a multi-head graph attention layer. By fusing multi-scale temporal dynamic features with spatial static features, MFE is able to capture the complex nonlinear spatial relationships between charging stations and their significant temporal variations.

[0077] Specifically, Occupancy and Price are stacked along the time series into a three-dimensional tensor X∈R N×T×2 , where N represents the number of charging stations and T is the number of time steps. The location and distance information are mainly used to construct the adjacency matrix of the graph. If the spatial distance d(i,j) between node i and node j is less than d th , then set A ij =1, otherwise A ij =0.

[0078] To further emphasize the influence between adjacent sites, a distance-weighted adjacency matrix is constructed, and the calculation formula is as follows:

[0079]

[0080] Among them, A d,ij is the distance-weighted adjacency matrix, and d(i,j) is the spatial distance between node i and node j.

[0081] Through the above process, spatial information is effectively converted into a graph structure representation, providing a basis for subsequent spatial feature extraction.

[0082] In order to capture short-term local time series features, we first perform two-dimensional convolution on the Occupant and Price data tensors. The convolution output of each node at time t is as follows:

[0083]

[0084] Among them, z i,t is the convolution output of the i-th node at time t, Θ(c,τ) is the learnable parameter of the convolution kernel, the width of the convolution kernel covers the feature channel, and the height slides along the time dimension, X i,c,t-τ is the feature of node i at time t-τ.

[0085] The convolutional features are further regularized using the Leaky ReLU nonlinear activation function and Dropout to reduce model overfitting.

[0086] In this example, by stacking the occupancy rates and charging prices of target charging stations along a time series into a three-dimensional tensor, we generate temporal sequence features that capture the dynamic patterns of charging demand over time. By constructing a weighted adjacency matrix based on the location coordinates and distances of the target charging stations, we generate spatial static features that help reflect the spatial relationships between charging stations. By combining the advantages of temporal and spatial information, we improve the ability to capture global spatiotemporal dynamic features and enhance the accuracy of charging demand forecasts.

[0087] In this embodiment, by inputting the target data into the embedding layer, the time series features and spatial static features are obtained, which can effectively capture the dynamic relationship between time series and spatial information and improve the accuracy and diversity of feature representation. By inputting the convolved features into the multi-layer multi-head graph attention layer, the advantages of time series and spatial information can be fully integrated. By introducing the multi-layer multi-head graph attention mechanism to dynamically adjust the graph adjacency weights, adaptive modeling of the spatial dependency relationship between charging stations is achieved, which can more accurately capture the inconsistency and mutation of demand behavior in urban areas, significantly improve the model's ability to identify and model spatial structural heterogeneity, and improve the accuracy of charging demand prediction.

[0088] Step 130: input the first feature into a multi-wavelet domain decoder to obtain a wavelet component;

[0089] In some embodiments, inputting the first feature into a multi-wavelet domain decoder to obtain a wavelet component includes:

[0090] Inputting the first feature into a wavelet attention mechanism layer, mapping the first feature into the wavelet domain to obtain a contextual embedding feature;

[0091] The context embedding features are input into the second LSTM network, and the context embedding features are subjected to deep abstract extraction to obtain a wavelet component containing prediction information.

[0092] In some embodiments, inputting the first feature into a wavelet attention mechanism layer to obtain a contextual embedding feature includes:

[0093] Inputting the first feature into an enhancement network, generating time-frequency representations corresponding to different time scales through dynamic weight allocation and summation operations, and obtaining enhanced features;

[0094] The enhanced features are input into a convolutional network, a convolution operation is performed on the enhanced features, and context embedding information at different scales is extracted to obtain context embedding features.

[0095] It is easy to understand that the multi-wavelet domain decoder first uses WAT (Wavelet Attention Transformer) to map the spatiotemporal fusion features extracted by the front-end network to the wavelet domain, and then uses the LSTM network to perform deep abstraction of the projected features to generate WTC (Wavelet Transform Coefficients) containing prediction information. During the prediction process, the WTCs obtained by wavelet transform decomposition of the charging demand time series correspond to different decomposition channels and scale levels, where the high-frequency components mainly reflect local fluctuation characteristics, while the low-frequency components capture the overall trend. Multiple decoders are used to achieve joint learning of multi-time scale features, and the inverse wavelet transform layer is used to reconstruct the WTCs of each scale to reproduce the historical charging demand series and predict future demand.

[0096] Figure 3 is a schematic diagram of the structure of the wavelet attention mechanism provided in the embodiment of the present application, such as Figure 3 As shown in Figure 1, WAT is based on wavelet transform theory and is a deep learning module specifically designed for time-frequency feature extraction. It consists of two main components: an enhancement network and a convolutional network. The enhancement network first applies an attention mechanism to the spatiotemporal fusion features extracted by the pre-processing network. Through dynamic weight allocation and summation operations, it generates time-frequency representations corresponding to different time scales, namely enhanced fusion features. Subsequently, the convolutional network performs convolution operations on these enhanced features to extract contextual embedding information at each scale. Mathematically, the calculation formula of the enhancement network is as follows:

[0097] H p =γ(Q1·W q1 )·W q2

[0098] E=σ(W k2 γ(W k1 ·H p ))

[0099] H l =σ(Diag(E)·H)

[0100] H h =H+H l

[0101] Among them, W q1 ∈R D×(D / 2) and W q2 ∈R (D / 2)×1 It is used to transform the spatiotemporal fusion features into pooling features H p ∈R M×1 The weight matrix, W k1 ∈R(M / 2)×M and W k2 ∈R M×(M / 2) is the weight matrix for allocating the correlation of spatiotemporal fusion features, σ is the ReLu activation function, γ is the Sigmoid activation function, D is the dimension of the feature space, M is the length of the historical charging demand sequence, E is the attention weight, and H l is the weight embedding feature, H h To enhance the features, H p is the spatiotemporal fusion feature, Q1 is the first feature, and H is the charging demand fusion feature.

[0102] It should be noted that E∈R activated by the Sigmoid function M×1 As the attention weight, it is used to determine the importance of historical trajectory points relative to future trajectory points. l Indicates that the charging demand fusion feature is E∈R M×1 The weighted embedding features are obtained by combining the original spatiotemporal fusion features with H l Add and calculate the enhanced feature H h ∈R M×D The operator Diag(·) returns a matrix with the input elements as diagonal.

[0103] The calculation formula of the convolutional network of the wavelet attention mechanism is as follows:

[0104] I = γ(Conv1d(H h ))

[0105] Where I∈R h×D represents the contextual embedding feature, h represents the same time dimension as the corresponding WTC, H h To enhance the features, γ is the Sigmoid activation function.

[0106] Due to the downsampling operation, the length of the L-level WTC obtained by discrete wavelet transform is approximately 1 / 2L of the original sequence length, thus determining the time dimension of the embedded feature I. In practical applications, discrete wavelet transform is usually accompanied by the translation of the wavelet function to perform a convolution operation on the time series; when the filter approaches the edge of the signal, it is necessary to compensate for the part beyond the boundary by signal expansion. Therefore, the exact length of the WTC depends not only on the selected wavelet function, but also on the signal expansion mode. Symmetric expansion is usually used to ensure boundary continuity. Based on the above principles, the formula for calculating the length of the WTC after the L-level discrete wavelet transform in the convolutional network is as follows:

[0107]

[0108] h L =h L-1

[0109] Where L is the number of wavelet analysis stages, and n is half the length of the wavelet filter selected during the wavelet transform process. x} x∈[0,L)∩x∈Z is the time length of high-frequency WTCL-x, h L The L-level time length of the low-frequency WTC0. Used to return the largest integer less than or equal to the input, h0 is the initial time length of low-frequency WTC0, M is the length of the original sequence in the time domain, h L-1 It is the L-1 level time length of low-frequency WTC0.

[0110] In this embodiment, by inputting the first feature into the enhanced network, the feature representation ability can be effectively improved, more discriminative feature information can be extracted, and the data representation effect can be enhanced. By inputting the enhanced feature into the convolutional network, the context information can be further extracted and optimized to obtain more accurate context embedding features. By introducing the wavelet attention mechanism, key scale information can be automatically identified and weighted extracted to achieve joint modeling of long-term trends and short-term fluctuations, effectively alleviating the frequency band aliasing problem in time series modeling, improving the response capability to rapidly changing loads in short-term scenarios, and improving the adaptability to multimodal influencing factors in cities. It can realize the prediction of electric vehicle charging demand in real data scenarios of super-large and diversified cities.

[0111] After obtaining the contextual embedding features through the wavelet attention mechanism, the LSTM in the multi-wavelet domain decoder further models the contextual embedding to produce a wavelet embedding, which is further mapped through a fully connected layer to produce WTC, using the last layer unit state of the LSTM block in the encoder. and the remaining cell states of the zeroing process To initialize the first layer unit state of the LSTM block in the Decoder To enhance its ability to face scale features. i ∈R h×D The input of the LSTM block after WT-AT processing, the hidden layer is initialized to zero. The output of the LSTM block also consists of two parts. Save all hidden states of the last layer of the LSTM block as output features. Denotes the hidden state representing short-term memory and the cell state representing long-term memory in the last time step. C2 is the number of recurrent layers. Output elements The Q2∈R required by IWTM is obtained through the LayerNorm layer LN(·) and the multi-layer perceptron layer MLP(·) h×D .

[0112] The calculation of LSTM is shown below:

[0113]

[0114] in, is the first layer unit state, is the state of the last layer unit, c r T is the remaining unit state, is the output feature, Respectively represent the hidden state representing short-term memory and the unit state representing long-term memory in the last time step, They represent the hidden state representing short-term memory and the initial unit state representing long-term memory in the last time step, respectively, and Q2 is the wavelet component.

[0115] In this embodiment, by inputting the first feature into the wavelet attention mechanism layer, the feature's contextual information representation can be effectively improved, enhancing the feature's expressive power. Furthermore, by inputting the context-embedded feature into the second LSTM network, time series information can be extracted and wavelet components can be obtained, effectively capturing multi-layered, dynamically changing features and improving the model's time series processing capabilities. By introducing the wavelet attention mechanism to separate and fuse long-term trends and short-term fluctuations at multiple scales, information loss caused by feature aliasing can be effectively reduced, providing more reliable technical support for charging facility planning and grid load regulation, and improving the accuracy of electric vehicle charging demand forecasting.

[0116] Step 140: Input the wavelet component into an inverse wavelet transform module to obtain a charging demand prediction value.

[0117] According to the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention provided in the embodiment of the present application,

[0118] By obtaining the occupancy rate, charging electricity price, location coordinates and distance of the target charging station and inputting them into the multivariate fusion encoder, the first feature is obtained. The multi-layer multi-head graph attention mechanism can cross the local neighborhood, aggregate remote node information, and characterize the spatial dependencies and differences between regions in the charging network. The first feature is input into the multi-wavelet domain decoder to obtain the wavelet component. The time-frequency wavelet transform can separate the long-term trends and short-term fluctuations in the charging demand data at multiple scales, so that the global dynamic characteristics can be more fully expressed. By combining the encoder-decoder architecture, the joint modeling of local details and global spatiotemporal dynamics is realized, which significantly improves the ability to capture the global spatiotemporal characteristics of complex urban charging demand, provides more reliable technical support for electric vehicle charging planning, urban charging facility planning and grid load management, and improves the accuracy of electric vehicle charging demand prediction.

[0119] In some embodiments, inputting the convolved features into a multi-layer multi-head graph attention layer to obtain the first feature includes:

[0120] The convolved features are input into the multi-layer multi-head graph attention layer, and the second feature is obtained through attention coefficient and weighted fusion;

[0121] Inputting the second feature into the first LSTM network, performing multi-level spatial extraction on the second feature to obtain a third feature;

[0122] The third feature is input into the first fully connected layer to obtain the first feature.

[0123] It is easy to understand that in order to effectively capture the complex spatial dependencies between charging stations, ML-GAT (Multi-Layer Multi-Head Graph Attention Mechanism) was designed. Figure 4 This is a schematic diagram of the structure of the multi-layer multi-head graph attention mechanism provided by the embodiment of the present application. Figure 4 As shown, in the l-th layer graph attention network, the features of node i are first mapped through a linear transformation to obtain For each node i and its neighbor node j, calculate the attention coefficient between them The calculation formula is as follows:

[0124]

[0125] Among them, W (l) is the learning weight matrix of layer l, is the attention score of node i to node j, a (l) is a learnable attention weight vector, || represents feature concatenation, represents the characteristics of the i-th node, Represents the features of the j-th node.

[0126] Next, the attention coefficient is normalized by softmax to obtain the weight of each neighbor node. Then, the feature of node i is updated by weighted summing the features of its neighbor nodes. The calculation formula is as follows:

[0127]

[0128] in, is the attention score of node i to node j, is the attention score of node i to node k, is the degree of fusion of node i to node j, represents the input feature vector of the j-th layer graph attention network, is the output of the multi-head attention mechanism, W (l,h) is the learning weight matrix of the lth and hth layers, H is the number of attention heads, is the set of neighbor nodes of node i.

[0129] Each head calculates a set of independent attention coefficients and weighted features. Finally, the outputs of all attention heads are combined by splicing or averaging. Assuming there are H attention heads, the output of each head is The final output is

[0130] The input of each graph attention layer is the node features (or convolutional embedding features) of the previous layer. Each layer contains multiple attention heads. Each attention head calculates a new representation of a node and combines the results of multiple heads by splicing or averaging. The calculation formula is as follows:

[0131]

[0132] Among them, α∈[0,1] controls the degree of fusion between the output of the current layer and the input of the previous layer. represents the output feature vector of the l-th layer graph attention network for node i, represents the output feature vector of the 0th layer graph attention network for node i, represents the input feature vector of the l-th layer graph attention network, Represents the combined operation of graph attention and graph convolution.

[0133] Through residual connections, the information loss or over-smoothing problems caused by multi-layer graph attention networks can be alleviated, ensuring that the model does not lose too much original information when multiple layers are stacked. is the representation feature of the node after the l-th layer of graph attention in space, Derived from the output of layer l-1. In the algorithm diagram, the input of the first layer is the feature embedding vector processed by the previous convolution and fully connected layers, representing the initial spatial feature representation of the node. First, the dynamic spatial dependency between nodes is learned through the multi-head graph attention mechanism (dynamically learning the adjacency relationship between nodes), and then the node feature expression ability is enhanced.

[0134] It is worth noting that ML-GAT can capture the multi-level spatial dependencies between charging stations, but it is difficult to obtain the short-term and long-term dependencies in the time series. In addition, the nonlinear coupling system composed of multiple factors requires the ability to simultaneously extract the complex abstract relationships between multi-level spatial and dynamic time series. In order to achieve the joint modeling of spatiotemporal features, LSTM is selected to implement the encoder's abstract summary of the time series. The preliminary analysis results of the ML-GAT model using Stack(·) are as follows: To process, Save all hidden states of the last layer of the LSTM block as output features, output features As the input of the linear projection layer FC(·) feature integration and nonlinear transformation output, we get the Q1∈R required in the Decoder B×D , the calculation formula is as follows:

[0135]

[0136] Among them, Stack(·) is stack processing, is the input of LSTM after stack processing, are the hidden state and unit state initialized to zero, is the output feature, They represent the hidden state representing short-term memory and the unit state representing long-term memory in the last time step, Q1 is the first feature, and FC(·) is the linear projection layer.

[0137] In this embodiment, by inputting the convolved features into a multi-layer multi-head graph attention layer, the relationship between different features can be effectively captured, and the multi-layer multi-head graph attention mechanism is used to adaptively capture the complex spatial dependencies between charging piles and their regions. The temporal dynamics are modeled in combination with LSTM, and a multi-head attention mechanism is introduced in the spatial path. The layer-by-layer abstraction of spatial semantics is achieved through multi-layer stacking. It can not only decompose temporal features at multiple scales, but also adaptively model the complex interactions between different regions, significantly improving the accuracy and anti-interference ability of the model in ultra-short-term prediction tasks, effectively enhancing the adaptability to complex urban spatial topology, improving the accuracy and expressiveness of spatial feature extraction, and improving the accuracy of electric vehicle charging demand prediction.

[0138] In some embodiments, inputting the wavelet component into an inverse wavelet transform module to obtain a charging demand prediction value includes:

[0139] Inputting the wavelet component into the second fully connected layer for recovery to obtain a time domain charging demand sequence;

[0140] The time-domain charging demand sequence is trimmed of redundant segments caused by signal expansion to obtain a charging demand prediction value.

[0141] The IWTM performs an inverse transform on the WTC at each time scale to reconstruct the input historical charging demand sequence and predict the charging demand at the next moment. The IWTM first feeds the output of each decoder layer into a fully connected network to restore it to a charging demand sequence in the time domain. It then trims redundant segments caused by signal expansion to obtain the predicted charging demand data. The multi-layer perceptron (MLP) layer converts the coefficient matrix set into a charging demand sequence of size d×(M+1), where all matrix dimension indices start at zero. Trim(·) is used to apply convolution at the end of the time series to trim redundant segments caused by signal expansion, retaining only the first M+1 elements in the time dimension. The first M elements in the _{\mathcal {I}} represent the reconstructed historical trajectory sequence, and the subsequent elements represent the predicted charging demand value at the next moment. The calculation formula of IWTM is as follows:

[0142]

[0143] in, is the charging demand prediction value, Trim is convolution trimming, MLP is multi-layer perceptron, is the Lth wavelet component.

[0144] In this embodiment, by inputting the wavelet component into the inverse wavelet transform module, the time domain information of the charging demand can be effectively restored, thereby improving the accuracy of the charging demand prediction.

[0145] The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention provided in the embodiments of the present application can be executed by an electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention. In the embodiments of the present application, the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention is executed by the electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention as an example to illustrate the electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention provided in the embodiments of the present application.

[0146] The embodiment of the present application also provides an electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention, such as Figure 5 As shown, the electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention includes: an acquisition module 510, a first processing module 520, a second processing module 530 and a prediction module 540.

[0147] An acquisition module 510 is configured to acquire target data, including an occupancy rate of a target charging station, a charging electricity price, and a location coordinate and distance of the target charging station;

[0148] A first processing module 520 is configured to input the target data into a multivariate fusion encoder to obtain a first feature;

[0149] A second processing module 530 is configured to input the first feature into a multi-wavelet domain decoder to obtain a wavelet component;

[0150] The prediction module 540 is configured to input the wavelet component into an inverse wavelet transform module to obtain a charging demand prediction value.

[0151] According to the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention provided in the embodiment of the present application, the occupancy rate, charging electricity price, location coordinates and distance of the target charging station are obtained and input into the multivariable fusion encoder to obtain the first feature. The multi-layer multi-head graph attention mechanism can cross the local neighborhood, aggregate remote node information, and characterize the spatial dependence and differences between various regions in the charging network. The first feature is input into the multi-wavelet domain decoder to obtain the wavelet component. The time-frequency wavelet transform can separate the long-term trend and short-term fluctuation in the charging demand data at multiple scales, so that the global dynamic characteristics can be more fully expressed. By combining the encoder-decoder architecture, the joint modeling of local details and global spatiotemporal dynamics is realized, which significantly improves the ability to capture the global spatiotemporal characteristics in complex urban charging demand, provides more reliable technical support for electric vehicle charging planning, urban charging facility planning and power grid load management, and improves the accuracy of electric vehicle charging demand prediction.

[0152] The electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention provided in the embodiment of the present application can achieve Figures 1 to 4 To avoid repetition, the various processes implemented in the embodiment of the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention are not repeated here.

[0153] In some embodiments, as Figure 6 As shown, an embodiment of the present application further provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the program is executed by the processor 601, each process of the embodiment of the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0154] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0155] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned electric vehicle charging prediction method embodiment based on multi-layer graph attention and wavelet attention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0156] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0157] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention.

[0158] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0159] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, which is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-mentioned electric vehicle charging prediction method embodiment based on multi-layer graph attention and wavelet attention, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0160] It should be understood that the chip mentioned in the embodiments of the present application can also be called a device-level chip, a device chip, a chip device, or an on-chip device chip, etc.

[0161] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention in each embodiment of the present application.

[0163] In the description of this application, "first feature" and "wavelet component" may include one or more such features.

[0164] In the description of this application, “plurality” means two or more.

[0165] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

[0166] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0167] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and purpose of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for predicting electric vehicle charging based on multi-layer graph attention and wavelet attention, characterized in that: The method comprises: Acquire target data, the target data including occupancy rate of the target charging station, charging electricity price, location coordinates and distance of the target charging station; Input the target data into the multivariate fusion encoder to obtain the first feature; Inputting the first feature into a multi-wavelet domain decoder to obtain a wavelet component; The wavelet components are input into an inverse wavelet transform module to obtain a charging demand prediction value.

2. The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention according to claim 1 is characterized in that The step of inputting the target data into a multivariate fusion encoder to obtain a first feature includes: Input the target data into the embedding layer to obtain temporal sequence features and spatial static features; Inputting the temporal sequence features and spatial static features into a convolutional layer to obtain convolved features; The convolved features are input into the multi-layer multi-head graph attention layer to obtain the first feature.

3. The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention according to claim 2 is characterized in that: The target data is input into the embedding layer to obtain temporal sequence features and spatial static features, including: The occupancy rate and charging electricity price of the target charging station are stacked into a three-dimensional tensor along the time series, and the three-dimensional tensor is subjected to a two-dimensional convolution process to obtain a time series feature; A weighted adjacency matrix is constructed based on the location coordinates and distance of the target charging station to obtain spatial static features.

4. The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention according to claim 2 is characterized in that: The convolutional features are input into the multi-layer multi-head graph attention layer to obtain the first feature, including: The convolved features are input into the multi-layer multi-head graph attention layer, and the second feature is obtained through attention coefficient and weighted fusion; Inputting the second feature into the first LSTM network, performing multi-level spatial extraction on the second feature to obtain a third feature; The third feature is input into the first fully connected layer to obtain the first feature.

5. The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention according to claim 1 is characterized in that: The step of inputting the first feature into a multi-wavelet domain decoder to obtain a wavelet component comprises: Inputting the first feature into a wavelet attention mechanism layer, mapping the first feature into the wavelet domain to obtain a contextual embedding feature; The context embedding features are input into the second LSTM network, and the context embedding features are subjected to deep abstract extraction to obtain a wavelet component containing prediction information.

6. The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention according to claim 5 is characterized in that: Inputting the first feature into the wavelet attention mechanism layer to obtain a contextual embedding feature includes: Inputting the first feature into an enhancement network, generating time-frequency representations corresponding to different time scales through dynamic weight allocation and summation operations, and obtaining enhanced features; The enhanced features are input into a convolutional network, a convolution operation is performed on the enhanced features, and context embedding information at different scales is extracted to obtain context embedding features.

7. The electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention according to claim 1 is characterized in that: Inputting the wavelet component into an inverse wavelet transform module to obtain a charging demand prediction value includes: Inputting the wavelet component into the second fully connected layer for recovery to obtain a time domain charging demand sequence; The time-domain charging demand sequence is trimmed of redundant segments caused by signal expansion to obtain a charging demand prediction value.

8. An electric vehicle charging prediction device based on multi-layer graph attention and wavelet attention, implemented using the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention according to any one of claims 1 to 7, characterized in that: The device comprises: An acquisition module is used to acquire target data, wherein the target data includes an occupancy rate of a target charging station, a charging electricity price, and a location coordinate and distance of the target charging station; A first processing module is used to input the target data into a multivariate fusion encoder to obtain a first feature; A second processing module, configured to input the first feature into a multi-wavelet domain decoder to obtain a wavelet component; The prediction module is used to input the wavelet component into the inverse wavelet transformation module to obtain a charging demand prediction value.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention is implemented as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the electric vehicle charging prediction method based on multi-layer graph attention and wavelet attention is implemented as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Substation equipment voiceprint recognition method and system based on small sample learning

    CN121459850A

  • Electric vehicle fast charging load prediction method and device based on charging order record

    CN121705734A