Method and device for predicting electric vehicle charging demand

CN122779518APending Publication Date: 2026-09-18CHINA ACAD OF TRANSPORTATION SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610974760.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

然而,深度学习方法往往也面临着数据稀缺、模型泛化能力不足,以及,计算资源收约束等问题,导致预测精度不够,难以满足以前预测和预警的需求

Benefits of technology

本发明实施例提供的一种电动汽车充电需求的预测方法及装置,能够获取目标充电站的历史充电需求序列,将历史充电需求序列输入至预先训练好的充电预测模型,使充电预测模型根据历史充电需求序列预测目标充电站在未来时间段内的充电需求,且,上述使用的充电预测模型为预先训练好的轻量级迁移学习增强的时序预测模型,能够采用轻量化设计、实现跨站点的迁移学习机制和多样化的数据增强策略进行有机结合,在保证预测精度的同时,显著降低对数据量和计算资源的依赖。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122779518A_ABST
    Figure CN122779518A_ABST
Patent Text Reader

Abstract

The application provides a kind of electric vehicle charging demand prediction method and device, it is related to the technical field of electric vehicle, the method comprises: obtaining the historical charging demand sequence of target charging station;The historical charging demand sequence is input to the charging prediction model trained in advance, so that the charging prediction model predicts the charging demand of the target charging station in the future time period according to the historical charging demand sequence;Wherein, the charging prediction model is the time series prediction model of pre-trained lightweight transfer learning enhanced.The electric vehicle charging demand prediction method and device provided by the application use the charging prediction model as the time series prediction model of pre-trained lightweight transfer learning enhanced, can adopt lightweight design, realize the organic combination of cross-site migration learning mechanism and diversified data enhancement strategy, while guaranteeing the prediction accuracy, significantly reduce the dependence on data volume and computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electric vehicle technology, and in particular to a method and apparatus for predicting the charging demand of electric vehicles. Background Technology

[0002] As electric vehicles become increasingly popular, the demand for charging stations is also constantly evolving. Traditional charging station planning and design often struggles to meet the charging needs of electric vehicles. For example, an unexpected surge in the number of charging piles connected to a station can easily overload the power distribution capacity, leading to power outages or equipment damage. Therefore, it is necessary to predict and provide early warnings regarding the charging demand of electric vehicles, and to take timely measures to prevent such problems from occurring.

[0003] Traditional methods for predicting charging demand often employ classical learning algorithms, which have significant limitations when dealing with the nonlinear and non-stationary characteristics of charging demand time series. In recent years, the continuous development of deep learning technology has demonstrated powerful learning capabilities in the field of charging demand prediction. However, deep learning methods often face challenges such as data scarcity, insufficient model generalization ability, and computational resource constraints, resulting in insufficient prediction accuracy and difficulty in meeting previous forecasting and early warning needs. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method and apparatus for predicting the charging demand of electric vehicles, so as to alleviate the above-mentioned technical problems.

[0005] In a first aspect, embodiments of the present invention provide a method for predicting electric vehicle charging demand. The method includes: acquiring a historical charging demand sequence of a target charging station, wherein the historical charging demand sequence includes the number of electric vehicles served by the target charging station in each unit time period within a historical time period; inputting the historical charging demand sequence into a pre-trained charging prediction model, so that the charging prediction model predicts the charging demand of the target charging station in a future time period based on the historical charging demand sequence; wherein the charging prediction model is a pre-trained lightweight transfer learning-enhanced time-series prediction model.

[0006] In conjunction with the first aspect, this embodiment of the invention provides a first possible implementation of the first aspect, wherein the charging prediction model adopts an encoder-decoder network architecture, including an encoder unit and a decoder unit connected in sequence; wherein the encoder unit uses a lightweight temporal feature extractor and a local temporal attention mechanism to extract features from the input historical charging demand sequence; the decoder unit uses a residual prediction decoder to perform residual learning on the output of the encoder unit, and captures the periodic features in the encoder unit and the decoder unit through explicit periodic modeling, and outputs a prediction result, the prediction result including the charging demand within the future time period; wherein the charging demand within the future time period includes the charging demand corresponding to each unit time within the future time period.

[0007] In conjunction with the first possible implementation of the first aspect, this embodiment of the invention provides a second possible implementation of the first aspect, wherein the lightweight temporal feature extractor includes a depthwise separable convolutional layer; the convolution operation of the depthwise separable convolutional layer includes depthwise convolution and pointwise convolution, and the depthwise separable convolutional layer uses a multi-branch parallel structure to process the historical charging demand sequence in parallel, with each branch using a different dilation rate.

[0008] In conjunction with the first aspect, this embodiment of the invention provides a third possible implementation of the first aspect, wherein the method further includes: acquiring historical charging data; wherein the historical charging data includes the number of electric vehicles served by multiple charging stations within a historical time period; dividing the time period into units according to a preset time length, and finding the number of electric vehicles served in each unit time period from the historical charging data, and using the found number of electric vehicles as the charging demand in that unit time period; dividing training samples according to a preset sequence length, wherein each training sample includes multiple charging demands in the unit time period arranged in chronological order; and constructing a training set based on the training samples.

[0009] In conjunction with the third possible implementation of the first aspect, this embodiment of the invention provides a fourth possible implementation of the first aspect, wherein the above method further includes: inputting the sample set in the training set into the time series prediction model in the initial state, and training the time series prediction model in the initial state to obtain the charging prediction model.

[0010] In conjunction with the fourth possible implementation of the first aspect, this embodiment of the invention provides a fifth possible implementation of the first aspect, wherein the step of inputting the sample set in the training set into the time-series prediction model in the initial state and training the time-series prediction model in the initial state includes: obtaining a training set of multiple charging stations, training the time-series prediction model in the initial state based on the training set of the multiple charging stations, so that the time-series prediction model in the initial state learns the common features across stations to obtain a first charging prediction model; obtaining a training set of the target charging station, fine-tuning the first charging prediction model based on the training set of the target charging station to obtain the charging prediction model matching the target charging station.

[0011] In conjunction with the first aspect, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein the step of inputting the historical charging demand sequence into a pre-trained charging prediction model includes: obtaining the charging station identifier of the target charging station; searching for the charging prediction model corresponding to the charging station identifier in a model database; determining the found charging prediction model as the charging prediction model of the target charging station; and inputting the historical charging demand sequence into the charging prediction model of the target charging station to predict the charging demand of the target charging station.

[0012] In conjunction with the fifth possible implementation of the first aspect, this embodiment of the invention provides a seventh possible implementation of the first aspect, wherein the above method further includes: dividing a validation set from the training set; validating the trained charging prediction model based on the validation set, and calculating an evaluation index of the charging prediction model based on the validation results; and adjusting the model parameters of the charging prediction model based on the evaluation index.

[0013] Secondly, embodiments of the present invention also provide an electric vehicle charging demand prediction device, the device comprising: an acquisition module, configured to acquire a historical charging demand sequence of a target charging station, wherein the historical charging demand sequence includes the number of electric vehicles served by the target charging station in each unit time period within a historical time period; and a prediction module, configured to input the historical charging demand sequence into a pre-trained charging prediction model, such that the charging prediction model predicts the charging demand of the target charging station in a future time period based on the historical charging demand sequence; wherein the charging prediction model is a pre-trained lightweight transfer learning-enhanced time-series prediction model.

[0014] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions executable by the processor, and the processor executes the computer-executable instructions to implement the steps of the method described in the first aspect.

[0015] The embodiments of the present invention bring the following beneficial effects: The present invention provides a method and apparatus for predicting electric vehicle charging demand, which can acquire the historical charging demand sequence of a target charging station, input the historical charging demand sequence into a pre-trained charging prediction model, and enable the charging prediction model to predict the charging demand of the target charging station in the future time period based on the historical charging demand sequence. Moreover, the charging prediction model used is a pre-trained lightweight transfer learning-enhanced time series prediction model, which can organically combine lightweight design, cross-site transfer learning mechanism and diversified data augmentation strategies, so as to significantly reduce the dependence on data volume and computing resources while ensuring prediction accuracy.

[0016] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating a method for predicting electric vehicle charging demand according to an embodiment of the present invention; Figure 2 This invention provides a complete process for predicting electric vehicle charging demand. Figure 3 A schematic diagram showing the comparison between predicted and observed values ​​of electric vehicle charging demand using different algorithms, provided as an embodiment of the present invention. Figure 4 A schematic diagram of the structure of a device for predicting the charging demand of an electric vehicle provided in an embodiment of the present invention; Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] When using deep learning methods to predict electric vehicle charging demand, recurrent neural network architectures such as Long Short-Term Memory (LSTM) and Transformer are often employed, demonstrating powerful feature learning capabilities in time series forecasting. However, existing deep learning methods face the following challenges in the practical application of charging station demand forecasting: (1) Data scarcity problem: In real-world scenarios, newly built charging stations often only have a few weeks to a few months of historical operating data, which is insufficient to support the training needs of complex deep models. Standard LSTM models typically require at least 6 months of data to achieve good prediction performance, and severe overfitting is likely to occur when data is insufficient.

[0022] (2) Insufficient model generalization ability: The geographical location, functional positioning (such as residential area or commercial area), and service target differences of charging stations lead to significant heterogeneity in demand patterns. Traditional deep learning methods model each station independently, which cannot utilize common knowledge across stations, resulting in high model training costs and poor generalization.

[0023] (3) Computational resource constraints: Charging station operation systems are usually deployed on edge computing devices, which impose strict requirements on the parameter scale and inference speed of the model. However, although large-scale spatiotemporal models based on Transformer have high accuracy, they have millions of parameters, which is not suitable for real-time prediction in resource-constrained scenarios.

[0024] Based on this, the electric vehicle charging demand prediction method and apparatus provided in this embodiment of the invention can effectively alleviate the above-mentioned technical problems.

[0025] To facilitate understanding of this embodiment, a method for predicting electric vehicle charging demand disclosed in this embodiment of the invention will first be described in detail.

[0026] In one possible implementation, embodiments of the present invention provide a method for predicting the charging demand of electric vehicles, such as... Figure 1The flowchart illustrates a method for predicting electric vehicle charging demand. The method includes the following steps: Step S102: Obtain the historical charging demand sequence of the target charging station; In this embodiment of the invention, the historical charging demand sequence includes the number of electric vehicles served by the target charging station in each unit of time within a historical time period. Step S104: Input the historical charging demand sequence into the pre-trained charging prediction model so that the charging prediction model can predict the charging demand of the target charging station in the future time period based on the historical charging demand sequence. In this embodiment of the invention, the charging prediction model is a pre-trained, lightweight transfer learning-enhanced time-series prediction model.

[0027] In practical use, this embodiment of the invention focuses on the charging demand prediction process for electric vehicles at the station level. Therefore, in this embodiment, the number of electric vehicles served by each charging station per unit time is defined as the charging demand of that charging station. The historical charging demand sequence obtained in step S102 above can be represented as follows: ,in, , where n is the number of data points in the historical charging demand sequence, and x t This refers to the number of electric vehicles served by the charging station in the t-th time period (unit of time).

[0028] Furthermore, the charging prediction model described in this embodiment of the invention refers to a pre-trained lightweight transfer learning-enhanced time-series prediction model. Therefore, based on the principle of lightweight transfer learning-enhanced site-level electric vehicle short-term charging demand prediction, it can mine the historical temporal patterns of charging demand in historical charging demand sequences and predict future charging demand based on these patterns. Specifically, the historical charging demand sequence in step S102 is constructed using the charging demand of m units within a historical time period, such as the charging demand of the t-th time period and the m time periods preceding it. Here, "time period" refers to a unit of time to predict the charging demand of the target charging station in the next p time periods, that is, the charging demand in the (t+1)th time period and the p time periods thereafter. Specifically, using This represents the algorithm of the pre-trained charging prediction model. In this case, the prediction process in step S104 above can be represented as:

[0029] in, , , , The algorithm for a pre-trained charging prediction model is to use the charging demand patterns of the m periods before the t-th period to predict the charging demand of the p periods after the t-th period.

[0030] Furthermore, the lightweight transfer learning-enhanced temporal prediction model described above in this embodiment of the invention can be represented as LTE-TN (Lightweight Transfer-Enhanced Temporal Network), hereinafter referred to as the temporal prediction model. Typically, this temporal prediction model has the following characteristics: (1) lightweight model with small parameters, preventing overfitting; (2) capable of transfer learning, i.e., pre-training using data from other sites or publicly available data; and (3) capable of data augmentation, allowing for manual expansion of training samples. Therefore, the algorithm of the charging prediction model described above in this embodiment of the invention can better meet the actual application requirements.

[0031] In practical use, the charging prediction model in this embodiment of the invention adopts an encoder-decoder network architecture, including an encoder unit and a decoder unit connected in sequence. The encoder unit uses a lightweight temporal feature extractor and a local temporal attention mechanism to extract features from the input historical charging demand sequence. The decoder unit uses a residual prediction decoder to perform residual learning on the output of the encoder unit. It also captures the periodic features in the encoder unit and decoder unit through explicit periodic modeling and outputs the prediction result. The prediction result includes the charging demand in the future time period. The charging demand in the future time period includes the charging demand corresponding to each unit time within the future time period.

[0032] That is, the charging prediction model in this embodiment of the invention mainly consists of four core modules: a lightweight temporal feature extractor, a local temporal attention mechanism, explicit periodicity modeling, and a residual prediction decoder. Its overall computational flow can be expressed as follows:

[0033] in, The input is a historical charging demand sequence; For the predicted charging demand in the future period, For prior periodic knowledge parameters, f is the pre-trained parameter obtained from transfer learning. LTE-TN ( ) is used to represent the algorithm of the charging prediction model.

[0034] Furthermore, the lightweight temporal feature extractor in this embodiment of the invention includes a depthwise separable convolutional layer; the convolution operation of the depthwise separable convolutional layer includes depthwise convolution and pointwise convolution, and the depthwise separable convolutional layer adopts a multi-branch parallel structure to process the historical charging demand sequence in parallel, and each branch uses a different dilation rate.

[0035] In practical implementation, the aforementioned depthwise separable convolutional layer replaces the traditional standard convolution, reducing the number of parameters by approximately 80%. Furthermore, depthwise separable convolution decomposes the convolution operation into depthwise convolution and pointwise convolution, as expressed in the formula:

[0036] in This is an intermediate hidden layer. For pointwise convolution, This is a depthwise convolution; furthermore, the multi-branch parallel structure is used to capture dependencies at different time scales, and each branch uses a different dilation rate. The computation process of the multi-branch parallel structure is expressed by the following formula:

[0037] in, For hidden layers constructed in a multilayer structure, the expansion rate is... Capture hourly short-term fluctuations, inflation rate This approach captures intraday mid-term dependencies, where X represents the historical charging demand sequence, and TCN() stands for Temporal Convolutional Network, a neural network architecture for sequence modeling specifically designed for processing time-series data. This multi-branch parallel structure design maintains predictive performance while keeping the number of parameters to around 5000, only 10% of the standard LSTM model.

[0038] In practical use, to obtain the aforementioned charging prediction model, it is usually necessary to train the time-series prediction model in the initial state beforehand. The training set used in the training process can be constructed from historical charging data of multiple charging stations. Therefore, the electric vehicle charging demand prediction method provided in this embodiment of the invention actually includes the processes of data preparation, model training, and model application. Specifically, Figure 2 This paper illustrates the entire process of predicting electric vehicle charging demand, including the aforementioned data preparation, model training, and model application. Specifically, the data preparation process is actually the process of constructing a training set, such as... Figure 2 As shown, it includes the following steps: Step S201: Obtain historical charging data; In this embodiment of the invention, the historical charging data includes the number of electric vehicles served by multiple charging stations within a historical time period. Specifically, a training set is constructed based on the historical charging data of multiple charging stations to learn common features across stations, such as basic intraday patterns and weekly regularities.

[0039] Step S202: Divide the time into units according to a preset time length, and find the number of electric vehicles served in each unit of time from the historical charging data, and use the number of electric vehicles found as the charging demand in that unit of time. Step S203: Divide the training samples according to the preset sequence length; construct a training set based on the training samples.

[0040] Each training sample includes multiple charging requirements per unit time arranged in chronological order. In actual use, the above historical charging data may include the following types of data: (1) Charging event number: a unique number for each electric vehicle charging event; (2) Charging station number: a unique identifier for the charging pile in the charging station; (3) Charging start date: the date on which the charging data begins; (4) Charging start time: the time on which the charging data begins; (5) Charging end date: the date on which the charging data ends; (6) Charging end time: the time on which the charging data ends, etc.

[0041] Furthermore, 30 minutes can typically be used as a unit of time. That is, the historical charging data mentioned above can be processed to extract the number of electric vehicles served by the charging station every 30 minutes, thereby determining the number of electric vehicles served in each unit of time, and thus determining the charging demand in each unit of time.

[0042] Furthermore, the aforementioned sequence length refers to the number of unit times included in the historical charging demand sequence. That is, by determining the time parameters from the historical charging data and dividing the charging demand of multiple unit times into a sequence according to time order, it can be used as a training sample. Moreover, since the historical charging data records the charging station number, a training set can be constructed for the historical charging data of each charging station.

[0043] Furthermore, for the training set constructed above, the sample set in the training set can be input into the time series prediction model in the initial state to train the time series prediction model in the initial state, so as to obtain the charging prediction model in the embodiment of the present invention. That is, corresponding to the above... Figure 2 The model training process includes the following steps: Step S204: During training, a training set of multiple charging stations is obtained, and the time-series prediction model in the initial state is trained based on the training set of multiple charging stations, so that the time-series prediction model in the initial state learns the common features across stations and obtains the first charging prediction model. Step S205: Obtain the training set of the target charging station, and fine-tune the first charging prediction model based on the training set of the target charging station to obtain a charging prediction model that matches the target charging station.

[0044] That is, in this embodiment of the invention, a two-stage training strategy is adopted when training the charging prediction model, including stage one and stage two. Stage one refers to the process of training using training sets of multiple charging stations in step S204 above. This training process is also called source domain pre-training, that is, training the time series prediction model in the initial state on the historical charging data of multiple charging stations, learning the common features across stations, such as basic intraday patterns and intraweekly patterns, to obtain the first charging prediction model. The formula for this stage one is expressed as follows:

[0045] in, This represents the true value of the charging demand in the source domain. The predicted charging demand of the source domain is given by N, where N represents the amount of data used for training, s represents the source domain, and Ns represents the amount of data in the source domain.

[0046] Given the aforementioned prior periodic knowledge parameters, the training process at this stage can determine the parameter Θ that minimizes the loss function L. Furthermore, the second stage mentioned above refers to the training process using the training set of the target charging station in step S205. This process is also called target domain fine-tuning, that is, fine-tuning on a small amount of training set data of the target charging station to adapt to the site characteristics of the target charging station. The formula for this second stage is expressed as follows:

[0047] in, The true value of the charging demand for the target domain. The predicted value of charging demand for the target domain. The pre-trained parameters obtained from the above transfer learning, The regularization term in the above formula indicates that the parameters need to be fine-tuned to prevent them from deviating too much from the pre-training initialization. The fine-tuning strategies here are: (1) Freeze the bottom feature extractor and only fine-tune the top layer; (2) Use 1 / 10 of the pre-training learning rate; (3) Use early stopping to prevent overfitting.

[0048] Furthermore, the charging prediction model trained in the above manner can be stored in the model database. Moreover, for each charging station, a matching charging prediction model can be trained and stored in the model database. Therefore, in step S104 above, when inputting the historical charging demand sequence into the pre-trained charging prediction model, the charging station identifier of the target charging station can be obtained first, and the charging prediction model corresponding to the charging station identifier can be searched in the model database. Then, the found charging prediction model is determined as the charging prediction model of the target charging station, and the historical charging demand sequence is input into the charging prediction model of the target charging station to predict the charging demand of the target charging station.

[0049] Furthermore, in this embodiment of the invention, the trained charging prediction model can be further validated, that is, Figure 2 The model training process also includes the following step S206.

[0050] Step S206: Divide a portion of the data from the training set as a validation set; validate the trained charging prediction model based on the validation set, and calculate the evaluation index of the charging prediction model based on the validation results; adjust the model parameters of the charging prediction model based on the evaluation index.

[0051] In practical applications, the evaluation metrics calculated in these embodiments may include Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE) to evaluate the performance of the charging prediction model's prediction algorithm from different perspectives, and to compare the predicted charging demand. and the actual charging demand obtained from observation The differences between them are measured. Specifically, the above three evaluation indicators can be calculated, or one or more of them can be selected for calculation, depending on the actual use. This embodiment of the invention does not impose any restrictions on this.

[0052] Specifically, the above indicators are explained below: (1) Mean Absolute Error (MAE) can quantify the direct error between the predicted charging demand and the observed charging demand. The formula for calculating MAE is as follows:

[0053] Where n is the number of records of predicted charging demand.

[0054] (2) Root Mean Square Error (RMSE) is highly sensitive to outliers. When the predicted charging demand differs significantly from the observed charging demand, the RMSE value increases substantially. Therefore, a large RMSE usually indicates poor algorithm prediction performance. The RMSE calculation formula is as follows:

[0055] (3) Mean Absolute Percentage Error (MAPE) is a commonly used indicator in statistics to measure prediction accuracy. The smaller the MAPE value, the smaller the error between the predicted charging demand value and the observed charging demand value, and the higher the accuracy. The MAPE calculation formula is as follows:

[0056] Among them, MAPE is not applicable to the case where the observation value is zero. MAPE is only calculated for the sample where the charging demand of electric vehicles is greater than or equal to 1, and is denoted as MAPE1 (%).

[0057] Furthermore, based on the aforementioned mean absolute percentage error, prediction accuracy can also be calculated. This prediction accuracy measures the prediction accuracy of the algorithm, and in this embodiment of the invention, it is defined as 100% minus the mean absolute percentage error, i.e.: .

[0058] Furthermore, the charging prediction model in this embodiment involves the setting of multiple hyperparameters, which have a significant impact on the performance of the charging prediction model. The hyperparameters used in this embodiment include: (1) Learning rate: controls the step size of weight updates in the charging prediction model. A suitable learning rate can accelerate convergence and avoid missing the global optimum. In this embodiment, it is preferably set to 0.01. (2) Batch size: the number of samples used to update model weights in each training iteration. A smaller batch size can improve the model's generalization ability, while a larger batch size helps accelerate training. In this embodiment, it is preferably set to 20. In actual use, the hyperparameters can also be set according to actual usage requirements; this embodiment does not impose any restrictions on this.

[0059] further, Figure 2 The process of applying the model in the above corresponds to the above. Figure 1 The forecasting of electric vehicle charging demand includes the following processes: Step S207: Obtain the historical charging demand sequence of the target charging station; In this embodiment of the invention, the historical charging demand sequence includes the number of electric vehicles served by the target charging station in each unit of time within a historical time period. Step S208: Input the historical charging demand sequence into the pre-trained charging prediction model so that the charging prediction model can predict the charging demand of the target charging station in the future time period based on the historical charging demand sequence. Step S209: Output the charging demand of the target charging station in the future time period.

[0060] In this embodiment of the invention, the charging prediction model is a lightweight transfer learning-enhanced time-series prediction model trained during the training process of the above-mentioned model.

[0061] The process of applying the model can also refer to the above. Figure 1 The corresponding process will not be elaborated here.

[0062] Furthermore, to evaluate the effectiveness of the electric vehicle charging demand prediction method provided in this embodiment of the invention, historical charging data of electric vehicles at over 800 charging stations in city A during December 2023 (a one-month period), and historical charging data of electric vehicles at over 300 charging stations in city B during the week of December 25-31, 2023, can be used to evaluate the prediction performance of the electric vehicle charging demand prediction method in this embodiment of the invention. The method is also compared with common LSTM and Transformer models to verify its prediction performance. Table 1 below shows the evaluation metrics for the three algorithms.

[0063] Table 1:

[0064] As can be seen from Table 1 above, the charging demand prediction accuracy obtained by using the trained charging prediction model in the embodiments of the present invention is higher, which is 14.14% higher than the prediction accuracy of the LSTM model and 13.96% higher than the accuracy of the Transformer model.

[0065] further, Figure 3 This diagram illustrates a comparison between predicted and observed values ​​of electric vehicle charging demand using different algorithms. Figure 2 (a) in the figure represents the comparison between the charging demand predicted by the trained charging prediction model in the embodiment of the present invention and the actual recorded observation value, which correspond to the curves of the predicted value and the observed value marked in the figure respectively. Figure 3 (b) shows the comparison between the charging demand predicted by the LSTM model and the actual observed values, and... Figure 3 (c) shows the comparison between the charging demand predicted by the Transformer model and the actual observed values. Figure 3As can be seen, in this embodiment of the invention, the charging demand predicted by the trained charging prediction model is closer to the actual recorded observations than the other two models, indicating that the electric vehicle charging demand prediction method proposed in this embodiment of the invention has higher prediction accuracy and better prediction effect.

[0066] Furthermore, based on the above embodiments, this invention also provides a device for predicting electric vehicle charging demand, such as... Figure 4 The diagram shows a structural schematic of an electric vehicle charging demand prediction device, which includes: The acquisition module 40 is used to acquire the historical charging demand sequence of the target charging station, wherein the historical charging demand sequence includes the number of electric vehicles served by the target charging station in each unit time within a historical time period. Prediction module 42 is used to input the historical charging demand sequence into a pre-trained charging prediction model, so that the charging prediction model can predict the charging demand of the target charging station in a future time period based on the historical charging demand sequence. The charging prediction model is a pre-trained, lightweight transfer learning-enhanced time-series prediction model.

[0067] The electric vehicle charging demand prediction device provided in this embodiment of the invention has the same technical features as the electric vehicle charging demand prediction method provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.

[0068] Furthermore, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0069] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described method.

[0070] Furthermore, embodiments of the present invention also provide a schematic diagram of the structure of an electronic device, such as... Figure 5 The diagram shows the structure of the electronic device, which includes a processor 51 and a memory 50. The memory 50 stores computer-executable instructions that can be executed by the processor 51, and the processor 51 executes the computer-executable instructions to implement the above-described method.

[0071] exist Figure 5In the illustrated embodiment, the electronic device further includes a bus 52 and a communication interface 53, wherein the processor 51, the communication interface 53, and the memory 50 are connected via the bus 52.

[0072] The memory 50 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 53 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 52 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 52 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0073] Processor 51 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 51 or by instructions in software form. Processor 51 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor 51 reads the information in the memory and uses its hardware to complete the aforementioned method.

[0074] The computer program product of the electric vehicle charging demand prediction method and apparatus provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0076] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0077] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a 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 described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0078] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0079] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for predicting the charging demand of electric vehicles, characterized in that, The method includes: Obtain the historical charging demand sequence of the target charging station, wherein the historical charging demand sequence includes the number of electric vehicles served by the target charging station in each unit time within a historical time period; The historical charging demand sequence is input into a pre-trained charging prediction model, which then predicts the charging demand of the target charging station in a future time period based on the historical charging demand sequence. The charging prediction model is a pre-trained, lightweight transfer learning-enhanced time-series prediction model.

2. The method according to claim 1, characterized in that, The charging prediction model adopts an encoder-decoder network architecture, including encoder units and decoder units connected in sequence; The encoder unit employs a lightweight temporal feature extractor and a local temporal attention mechanism to extract features from the input historical charging demand sequence. The decoder unit uses a residual prediction decoder to perform residual learning on the output of the encoder unit, and captures the periodic features in the encoder unit and the decoder unit through explicit periodic modeling, and outputs prediction results, which include the charging demand in the future time period. The charging demand in the future time period includes the charging demand corresponding to each unit time within the future time period.

3. The method according to claim 2, characterized in that, The lightweight temporal feature extractor includes depthwise separable convolutional layers; The convolution operations of the depthwise separable convolutional layer include depthwise convolution and pointwise convolution. Furthermore, the depthwise separable convolutional layer employs a multi-branch parallel structure to process the historical charging demand sequence in parallel, with each branch using a different dilation rate.

4. The method according to claim 1, characterized in that, The method further includes: Acquire historical charging data; wherein, the historical charging data includes the number of electric vehicles served by multiple charging stations within a historical time period; The time is divided into units according to a preset time length, and the number of electric vehicles served in each unit of time is found from the historical charging data. The number of electric vehicles found is taken as the charging demand in that unit of time. The training samples are divided according to a preset sequence length, wherein each training sample includes multiple charging requirements per unit time arranged in chronological order. A training set is constructed based on the training samples.

5. The method according to claim 4, characterized in that, The method further includes: The sample set in the training set is input into the time series prediction model in the initial state, and the time series prediction model in the initial state is trained to obtain the charging prediction model.

6. The method according to claim 5, characterized in that, The steps of inputting the sample set in the training set into the time series prediction model in the initial state and training the time series prediction model in the initial state include: A training set of multiple charging stations is obtained, and a time-series prediction model in the initial state is trained based on the training set of multiple charging stations, so that the time-series prediction model in the initial state learns the common features across stations, and a first charging prediction model is obtained. Obtain the training set of the target charging station, and fine-tune the first charging prediction model based on the training set of the target charging station to obtain the charging prediction model that matches the target charging station.

7. The method according to claim 1, characterized in that, The step of inputting the historical charging demand sequence into a pre-trained charging prediction model includes: Obtain the charging station identifier of the target charging station, and search for the charging prediction model corresponding to the charging station identifier in the model database; The found charging prediction model is determined as the charging prediction model for the target charging station, and the historical charging demand sequence is input into the charging prediction model for the target charging station to predict the charging demand for the target charging station.

8. The method according to claim 6, characterized in that, The method further includes: Divide the training set into a validation set; The trained charging prediction model is validated based on the validation set, and the evaluation index of the charging prediction model is calculated based on the validation results. The model parameters of the charging prediction model are adjusted based on the evaluation indicators.

9. A device for predicting the charging demand of electric vehicles, characterized in that, The device includes: The acquisition module is used to acquire the historical charging demand sequence of the target charging station, wherein the historical charging demand sequence includes the number of electric vehicles served by the target charging station in each unit time within a historical time period. The prediction module is used to input the historical charging demand sequence into a pre-trained charging prediction model, so that the charging prediction model can predict the charging demand of the target charging station in a future time period based on the historical charging demand sequence. The charging prediction model is a pre-trained, lightweight transfer learning-enhanced time-series prediction model.

10. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the steps of the method according to any one of claims 1 to 8.