Electric vehicle charging queuing time prediction method

By processing traffic flow data through spatiotemporal decoupling and feature extraction modules, and combining them with the M/M/C/K queuing model, the problem of insufficient spatiotemporal feature modeling in electric vehicle charging queuing time prediction is solved, thereby improving prediction accuracy and user experience, and optimizing charging station resource allocation.

CN121936662APending Publication Date: 2026-04-28SUN YAT SEN UNIV +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUN YAT SEN UNIV
Filing Date
2025-12-31
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing methods for predicting electric vehicle charging queuing time are insufficient in spatiotemporal feature modeling and fail to effectively combine traffic flow prediction with the physical mechanism of queuing behavior, resulting in an imbalance between operational optimization and user experience. Furthermore, their prediction accuracy and generalization ability are limited in complex and cross-regional scenarios.

Method used

The original traffic flow data is processed using a spatiotemporal decoupling and feature extraction module. Long-term, periodic and short-term trend feature extraction modules are used for prediction. Charging station queuing time is predicted by combining the M/M/C/K queuing model. Feature extraction and prediction are performed by spatiotemporal mask hourglass Transformer and multilayer perceptron.

Benefits of technology

It enables queue time prediction with user waiting experience as the core, optimizes charging station selection and resource scheduling, and improves the service quality and resource allocation efficiency of the charging network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121936662A_ABST
    Figure CN121936662A_ABST
Patent Text Reader

Abstract

The invention discloses an electric vehicle charging queuing time prediction method, which comprises the following steps of performing space-time decoupling and traffic flow prediction on original traffic flow data, outputting a traffic flow prediction result, performing electric vehicle charging queuing time prediction on the traffic flow prediction result, and outputting a queuing time prediction value. According to the method, the spatial-temporal characteristics of the traffic flow are fully utilized, queuing time prediction taking user waiting experience as a core is realized, a basis is provided for a user to select a charging station with a relatively low congestion degree and optimize charging arrangement, decision support is provided for an operator to plan the charging station and schedule resources, and the user experience is improved. Unbalance between operation optimization and user experience is effectively relieved, and the charging resource configuration efficiency and the overall service quality of an electric vehicle charging network are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent transportation and electric vehicle charging management technology, and more specifically, relates to a method for predicting electric vehicle charging queuing time. Background Technology

[0002] Electric vehicles (EVs) have been widely adopted due to their high energy efficiency and low emissions. However, with the rapid increase in their ownership, the construction of charging infrastructure has lagged behind, leading to increasingly prominent problems such as long waiting times at charging stations during peak hours. Therefore, accurately predicting EV charging queue times has become a key technical issue in the operation of Intelligent Transportation Systems (ITS) and charging networks. Existing research mainly focuses on traffic flow prediction, charging demand prediction, charging scheduling optimization, and queue modeling. In traffic flow prediction, statistical methods, machine learning methods, and deep learning methods (such as CNN, LSTM, GNN, and Transformer) are used to model traffic conditions. In the charging field, operational efficiency is improved through site selection and capacity planning, charging demand prediction, and reinforcement learning-based scheduling optimization.

[0003] Despite some progress in existing research, significant shortcomings remain: Firstly, current methods primarily focus on overall predictions of charging demand or station load, failing to explicitly model individual users' queuing times before charging begins, thus failing to accurately reflect peak-hour user experience. Secondly, some studies incorporate queuing times into overall charging duration predictions, neglecting the crucial role of the waiting phase in user experience. Furthermore, existing methods generally center on operational optimization, lacking systematic modeling with user waiting time as a core indicator, leading to an imbalance between operational efficiency and user experience. Simultaneously, traffic flow prediction models still suffer from problems in spatiotemporal feature modeling, such as excessive spatiotemporal coupling, insufficient utilization of long-term periodic information, and limited characterization of global spatial dependencies, thus restricting prediction accuracy and generalization ability in complex, cross-regional, and long-cycle scenarios.

[0004] The invention patent with publication number CN118966408A proposes a method for predicting peak-hour queuing time for charging piles based on big data analysis. This method includes: S1, acquiring historical usage data of charging piles; S2, preprocessing the historical usage data; S3, encoding the time-series data using a location encoding mechanism, converting timestamps into high-dimensional vector representations; S4, inputting the location-encoded data into a Transformer encoder, calculating the correlation between each location in the sequence and other locations through a self-attention mechanism, and capturing features of different subspaces using a multi-head attention mechanism; S5, constructing a contrastive learning module, generating positive and negative samples to perform self-supervised learning on the encoded data; S6, defining a multi-objective loss function, and training and optimizing the model; S7, applying the trained model to real-time data and providing a visual user interface. This invention focuses on location encoding and self-supervised Transformer... While using sequence learning from historical usage data to predict charging station queuing times, this approach lacks an explicit queuing theory-based model to describe the user arrival / service process and the spatiotemporal dependencies of global traffic flow, resulting in deficiencies in user queuing behavior modeling and long-term periodic spatiotemporal feature capture. Summary of the Invention

[0005] This invention aims to overcome the problems of insufficient spatiotemporal feature modeling and failure to effectively combine traffic flow prediction with the physical mechanism of queuing behavior in existing electric vehicle charging queuing time prediction methods, and provides an electric vehicle charging queuing time prediction method.

[0006] The primary objective of this invention is to solve the aforementioned technical problems. The technical solution of this invention is as follows: This invention provides a method for predicting electric vehicle charging queuing time, comprising the following steps: Perform spatiotemporal decoupling and traffic flow prediction on the raw traffic flow data, and output the traffic flow prediction results; The system predicts electric vehicle charging queuing time based on traffic flow forecasts and outputs the predicted queuing time value.

[0007] Furthermore, the original traffic flow data is decoupled in time and space and traffic flow is predicted to output the traffic flow prediction results, including the following steps: The original traffic flow data is input into the long-term trend feature extraction module with a spatiotemporal mask hourglass for spatiotemporal decoupling and feature extraction, and the output is an implicit representation of the long-term trend. Input the implicit representation of the long-term trend into the periodic trend feature extraction module, and output the implicit representation of the periodic trend. The implicit representation of the cyclical trend is input into the short-term trend feature extraction module, and the traffic flow prediction value is output.

[0008] Furthermore, the long-term trend feature extraction module includes a slicing module and a spatiotemporal mask hourglass Transformer module. The spatiotemporal mask hourglass Transformer module includes an encoder and a decoder. It inputs the original traffic flow data into the long-term trend feature extractor and outputs an implicit representation of the long-term trend, including the following steps: Input the raw traffic flow data into the slicing module, and output data blocks X of equal length based on duration. patched ; X patched Input encoder, output implicit representation H encoder ; H encoder Input the decoder and output an implicit representation of the long-term trend.

[0009] Furthermore, the encoder includes a first position encoding module, a time mask hourglass Transformer encoder module, and a spatial mask Transformer encoder. The first position encoding module includes a mapping layer and a two-dimensional position encoding module, which inputs time-equal length data blocks into the encoder and outputs an implicit representation, including the following steps: Data blocks of equal duration are mapped to a high-dimensional embedding space using a mapping layer to obtain vector representations. The vector representation is input into the two-dimensional position encoding module, and the position encoding is superimposed on the vector representation to obtain a vector with position encoding. The vector with position encoding is input into the temporal mask hourglass Transformer encoder and the spatial mask Transformer encoder respectively, and the temporal dimension features and spatial dimension features are output. The implicit representation is obtained by concatenating the time-dimensional features and the spatial-dimensional features.

[0010] Furthermore, the position-encoded vector is input into the temporal mask hourglass Transformer encoder module, which outputs temporal dimension features, including the following steps: The time-step traffic flow data of the input vector is masked using a random masking strategy with a preset masking ratio to obtain masked data; Input the masked data into a Transformer encoder with an hourglass network structure, and output the temporal dimension features. The expression is as follows:

[0011] in, (·) represents a masking operation in the time dimension. Indicates the location encoding in the time dimension. Represents the input vector. The Transformer encoder with an hourglass network structure includes a first downsampling layer, a second downsampling layer, a bottleneck encoder, a first upsampling layer, and a second upsampling layer. Masked data is input into the Transformer encoder with the hourglass network structure, and the output is temporal features. The process includes the following steps: X after masking input Input the first downsampling layer and output the first downsampling feature skip1; Input skip1 into the second downsampling layer and output the second downsampling feature skip2; Input skip2 into the bottleneck encoder and output the first encoded feature X1; Input X1 and skip2 (which is connected to skip) into the first upsampling layer to output the second encoded feature X2. Input X2 and the skip1 connection into the second upsampling layer to output the time dimension features.

[0012] Furthermore, the vector representation with positional encoding is input to the spatial mask Transformer encoder, and the output is a spatial dimension feature representation, including the following steps: The spatial node traffic flow data of the input vector is masked using a random masking strategy with a preset masking ratio to obtain masked data. The masked data is input into a pre-trained Transformer encoder, which outputs spatial dimension features. The expression is as follows:

[0013] in, (·) represents a masking operation for spatial dimensions. Indicates spatial dimension location encoding, SMTE represents the input vector and the pre-trained transformer encoder.

[0014] Furthermore, the decoder includes a second positional encoding module and a Transformer decoder module. The second positional encoding module includes a linear layer and a positional encoding module. The Transformer decoder module includes a Transformer decoder and a linear output layer. It takes an implicit representation as input to the decoder and outputs an implicit representation of the long-term trend, including the following steps: Implicit representation H encoder The input linear layer performs spatial mapping, preserving the feature dimension, and outputs an implicit representation that fits the decoder. The expression is as follows:

[0015] in, and All of these represent learnable parameters; Will Input position encoding module, for The unmasked portion will Adding this to the corresponding location information yields the temporal feature T of the unmasked portion. unmasked and spatial features S unmasked ;for In the masking part, the learned mask vector is filled in at the masking positions, and the mask vector is added to the corresponding masking position information to obtain the time feature T reconstructed by the masking part. masked and spatial characteristics S masked ; T respectively masked、 T unmasked and S unmasked S masked By merging the data, the complete spatiotemporal features are obtained. Input the complete spatiotemporal features into the Transformer decoder Perform restoration and reconstruction to obtain the reconstructed feature representation. The expression is as follows: Reconstruct feature representation The input is a linear output layer, which outputs an implicit representation of the final long-term trend features. The expression is as follows:

[0017] in, and This represents the learnable parameters.

[0018] Furthermore, the periodic trend feature extraction module includes a periodic trend extractor and a multilayer perceptron. The implicit representation of the long-term trend is input into the periodic trend feature extraction module, and the implicit representation of the periodic trend is output, including the following steps: Implicit representation of long-term trend characteristics Input the periodic trend extractor PTE, output periodic features and daily cycle characteristics The expression is as follows:

[0019] Implicit representation of long-term trend characteristics Extracting current time features and current spatial characteristics The expression is as follows:

[0020] in, Implicit representation of long-term trend characteristics Get the last slice block from the middle; Periodic characteristics Daily cycle characteristics Current time characteristics and current spatial characteristics Input feature fusion module, output comprehensive features; By inputting the comprehensive features into a multilayer perceptron (MLP), an implicit representation of the periodic trend is obtained. The expression is as follows:

[0022] Furthermore, the short-term trend feature extraction module is a spatiotemporal prediction network structure based on graph convolution and wavelet mechanisms. It inputs the implicit representation of the periodic trend into the short-term trend feature extraction module and outputs traffic flow prediction results. The expression is as follows:

[0023] Where t represents the current time step, This indicates the time step for traffic flow forecasting; STE stands for Short-Term Trend Feature Extractor. Indicates current time characteristics and current spatial characteristics .

[0024] Furthermore, the traffic flow forecast results are used to predict electric vehicle charging queuing times, and the predicted queuing time values ​​are output, including the following steps: Traffic flow forecast Converted to charging station arrival rate through a linear relationship The expression is as follows:

[0025] in, This indicates the penetration rate of electric vehicles in traffic flow. This indicates the proportion of electric vehicles that choose to enter charging stations for charging. Using arrival rate Calculate traffic flow intensity The expression is as follows:

[0026] Where μ represents the average service rate of the charging pile; Utilizing traffic flow intensity Calculate the utilization rate of each charging service at the charging station The expression is as follows:

[0027] Where C represents the number of charging stations; Utilizing traffic flow intensity and the utilization rate of each charging service at the charging station Calculate the probability that there are no electric vehicles at the charging station. And the probability that there are n electric vehicles at the charging station. The expression is as follows:

[0028]

[0029] Where K is the maximum number of electric vehicles that the charging station can accommodate; use Calculate the total queue length within the charging station when its maximum capacity is not reached. The expression is as follows:

[0030] use Calculate the predicted charging queue time for electric vehicles The expression is as follows:

[0031] in, Let K be the probability that there are K electric vehicles in the charging station.

[0032] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: This invention proposes a novel method for predicting electric vehicle charging queuing time, decomposing the prediction problem into two stages. First, a traffic flow prediction module obtains predicted values ​​of future traffic flow data from raw spatiotemporal traffic flow data. Then, a queuing model is used to simulate the electric vehicle charging queuing process, and the predicted traffic flow values ​​obtained in the first stage are used to obtain the final predicted electric vehicle charging queuing time. This invention fully utilizes the spatiotemporal characteristics of traffic flow to achieve queuing time prediction centered on user waiting experience. It not only provides a basis for users to choose charging stations with lower congestion levels and optimize charging arrangements, but also provides decision support for operators in charging station planning and resource scheduling, effectively alleviating the imbalance between operational optimization and user experience, and improving the efficiency of charging resource allocation and the overall service quality of the electric vehicle charging network. Attached Figure Description

[0033] To make the objectives and technical solutions of this invention clearer, the following drawings are provided and described: Figure 1 This is a schematic diagram of an electric vehicle charging queuing time prediction method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the traffic flow prediction method model provided in an embodiment of the present invention; Figure 3 A schematic diagram of a Transformer encoder with an hourglass network structure provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the M / M / C / K queuing model provided in an embodiment of the present invention; Figure 5 The method of the present invention is used to compare the predicted value and the true value at Node0 in the PEMS08 dataset. Detailed Implementation

[0034] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0035] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0036] Example 1: This invention provides a method for predicting electric vehicle charging queuing time, such as... Figure 1 The diagram shows a method for predicting charging queuing time for electric vehicles, which includes the following steps: S1: Perform spatiotemporal decoupling and traffic flow prediction on the raw traffic flow data, and output the traffic flow prediction results.

[0037] The specific process is as follows: S1.1: Input the raw traffic flow data into the long-term trend feature extraction module with spatiotemporal mask hourglass for spatiotemporal decoupling and feature extraction, and output the implicit representation of the long-term trend.

[0038] More specifically, the long-term trend feature extraction module includes a slicing module and a spatiotemporal mask hourglass Transformer module. The spatiotemporal mask hourglass Transformer module includes an encoder and a decoder. It inputs the raw traffic flow data into the long-term trend feature extractor and outputs an implicit representation of the long-term trend, including the following steps: S1.1.1: Input the raw traffic flow data into the slicing module and output data blocks X of equal duration. patched .

[0039] like Figure 2 As shown in (a), the model takes raw traffic flow data as input, and the long-term spatiotemporal traffic flow raw data X for two weeks is used as input. long The data is converted into a 1-hour data block X using a slicing operation with a slice size of 12. patched .

[0040] S1.1.2: X patched Input encoder, output implicit representation H encoder .

[0041] In the encoder stage, the long spatiotemporal traffic flow input data is first segmented into fixed-length segments using a slice encoding embedding operation, and these segments are mapped to a high-dimensional embedding space for subsequent processing. Next, a two-dimensional position encoding module overlays position codes onto the mapped spatiotemporal traffic flow data, allowing the subsequent model to obtain the position of each input in both the temporal and spatial dimensions. Subsequently, different mask pre-training architectures are set up in the temporal and spatial dimensions to obtain feature encodings in both dimensions.

[0042] More specifically, such as Figure 2 As shown, the encoder includes a first position encoding module, a time mask hourglass Transformer encoder module, and a spatial mask Transformer encoder. The first position encoding module includes a mapping layer and a two-dimensional position encoding module. It inputs time-equal length data blocks into the encoder and outputs an implicit representation, including the following steps: S1.1.2.1: Map data blocks of equal duration to a high-dimensional embedding space using a mapping layer to obtain a vector representation.

[0043] S1.1.2.2: Input the vector representation into the two-dimensional position encoding module, and superimpose the position encoding on the vector representation to obtain a vector with position encoding.

[0044] S1.1.2.3: Input the vector with position encoding into the temporal mask hourglass Transformer encoder and the spatial mask Transformer encoder respectively, and output the temporal dimension features and spatial dimension features.

[0045] In the time dimension, the proposed mask pre-training architecture is the Temporal Masked Hourglass Transformer Encoder (TMHTE), which uses a random masking strategy with a preset masking ratio to mask traffic flow data at some time steps. The masked data is then encoded with time dimension features through a Transformer encoding layer with an hourglass network structure.

[0046] More specifically, the vector with position encoding is input into the temporal mask hourglass Transformer encoder module, and the output temporal dimension features are obtained by the following steps: S1.1.2.3.1.1: Use a random masking strategy with a preset masking ratio (25% in this embodiment) to mask the time step traffic flow data of the input vector to obtain masked data; S1.1.2.3.1.2: Input the masked data into a Transformer encoder with an hourglass network structure, and output the temporal dimension features. The expression is as follows:

[0047] in, (·) represents a masking operation in the time dimension. Indicates the location encoding in the time dimension. Represents the input vector. This refers to a Transformer encoder with an hourglass network structure, consisting of two parts: downsampling and upsampling. Figure 3 As shown, in the downsampling stage, features are extracted from long sequence input data through two layers of Transformer encoders and the sequence length is downsampled step by step; then the features are reduced in dimensionality in the bottleneck layer to model global dependencies in the low-dimensional space, and then the dimensionality is increased back to the original feature dimension; in the upsampling stage, the sequence length is gradually restored and fused with the intermediate features from the downsampling stage, and then restored to the original sequence shape by the decoder, thereby realizing multi-scale feature aggregation and global modeling.

[0048] More specifically, the Transformer encoder with an hourglass network structure includes a first downsampling layer, a second downsampling layer, a bottleneck encoder, a first upsampling layer, and a second upsampling layer. The masked data is input into the Transformer encoder with the hourglass network structure, and the output is temporal dimension features, including the following steps: S1.1.2.3.1.2.1: Mask the data X input Input the first downsampling layer and output the first downsampling feature skip1; S1.1.2.3.1.2.2: Input skip1 into the second downsampling layer and output the second downsampling feature skip2; S1.1.2.3.1.2.3: Input skip2 into the bottleneck encoder and output the first encoded feature X1; S1.1.2.3.1.2.4: Input X1 and skip2 (the skip connection) into the first upsampling layer and output the second encoded feature X2; S1.1.2.3.1.2.5: Input X2 and the skip1 connection into the second upsampling layer to output the time dimension features.

[0049] More specifically, the spatial mask Transformer encoder inputs a position-encoded vector representation and outputs a spatial dimension feature representation. In the spatial dimension, the proposed mask pre-training architecture is a spatial mask Transformer encoder (SMTE), which includes the following steps: S1.1.2.3.2.1: Use a random masking strategy with a preset masking ratio (25% in this embodiment) to mask the spatial node traffic flow data of the input vector to obtain masked data; S1.1.2.3.2.2: Input the masked data into the pre-trained Transformer encoder, and output the spatial dimension features. The expression is as follows:

[0050] in, (·) represents a masking operation for spatial dimensions. Indicates spatial dimension location encoding, SMTE represents the input vector and the pre-trained transformer encoder.

[0051] S1.1.2.4: Concatenate the temporal and spatial features to obtain the implicit representation of the unmasked spatiotemporal dimension encoding. The expression is as follows:

[0052] S1.1.3: H encoder Input to decoder, output implicit representation H of long-term trend long .

[0053] In the decoder stage, the implicit representation of the unmasked spatiotemporal dimensions obtained in the encoder stage is remapped to the space required by the decoder through a linear layer, keeping the feature dimensions unchanged, but allowing a lightweight transformation to be learned.

[0054] More specifically, the decoder includes a second positional encoding module and a Transformer decoder module. The second positional encoding module includes a linear layer and a positional encoding module. The Transformer decoder module includes a Transformer decoder and a linear output layer. It takes an implicit representation as input to the decoder and outputs an implicit representation of the long-term trend, including the following steps: S1.1.3.1: Implicitly representing H encoderThe input linear layer performs spatial mapping, preserving the feature dimension, and outputs an implicit representation that fits the decoder. The expression is as follows:

[0055] in, and All of these represent learnable parameters; S1.1.3.2: Will Input position encoding module, for The unmasked portion will Adding this to the corresponding location information yields the temporal feature T of the unmasked portion. unmasked and spatial features S unmasked ;for In the masking part, the learned mask vector is filled in at the masking positions, and the mask vector is added to the corresponding masking position information to obtain the time feature T reconstructed by the masking part. masked and spatial characteristics S masked ; S1.1.3.3: T respectively masked、 T unmasked and S unmasked S masked By merging the data, the complete spatiotemporal features are obtained. S1.1.3.4: Input the complete spatiotemporal features into the Transformer decoder Perform restoration and reconstruction to obtain the reconstructed feature representation. The expression is as follows: S1.1.3.5: Reconstruct the feature representation The input is a linear output layer, which outputs an implicit representation of the final long-term trend features. The expression is as follows:

[0057] in, and This represents the learnable parameters.

[0058] S1.2: Input the implicit representation of the long-term trend into the periodic trend feature extraction module, and output the implicit representation of the periodic trend.

[0059] like Figure 2As shown in (b), this step aims to extract periodic trend features from long-term traffic flow data to enhance the model's ability to perceive long-term regular changes. Traffic flow data typically exhibits significant periodic characteristics; for example, traffic flow patterns on the same workdays each week show similar regularities, and different dates often show similar travel characteristics during the same time period (e.g., morning rush hour 8:00–9:00). Therefore, capturing such periodic changes is crucial for improving the accuracy of future traffic flow predictions. In this step, weekly and daily periodic features are first extracted from the implicit representation of long-term trend features obtained in the long-term trend feature extraction module using the periodic trend extractor (PTE). Simultaneously, temporal and spatial features are extracted from the traffic characteristics of the current time period to reflect the current road conditions and their positional relationship within the spatial network. Subsequently, the obtained periodic features and the current spatiotemporal features are combined through a feature fusion module to form a comprehensive feature representation, providing input for subsequent prediction modules.

[0060] More specifically, the periodic trend feature extraction module includes a periodic trend extractor and a multilayer perceptron. The module inputs the implicit representation of the long-term trend into the periodic trend feature extraction module and outputs the implicit representation of the periodic trend, including the following steps: S1.2.1: Implicit representation of long-term trend characteristics Input the periodic trend extractor PTE, output periodic features and daily cycle characteristics The expression is as follows:

[0061] Among them, the periodic characteristics Used to reflect long-term patterns across weeks, such as traffic fluctuation trends on the same workday over several consecutive weeks; daily cycle characteristics. PTE stands for Dynamic Graph Convolution, used to characterize traffic patterns at different times of the same day, such as the recurring changes during morning and evening rush hours.

[0062] S1.2.2: Implicit Representation of Long-Term Trend Characteristics Extracting current time features and current spatial characteristics The expression is as follows:

[0063] in, Implicit representation of long-term trend characteristics Get the last slice block from the middle; S1.2.3: Periodic characteristics Daily cycle characteristics Current time characteristics and current spatial characteristics Input feature fusion module, output comprehensive features; S1.2.4: Input the comprehensive features into a multilayer perceptron (MLP) to obtain an implicit representation of the periodic trend. The expression is as follows:

[0065] S1.3: Input the implicit representation of the cyclical trend into the short-term trend feature extraction module and output the traffic flow prediction value.

[0066] like Figure 2 As shown in (c), with the implicit temporal representation already obtained... This includes cyclical trend characteristics derived from long-term trend features. and and the latest traffic flow characteristics at the current moment. and To further improve the accuracy of predicting short-term traffic flow changes, this step introduces a Short-Term Trend Feature Extraction (STE) module into the model. This module is mainly used to capture sudden or localized traffic flow fluctuations in the near term, thereby enhancing the model's responsiveness to real-time changes.

[0067] More specifically, the short-term trend feature extraction module is a spatiotemporal prediction network structure based on graph convolution and wavelet mechanisms. It inputs the implicit representation of the periodic trend into the short-term trend feature extraction module and outputs the traffic flow prediction result. The expression is as follows:

[0068] Where t represents the current time step, This indicates the time step for traffic flow prediction; STE represents the short-term trend feature extraction module. Indicates current time characteristics and current spatial characteristics .

[0069] S2: Predict electric vehicle charging queuing time based on traffic flow forecast results, and output the predicted queuing time value.

[0070] like Figure 4As shown, the electric vehicle charging queuing system includes C parallel charging piles and K electric vehicles charging or queuing. The customer arrival process follows a Poisson distribution, meaning the arrival time interval is exponentially distributed; the service time also follows an exponential distribution. Furthermore, the electric vehicle charging queuing system is divided into a queuing area, a charging area, and a departure area. Electric vehicles arriving in the queuing system enter the charging area to charge if there are available charging piles. If all charging piles in the charging area are occupied, arriving electric vehicles enter the queuing area to wait in line. When the total number of electric vehicles in the charging area and the queuing area reaches the total capacity limit K of the queuing system, subsequently arriving electric vehicles cannot enter the queuing area and will not enter the queuing system. After the electric vehicles in the charging area finish charging, they enter the departure area and leave the charging queuing system.

[0071] The queuing system outputs traffic flow predictions via S1. The expression used as input is as follows:

[0072] in, The predicted queuing time for electric vehicle charging is given by Q(·), which represents the queuing model of the electric vehicle charging queuing system. The queuing time prediction method includes the following steps: S2.1: Traffic flow forecast values Converted to charging station arrival rate through a linear relationship The expression is as follows:

[0073] in, This indicates the penetration rate of electric vehicles in traffic flow. This indicates the proportion of electric vehicles that choose to enter charging stations for charging. S2.2: Utilizing arrival rate Calculate traffic flow intensity The expression is as follows:

[0074] Where μ represents the average service rate of the charging pile; S2.3: Utilizing traffic flow intensity Calculate the utilization rate of each charging service at the charging station The expression is as follows:

[0075] Where C represents the number of charging stations; S2.4: Utilizing traffic flow intensity and the utilization rate of each charging service at the charging station Calculate the probability that there are no electric vehicles at the charging station. And the probability that there are n electric vehicles at the charging station. The expression is as follows:

[0076]

[0077] Where K is the maximum number of electric vehicles that the charging station can accommodate; S2.5: Utilize Calculate the total queue length within the charging station when its maximum capacity is not reached. The expression is as follows:

[0078] S2.6: Utilize Calculate the predicted charging queue time for electric vehicles The expression is as follows:

[0079] in, Let K be the probability that there are K electric vehicles in the charging station.

[0080] Since the accuracy of traffic flow prediction in S1 has a crucial impact on the reliability of electric vehicle charging queue time prediction in S2, a rigorous comparative study was conducted to evaluate the effectiveness of the STMHTNet method model in this invention. This patent performs experimental comparisons on four classic datasets: PEMS04, PEMS08, PEMS-BAY, and METR-LA, using three commonly used error metrics: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). On the PEMS04 and PEMS08 datasets, the average value of 12 prediction time steps is used as the performance evaluation metric, labeled Avg; on the PEMS-BAY and METR-LA datasets, the 3rd, 6th, and 12th prediction time steps (corresponding to predictions of the next 15, 30, and 60 minutes, respectively) are used as the performance evaluation metrics, labeled @3, @6, and @12, respectively. A smaller error metric indicates better model performance.

[0081] A series of representative spatiotemporal prediction models were selected as baselines, covering various methods from non-graph-based to adaptive graph learning approaches. Non-graph models (HI, GRU, STNorm, and STID) capture the inherent dynamic patterns of time series through temporal normalization, spatial normalization, or spatiotemporal identification information, achieving effective predictions without relying on graph structures. Static graph models (DCRNN and STGCN) utilize predefined road networks and model fixed spatial dependencies through diffusing convolution or graph convolution. Adaptive graph learning models (GWNet, AGCRN, GTS, and MegaCRN) dynamically capture heterogeneous and non-stationary spatial correlations through node adaptive parameter learning, probabilistic graph distribution optimization, or metagraph learning mechanisms, further eliminating the need for prior graphs. Furthermore, the ST-WA model incorporates a window attention mechanism to generate location-specific and time-varying parameters for efficient spatiotemporal awareness modeling. Overall, these comparative models explore spatiotemporal dependency modeling from different perspectives, providing a comprehensive reference for evaluating the effectiveness of this patent.

[0082] The results are summarized in the table below, with the best results highlighted in bold. The results on the PEMS04 and PEMS08 datasets are shown in Table 1 below.

[0083] Table 1

[0084] The results on the PEMS-BAY and METR-LA datasets are shown in Table 2 below.

[0085] Table 2

[0086] In summary, as a Transformer-based model, STMHTNet consistently outperforms all baseline models across four benchmark tests. On the PEMS04 and PEMS08 datasets, STMHTNet achieves the lowest mean absolute error (MAE) and root mean square error (RMSE), while its mean absolute percentage error (MAPE) is only slightly higher than STID and GWNet, respectively. On the PEMS-BAY and METR-LA datasets, STMHTNet achieves the best overall performance across multiple prediction time steps, with its RMSE only slightly higher than MegaCRN on the third time step of the METR-LA dataset. These results collectively demonstrate the robustness and superiority of STMHTNet in capturing complex spatiotemporal dependencies across various traffic scenarios. Compared to previous traffic flow prediction models, this patent achieves the best results, thus ensuring accurate prediction of electric vehicle queuing and charging waiting times in the second stage.

[0087] like Figure 5 The image shows a comparison between the predicted and actual values ​​of S2 in the PEMS08 dataset. It can be seen that, with accurate traffic flow prediction in the first stage, the prediction accuracy of electric vehicle queuing and charging waiting time in the second stage is also very high, with the predicted values ​​basically matching the actual values, demonstrating excellent prediction performance.

[0088] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for predicting electric vehicle charging queuing time, characterized in that, Includes the following steps: Perform spatiotemporal decoupling and traffic flow prediction on the raw traffic flow data, and output the traffic flow prediction results; The system predicts electric vehicle charging queuing time based on traffic flow forecasts and outputs the predicted queuing time value.

2. The method for predicting electric vehicle charging queuing time according to claim 1, characterized in that, The process of performing spatiotemporal decoupling and traffic flow prediction on raw traffic flow data, and outputting traffic flow prediction results, includes the following steps: The original traffic flow data is input into the long-term trend feature extraction module with a spatiotemporal mask hourglass for spatiotemporal decoupling and feature extraction, and the output is an implicit representation of the long-term trend. Input the implicit representation of the long-term trend into the periodic trend feature extraction module, and output the implicit representation of the periodic trend. The implicit representation of the cyclical trend is input into the short-term trend feature extraction module, and the traffic flow prediction value is output.

3. The method for predicting electric vehicle charging queuing time according to claim 2, characterized in that, The long-term trend feature extraction module includes a slicing module and a spatiotemporal mask hourglass Transformer module. The spatiotemporal mask hourglass Transformer module includes an encoder and a decoder. It inputs the original traffic flow data into the long-term trend feature extractor and outputs an implicit representation of the long-term trend, including the following steps: Input the raw traffic flow data into the slicing module, and output data blocks X of equal length based on duration. patched ; X patched Input encoder, output implicit representation H encoder ; H encoder Input the decoder and output an implicit representation of the long-term trend.

4. The method for predicting electric vehicle charging queuing time according to claim 3, characterized in that, The encoder includes a first position encoding module, a time mask hourglass Transformer encoder module, and a spatial mask Transformer encoder. The first position encoding module includes a mapping layer and a two-dimensional position encoding module. It inputs time-equal length data blocks into the encoder and outputs implicit representations, including the following steps: Data blocks of equal duration are mapped to a high-dimensional embedding space using a mapping layer to obtain vector representations. The vector representation is input into the two-dimensional position encoding module, and the position encoding is superimposed on the vector representation to obtain a vector with position encoding. The vector with position encoding is input into the temporal mask hourglass Transformer encoder and the spatial mask Transformer encoder respectively, and the temporal dimension features and spatial dimension features are output. The implicit representation is obtained by concatenating the time-dimensional features and the spatial-dimensional features.

5. The method for predicting electric vehicle charging queuing time according to claim 4, characterized in that, The vector with position encoding is input into the temporal mask hourglass Transformer encoder module, which outputs temporal dimension features, including the following steps: The time-step traffic flow data of the input vector is masked using a random masking strategy with a preset masking ratio to obtain masked data; Input the masked data into a Transformer encoder with an hourglass network structure, and output the temporal dimension features. The expression is as follows: in, (·) represents a masking operation in the time dimension. Indicates the location encoding in the time dimension. Represents the input vector. The Transformer encoder with an hourglass network structure includes a first downsampling layer, a second downsampling layer, a bottleneck encoder, a first upsampling layer, and a second upsampling layer. Masked data is input into the Transformer encoder with the hourglass network structure, and the output is temporal features. The process includes the following steps: X after masking input Input the first downsampling layer and output the first downsampling feature skip1; Input skip1 into the second downsampling layer and output the second downsampling feature skip2; Input skip2 into the bottleneck encoder and output the first encoded feature X1; Input X1 and skip2 (which is connected to skip) into the first upsampling layer to output the second encoded feature X2. Input X2 and the skip1 connection into the second upsampling layer to output the time dimension features.

6. The method for predicting electric vehicle charging queuing time according to claim 4, characterized in that, The Transformer encoder, which uses position-encoded vectors as input to a spatial mask, outputs a spatial dimension feature representation, including the following steps: The spatial node traffic flow data of the input vector is masked using a random masking strategy with a preset masking ratio to obtain masked data. The masked data is input into a pre-trained Transformer encoder, which outputs spatial dimension features. The expression is as follows: in, (·) represents a masking operation for spatial dimensions. Indicates spatial dimension location encoding, SMTE represents the input vector and the pre-trained transformer encoder.

7. The method for predicting electric vehicle charging queuing time according to claim 3, characterized in that, The decoder includes a second positional encoding module and a Transformer decoder module. The second positional encoding module includes a linear layer and a positional encoding module. The Transformer decoder module includes a Transformer decoder and a linear output layer. It takes the implicit representation as input to the decoder and outputs an implicit representation of the long-term trend, including the following steps: Implicit representation H encoder The input linear layer performs spatial mapping, preserving the feature dimension, and outputs an implicit representation that fits the decoder. The expression is as follows: in, and All of these represent learnable parameters; Will Input position encoding module, for The unmasked portion will Adding this to the corresponding location information yields the temporal feature T of the unmasked portion. unmasked and spatial features S unmasked ;for In the masking part, the learned mask vector is filled in at the masking positions, and the mask vector is added to the corresponding masking position information to obtain the time feature T reconstructed by the masking part. masked and spatial characteristics S masked ; T respectively masked、 T unmasked and S unmasked S masked By merging the data, the complete spatiotemporal features are obtained. Input the complete spatiotemporal features into the Transformer decoder Perform restoration and reconstruction to obtain the reconstructed feature representation. The expression is as follows: ; Reconstruct feature representation The input is a linear output layer, which outputs an implicit representation of the final long-term trend features. The expression is as follows: in, and This represents the learnable parameters.

8. The method for predicting electric vehicle charging queuing time according to claim 2, characterized in that, The periodic trend feature extraction module includes a periodic trend extractor and a multilayer perceptron. It inputs the implicit representation of the long-term trend into the periodic trend feature extraction module and outputs the implicit representation of the periodic trend, including the following steps: Implicit representation of long-term trend characteristics Input the periodic trend extractor PTE, output periodic features and daily cycle characteristics The expression is as follows: Implicit representation of long-term trend characteristics Extracting current time features and current spatial characteristics The expression is as follows: in, Implicit representation of long-term trend characteristics Get the last slice block from the middle; Periodic characteristics Daily cycle characteristics Current time characteristics and current spatial characteristics Input feature fusion module, output comprehensive features; By inputting the comprehensive features into a multilayer perceptron (MLP), an implicit representation of the periodic trend is obtained. The expression is as follows: 。 9. The method for predicting electric vehicle charging queuing time according to claim 2, characterized in that, The short-term trend feature extraction module is a spatiotemporal prediction network structure based on graph convolution and wavelet mechanisms. It inputs the implicit representation of the periodic trend into the short-term trend feature extraction module and outputs the traffic flow prediction result. The expression is as follows: Where t represents the current time step, This indicates the time step for traffic flow forecasting; STE stands for Short-Term Trend Feature Extractor. Indicates current time characteristics and current spatial characteristics .

10. The method for predicting electric vehicle charging queuing time according to claim 1, characterized in that, The process of predicting electric vehicle charging queue times based on traffic flow forecasts and outputting predicted queue times includes the following steps: Traffic flow forecast Converted into charging station arrival rate through a linear relationship The expression is as follows: in, This indicates the penetration rate of electric vehicles in traffic flow. This indicates the proportion of electric vehicles that choose to enter charging stations for charging. Using arrival rate Calculate traffic flow intensity The expression is as follows: Where μ represents the average service rate of the charging pile; Utilizing traffic flow intensity Calculate the utilization rate of each charging service at the charging station The expression is as follows: Where C represents the number of charging stations; Utilizing traffic flow intensity and the utilization rate of each charging service at the charging station Calculate the probability that there are no electric vehicles at the charging station. And the probability that there are n electric vehicles at the charging station. The expression is as follows: Where K is the maximum number of electric vehicles that the charging station can accommodate; use Calculate the total queue length within the charging station when its maximum capacity is not reached. The expression is as follows: use Calculate the predicted charging queue time for electric vehicles The expression is as follows: in, Let K be the probability that there are K electric vehicles in the charging station.

Citation Information

Patent Citations

  • Charging pile peak queuing time prediction method based on big data analysis

    CN118966408A