Grid-level charging demand prediction method based on multi-type vehicle driving mode
By constructing cubes and combining GNN and LSTM models, the problem of inaccurate vehicle type and spatial distribution prediction in traditional methods is solved, and high-precision grid-level charging demand prediction is achieved, supporting the optimization of urban energy systems and grid management.
Patent Information
- Application Number
- CN202510572565.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-15
AI Technical Summary
Traditional methods cannot accurately predict the travel rules and spatial distribution of different types of vehicles in cities, resulting in unscientific layout of block and grid-level charging piles, affecting the scheduling response efficiency.
A cube dataset is constructed, combining graph neural network (GNN) and long and short-term memory network (LSTM), and predicting microgrid-level charging needs through vehicle trajectory, road topology and urban functional area data. GNN is used to extract spatial dynamic graph sequences and capture temporal changes in combination with LSTM, and fuse semantic information for prediction.
It improves the accuracy of grid-level charging demand prediction, takes into account the heterogeneity of different vehicle types, and supports the optimization of urban energy systems and grid load management.
Smart Images

Figure CN120494368A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of smart city and electric transportation system optimization and scheduling, and specifically relates to a grid-level charging demand prediction method based on the driving patterns of multiple types of vehicles, which is suitable for city-level charging infrastructure layout optimization and energy management decision support system. Background Art
[0002] As urban electrification progresses, the number of electric vehicles is rapidly increasing. Traditional forecasting methods based on overall charging history data fail to fully reflect the travel patterns and spatial distribution differences of different vehicle types in a city. This leads to insufficient forecast accuracy at the micro level (such as the block and grid level), which in turn affects the rationality of urban charging station layout and the efficiency of scheduling response. Existing research has mostly focused on macro-level forecasts of overall electric vehicle charging demand, lacking modeling and exploration of the relationship between vehicle type, spatiotemporal grid, and traffic pattern. Summary of the Invention
[0003] The purpose of the present invention is to provide a grid-level charging demand prediction method based on the driving patterns of multiple types of vehicles.
[0004] This paper proposes a grid-level charging demand prediction method based on multi-type vehicle driving patterns. By constructing a multidimensional dataset containing vehicle trajectories, road topology, urban functional areas, and historical charging behavior data, and combining it with a graph neural network (GNN) and a long short-term memory (LSTM) network for modeling, the method predicts the charging demand intensity per unit time at the microgrid level. The specific steps are as follows: (1) Construction and preprocessing of urban traffic spatiotemporal data Based on a data source based on electric vehicle data collection standards, high-precision trajectory data of multiple types of vehicles within the city is obtained as the original dataset. The original dataset is preprocessed, and vehicle type is determined for the acquired and original datasets. Time discretization is performed, and the data sampling time granularity is refined to every 15 minutes. Spatial grid division is then performed with a minimum spatial grid division accuracy of 200 meters × 200 meters. The city is then aligned with the trajectory points and divided into non-overlapping regular spatial grid units. Combined with the method of trajectory point falling into the area, a "time-space-vehicle type" three-dimensional dataset is established. The original dataset includes taxi data, online car-hailing data, bus data, logistics vehicle data, and private car data. (2) Vehicle type recognition and driving pattern clustering All data collected in the original dataset has been pre-labeled with vehicle type information, complying with national / industry electric vehicle data collection specifications. Based on this labeling, typical vehicle travel pattern characteristics are extracted, and clustering methods are used to construct category labels for different driving modes, providing semantic enhancement features for subsequent modeling. (3) Constructing the input graph of the spatiotemporal graph neural network The nodes in the urban grid unit model are connected to adjacent spatial grids with edges. Node features are established, including: the distribution frequency of vehicle types at a 15-minute granularity for each grid; the number and activity of charging stations; the urban functional area to which the grid belongs (such as residential, office, commercial, etc.); and charging behavior characteristics in the same historical time period. All node features are embedded into a matrix as input to construct a dynamic graph sequence. (4) GNN-LSTM joint model design and training A graph neural network is used to extract spatial dynamic graph sequences between urban grids. The spatial feature extraction layer based on GAT processes the graph structure input and generates embedded features for each grid at each moment. The temporal feature extraction layer based on LSTM is input into the LSTM model to capture the changing trends in the time series. The feature enhancement module performs semantic information fusion, and then the feature enhancement module based on the attention mechanism is used to obtain the output layer to realize the prediction of grid charging demand for several 15-minute time slices in the future. The model objective function uses weighted mean square error, and the error weight is dynamically adjusted based on the consideration that the prediction deviation is more serious during peak hours. (5) Prediction result output and visualization The model predicts and outputs the charging demand intensity for each grid within a future time window, which can be defined as the expected number of vehicles connected to the charging pile or the expected electricity load. The results can be visualized in the form of heat maps and imported into GIS platforms or energy scheduling systems for further resource allocation optimization.
[0005] In the present invention, the typical travel mode characteristics in step (2) are one or more of travel time distribution, trajectory length and average speed, and the clustering method is specifically any one of K-means or DBSCAN.
[0006] In the present invention, the graph neural network in step (4) is specifically GCN or GAT, and the weighted mean square error is specifically Weighted MSE.
[0007] The beneficial effects of this invention include: integrating urban traffic structure and vehicle behavior to achieve high prediction accuracy; taking into account the heterogeneity of different vehicle types; being scalable to other cities or spatial units of varying granularity; and facilitating the proactive allocation of energy resources, optimizing peak and valley loads, and alleviating pressure on urban power grids. This method has broad application in scenarios such as optimizing the deployment of electric vehicle charging infrastructure, proactive load control in power grid dispatching, and peak-shaving management of urban energy systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 Schematic diagram of data preprocessing in step (1) of Example 1; Figure 2 Schematic diagram of the GNN-LSTM joint model framework in step (4) of Example 1. DETAILED DESCRIPTION
[0009] The present invention is further described below by way of examples with reference to the accompanying drawings.
[0010] Example 1: The steps of the method of the present invention are as follows: 1. Such as Figure 1 As shown in the figure, urban traffic spatiotemporal data construction and preprocessing: This step consists of two phases: raw dataset acquisition and data preprocessing. First, based on a standard data source for electric vehicle data collection, high-precision trajectory data for various vehicle types (such as taxis, ride-hailing vehicles, buses, logistics vehicles, and private cars) within the city is collected. Furthermore, during the data preprocessing phase, the present invention identifies vehicle types and then performs temporal discretization, refining the data sampling time granularity to every 15 minutes. Next, the urban area is divided into non-overlapping regular square grid cells, with a spatial grid resolution of 200 meters x 200 meters. Finally, the grid cell in which each trajectory point resides is determined based on its latitude and longitude coordinates, establishing a mapping between the trajectory data and the spatial grid. For each trajectory point, the frequency of each vehicle type in each grid cell within each time slice is calculated based on the grid cell where the trajectory point falls. A three-dimensional "time-space-vehicle type" dataset is constructed. Each data cell records the travel frequency characteristics of different vehicle types within the corresponding time slice and grid cell.
[0011] 2. Vehicle type recognition and driving pattern clustering: All collected data is pre-labeled with vehicle type information, complying with national and industry standards for electric vehicle data collection. Based on this labeling, typical vehicle travel pattern characteristics (such as travel time distribution, trajectory length, and average speed) are extracted. Clustering methods (such as K-means and DBSCAN) are used to construct category labels for different driving modes, providing semantically enhanced features for subsequent modeling.
[0012] 3. Construct the spatiotemporal graph neural network input graph: Urban grid cells are modeled as nodes in a graph structure, with adjacent spatial grids connected by edges. Node features introduced include: the distribution frequency of vehicle types at a 15-minute granularity within each grid; the number and activity of charging stations; the urban functional area to which the grid belongs (e.g., residential, office, commercial, etc.); and historical charging behavior characteristics over the same time period.
[0013] All features are used as input embedding matrix to construct dynamic graph sequence.
[0014] 4. Such as Figure 2 As shown, GNN-LSTM joint model design and training: The GNN-LSTM first processes a three-dimensional dataset and dynamic graph data, using a graph neural network (such as GCN or GAT) to extract spatial correlations between urban grids. After processing the graph input, it generates embedded features for each grid at each moment. Furthermore, the embedded features of each node are fed into the LSTM to capture the dynamic evolution of node features over time, thereby learning the intrinsic patterns of charging demand in the time series. The LSTM output is then fed into a feature enhancement module, which further enriches the node semantic features by integrating auxiliary information such as vehicle driving pattern category labels obtained through clustering and local traffic density trends at nodes, thereby improving prediction accuracy. Finally, an attention mechanism dynamically assigns importance to different time slices and nodes, and the results are fed into the output layer, thereby predicting grid charging demand for several future 15-minute time slices.
[0015] In addition, the model objective function uses weighted mean square error (Weighted MSE) to dynamically adjust the error weight based on the consideration that the prediction deviation is more serious during peak hours.
[0016] 5. Prediction result output and visualization The model predicts the intensity of charging demand for each grid within a future time window (defined as the expected number of vehicles connected to charging stations or the expected electricity load). The results can be visualized as heat maps and imported into GIS platforms or energy scheduling systems for further resource allocation optimization.
Claims
1. A grid-level charging demand prediction method based on multi-type vehicle driving patterns. By constructing a multidimensional dataset containing vehicle trajectories, road topology, urban functional areas, and historical charging behavior data, and combining graph neural networks with long short-term memory networks for modeling, the method predicts the charging demand intensity per unit time at the micro-grid level. The method is characterized by: The specific steps are as follows: (1) Construction and preprocessing of urban traffic spatiotemporal data Based on a standard data source for electric vehicle data collection, high-precision trajectory data of multiple types of vehicles within the city is obtained as the original dataset. Data preprocessing is performed on the original dataset, and vehicle type is determined for both the acquired and original datasets. Time discretization is performed, and the data sampling time granularity is refined to every 15 minutes. Spatial grid division is then performed with a minimum spatial grid division accuracy of 200 meters x 200 meters. The city is then divided into non-overlapping regular spatial grid cells using trajectory point-grid alignment. Using the method of trajectory point falling into regions, a three-dimensional "time-space-vehicle type" dataset is established. The original dataset includes taxi data, online ride-hailing data, bus data, logistics vehicle data, and private car data. (2) Vehicle type recognition and driving pattern clustering All data collected in the original dataset has been pre-labeled with vehicle type information, in compliance with national / industry electric vehicle data collection specifications; Based on this annotation, the typical travel mode characteristics of the vehicle are extracted, and the category labels of different travel modes are constructed using clustering methods to provide semantic enhancement features for subsequent modeling; (3) Constructing the input graph of the spatiotemporal graph neural network Connect the nodes and adjacent spatial grids in the urban grid unit modeling with edges; establish Node features include: the frequency of vehicle type distribution at a 15-minute granularity for each grid; the number and activity of charging stations; the urban functional area to which the grid belongs; and charging behavior characteristics for the same historical time period. All node features are embedded into a matrix as input to construct a dynamic graph sequence. (4) GNN-LSTM joint model design and training A graph neural network is used to extract spatial dynamic graph sequences between urban grids. The spatial feature extraction layer based on GAT processes the graph structure input and generates embedded features for each grid at each moment. The temporal feature extraction layer based on LSTM is input into the LSTM model to capture the changing trends in the time series. The feature enhancement module performs semantic information fusion, and then the feature enhancement module based on the attention mechanism is used to obtain the output layer to realize the prediction of grid charging demand for several 15-minute time slices in the future. The model objective function uses weighted mean square error, and the error weight is dynamically adjusted based on the consideration that the prediction deviation is more serious during peak hours. (5) Prediction result output and visualization The model predicts and outputs the charging demand intensity for each grid within a future time window, which can be defined as the expected number of vehicles connected to the charging pile or the expected electricity load. The results can be visualized in the form of heat maps and imported into GIS platforms or energy scheduling systems for further resource allocation optimization.
2. The method according to claim 1, characterized in that The typical travel mode characteristics in step (2) are one or more of travel time distribution, trajectory length and average speed, and the clustering method is specifically K-means or DBSCAN.
3. The method according to claim 1, characterized in that The graph neural network in step (4) is specifically GCN or GAT, and the weighted mean square error is specifically Weighted MSE.