Charging load prediction method and device for electric vehicle in charging station and electronic equipment
By using machine learning models for charging load prediction in electric vehicle charging stations, and combining multi-timescale convolutional layers and a two-layer LSTM network, the problem of low accuracy in charging load prediction is solved, achieving high-precision load prediction and resource optimization.
Patent Information
- Application Number
- CN202511543211.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-01-23
AI Technical Summary
The low accuracy of charging load prediction in existing electric vehicle charging stations leads to the exacerbation of the peak-valley difference in the power grid and the imbalance between renewable energy consumption and charging demand.
A machine learning-based charging load prediction model is adopted, including an input layer, multi-timescale convolutional layers, and a two-layer long short-term memory network (LSTM). Charging load is predicted using charging data, weather data, and multi-scale features. Features are extracted through multi-timescale convolutional layers, and long-term dependency analysis is performed by the two-layer LSTM network to finally generate prediction results.
It enables high-precision prediction of electric vehicle charging load within charging stations, improves prediction accuracy, helps the power grid optimize resource allocation, and reduces the risks caused by prediction errors.
Smart Images

Figure CN121389762A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of electric vehicles, in particular, to a charging load prediction method and device for electric vehicles in a charging station and an electronic device. BACKGROUND
[0002] At present, the electric vehicle (EV) industry is showing explosive growth. Due to the strong spatio-temporal randomness of electric vehicle charging behavior, influenced by weather, electricity price, time and other multi-dimensional factors, it is difficult for related load prediction methods such as regression analysis and support vector machine to accurately capture the nonlinear and multi-modal characteristics, resulting in problems such as aggravation of peak-valley difference, imbalance between new energy consumption and charging demand coordination, and so on. Further, the related technologies have the problem of low accuracy of charging load prediction for electric vehicles in a charging station.
[0003] In view of the above problems, no effective solutions have been proposed so far. SUMMARY
[0004] The embodiments of the present application provide a charging load prediction method and device for electric vehicles in a charging station and an electronic device, to at least solve the technical problem of low accuracy of charging load prediction for electric vehicles in a charging station in the related art.
[0005] According to an aspect of an embodiment of the present application, a charging load prediction method for electric vehicles in a charging station is provided, comprising: obtaining charging data and weather data of electric vehicles in the charging station in a current charging period, wherein the charging data includes charging load, charging price and charging time of multiple different scales, and the charging load is used to indicate the sum of charging power of all electric vehicles in the charging station at the same sampling time; based on the charging data and weather data of the current charging period, a charging load prediction model is used to obtain the predicted charging load of electric vehicles in the charging station in a predicted charging period; wherein the charging load prediction model is obtained by machine learning based on the charging data and weather data of electric vehicles in the charging station in historical charging periods, and the charging load prediction model includes an input layer, a multi-time scale convolution layer, a double-layer long short-term memory network and a prediction layer.
[0006] According to another aspect of the embodiments of the present application, a charging load prediction device for electric vehicles in a charging station is also provided, comprising: a data acquisition module configured to acquire charging data and weather data of electric vehicles in the charging station in a current charging period, wherein the charging data comprises charging load, charging price and charging time of multiple different scales, and the charging load is used to indicate the sum of charging power of all electric vehicles in the charging station at the same sampling time; and a load prediction module configured to obtain predicted charging load of electric vehicles in the charging station in a predicted charging period based on the charging data and weather data of the current charging period by using a charging load prediction model.
[0007] According to another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, which stores a plurality of instructions adapted to be loaded and executed by a processor to implement any of the charging load prediction methods for electric vehicles in a charging station.
[0008] According to another aspect of the embodiments of the present application, an electronic device is also provided, which comprises one or more processors and a memory configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any of the charging load prediction methods for electric vehicles in a charging station.
[0009] According to another aspect of the embodiments of the present application, a computer program product is also provided, which comprises a computer program configured to implement the steps of any of the charging load prediction methods for electric vehicles in a charging station when executed by a processor.
[0010] In this embodiment, charging data and weather data of electric vehicles in the charging station during the current charging period are obtained. The charging data includes charging load, charging price, and charging time at multiple different scales. The charging load is used to indicate the sum of charging power of all electric vehicles in the charging station at the same sampling time. Based on the charging data and weather data of the current charging period, a charging load prediction model is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period. The charging load prediction model is obtained by machine learning based on the charging data and weather data of electric vehicles in the charging station during historical charging periods. The charging load prediction model includes an input layer, a multi-time-scale convolutional layer, a two-layer long short-term memory network, and a prediction layer. This achieves the goal of collecting and analyzing multi-scale charging time, charging load, charging price, and weather data, and using a deep learning model containing multi-time-scale convolutional layers, a two-layer long short-term memory network (LSTM), and a prediction layer to accurately predict the charging load. This achieves high-precision prediction of the charging load of electric vehicles in the charging station, effectively improving the accuracy of the prediction, and thus solving the technical problem of low accuracy in predicting the charging load of electric vehicles in the charging station in related technologies. Attached Figure Description
[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0012] Figure 1 This is a flowchart of a method for predicting the charging load of electric vehicles in a charging station according to an embodiment of this application;
[0013] Figure 2 This is a schematic diagram of an optional initial network model according to an embodiment of this application;
[0014] Figure 3 This is a schematic diagram of a charging load prediction device for electric vehicles in a charging station according to an embodiment of this application. Detailed Implementation
[0015] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0016] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0017] According to an embodiment of this application, a method embodiment for predicting the charging load of electric vehicles in a charging station is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0018] Figure 1 This is a flowchart of a method for predicting the charging load of electric vehicles in a charging station according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0019] Step S102: Obtain charging data and weather data of electric vehicles in the charging station during the current charging period. The charging data includes charging load, charging price, and charging time at multiple different scales. The charging load is used to indicate the sum of charging power of all electric vehicles in the charging station at the same sampling time.
[0020] In step S102, real-time data on electric vehicles charging at the charging station is first collected, including charging load (i.e., the total charging power of all electric vehicles at a given moment), charging price, and charging time. Simultaneously, current weather data is also acquired. This information forms the input basis for the prediction model, reflecting the key factors affecting the charging load.
[0021] Optionally, charging times at multiple different scales may include, but are not limited to, charging duration, charging start time, and corresponding season, day of the week, and holiday status. Weather data may include, but is not limited to, weather type and temperature.
[0022] Step S104: Based on the charging data and weather data of the current charging period, a charging load prediction model is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period. The charging load prediction model is obtained by machine learning based on the charging data and weather data of electric vehicles in the charging station during historical charging periods. The charging load prediction model includes an input layer, a multi-timescale convolutional layer, a two-layer long short-term memory network, and a prediction layer.
[0023] In step S104, the charging load prediction model is a trained machine learning model built upon historical charging data (including charging load, charging price, and charging time) from past charging periods at the charging station, along with the weather conditions at that time. The model's architecture includes an input layer that receives various data, which is then processed through multi-timescale convolutional layers to identify and extract features at different time scales, such as short-term charging load fluctuations and long-term charging trends. Next, the data is passed to a two-layer Long Short-Term Memory (LSTM) network, which can remember long-term dependencies, helping the model understand and predict future changes in charging load. Finally, the prediction layer is responsible for generating the predicted charging load value for the predicted charging period. Based on the charging data and weather data for the current charging period, the predicted electric vehicle charging load value for a future predicted charging period can be obtained through the processing of the prediction model.
[0024] The above methods take into account the reality that charging load is affected by external factors such as weather, as well as the multi-timescale characteristics of prediction, and can more accurately reflect future charging demand, providing a scientific basis for the operation planning of charging stations and the load management of the power grid. In other words, through the above steps S102 to S108, it is possible to collect and analyze multi-scale charging time, charging load, charging price and weather data, and use a deep learning model containing multi-timescale convolutional layers, a two-layer long short-term memory network (LSTM) and a prediction layer to accurately predict the charging load, thereby achieving high-precision prediction of electric vehicle charging load in charging stations, effectively improving the accuracy of prediction, and thus solving the technical problem of low accuracy in predicting electric vehicle charging load in charging stations in related technologies.
[0025] In one optional embodiment, based on charging data and weather data during the current charging period, a charging load prediction model is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period. This includes: constructing a target feature matrix based on the charging data and weather data during the current charging period; inputting the target feature matrix into a multi-timescale convolutional layer via the input layer in the charging load prediction model, and extracting multi-scale temporal features from the target feature matrix through the multi-timescale convolutional layer; extracting the target temporal features from the multi-scale temporal features through a two-layer long short-term memory network in the charging load prediction model; and obtaining the predicted charging load of electric vehicles in the charging station during the predicted charging period based on the target temporal features and the prediction layer in the charging load prediction model.
[0026] Optionally, the collected charging data (such as charging load, charging price, and charging time) and weather data (such as temperature, humidity, and light intensity) for the current charging period are first converted into numerical forms and then combined to form a target feature matrix. Each row of this target feature matrix can represent a data set at an observation time point, while each column can correspond to different feature types (such as charging price, ambient temperature, etc.). The target feature matrix first enters the prediction model through the input layer, and then the data is fed into a multi-timescale convolutional layer. The purpose of this layer is to extract relevant features at different time scales from the target feature matrix. For example, it can identify rapid changes (such as changes in charging behavior caused by price fluctuations) and slow trends (such as the impact of seasonal changes on charging load). Through convolution operations, the model can capture these multi-level temporal information, making the prediction of charging load more sensitive and accurate. The extracted multi-scale temporal features are then fed into a two-layer LSTM network to effectively remember long-term dependencies, ignore unimportant information, and retain complex temporal features. The two-layer structure means that the model processes information at different levels of abstraction. For example, the first LSTM layer can focus on finer-grained changes, while the second layer can focus on more macroscopic trends. This helps the model to more comprehensively understand the dynamic changes in charging load. Finally, the target temporal features extracted by the LSTM are input into the prediction layer, which is the model's output layer. The prediction layer uses the complex temporal features (i.e., the target temporal features) output by the two-layer LSTM network to calculate the predicted charging load for the predicted charging period, that is, the total charging power that all electric vehicles in the charging station may generate within a specific time period in the future.
[0027] In the above approach, multi-timescale convolutional layers and a two-layer LSTM network are used to effectively capture and analyze the complex temporal characteristics of charging load, ultimately producing more accurate and reliable prediction results. This approach is particularly suitable for charging station scenarios with a large amount of historical and real-time data, helping managers to allocate power resources in advance to meet future charging demands, while also reducing the potential risks caused by prediction errors.
[0028] In one optional embodiment, a target feature matrix is constructed based on charging data and weather data during the current charging period, including: performing feature encoding on charging time and weather data at multiple different scales during the current charging period to obtain charging time features and weather features during the current charging period; constructing an initial feature matrix based on the charging load and charging price during the current charging period, as well as the charging time features and weather features during the current charging period; and normalizing the initial feature matrix to obtain the target feature matrix.
[0029] Optionally, the charging time feature may include, but is not limited to, specific time features (year, month, day, hour), charging duration features, holiday impact coefficient, weather coefficient, seasonal coordinates, etc.
[0030] Optionally, firstly, feature encoding is performed on the charging time data within the current charging period. Since charging time has multi-scale characteristics, ranging from minutes to hours or even days, the encoding process transforms this time information into a form that machine learning models can understand, such as using time window sliding or time series embedding methods. Similarly, weather data also needs feature encoding, which may include, but is not limited to, converting continuous temperature and humidity values into categorical variables (such as "cold," "moderate," or "hot"), or standardized numerical features, so that the model can identify the correlation between weather conditions and charging load. Next, the encoded charging time features and weather features are combined with the charging load and charging price data for the current charging period to construct an initial feature matrix. Each row of this matrix represents a point in time, containing all relevant information for that point in time, such as charging load, price, charging time features, and weather features. This is the basis for model training and prediction. To enable the prediction model to process the data more effectively, the initial feature matrix needs to be normalized to obtain the target feature matrix. Normalization eliminates the influence of different dimensions between features, ensuring that all features are within a similar numerical range. The above normalization process can be performed using methods such as min-max scaling (scaling all numerical features to between 0 and 1) and Z-score standardization (standardizing feature values according to their mean and standard deviation to make them follow a standard normal distribution). Normalization makes the model's learning process more stable and the prediction results more reliable.
[0031] The above feature matrix construction and preprocessing process is a crucial step in ensuring that the charging load prediction model can effectively learn from multi-source data. It not only integrates information from charging behavior and external environmental factors, but also improves data quality through normalization, laying a solid foundation for subsequent training and prediction using multi-timescale convolutional layers and two-layer LSTM networks.
[0032] Optionally, considering the impact of holidays, seasons, and weather on charging load, a preset charging load time coding method is used to perform feature coding on charging time and weather data at multiple scales for the current charging period, obtaining the charging time characteristics and weather characteristics for the current charging period. This charging load time coding method may include, but is not limited to, the following:
[0033] 1) The holiday impact coefficient coding is designed as follows:
[0034] First, all statutory holidays throughout the year are selected. Then, considering the type of holiday, holiday length, and the expected impact of weekdays and weekends on charging load, corresponding codes are designed for the holidays. The coding rules are as follows:
[0035] Weekdays = 0; Regular weekends = 1; Short holidays (Qingming Festival / Dragon Boat Festival / Mid-Autumn Festival / New Year's Day) = 2; Long holidays (National Day / May Day) = 3; Important holidays (Spring Festival) = 4.
[0036] 2) The weather coding method is designed as follows:
[0037] Considering the impact of different weather conditions on charging load, sunny days have the least impact, while rain and snow have the greatest impact. Weather types are mapped to numerical codes, and the coding rules are as follows:
[0038] Sunny = 0, Cloudy = 1, Light rain = 2, Fog = 3, Heavy rain = 4, Snow = 5.
[0039] 3) The seasonal coding method is designed as follows:
[0040] Considering seasonal periodicity, a sine / cosine encoding method is adopted. First, the season is mapped to an angle, and the calculation formula is as follows: Where t is the season number, with values of spring=1, summer=2, autumn=3, and winter=4; a is the total number of seasons, with a value of 4. Then, a two-dimensional coordinate vector [sin(angle),cos(angle)] is generated based on the angle, and the coordinate information is used to represent the seasonal periodic relationship.
[0041] A 12-dimensional feature matrix is constructed using specific time features (year, month, day, hour), charging duration features, charging load, holiday impact coefficient, weather coefficient, seasonal coordinates, charging price, and temperature data. The charging load is the sum of the charging power of all electric vehicles at the charging station at the same time. The initial feature matrix is normalized using a min-max normalization method, scaling the data to [0,1]. The resulting target feature matrix eliminates feature differences caused by varying dimensions and ranges in features such as temperature and load.
[0042] In an optional embodiment, when the multi-timescale convolutional layer includes multiple one-dimensional convolutional layers, channel merging layers, and channel attention layers, the extraction of multi-scale temporal features from the target feature matrix through the multi-timescale convolutional layer includes: based on the target feature matrix, using multiple one-dimensional convolutional layers to obtain multiple sets of temporal features corresponding to the outputs of the multiple one-dimensional convolutional layers, wherein the multiple one-dimensional convolutional layers have different convolutional sizes to extract feature relationships at different spatial scales; using a channel merging layer to concatenate the multiple sets of temporal features to obtain merged temporal features; based on the merged temporal features, using a channel attention layer to obtain channel attention weights, wherein the channel attention weights are used to assign weights to each feature channel in the merged temporal features; and based on the channel attention weights and the merged temporal features, obtaining multi-scale temporal features.
[0043] Optionally, multi-timescale convolutional layers consist of multiple one-dimensional convolutional layers, each with a different convolutional size (or kernel size). This design allows the model to simultaneously extract feature relationships at different time scales from the target feature matrix. For example, smaller convolutional sizes can capture local changes within a short timeframe, while larger sizes are better suited for identifying patterns and trends over longer periods. The multiple sets of temporal features output by each one-dimensional convolutional layer are integrated through a channel merging layer. This integration process is achieved by horizontally concatenating the features, resulting in a merged temporal feature that includes features from all time scales. This process utilizes information from short, medium, and long time scales simultaneously, enhancing the comprehensiveness and accuracy of predictions. The merged temporal features are further processed by a channel attention layer to determine the importance of each feature channel and assign weights accordingly. The channel attention mechanism allows the model to focus on the most relevant feature channels while reducing the influence of irrelevant or secondary features, thereby improving the accuracy of model predictions. For example, if the model finds that a weather feature (such as temperature) has a significant impact on charging load, the channel attention layer will automatically give this feature a higher weight. Finally, channel attention weights are applied to merge temporal features to obtain optimized multi-scale temporal features. This feature set not only includes the changes in the original data at different time scales, but also allows for the adjustment of feature importance through an attention mechanism, providing high-quality input for subsequent processing by a two-layer Long Short-Term Memory (LSTM) network. In this approach, the multi-time-scale convolutional layers can not only capture local and global patterns in the charging data, but also intelligently adjust feature weights through channel merging and attention mechanisms, significantly enhancing the model's ability to process complex temporal data.
[0044] Optionally, the multi-timescale convolutional layer can consist of three parallel one-dimensional convolutions of different sizes (e.g., 1×1, 1×3, and 1×5 convolutions). These three one-dimensional convolutions of different sizes extract feature relationships at different spatial scales, capturing short-term fluctuations and long-term trends through one-dimensional convolution kernels of different sizes. The 1×1 convolution captures 1-hour features, the 1×3 convolution captures intermediate dependencies between adjacent 3-hour intervals, and the 1×5 convolution captures long-term dependencies over 5 hours. With a stride of 1, after convolution, the input features [12,24] become [12,24], [12,22], and [12,20]. These are then concatenated at the channel merging layer to obtain merged temporal features, resulting in data of size [12,66].
[0045] As an optional implementation, in a two-layer Long Short-Term Memory (LSTM) network, the temporal dependencies of the target temporal features are initially extracted using a first-layer LSTM network. The second-layer LSTM network further optimizes and enhances these temporal dependency features, while a random deactivation (Dropout) mechanism is used to prevent model overfitting. Specifically, when the target temporal features enter the initial processing stage of the two-layer LSTM network, the first-layer LSTM network is responsible for initially extracting the temporal dependencies in these features, focusing on the changing trends of charging data over time, as well as the interactions between factors such as charging load, price, and weather. The first-layer LSTM can remember information from earlier time points and determine their impact on the current temporal features. Based on the first-layer LSTM, the target temporal features are passed to the second-layer LSTM network. The task of this layer is to further optimize and enhance these features based on the temporal dependency features initially extracted by the first layer, making them more consistent with the model's requirements for charging load prediction. The second-layer LSTM network can capture deeper temporal dependencies that the first layer may have missed, as well as more complex interaction patterns between features. During the training of the second-layer LSTM network, the Dropout mechanism is used to randomly "shut down" the updates of a portion of neurons. This prevents the model from overfitting the training data and improves its generalization ability. By randomly discarding a portion of network connections during each training iteration, Dropout forces the model to learn to extract information from all features, rather than over-relying on any single feature, thus avoiding poor performance when encountering new data. After processing the two-layer LSTM network and applying the Dropout mechanism, the optimized and enhanced target time-series features in the multi-scale time-series features are finally obtained. These features not only contain the inherent regularity of the time series but also become more accurate and reliable through the progressive processing of the two LSTM layers and the supervision of the Dropout mechanism, providing high-quality input data for subsequent prediction layers.
[0046] In one optional embodiment, the prediction layer is an attention-based prediction layer. Based on the target time-series features, the prediction layer in the charging load prediction model is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period. This includes: generating attention weights for each feature in the target time-series features based on the fully connected layer in the prediction layer; multiplying each feature in the target time-series features with its corresponding attention weight to generate a weighted feature; normalizing the weighted feature using the softmax function in the prediction layer to obtain the predicted charging load distribution; and obtaining the predicted charging load of electric vehicles in the charging station during the predicted charging period based on the predicted charging load distribution.
[0047] Optionally, the prediction layer first processes the target temporal features through a fully connected layer to generate attention weights for each feature. The fully connected layer maps features to weight vectors, and the attention weights reflect the importance of each temporal feature in predicting charging load. A higher attention weight means the model considers that feature more crucial in determining the charging load. Next, each target temporal feature is element-wise multiplied with its corresponding attention weight to obtain a weighted feature. Each feature has been adjusted according to its contribution, so in subsequent predictions, the model will rely more on key features and pay less attention to secondary features, thereby improving prediction accuracy and robustness. The resulting weighted features are then normalized using a softmax function to generate a distribution of predicted charging load. The softmax function converts a set of values into a probability distribution, ensuring that the sum of all predicted values equals 1. This helps predict the probability of different charging load values occurring during the predicted charging period, forming a probability distribution. Finally, based on the obtained predicted charging load distribution, the most likely predicted charging load value during the predicted charging period can be calculated. This can be achieved by taking the expected value of the distribution or selecting the load value with the highest probability as the prediction result. In this way, the prediction layer can not only provide specific predicted load values, but also provide a probability estimate of future load distribution, thereby improving the accuracy of electric vehicle charging load prediction in charging stations.
[0048] In an optional embodiment, before using a charging load prediction model based on charging data and weather data during the current charging period to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period, the method further includes: constructing a charging load prediction model by: acquiring charging data and weather data of electric vehicles in the charging station during historical charging periods, wherein the duration of the historical charging periods is longer than the duration of the current charging period; constructing a historical feature matrix based on the charging data and weather data of the historical charging periods; adding Gaussian white noise to the charging load sequence in the historical feature matrix to obtain an enhanced feature matrix; slicing the enhanced feature matrix based on a preset time window length and a preset sliding step size to obtain multiple sub-feature matrices with overlapping time windows; and training an initial network model based on the multiple sub-feature matrices to obtain a charging load prediction model.
[0049] Optionally, in the model building preparation phase, it is first necessary to collect charging data and weather data of electric vehicles at charging stations during historical charging periods. This historical charging and weather data is preprocessed, including feature encoding and normalization, and then combined into a historical feature matrix. To increase the model's robustness and prevent overfitting, Gaussian white noise is added to the charging load sequence in the historical feature matrix. Gaussian white noise is a randomly distributed noise whose noise value at each time point is independent and conforms to a Gaussian distribution. This data augmentation technique can simulate the uncertainty in real-world scenarios, enabling the model to better handle noise and outliers during training. Next, the augmented feature matrix is sliced using a preset time window length and sliding step size, resulting in a series of sub-feature matrices, each representing a data segment containing overlapping time windows. This approach allows the model to learn local and global patterns in time-series data, while also creating more training samples to help the model better understand the temporal dependencies of the data. Finally, the initial network model is trained based on these sub-feature matrices, and the predictive ability of the model is optimized by continuously adjusting the network parameters. In this process, the model learns how to predict future charging loads from historical features, while also improving its ability to handle noisy data by adding noise.
[0050] Through the above steps, the constructed charging load prediction model can not only learn the temporal characteristics of charging load from historical data, but also effectively handle noise and uncertainty in the data, thereby providing more accurate and reliable prediction results when predicting the charging load of electric vehicles in charging stations.
[0051] In one optional embodiment, an initial network model is trained based on multiple sub-feature matrices to obtain a charging load prediction model, including: constructing a loss function based on mean squared error and a preset regularization coefficient, wherein the mean squared error is the mean squared error between the predicted charging load output during the training of the initial network model and the corresponding measured charging load; and training the initial network model based on multiple sub-feature matrices, the loss function, and the Adam optimizer to obtain a charging load prediction model, wherein the Adam optimizer is used to optimize the parameters of the initial network model.
[0052] Optionally, the loss function is a standard for measuring the difference between the model's predicted results and the true values. In this embodiment, the Mean Squared Error (MSE) is used as the main loss metric to calculate the difference between the charging load predicted by the model and the corresponding measured charging load in historical data. MSE is the average of the squares of the difference between the predicted and true values. It can sensitively reflect the magnitude of the prediction deviation, especially with a large amount of data. MSE can help the model identify predictions with large deviations, thus prioritizing the adjustment of these parameters during training. In addition to the basic MSE, a preset regularization coefficient is added to prevent model overfitting (i.e., the model performs extremely well on training data but poorly on unseen test data). In this embodiment, the regularization coefficient is used to balance the model's prediction accuracy and model complexity, ensuring that the model can fit the training data well while maintaining good generalization ability, avoiding over-reliance on specific patterns in the training set when predicting charging load. The Adaptive Moment Estimation Optimizer (Adam) can accelerate the model's convergence speed and improve the stability of model training by dynamically adjusting the learning rate. In this embodiment, the Adam optimizer is used to optimize the parameters of the initial network model, continuously improving its predictive ability under the guidance of the loss function. Compared to the Stochastic Gradient Descent (SGD) algorithm in related technologies, the Adam optimizer can handle sparse gradients and non-stationary objective functions more effectively, making it particularly suitable for complex neural network models, such as the LSTM network involved in this embodiment. Based on the constructed loss function and optimizer, the model will be trained using data from the sub-feature matrix through multiple iterations. In each iteration, the model attempts to predict the charging load at the next time point, calculates the MSE loss between the predicted result and the true value, and adjusts the model parameters through the Adam optimizer to minimize the loss function. As the number of iterations increases, the model gradually learns the temporal characteristics of the charging load and the influence of weather data, and its predictive ability gradually improves until a preset training termination condition is reached. The model obtained at this point is the charging load prediction model.
[0053] By following the steps above, using the Adam optimizer and a loss function with a regularization term, the model can be trained efficiently, giving it good charging load prediction capabilities while avoiding overfitting. This ensures that the charging load prediction model can still provide accurate prediction results when processing new charging period data.
[0054] In processing electric vehicle user charging load data, points with negative load values and local abrupt changes are identified as outliers and replaced using interpolation. Subsequently, the Pearson correlation coefficient is used to filter the input features of the prediction model to reduce the dimensionality of factors influencing charging load, and the filtered features are normalized. Next, ensemble empirical mode decomposition (EEMD) is applied to decompose the non-stationary charging load sequence into multiple stationary intrinsic mode functions (IMF) components. For each IMF component, a convolutional neural network-transformer (CNN-Transformer) hybrid model is constructed for prediction. Finally, the prediction results of each component are weighted and fused to obtain the predicted charging load value.
[0055] However, the above methods have the following problems: 1) The outlier judgment criteria are limited to certain scenarios, and the ability to judge outliers caused by excessive charging load due to equipment failure, malicious charging, or metering errors is insufficient. 2) As charging load is time series data, the processing lacks a method for systematically encoding key time nodes, failing to effectively mine and utilize the regular features contained in the time dimension. 3) The time feature extraction scale is singular. When extracting time series features, only a single time scale is considered, failing to fully utilize feature information from multiple time scales, thus limiting the model's ability to understand complex load patterns. 4) Building an independent CNN-Transformer model for each IMF component will significantly increase the total number of model parameters and the computational cost of training / inference.
[0056] Based on the above problems and the above embodiments and optional embodiments, this application proposes an optional implementation method for predicting the charging load of electric vehicles in charging stations. Figure 2 This is a schematic diagram of an optional initial network model according to an embodiment of this application. The method can be applied to, for example... Figure 2 In the initial network model shown, the method includes:
[0057] S1, Electric vehicle charging data collection and preprocessing, specifically:
[0058] S1.1: Collect charging power, charging time, charging price, and daily weather data of electric vehicles in charging stations during historical periods to construct a dataset. Electric vehicle time includes charging start time (year, month, day, and hour), charging duration, holidays, and seasons. Weather data includes weather type, temperature, etc.
[0059] S1.2: Handling missing values in electric vehicle charging data, specifically:
[0060] First, check if there are any missing values in the electric vehicle charging dataset. If missing values exist, impute them using the mean or mode for charging power, charging price, and charging start time; for missing weather data, supplement them based on information from the meteorological platform.
[0061] S1.3: Use the quartile method to filter out outliers, specifically:
[0062] The quartile method was used to filter abnormal charging power, charging time, charging price, and temperature data. The charging power, charging time, charging price, and temperature were sorted from smallest to largest. The quartile calculation method is as follows:
[0063] The lower quartile, denoted as Q1, is located at 1 / 4 of the total number of quartiles.
[0064] The upper quartile, denoted as Q3, is located at 3 / 4 of the total number of quartiles.
[0065] Interquartile range (IQR) = Q3 - Q1;
[0066] Data points below Q1-1.5×IQR or above Q3+1.5×IQR are considered outliers, and the filtered outliers are replaced with the mode or mean.
[0067] S1.4: The dataset is encoded as follows:
[0068] Considering the impact of holidays, seasons, and weather on charging load, a charging load time coding method is designed to transform time characteristics such as season, weekday type, and holiday status into corresponding feature vectors. Specifically:
[0069] S1.4.1: The design of the holiday impact coefficient coding is as follows:
[0070] First, all statutory holidays throughout the year are selected. Then, considering the type of holiday, holiday length, and the expected impact of weekdays and weekends on charging load, corresponding codes are designed for the holidays. The coding rules are as follows:
[0071] Weekdays = 0; Regular weekends = 1; Short holidays (Qingming Festival / Dragon Boat Festival / Mid-Autumn Festival / New Year's Day) = 2; Long holidays (National Day / May Day) = 3; Important holidays (Spring Festival) = 4.
[0072] S1.4.2: The weather coding method is designed as follows:
[0073] Considering the impact of different weather conditions on charging load, sunny days have the least impact, while rain and snow have the greatest impact. Weather types are mapped to numerical codes, and the coding rules are as follows:
[0074] Sunny = 0, Cloudy = 1, Light rain = 2, Fog = 3, Heavy rain = 4, Snow = 5.
[0075] S1.4.3: The seasonal coding method is designed as follows:
[0076] Considering seasonal periodicity, a sine / cosine encoding method is adopted. First, the seasons are mapped to angles, and the calculation formula is as follows:
[0077]
[0078] Where t is the season number, with values of 1 for spring, 2 for summer, 3 for autumn, and 4 for winter; a is the total number of seasons, with a value of 4. Then, a two-dimensional coordinate vector [sin(angle), cos(angle)] is generated based on the angle, and the coordinate information is used to represent the seasonal periodic relationship.
[0079] S2, Construct key feature vectors for charging load prediction and divide the network training dataset, specifically:
[0080] S2.1: Construct the feature matrix, specifically:
[0081] A 12-dimensional feature matrix is constructed using specific time features (year, month, day, hour), charging duration features, charging load, holiday impact coefficient, weather coefficient, seasonal coordinates, charging price, and temperature data. The charging load is the sum of the charging power of all electric vehicles at the charging station at the same time. The calculation formula is as follows:
[0082]
[0083] In the formula, N represents the number of vehicles charging at the charging station. Let t be the real-time power of the nth vehicle.
[0084] S2.2: Data normalization processing, specifically:
[0085] The min-max normalization method is used to normalize the data in the dataset, scaling the data in the feature matrix to [0,1] to eliminate feature differences caused by the units and ranges of different features such as temperature and load. The formula is as follows:
[0086]
[0087] in, Here are the normalized data, and x is the original data. max x represents the maximum value of the original data. min This is the minimum value of the original data.
[0088] S2.3: To improve the model's generalization ability, data augmentation is performed on the charging power in the training set by introducing Gaussian white noise, as detailed below:
[0089] First, calculate the standard deviation of Gaussian white noise using the following formula:
[0090]
[0091] in, This represents the average charging load at the charging station. Let t be the charging load at the charging station; T is the length of the training set time series. The coefficient is set, and the value range is [0.001, 0.005]. Here, the value is 0.0001.
[0092] Then, a Gaussian white noise sequence with the same length as the original charging load sequence is generated. Each noise component is independently distributed and follows a N(0, S) distribution. 2 S² is a Gaussian distribution (also known as a normal distribution), where 0 is the mean of the distribution and S² represents the variance of the distribution.
[0093] Finally, the data-enhanced charging load sequence is calculated: Pstrength=[P1+Z1,P2+Z2,…,PT+ZT].
[0094] S2.4: Generate sliding window samples and divide them into training, test, and validation sets.
[0095] First, the complete dataset is continuously sliced with a time window length of 24 hours and a sliding step size of 1 hour to generate overlapping time-series sample sequences. Each window contains load data from the past 24 hours, i.e., the time window is [t−24,t−23,…,t−1], and is used to predict the charging load value at the next time t.
[0096] Then, all the generated sliding window samples are arranged in chronological order, and the first 70% are selected as the training set for model parameter learning and fitting; 20% of the remaining samples are randomly selected as the test set, and the remaining 10% are selected as the validation set.
[0097] S3, input the processed 24-hour load data into the initial network model to extract time-series features, such as... Figure 2 As shown, this initial network model is built based on a convolutional network-long short-term memory network-self-attention network (CNN-LSTM-Attention), consisting of a data input layer, multi-timescale convolutional layers, a two-layer LSTM, and a prediction layer. Specifically:
[0098] S3.1: Multi-timescale convolutional layers extract multi-scale temporal features, including:
[0099] Load data of size [24, 12] from the dataset, adjust the data dimension to [12, 24], input it into the preprocessed and dimension-adjusted multi-timescale convolutional layer. The multi-timescale convolutional neural network consists of parallel convolutional layers, channel merging layers, activation function layers, and channel attention layers.
[0100] S3.1.1: Perform parallel convolution operations, specifically:
[0101] Parallel convolutions consist of three parallel connections of three one-dimensional convolutions of different sizes. A multi-scale one-dimensional convolutional neural network extracts temporal features. Parallel convolutions are designed using 1×1, 1×3, and 1×5 convolutions to extract feature relationships at different spatial scales. Different sized one-dimensional convolution kernels capture short-term fluctuations and long-term trends: the 1×1 convolution captures 1-hour features, the 1×3 convolution captures intermediate dependencies between adjacent 3-hour intervals, and the 1×5 convolution captures long-term dependencies over 5 hours. The stride is always 1. After convolution, the input features [12,24] become [12,24], [12,22], and [12,20]. These are then concatenated at the channel merging layer to obtain merged temporal features, resulting in data of size [12,66]. The LeakReLU function is used for activation. The LeakReLU formula is as follows:
[0102]
[0103] in, The value is 0.01, where x represents the merged time series feature.
[0104] S3.1.2: Calculate channel attention, specifically:
[0105] First, the feature maps after multi-scale convolution (i.e., merging temporal features) are processed. Global average pooling is performed to compress the feature sequence of each channel into a scalar, obtaining the channel feature vector Z=[z1,z2,…,z12] representing global information. The calculation formula is as follows:
[0106]
[0107] Then, channel attention is calculated using two fully connected layers, as follows:
[0108]
[0109]
[0110] in, The number of channels will be reduced to 1 / 4 of the original number. ; Restore the number of channels to 12. ; Adjust the output value of the sigmoid function to the range [0,1] to generate attention that represents the importance of each channel.
[0111] Finally, the channel attention weights are multiplied by the original features (i.e., the merged temporal features) and then input into the LSTM network. The calculation formula is as follows:
[0112]
[0113] S3.2: The characteristic quantities After expansion, the input is a two-layer LSTM network to extract complex temporal features (i.e., target temporal features).
[0114] Complex temporal features are extracted using a two-layer LSTM network with 64 neurons in each hidden layer. A random dropout mechanism is applied between layers with a dropout value of 0.2. The input of the second LSTM layer has a 20% probability of being randomly set to zero.
[0115] S3.3: Design an attention-based prediction layer, specifically:
[0116] A fully connected layer is used to generate attention weights for each feature. The original input is multiplied element-wise by the attention weights to obtain the predicted output value, which is then normalized using the softmax function. The calculation formula is as follows:
[0117]
[0118]
[0119]
[0120] Where h represents the LSTM output features, and Y represents the prediction result. , , , , .
[0121] S4 optimizes the training process, specifically:
[0122] S4.1: Use Mean Squared Error (MSE) as the training loss function, calculated as follows:
[0123]
[0124] In the formula: y i and These are the true value and the predicted value of the i-th observation, respectively, which is the mean square error between the predicted charging load (predicted value) output during the training of the initial network model and the corresponding measured charging load (actual value).
[0125] S4.2: L2 regularization is used to prevent overfitting. An additional penalty term is added to the original loss function to suppress model parameter weights, resulting in a relatively smooth and dispersed weight distribution, allowing all features to work together. The formula is as follows:
[0126]
[0127] In the formula: Loss is the total loss function value; MSE is the mean squared error value; λ is the regularization coefficient, with a value of 0.01, which controls the influence of the regularization term; m is the total number of parameters; These are the model parameters.
[0128] S4.3: Determine the hyperparameters during training, specifically:
[0129] The Adam optimizer was used during training, with an initial learning rate of 0.001 and a batch size of 64. To prevent overfitting, an early stopping mechanism was employed, and the loss function value and test set performance were recorded for each epoch.
[0130] It should be noted that this embodiment can accurately filter out outliers in charging load data, establish an anomaly detection mechanism including dynamic upper and lower limit constraints, accurately distinguish and handle outliers caused by equipment failure or data errors, and ensure the integrity and authenticity of input data. The charging load characteristics are systematically encoded, and a structured encoding method for charging load time characteristics is designed. This efficiently transforms load time characteristics such as seasons, weekday types, and holiday status into feature vectors that the model can learn, deeply mining and utilizing the inherent periodicity and event-based patterns of charging load. Multi-timescale feature extraction is achieved, comprehensively capturing the changing patterns of charging load across different time dimensions. Simultaneously, an attention mechanism is introduced to dynamically weight features at different time scales, enabling high-precision prediction of electric vehicle charging load within charging stations.
[0131] This embodiment employs a quartile outlier screening mechanism to eliminate abnormal data in charging load data that is affected by factors such as random user behavior and sudden environmental changes, ensuring the reliability of the input data. It utilizes systematic coding techniques to deeply correlate and encode multi-source heterogeneous information such as weather and seasons, fully preserving and enhancing key features. A one-dimensional parallel convolutional neural network extracts multi-scale temporal features, covering the real-time (1h), medium-term (3h), and long-term (5h) dependencies of charging behavior. A dual-layer LSTM network structure captures complex 24-hour long-term historical data. An attention mechanism dynamically allocates channel and prediction feature weights during training, focusing on key features. Early stopping and L2 regularization are used during training to suppress noise interference, prevent overfitting, and enhance the network's generalization ability. Ultimately, this achieves high-precision prediction of electric vehicle charging load within charging stations, improving the accuracy of electric vehicle charging load prediction.
[0132] This embodiment also provides a charging load prediction device for electric vehicles in a charging station. This device is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the terms "module" and "device" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0133] According to an embodiment of this application, an apparatus embodiment for implementing the above-described method for predicting the charging load of electric vehicles in a charging station is also provided. Figure 3 This is a schematic diagram of the structure of a charging load prediction device for electric vehicles in a charging station according to an embodiment of this application, as shown below. Figure 3 As shown, the electric vehicle charging load prediction device in the above-mentioned charging station includes: a data acquisition module 300 and a load prediction module 302, wherein:
[0134] The data acquisition module 300 is used to acquire charging data and weather data of electric vehicles in the charging station during the current charging period. The charging data includes charging load, charging price and charging time at multiple different scales. The charging load is used to indicate the sum of charging power of all electric vehicles in the charging station at the same sampling time.
[0135] The load prediction module 302, connected to the data acquisition module 300, is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period based on the charging data and weather data of the current charging period and the charging load prediction model. The charging load prediction model is obtained by machine learning based on the charging data and weather data of electric vehicles in the charging station during historical charging periods. The charging load prediction model includes an input layer, a multi-timescale convolutional layer, a two-layer long short-term memory network, and a prediction layer.
[0136] In this embodiment, by setting up a data acquisition module 300 and a load prediction module 302, the system collects and analyzes multi-scale charging time, charging load, charging price, and weather data. It then uses a deep learning model containing multi-time-scale convolutional layers, a two-layer long short-term memory network (LSTM), and a prediction layer to accurately predict the charging load. This achieves high-precision prediction of the charging load of electric vehicles in charging stations, effectively improving the accuracy of prediction and solving the technical problem of low accuracy in predicting the charging load of electric vehicles in charging stations in related technologies.
[0137] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0138] It should be noted that the data acquisition module 300 and load prediction module 302 mentioned above correspond to steps S102 to S104 in the embodiments. The instances and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can run on a computer terminal.
[0139] It should be noted that the optional or preferred implementation methods of this embodiment can be found in the relevant descriptions in the embodiments, and will not be repeated here.
[0140] The electric vehicle charging load prediction device in the charging station mentioned above may also include a processor and a memory. The data acquisition module 300, load prediction module 302, etc. are all stored in the memory as program modules, and the processor executes the program modules stored in the memory to realize the corresponding functions.
[0141] The processor contains a core that retrieves the corresponding program modules from memory. One or more cores may be configured. Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory includes at least one memory chip.
[0142] According to an embodiment of this application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein, when the program runs, it controls the device where the non-volatile storage medium is located to execute any of the above-mentioned charging load prediction methods for electric vehicles in a charging station.
[0143] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals, and the non-volatile storage medium includes stored programs.
[0144] Optionally, during program execution, the device containing the non-volatile storage medium can be controlled to execute any of the above-mentioned methods for predicting the charging load of electric vehicles in a charging station.
[0145] According to an embodiment of this application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein the program executes any of the above-described methods for predicting the charging load of electric vehicles in a charging station.
[0146] According to an embodiment of this application, an embodiment of a computer program product is also provided, which, when executed on a data processing device, is adapted to execute a program that initializes the charging load prediction method steps for electric vehicles in a charging station having any of the above-described steps.
[0147] Optionally, when the above-mentioned computer program product is executed on a data processing device, it is suitable for executing a program that initializes the charging load prediction method steps for electric vehicles in a charging station, as described above.
[0148] This application provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of any of the above-described methods for predicting the charging load of electric vehicles in a charging station.
[0149] The order of the embodiments described above is merely for illustrative purposes and does not represent the superiority or inferiority of the embodiments.
[0150] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0151] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of modules described above can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between modules, and may be electrical or other forms.
[0152] The modules described above as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0153] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0154] If the aforementioned integrated modules are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a non-volatile storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned non-volatile storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0155] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for predicting the charging load of electric vehicles in a charging station, characterized in that, include: Acquire charging data and weather data of electric vehicles in the charging station during the current charging period. The charging data includes charging load, charging price, and charging time at multiple different scales. The charging load is used to indicate the sum of charging power of all electric vehicles in the charging station at the same sampling time. Based on the charging data and weather data of the current charging period, a charging load prediction model is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period. The charging load prediction model is obtained by machine learning based on the charging data and weather data of electric vehicles in the charging station during historical charging periods. The charging load prediction model includes an input layer, a multi-timescale convolutional layer, a two-layer long short-term memory network, and a prediction layer.
2. The method according to claim 1, characterized in that, Based on the charging data and weather data of the current charging period, a charging load prediction model is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period, including: Based on the charging data and weather data of the current charging period, a target feature matrix is constructed; The target feature matrix is input to the multi-timescale convolutional layer via the input layer in the charging load prediction model, and the multi-timescale convolutional layer extracts the multi-scale temporal features from the target feature matrix. The target temporal features in the multi-scale temporal features are extracted by the two-layer long short-term memory network in the charging load prediction model. Based on the target time-series characteristics, the prediction layer in the charging load prediction model is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period.
3. The method according to claim 2, characterized in that, The construction of the target feature matrix based on the charging data and weather data during the current charging period includes: Feature encoding is performed on charging time and weather data at multiple different scales during the current charging period to obtain the charging time features and weather features of the current charging period; Based on the charging load and charging price during the current charging period, as well as the charging time characteristics and weather characteristics during the current charging period, an initial feature matrix is constructed; The initial feature matrix is normalized to obtain the target feature matrix.
4. The method according to claim 2, characterized in that, When the multi-timescale convolutional layer includes multiple one-dimensional convolutional layers, channel merging layers, and channel attention layers, the step of extracting multi-scale temporal features from the target feature matrix through the multi-timescale convolutional layer includes: Based on the target feature matrix, multiple one-dimensional convolutional layers are used to obtain multiple sets of temporal features corresponding to the output of the multiple one-dimensional convolutional layers. The multiple one-dimensional convolutional layers have different convolutional sizes to extract feature relationships at different spatial scales. The channel merging layer is used to concatenate the multiple sets of time-series features to obtain merged time-series features. Based on the merged temporal features, the channel attention layer is used to obtain channel attention weights, wherein the channel attention weights are used to assign weights to each feature channel in the merged temporal features; The multi-scale temporal features are obtained based on the channel attention weights and the merged temporal features.
5. The method according to claim 2, characterized in that, The prediction layer is an attention-based prediction layer. Based on the target time-series features, the prediction layer in the charging load prediction model is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period, including: Attention weights for each feature in the target temporal features are generated based on the fully connected layer in the prediction layer. Each feature in the target temporal features is multiplied by its corresponding attention weight to generate a weighted feature; The weighted features are normalized using the softmax function in the prediction layer to obtain the predicted charging load distribution; Based on the predicted charging load distribution, the predicted charging load of electric vehicles in the charging station during the predicted charging period is obtained.
6. The method according to any one of claims 1 to 5, characterized in that, Before obtaining the predicted charging load of electric vehicles at the charging station during the predicted charging period using a charging load prediction model based on the charging data and weather data of the current charging period, the method further includes: The charging load prediction model is constructed as follows: Acquire charging data and weather data of electric vehicles in the charging station during historical charging periods, wherein the duration of the historical charging periods is greater than the duration of the current charging period; Based on the charging data and weather data of the historical charging periods, a historical feature matrix is constructed; Gaussian white noise is added to the charging load sequence in the historical feature matrix to obtain the enhanced feature matrix; Based on a preset time window length and a preset sliding step size, the enhanced feature matrix is sliced to obtain multiple sub-feature matrices with overlapping time windows. Based on the multiple sub-feature matrices, the initial network model is trained to obtain the charging load prediction model.
7. The method according to claim 6, characterized in that, The step of training the initial network model based on the multiple sub-feature matrices to obtain the charging load prediction model includes: A loss function is constructed based on the mean square error and a preset regularization coefficient, wherein the mean square error is the mean square error between the predicted charging load output during the training of the initial network model and the corresponding measured charging load. Based on the multiple sub-feature matrices, the loss function, and the Adam optimizer, the initial network model is trained to obtain the charging load prediction model, wherein the Adam optimizer is used to optimize the parameters of the initial network model.
8. A charging load prediction device for electric vehicles in a charging station, characterized in that, include: The data acquisition module is used to acquire charging data and weather data of electric vehicles in the charging station during the current charging period. The charging data includes charging load, charging price, and charging time at multiple different scales. The charging load is used to indicate the sum of charging power of all electric vehicles in the charging station at the same sampling time. The load prediction module is used to obtain the predicted charging load of electric vehicles in the charging station during the predicted charging period based on the charging data and weather data of the current charging period and using a charging load prediction model. The charging load prediction model is obtained by machine learning based on the charging data and weather data of electric vehicles in the charging station during historical charging periods. The charging load prediction model includes an input layer, a multi-timescale convolutional layer, a two-layer long short-term memory network, and a prediction layer.
9. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores multiple instructions, which are adapted to be loaded by a processor and executed by the charging load prediction method for electric vehicles in a charging station according to any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the charging load prediction method for electric vehicles in a charging station as described in any one of claims 1 to 7.