Electric vehicle charging load prediction method and device for different types of transformer areas
Through the classification of the electric vehicle charging pile and the use of the Coord-AutoFormer model for load prediction, the prediction of load is performed, and the problems of low accuracy and lack of targeted prediction in existing technologies have been solved, and higher accuracy and adaptability of charging load are achieved.
Patent Information
- Application Number
- CN202411399334.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-28
AI Technical Summary
The existing electric vehicle charging load prediction methods have low prediction accuracy, lack targetedness, and fail to make full use of data, especially when dealing with charging characteristics in different regions and time periods.
By classifying the platforms of electric vehicle charging piles, the Elkan K-MEANS clustering method is used to divide the charging pile into residents, industry, commerce, and other Taiwan areas, and use the Coord-AutoFormer model for load prediction.
It significantly improves the accuracy and pertinence of charging load prediction, can more accurately capture the space -time distribution characteristics and dynamic changes of charging loads, and improve the adaptability and scalability of the model.
Smart Images

Figure CN119378734A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method and a device for predicting charging load of an electric vehicle for different types of stations, belonging to the technical field of electric vehicle equipment. Background Art
[0002] With the rapid development and popularization of the electric vehicle industry, the impact of electric vehicle charging load on the power grid is becoming increasingly significant. Accurate prediction of electric vehicle charging load is crucial for the planning, operation and management of the power grid. However, existing charging load prediction methods have many shortcomings, mainly manifested in low prediction accuracy, lack of pertinence and insufficient data utilization.
[0003] Existing technologies often use a single prediction model, which fails to fully consider the charging characteristics of different regions and time periods, regards all charging piles as homogeneous, and ignores the differences in charging patterns in different types of regions. For example, residential areas usually have higher household charging needs, while industrial areas may have higher charging loads during daytime and working hours. This diversity makes it difficult to obtain ideal prediction results when applying a unified prediction model. In addition, existing charging load prediction models usually rely on simple linear or static methods when dealing with the spatiotemporal distribution characteristics of charging loads, lack of sufficient consideration of dynamic changes, resulting in low prediction accuracy. Summary of the invention
[0004] The purpose of the present invention is to provide a method and device for predicting electric vehicle charging load for different types of substations, so as to solve the technical problems described in the background technology part and improve the prediction accuracy and pertinence of electric vehicle charging load.
[0005] The purpose of the present invention is achieved through the following technical solutions:
[0006] A method for predicting charging load of electric vehicles for different types of substations comprises the following steps:
[0007] Step 1) Classify the areas to which the electric vehicle charging piles belong, including:
[0008] Collect charging pile data and perform data preprocessing on the collected electric vehicle charging data;
[0009] The Elkan K-means method is used to cluster the charging piles. Based on the time characteristics of the charging load, the charging piles are divided into residential areas, industrial areas, commercial areas, and other areas, and the clustering model is saved.
[0010] Step 2) Training the electric vehicle load prediction model for different areas, including:
[0011] The Coord-Autoformer model is used to train the charging pile load data of four types of substations, and four types of charging pile prediction models are obtained;
[0012] Step 3) Forecast the electric vehicle load in different areas, including:
[0013] Obtain target input data, input the target input data into a clustering model for classification, and obtain the area category of each charging pile; input the target data into a prediction model according to the area type to predict the charging load.
[0014] An electric vehicle charging load prediction device, comprising:
[0015] The charging load data acquisition module is used to obtain the charging pile load data and perform data preprocessing. The data preprocessing collects charging data from various data sources and performs data deduplication, missing value processing, outlier processing and data format conversion on the data;
[0016] A classification module, used for inputting the target input data into a clustering model to classify the target input data and obtain a station area category for each charging pile;
[0017] Prediction module: used to receive classified input data and input it into the Coord-Autoformer prediction model to predict the charging load of electric vehicles and generate prediction results;
[0018] This module has both training and prediction capabilities, and whether to train depends on the needs of the user; if a new data set appears or the charging behavior pattern changes, the prediction model can be retrained to update the model parameters to adapt it to the new charging load characteristics; the retrained model will replace the original model, thereby providing high-precision load prediction.
[0019] The purpose of the present invention can also be further achieved by the following technical measures:
[0020] In the above-mentioned method for predicting charging load of electric vehicles for different types of substations, step 1) includes:
[0021] S1.1: Data acquisition:
[0022] The electric vehicle charging data collected over a period of time is aggregated into a data set, which includes: charging start and end time, charging power, charging duration, charging pile ID, and meteorological data;
[0023] S1.2: Data preprocessing:
[0024] S1.2.1: Data deduplication: Detect and delete duplicate records in the data set by fully matching the data content to ensure that each record is unique;
[0025] S1.2.2: Identify and process missing values in the data. For records with a large number of missing values or missing key fields, delete them directly to ensure data integrity. For records with a small number of missing values or records that can be inferred from other data, use interpolation methods to fill them.
[0026] S1.2.3: Detect and handle outliers in data: Set the outlier detection standard to Z Score When it is greater than 3, it is an abnormal value.
[0027]
[0028] Among them, Z Score is the standard score of the data point, X is the original data point, μ is the mean of the data, and σ is the standard deviation of the data;
[0029] The processing methods after identification include: deleting outliers or replacing outliers with the median of the column;
[0030] S1.2.4: Data format conversion, including:
[0031] Convert text data representing numerical values into numerical types;
[0032] Convert date and time fields to standard date and time formats;
[0033] The data is normalized to eliminate the differences between different scales. The normalization formula is as follows:
[0034]
[0035] Among them, X 归一化 is the normalized data point, whose value is scaled to the range of (0,1), X is the original data point, and X min is the minimum value in the original data set, X max is the maximum value in the original data set;
[0036] S1.3: Cluster the corresponding areas:
[0037] The Elkan K-means algorithm consists of the following steps:
[0038] S1.3.1: Randomly select K data points as initial centroids, calculate and store the Euclidean distance between each pair of centroids, and the Euclidean distance calculation method is:
[0039]
[0040] Where n represents the number of dimensions of the data, x i Represents the coordinates of the data point x in the i-th dimension, y i Represents the coordinates of data point y in the i-th dimension; the above K is the number of clusters, and the centroid is the cluster center;
[0041] S1.3.2: For each data point, initialize the upper and lower bounds of its distance to all centroids. The upper bound is set to the distance from the data point to the nearest centroid, and the lower bound is set to half the distance between centroids. For each data point, calculate the distance between it and all centroids, compare these distances, and assign the data point to the centroid with the smallest distance.
[0042] S1.3.3: Iteration step: Calculate the average position of all data points in each cluster and move the centroid to the mean position; after updating the centroid, recalculate and store the distance between each pair of centroids; for each data point, check whether the upper bound from the current centroid is less than the lower bound from the point to other centroids. If so, there is no need to recalculate the distance from the point to other centroids. Assign the point to the current centroid directly. If the upper bound is greater than the lower bound, recalculate the distance from the point to the centroid and update the upper and lower bounds based on the calculation results. Based on the updated distance, reassign each data point to the nearest centroid.
[0043] S1.3.4: Check whether the moving distance of all centroids is less than the preset threshold. If so, the algorithm converges and stops iterating. If the centroid is still moving and the distance is greater than the threshold, return to step S1.3.3 to continue iterating.
[0044] S1.3.5: When the algorithm converges, output the final centroid location and the cluster to which each data point belongs.
[0045] In the above-mentioned method for predicting charging load of electric vehicles for different types of substations, step 2) includes:
[0046] S2.1: Data preparation, divide the charging pile data into four categories: residential area, industrial area, commercial area and other areas;
[0047] S2.2: Input the data of the four types of charging piles into the Coord-Autoformer model for training. The specific training steps include:
[0048] S2.2.1: Integrate the CoordAttention module into the encoder and decoder of the Autoformer, and configure the model parameters, including the number of attention heads, hidden layer dimensions, learning rate, batch size, number of training rounds, loss function, and optimizer type;
[0049] S2.2.2: Feed the input data into the Coord-Autoformer model;
[0050] S2.2.3: Calculate the loss between the model output and the true value and back-propagate the gradient;
[0051] S2.2.4: Update model parameters using the optimizer.
[0052] S2.2.5: After the training is completed, the trained parameters and structures of the four models are saved.
[0053] In the above-mentioned method for predicting charging load of electric vehicles for different types of substations, step 3) includes:
[0054] S3.1: Obtain target input data, which should at least include the charging pile ID, charging start and end time, charging power, and charging duration;
[0055] S3.2: Input the target input data into the saved clustering model, determine the area category of each charging pile, and add the area category as a new data dimension to the corresponding data of each charging pile to obtain new target input data;
[0056] S3.3: Input the new target data into the corresponding prediction model according to the substation type to perform prediction, and obtain the prediction result of the electric vehicle charging load.
[0057] Compared with the prior art, the beneficial effects of the present invention are as follows: through the classification processing of different substations, the present invention can perform customized charging load prediction according to the specific characteristics of residential, industrial and commercial substations, significantly improving the adaptability and prediction accuracy of the model; the Coord-Autoformer model is adopted, which fully considers the spatiotemporal distribution characteristics of the charging load and accurately captures the dynamic changes of the charging load; the combination of the clustering model and the prediction model enables the present invention to have good scalability, and can be adjusted and optimized according to the needs of substations of different sizes and types; in addition, through processing steps such as data cleaning, filling and standardization, the quality of input data is ensured, and the reliability of model training and prediction is improved; finally, the present invention can accurately predict the charging load of different substations, optimize power grid dispatching and charging facility configuration, improve energy utilization efficiency, and reduce unnecessary energy waste, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a flow chart of the electric vehicle charging pile classification method of the present invention;
[0059] Figure 2 A flowchart of a method for training an electric vehicle charging load prediction model according to the present invention;
[0060] Figure 3 A flowchart of a prediction method of an electric vehicle charging load prediction model of the present invention;
[0061] Figure 4 A schematic diagram of the structure of a charging load prediction device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0063] The types of substations in the embodiments of the present application may be, but are not limited to, "residential substations", "industrial substations", "commercial substations", etc. This is only an example, and its specific structure is not limited to this. According to actual conditions and needs, it can be appropriately adjusted and changed according to specific application scenarios. For example, the substations can also be classified as "agricultural substations", "tourism substations", etc.
[0064] In response to the problems of low prediction accuracy, lack of pertinence and insufficient data utilization in the prior art, the present application provides a method and device for predicting the charging load of electric vehicles for different types of substations. The method includes: collecting charging data of electric vehicles and preprocessing the charging data; classifying charging piles by substation based on the preprocessed data; training models for data from different substations to obtain prediction models for different substations; obtaining target input data, inputting it into a clustering model to determine the substation category of the charging pile, and inputting the classified data into the corresponding prediction model for charging load prediction. The technical solution of the present application can predict the charging load of electric vehicles in different types of substations, thereby obtaining more targeted and accurate load prediction results.
[0065] See also Figure 1 The method for classifying the areas to which electric vehicle charging piles belong in the present invention comprises:
[0066] S1.1: Data acquisition:
[0067] The source and method of data acquisition are not restricted. You can choose to collect data at fixed intervals and collect the electric vehicle charging data collected over a period of time into a data set. The data content includes: charging start and end time, charging power, charging time, charging pile ID, and meteorological data, covering factors such as temperature, humidity, precipitation, wind speed and special weather;
[0068] S1.2: Data preprocessing:
[0069] S1.2.1: Data deduplication: Detect and delete duplicate records in the data set by fully matching the data content to ensure that each record is unique;
[0070] S1.2.2: Identify and process missing values in the data. For records with a large number of missing values or missing key fields, you can choose to delete them directly to ensure the integrity of the data. For records with fewer missing values or that can be inferred from other data, use interpolation methods to fill them. Common interpolation methods include linear interpolation, polynomial interpolation, spline interpolation, etc. This invention uses linear interpolation for processing, and the formula is as follows:
[0071]
[0072] where x i Indicates the point where the missing value is located, y i Represents the interpolation result, y i+1 and i-1 They are x i+1 and x i-1 The known data at .
[0073] S1.2.3: Detect and handle outliers in the data. Score If the outlier is greater than 3), the outlier is identified. The processing methods after identification include: deleting it or replacing the outlier with the median of the column.
[0074]
[0075] Among them, Z Score is the standard score of the data point, X is the original data point, μ is the mean of the data, and σ is the standard deviation of the data.
[0076] S1.2.4: Data format conversion, including:
[0077] Convert data into a format suitable for analysis and modeling. For example, convert text data representing numerical values into numerical types;
[0078] Convert date and time fields to the standard date and time format (YYYY-MM-DD HH:MM:SS).
[0079] According to the analysis requirements, the data is normalized to eliminate the differences between different scales. The normalization formula is as follows:
[0080]
[0081] Among them, X 归一化is the normalized data point, whose value is scaled to the range of (0,1), X is the original data point, and X min is the minimum value in the original data set, X max is the maximum value in the original data set.
[0082] S1.3: Cluster the corresponding areas:
[0083] After the data preprocessing is completed, the charging piles are classified by using a clustering algorithm. This embodiment preferably uses the Elkan K-means algorithm, which is an improved version of the K-means clustering algorithm. The algorithm improves the efficiency of K-means by reducing unnecessary distance calculations. Specifically, the following steps are included:
[0084] S1.3.1: Randomly select K data points as initial centroids, calculate and store the Euclidean distance between each pair of centroids, and the Euclidean distance calculation method is:
[0085]
[0086] Where n represents the number of dimensions of the data, x i Represents the coordinates of the data point x in the i-th dimension, y i Represents the coordinates of data point y in the i-th dimension; the above K is the number of clusters, and the centroid is the cluster center;
[0087] S1.3.2: For each data point, initialize the upper and lower bounds of its distance to all centroids. The upper bound is set to the distance from the data point to the nearest centroid, and the lower bound is set to half the distance between centroids. For each data point, calculate the distance between it and all centroids, compare these distances, and assign the data point to the centroid with the smallest distance. The functions of the upper and lower bounds are:
[0088] The upper bound represents the distance from the data point to the centroid to which it currently belongs or is closest. In subsequent iterations, if the position of the centroid does not change much, the upper bound may not change significantly, so that it can be quickly determined whether the data point still belongs to the current centroid. If the upper bound of the data point is small enough, it can be directly assumed that it will not be assigned to a farther centroid, thereby reducing unnecessary calculations. The lower bound is the minimum possible distance from a data point to other centroids for quick judgment, which is set to half the distance between centroids. Through the lower bound, we can quickly exclude other centroids that cannot be the closest centroids to the data point. If the upper bound of the data point to the current centroid is already smaller than its lower bound to other centroids, then we can directly skip recalculating the distance between the data point and these other centroids, thereby greatly reducing the amount of calculations.
[0089] S1.3.3: Iteration step: Calculate the average position of all data points in each cluster, and move the centroid to the mean position. After updating the centroid, recalculate and store the distance between each pair of centroids. For each data point, check whether its upper bound to the current centroid (after the "initialization" in the previous step, each data point has been assigned to a cluster, and its current centroid is the centroid of the class) is less than the lower bound of the point to other centroids. If so, there is no need to recalculate the distance between the point and other centroids, and directly assign the point to the current centroid. If the upper bound is greater than the lower bound, recalculate the distance from the point to the centroid (that is, the distance needs to be recalculated and then the cluster to which it belongs needs to be reassigned), and update the upper and lower bounds based on the calculation results. Based on the updated distance, reassign each data point to the nearest centroid, and update the upper and lower bounds of the distance;
[0090] S1.3.4: Check whether the moving distance of all centroids is less than the preset threshold (the threshold is generally a small number, such as 0.0001, which can be adjusted according to the situation). If so, the algorithm converges and stops iterating. If the centroid is still moving and the distance is greater than the threshold, return to step S1.3.3 to continue iterating;
[0091] S1.3.5: When the algorithm converges, the final centroid position and the cluster to which each data point belongs are output. The algorithm outputs a digital label, and the specific cluster name can be defined by yourself. For example, output 1 represents a residential area, 2 represents an industrial area, etc.
[0092] See also Figure 2 , an embodiment of a training method for an electric vehicle load forecasting model, comprising:
[0093] S2.1: Data preparation, dividing the charging pile data into four categories according to the results obtained in step S1;
[0094] S2.2: The data of the four types of charging piles are respectively input into four prediction models for training. The Coord-Autoformer model is preferably used in this embodiment, which is a model that combines CoordAttention and Autoformer. CoordAttention is a lightweight attention mechanism that can capture and utilize the location information in the input data. It is particularly suitable for processing space-related data. It enhances the model's perception of spatial context by introducing coordinate information, thereby improving the performance of the prediction model. Autoformer is a time series prediction model based on the self-attention mechanism. It is good at capturing long-term dependencies and is suitable for processing tasks with complex time series dependencies. Autoformer reduces the complexity of the model by decoupling trends and seasonal components, thereby enhancing the ability to model time series features. Therefore, the Coord-Autoformer model preferred in this embodiment combines the advantages of the CoordAttention and Autoformer models, can enhance prediction accuracy and make the model training faster. The specific training steps of the model include:
[0095] S2.2.1: Integrate the CoordAttention module into the encoder and decoder of the Autoformer, and configure the model parameters, including the number of attention heads, hidden layer dimensions, learning rate, batch size, number of training rounds, loss function, and optimizer type;
[0096] S2.2.2: Feed the input data into the Coord-Autoformer model;
[0097] S2.2.3: Calculate the loss between the model output and the true value and back-propagate the gradient;
[0098] S2.2.4: Use the optimizer to update model parameters. The optimizer is part of the deep learning process. The algorithm code automatically updates the parameters. Generally, the Adam optimizer is used, which can be called directly.
[0099] S2.2.5: After the training is completed, the trained parameters and structures of the four models are saved.
[0100] See also Figure 3 The present invention provides an electric vehicle load prediction model prediction method embodiment, comprising:
[0101] S3.1: Obtain target input data, which should at least include the charging pile ID, charging start and end time, charging power, and charging duration;
[0102] S3.2: Input the target input data into the saved clustering model, determine the area category of each charging pile, add the area category as a new data dimension to the corresponding data of each charging pile, and obtain new target input data; the new data dimension will be represented as a column in the data set, and the content is the label of the area category to which each charging pile belongs. That is, if there are originally 5 columns of data, there will be 6 columns after adding the area category.
[0103] S3.3: Input the new target data into the corresponding prediction model according to the substation type to perform prediction, and obtain the prediction result of the electric vehicle charging load.
[0104] In a specific example of the present invention, the specific processing process is as follows:
[0105] (1) Data acquisition and processing: Electric vehicle charging pile data from a certain eastern city in a certain year was selected. Each record corresponds to a charging event. The main information dimensions of the data include charging pile ID, time, charging load, temperature, humidity, wind speed, wind direction, and rainfall, a total of 8 dimensions. The data collection interval is 15 minutes, that is, each charging pile generates 4 data per hour.
[0106] ① First, deduplicate the data to ensure that each record is unique and avoid the impact of duplicate charging events on subsequent analysis.
[0107] ② After deduplication, check whether there are missing values in the data set. For missing data, linear interpolation method is used to fill them.
[0108] ③After processing missing values, perform outlier detection. Set the outlier detection criteria and replace the outliers with the median of the column after identifying them.
[0109] ④ Unify the data format and convert the date and time fields into the standard date and time format (YYYY-MM-DD HH:MM:SS).
[0110] ⑤After the format conversion, the data is normalized and each eigenvalue is scaled to the range of (0,1).
[0111] ⑥ After the format conversion is completed, a new dimension "day type" is added to each data to indicate the type of day the charging event occurs, that is, whether it is a working day or a rest day. Mark working days as 0 and rest days as 1. Through this step, the number of dimensions of the input data increases from 8 to 9.
[0112] ⑦Finally, the processed data is divided into two parts in a ratio of 3:1. The first part is used for model training and the second part is used for model prediction. This division is to meet the training needs. In practical applications, the model only needs to be trained before the first use, and subsequent predictions can be performed directly.
[0113] (2) Clustering of charging stations: Based on the charging load characteristics of different areas, the first part of the data is clustered. Generally, the charging load in residential areas is higher at night and lower during the day; the charging load in industrial (work) areas is higher during the day, especially in the afternoon, and lower at night; while the charging load in commercial areas is higher at night than during the day, and the charging load on weekends is higher than on weekdays. For this reason, the 24-hour day is divided into three periods: morning (5:00 to 11:00), afternoon (12:00 to 20:00) and night (21:00 to 4:00 the next day). The charging records of all charging piles in these three periods are marked separately, and the number of charging records in each time period is obtained accordingly.
[0114] The preprocessed data is input into the Elkan K-means algorithm, and clustering is performed based on the number of charging records and day types in three time periods. The number of clusters is set to 4. After clustering, the data is divided into four categories. According to the charging load characteristics of each category, the corresponding regional category is determined: the residential area has high charging load at night and low charging load during the day; the industrial (work) area has high charging load during the day, especially in the afternoon, and low load at night; the commercial area has higher charging load in the afternoon and evening than in the morning, and the charging load on weekends is significantly higher than that on weekdays; those that do not meet the above three characteristics are classified as other areas. Finally, the obtained classification label is added to each data as a new dimension "area type", so that the processed data has 10 dimensions, and the clustering model is saved for subsequent use.
[0115] (3) Model training:
[0116] ① Construct the feature matrix X and label vector Y. The matrix X contains several feature dimensions related to the electric vehicle load. In this example, these features are: charging pile ID, charging start time, charging end time, temperature, humidity, wind speed, wind direction, rainfall, day type, and station type. Then the shape of X is (n×10), where n is the number of data entries. The label vector Y represents the load value of each sample at the next time point. Specifically, if the load value at the current time point is L t , then Y represents L t+1 This value is extracted from the data set by sliding the window;
[0117] ②Convert the feature matrix X and label vector Y into the data set format required for model training. This format means that the structure and format of the data set can be directly accepted and processed by the model. In this example, it is stored in PyTorch in the form of tensors, that is, in the form of TensorDataset;
[0118] ③Use DataLoader to implement batch training and optimization. In PyTorch, DataLoader is a tool that can divide the data set into multiple batches and load data batch by batch during training, reducing memory pressure and improving computing efficiency;
[0119] ④ According to the dimension of "substation type" in the data set, the data set is divided into four subsets, corresponding to the four substation categories obtained in the clustering stage. Then, each subset is divided into a training set and a test set in a ratio of 7:3;
[0120] ⑤ Input the four training sets into the Coord-Autoformer model to train the prediction models corresponding to the four regions. The calculation of the self-attention mechanism is realized in the encoder and decoder through position encoding, and nonlinear transformation is performed through the fully connected layer.
[0121] The role of position encoding is: when processing time series data, the model needs to understand the order of the input data, and position encoding is to solve this problem. By adding position information to the input data, the model can identify the order of data points in the sequence, thereby better capturing the temporal correlation.
[0122] The function of the fully connected layer is: In the final stage of the model, the fully connected layer is used to convert the output of the model into a predicted value. It generates the final output result by linearly combining all input features and processing them through nonlinear activation functions. The fully connected layer plays a role in integrating information and completing the final prediction at this stage;
[0123] ⑥During the training process, the cross entropy loss function is used to calculate the error between the predicted value and the true value. Through the Adam optimizer, the model parameters are optimized according to the gradient information, and the loss function value is gradually reduced;
[0124] ⑦Model evaluation stage. Use four test data sets to evaluate the accuracy of the trained corresponding models. By comparing the model prediction output with the true label, calculate the accuracy of the model on the test data set;
[0125] The experimental results show that the prediction accuracy of the four models is more than 96%, which verifies the effectiveness of the models. Finally, the four models are saved for use in prediction.
[0126] (4) Use the model for prediction: Input the second part of the data (i.e., the data used for prediction) obtained from the data acquisition and processing in (1) above into the saved clustering model to obtain the clustering result, and add the dimension feature of "substation type" to the data. Then, input the data into the four saved Coord-Autoformer models according to the substation type, and the model directly calculates the final prediction result.
[0127] Another aspect of the present invention further provides a corresponding device embodiment, specifically as follows Figure 4 Specifically, the device 400 includes:
[0128] The charging load data acquisition module 410 is used to collect the load data of the electric vehicle charging pile, including the charging start and end time, charging power, charging time, charging pile ID, charging station location and other information, and pre-process the collected data, such as removing outliers, filling missing values and converting data formats;
[0129] The charging pile area classification module 420 is used to classify the charging piles into different area categories by using a clustering algorithm based on the acquired charging pile data, combined with information such as spatial coordinates, user attributes and meteorological data, and save the classification results for subsequent use;
[0130] The charging load prediction module 430 is used to input the target input data into the corresponding prediction model based on the area category information output by the classification module, perform model training and prediction of the electric vehicle charging load, and finally obtain an accurate charging load prediction result.
[0131] In addition to the above embodiments, the present invention may also have other implementation modes. Any technical solutions formed by equivalent replacement or equivalent transformation shall fall within the protection scope required by the present invention.
Claims
1. A method for predicting electric vehicle charging load for different types of substations, characterized in that: The method comprises the following steps: Step 1) Classify the areas to which the electric vehicle charging piles belong, including: Collect charging pile data and perform data preprocessing on the collected electric vehicle charging data; The Elkan K-means method is used to cluster the charging piles. Based on the time characteristics of the charging load, the charging piles are divided into residential areas, industrial areas, commercial areas, and other areas, and the clustering model is saved. Step 2) Training the electric vehicle load prediction model for different areas, including: The Coord-Autoformer model is used to train the charging pile load data of four types of substations, and four types of charging pile prediction models are obtained; Step 3) Forecast the electric vehicle load in different areas, including: Obtain target input data, input the target input data into a clustering model for classification, and obtain the area category of each charging pile; input the target data into a prediction model according to the area type to predict the charging load.
2. The method for predicting electric vehicle charging load for different types of substations as claimed in claim 1, characterized in that: The step 1) comprises: S1.1: Data acquisition: The electric vehicle charging data collected over a period of time is aggregated into a data set, which includes: charging start and end time, charging power, charging duration, charging pile ID, and meteorological data; S1.2: Data preprocessing: S1.2.1: Data deduplication, through the complete matching of data content, detect and delete duplicate records in the data set to ensure that each record is unique; S1.2.2: Identify and process missing values in the data. For records with a large number of missing values or missing key fields, delete them directly to ensure data integrity. For records with a small number of missing values or records that can be inferred from other data, use interpolation methods to fill them. S1.2.3: Detect and handle outliers in data: Set the outlier detection standard to Z Score When it is greater than 3, it is an abnormal value. Among them, Z Score is the standard score of the data point, X is the original data point, μ is the mean of the data, and σ is the standard deviation of the data; The processing methods after identification include: deleting outliers or replacing outliers with the median of the column; S1.2.4: Data format conversion, including: Convert text data representing numerical values into numerical types; Convert date and time fields to standard date and time formats; The data is normalized to eliminate the differences between different scales. The normalization formula is as follows: Among them, X 归一化 is the normalized data point, whose value is scaled to the range of (0,1), X is the original data point, and X min is the minimum value in the original data set, X max is the maximum value in the original data set; S1.3: Cluster the corresponding areas: The Elkan K-means algorithm consists of the following steps: S1.3.1: Randomly select K data points as initial centroids, calculate and store the Euclidean distance between each pair of centroids, and the Euclidean distance calculation method is: Where n represents the number of dimensions of the data, x i Represents the coordinates of the data point x in the i-th dimension, y i Represents the coordinates of the data point y in the i-th dimension; the above K is the number of clusters, and the centroid is the cluster center; S1.3.2: For each data point, initialize the upper and lower bounds of its distance to all centroids. The upper bound is set to the distance from the data point to the nearest centroid, and the lower bound is set to half the distance between centroids. For each data point, calculate the distance between it and all centroids, compare these distances, and assign the data point to the centroid with the smallest distance. S1.3.3: Iteration step: Calculate the average position of all data points in each cluster and move the centroid to the mean position; after updating the centroid, recalculate and store the distance between each pair of centroids; for each data point, check whether the upper bound from the current centroid is less than the lower bound from the point to other centroids. If so, there is no need to recalculate the distance from the point to other centroids. Assign the point to the current centroid directly. If the upper bound is greater than the lower bound, recalculate the distance from the point to the centroid and update the upper and lower bounds based on the calculation results. Based on the updated distance, reassign each data point to the nearest centroid. S1.3.4: Check whether the moving distance of all centroids is less than the preset threshold. If so, the algorithm converges and stops iterating. If the centroid is still moving and the distance is greater than the threshold, return to step S1.3.3 to continue iterating. S1.3.5: When the algorithm converges, output the final centroid location and the cluster to which each data point belongs.
3. The method for predicting charging load of electric vehicles for different types of substations as claimed in claim 1, characterized in that: The step 2) comprises: S2.1: Data preparation, divide the charging pile data into four categories: residential area, industrial area, commercial area and other areas; S2.2: Input the data of the four types of charging piles into the Coord-Autoformer model for training. The specific training steps include: S2.2.1: Integrate the CoordAttention module into the encoder and decoder of the Autoformer, and configure the model parameters, including the number of attention heads, hidden layer dimensions, learning rate, batch size, number of training rounds, loss function, and optimizer type; S2.2.2: Feed the input data into the Coord-Autoformer model; S2.2.3: Calculate the loss between the model output and the true value and back-propagate the gradient; S2.2.4: Update model parameters using the optimizer. S2.2.5: After the training is completed, the trained parameters and structures of the four models are saved.
4. The method for predicting charging load of electric vehicles for different types of stations as claimed in claim 1, characterized in that: The step 3) comprises: S3.1: Obtain target input data, which should at least include the charging pile ID, charging start and end time, charging power, and charging duration; S3.2: Input the target input data into the saved clustering model, determine the area category of each charging pile, and add the area category as a new data dimension to the corresponding data of each charging pile to obtain new target input data; S3.3: Input the new target data into the corresponding prediction model according to the substation type to perform prediction, and obtain the prediction result of the electric vehicle charging load.
5. An electric vehicle charging load prediction device, characterized in that: include: The charging load data acquisition module is used to obtain the charging pile load data and perform data preprocessing. The data preprocessing collects charging data from various data sources and performs data deduplication, missing value processing, outlier processing and data format conversion on the data; A classification module, used for inputting the target input data into a clustering model to classify the target input data and obtain a station area category for each charging pile; Prediction module: used to receive classified input data and input it into the Coord-Autoformer prediction model to predict the charging load of electric vehicles and generate prediction results; This module has both training and prediction capabilities. Whether to train depends on the needs of the user. If a new data set appears or the charging behavior pattern changes, the prediction model can be retrained to update the model parameters to adapt it to the new charging load characteristics; the retrained model will replace the original model, thereby providing high-precision load prediction.