A charging station charging load prediction method based on an attention mechanism

By employing an attention-based prediction method, combined with feature embedding and historical data encoding modules, the problems of learning degrees of freedom and data distribution capture in traditional models for charging station load prediction are solved, achieving more accurate load prediction and supporting construction and operation decisions for charging stations.

CN115526398BActive Publication Date: 2026-06-09SHANGHAI LIANRUIKE ENERGY TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI LIANRUIKE ENERGY TECH CO LTD
Filing Date
2022-09-27
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Traditional charging load prediction models suffer from low learning freedom, poor support for covariates, and difficulty in capturing data distribution differences when dealing with electric vehicle charging stations, resulting in poor generalization performance, especially in real-world application scenarios.

Method used

A novel prediction model based on attention mechanism is trained by combining stochastic gradient descent and momentum minimization algorithms through a feature embedding module, a historical data encoding module, and a fusion prediction module. This model uses historical data from charging stations to predict charging load, captures long-term dependencies, and improves prediction accuracy.

Benefits of technology

It enables accurate prediction of charging load change curves for charging stations over future time periods, providing data support for charging station construction planning and daily operation, and improving the generalization performance and accuracy of the prediction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115526398B_ABST
    Figure CN115526398B_ABST
Patent Text Reader

Abstract

The application discloses a charging station charging load prediction method based on an attention mechanism, including a prediction model, the prediction model including a feature embedding module, a historical data coding module and a fusion prediction module; feature data of a charging station site period t and a charging load value y corresponding to the period t are acquired from historical data t The prediction model calculates a predicted charging load value, the converged prediction model is obtained through historical data training, and thus the charging load of a future period is predicted. According to historical charging load data of the charging station, a novel prediction method is adopted to predict the charging load change curve of each charging station in a given future period, better data support is provided for construction planning and daily operation of the charging station, and then quantitative analysis basis is provided for load prediction of a power distribution network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to a charging load prediction method for charging stations based on an attention mechanism, which includes general data processing and data prediction or optimization techniques, and belongs to the field of data mining, utilization and prediction technology. Background Technology

[0002] Because charging load exhibits significant spatiotemporal characteristics, the charging load of electric vehicles varies drastically across different times and locations, and the charging load curves of different charging stations also differ. Traditional autoregressive time series prediction models, such as AR, MA, ARMA, and ARIMA, while highly targeted and robust, suffer from low learning freedom and limited support for covariate introduction. Furthermore, these methods cannot accurately capture the significant differences in data distribution between different items, resulting in poor generalization performance. In contrast, shallow machine learning methods based on feature engineering, such as regression analysis, gradient boosting decision trees, and support vector machines, offer improved freedom compared to autoregressive models. However, they rely on complex feature engineering and business experience, have high extrapolation complexity, and are less prepared for predictions involving missing data.

[0003] Deep learning-based prediction methods have gradually become a research hotspot in the field of data prediction due to their high degree of learning freedom and low dependence on manual feature engineering. For example, the DeepAR autoregressive recurrent neural network proposed by David Salinas et al. combines autoregression and recurrent neural networks, introducing covariates to support the prediction of missing items based on the similarity performance between similar items. However, it is also limited by the shortcomings of recurrent neural networks, making it difficult to capture long-term periodic and seasonal information. In recent years, attention mechanisms have shown outstanding performance in capturing long-term dependencies, so researchers have incorporated attention mechanisms into deep learning models to further improve the accuracy of data prediction. However, in real-world prediction problems, a single general method may not achieve good results. To solve prediction problems in complex real-world scenarios, multiple methods are often combined. Summary of the Invention

[0004] The purpose of this application is to use a novel prediction method based on historical charging load data of charging stations to predict the charging load change curve of each charging station within a given future time period, so as to better provide data support for the construction planning and daily operation of charging stations, and thus provide a quantitative analysis basis for the load prediction of the power distribution network.

[0005] To achieve the above objectives, the technical solution of this application is to provide a charging load prediction method for charging stations based on an attention mechanism, characterized in that it includes a prediction model, which includes a feature embedding module, a historical data encoding module, and a fusion prediction module.

[0006] The training steps for the prediction model are as follows:

[0007] Obtain the characteristic data of the charging station during time period t and the corresponding charging load value y during time period t. t All feature data constitute the feature vector r t Extracting feature vector r t The part related to time and weather characteristics is denoted as g. t ;

[0008] Obtain historical data of charging stations over the past s days for time period t, including and These represent the date, time, weather characteristics, and load values ​​for time period t within the past s days;

[0009] The input vector of the historical data encoding module is u t and g t ;

[0010] The historical data encoding module is equipped with a network basic module FA, which consists of a linear layer, a BatchNorm layer, a Tanh layer and a Dropout layer from input to output.

[0011] Vector X is input into the basic network module FA to obtain FA(X);

[0012] The historical data encoding module encodes vector u t The processing is as follows: residual join processing:

[0013] K t =FA(u t +FA(u t )),

[0014] For g t Similarly, we obtain: Q t =FA(g) t +FA(g t ));

[0015] K t With Q t After multiplication and normalization, the feature data corresponding to time period t in the historical data is used to predict y. t Influence factor α t :

[0016] α t=softmax(K) t ×Q t )

[0017] With α t For p t The weighted sum is calculated to obtain the output vector V of the historical data encoding module. t :

[0018]

[0019] The input vector of the fusion prediction module is O t O t =[r t V t ];

[0020] The output of the fusion prediction module is:

[0021]

[0022] Among them, W p and b p These represent the weight matrix and the offset, respectively, which are the weights that need to be learned and updated after training in the prediction model;

[0023] Define the mean squared error loss function LMSE. Error backpropagation is performed based on the stochastic gradient descent algorithm and the momentum minimization loss algorithm to update the prediction model until the prediction model converges, thus obtaining the converged prediction model.

[0024] The prediction steps of the prediction model are as follows:

[0025] The time period to be predicted is denoted as t'. Feature data for time period t' is obtained, including weather-related features acquired from weather forecasts. These feature data are then substituted into the converged prediction model to calculate... This is the predicted charging load value for time period t'.

[0026] The feature data includes x t =[x t0 x t1 , ..., x td-1 ] and h t =[h t0 k t1 , ..., h tk-1 ], x t h represents the continuous feature vector consisting of d continuous feature data corresponding to time period t. t The categorical feature vector h represents the k categorical feature data corresponding to time period t. t The input feature embedding module transforms the input feature vector into a continuous feature vector h′.t Continuous eigenvector x t and continuous eigenvector h′ t The feature vector r is obtained by combination. t =[h′ t |x t ].

[0027] Specifically, the feature embedding module processes the input categorical feature vector as follows: First, each feature is one-hot encoded, and then multiplied by a learnable weight matrix to transform it into a continuous feature vector of dimension r, where r is the hyperparameter of the model, determined through prior knowledge and manual debugging.

[0028] Specifically, the input-output relationship of the linear layer is as follows:

[0029] f(X) = XW T +b,

[0030] X represents the input vector of this layer, and W and b represent the weight matrix and offset, respectively, which are the weights that need to be learned and updated after training in the prediction model.

[0031] The input-output relationship of the BatchNorm layer is as follows:

[0032]

[0033] μ represents the expectation of the input vector X, σ is the standard deviation, ∈ is a positive number close to 0, γ and β represent the affine transformation parameter vectors, which are the weights that need to be learned and updated after training in the prediction model.

[0034] The input-output relationship of the Tanh layer is as follows:

[0035]

[0036] Preferably, the feature data input to the prediction model is set as standardized feature data, and the standardization formula is:

[0037]

[0038] x′ represents the original data, μ represents the mean of the original data, S represents the standard deviation of the original data, and x represents the standardized data.

[0039] Preferably, the charging load value is set as a logarithmically processed charging load value, and the logarithm processing formula is:

[0040] y = log(y′ + 1)

[0041] Where y′ represents the original data and y represents the data after logarithmic transformation.

[0042] Specifically, the formula for the softmax function is:

[0043] Preferably, the feature data includes at least charging station information, location information of the charging station, weather information, and time information. Preferably, the weather information includes the current temperature and humidity. Further, the time information includes the hour and minute of the current day. Attached Figure Description

[0044] Figure 1 This is a flowchart of the feature embedding process provided in the embodiment;

[0045] Figure 2 The example shows the site charging load curve before logarithmic processing.

[0046] Figure 3 The example shows the logarithmically processed site charging load curve.

[0047] Figure 4 This is a schematic diagram of the overall structure of the prediction model provided in the embodiment;

[0048] Figure 5 A comparison of the charging load prediction results for site A provided in the example;

[0049] Figure 6 Comparison of the charging load prediction results for site B provided in the example;

[0050] Figure 7 Comparison of the charging load prediction results for site C provided in the example;

[0051] Figure 8 This is a comparison of the charging load prediction results for site D provided in the example. Detailed Implementation

[0052] To make this application more apparent and understandable, preferred embodiments are described in detail below with reference to the accompanying drawings.

[0053] Example

[0054] This embodiment provides a charging load prediction method for charging stations based on an attention mechanism. It predicts the charging load of electric vehicle stations for time period t. Time period t can be divided into minute-level segments or the time division scale can be expanded based on actual applications. In this embodiment, time period t is divided into minute-level segments, specifically including a model training stage and a model prediction stage.

[0055] I. Model Training Phase:

[0056] The training phase of the model is mainly divided into three parts: 1. Data acquisition and feature extraction; 2. Data preprocessing; 3. Model training.

[0057] 1. Data Acquisition and Feature Extraction

[0058] In the electric vehicle charging station load prediction method proposed in this embodiment, the charging equipment operator pushes data through the data transmission protocol in Table 1, and we receive the data and store it in the database.

[0059] Table 1. Detailed data on the charging process of the charging device interface

[0060] Parameter name definition Required Parameter type Remark Charging order number StartChargeSeq yes String Order number of the platform system Charging device interface code ConnectorID yes String The only gun slogan on the platform Vehicle Identification Number Vin no String Vehicle Identification Number or Chassis Number Phase A current CurrentA yes floating point Unit: A, Default: 0 including DC (output) Phase A voltage VoltageA yes floating point Unit: V, Default: 0 including DC (output) Battery remaining percentage SOC yes floating point Default: 0 Start charging time StartTime yes character type Format "yyyy-MM-dd HH:mm:ss" Sampling time EndTime yes character type Format "yyyy-MM-dd HH:mm:ss" Cumulative charging amount TotalElect yes floating point Unit: degrees, 2 decimal places Accumulated electricity bill ElecMoney yes floating point Unit: Yuan, 2 decimal places Cumulative service fee SeviceMoney yes floating point Unit: Yuan, 2 decimal places Total amount TotalMoney yes floating point Unit: Yuan, 2 decimal places

[0061] The power P can be obtained by multiplying the phase A current and phase A voltage (the sum of power drawn by a station from the power system at a certain moment is called the charging load of that station).

[0062] P = CurrentA × VoltageA (1)

[0064] Aggregation is performed minute by minute. If k vehicles are charging at a certain station within one minute, the operator pushes notifications d1, d2...d to these k vehicles regarding their charging activity within that minute. k Based on this data, the charging load of the station in this minute is calculated as shown in formula (2):

[0065]

[0066] Meanwhile, the popularity of charging stations is related to the charging station and its geographical location, and the charging behavior of electric vehicles is affected by weather and time. Therefore, characteristic data such as charging station information, location information of charging stations, weather information, and time information are extracted from the database and stored in a table.

[0067] Table 2. Feature Descriptions Used in the Model

[0068] feature Feature classification describe frequency Continuous Charging frequency at the station last month conn_num Continuous Number of charging ports at the site dc_conn_num Continuous Number of DC interfaces at the site ac_conn_num Continuous Number of site communication interfaces equipment_amount Continuous Number of site devices ac_equipment_amount Continuous Number of DC devices at the site dc_equipment_amount Continuous Number of site communication devices st_equipment_power Continuous Total power of the site dc_equipment_power Continuous Total power of DC equipment at the site single_power Continuous Station single pile power ac_dedicated Continuous Number of dedicated communication devices in the administrative region where the site is located dc_dedicated Continuous Number of dedicated DC equipment in the administrative region where the site is located ac_public Continuous Number of public communication facilities in the administrative region where the site is located dc_public Continuous Number of public DC equipment in the administrative region where the site is located density Continuous Station distribution density in the administrative region where the station is located equipment_power Continuous Total power of charging equipment in the administrative region where the station is located temperature Continuous Current temperature humidity Continuous Humidity at current time power Continuous Current charging load at the site district Category Administrative region hour Category Hour minute Category minute station_type Category Site Type park_fee_type Category Station parking fee types construction Category Site construction site demonstration Category Is it a charging demonstration station? city_area Category The ring area to which the station belongs equipment_structure Category Site equipment composition structure connector_structure Category Site gun muzzle structure scale Category The scale of the operator to which the site belongs

[0069] Specifically, the data is divided into four categories: charging station information, charging station location information, weather information, and time information. Among these, the following are considered charging station information: last month's charging frequency, number of charging interfaces, number of DC interfaces, number of AC interfaces, number of devices, number of DC devices, number of AC devices, total power, whether it is a charging demonstration station, total power of DC devices, power per charging pile, station type, parking fee type, construction location, equipment structure, charging gun structure, and operator size. The following are considered charging station location information: number of dedicated AC devices, dedicated DC devices, public AC devices, public DC devices, station distribution density, total charging device power, administrative region, and ring road area. The following are considered weather information: current temperature and humidity. The following are considered time information: hour and minute.

[0070] 2. Data Preprocessing

[0071] As shown in Table 2, the dataset used in this invention mainly consists of categorical and continuous variables. For categorical features, we transform them into continuous variables through embedding. First, each feature is one-hot encoded, and then multiplied by a learnable weight matrix to transform it into a continuous feature vector of dimension r, where r is a hyperparameter of the model, determined through prior knowledge and manual tuning. The feature embedding process is as follows: Figure 1 As shown.

[0072] Since the model training process uses stochastic gradient descent for optimization, gradient explosion and gradient vanishing may occur when the input dataset fluctuates significantly, causing the model to fail to converge. To prevent this from happening during model training, we first standardize the continuous features of the dataset before training, so that the continuous features of the dataset are distributed normally, reducing the possibility that the model will get stuck in the linear region of the nonlinear activation function due to outliers. The standardization method for continuous features is shown in formula (3), where x′ represents the input data, μ represents the mean of the input data, and S represents the standard deviation of the input data.

[0073]

[0074] In addition, in order to make the model label data distribution more stable, reduce the computational load of the model, and avoid introducing new computational errors due to the difference in data distribution between the training set and the test set, we choose to logarithmize the charging load data y′ of the station, as shown in formula (4).

[0075] y = log(y′ + 1) (4)

[0077] Specifically, for a comparison of logarithmically processed charging load data, see [link to relevant documentation]. Figure 2 and Figure 3 ,in Figure 2 The site charging load curve before logarithmic processing. Figure 3 This is the station charging load curve after logarithmic processing.

[0078] Experimental data: In this embodiment, a total of 959,040 sample instances were randomly selected, covering 22 days. The test set samples are the data from the last day of the dataset, while the training set and validation set are the data from the first 21 days, randomly divided in a ratio of 8:2. The validation set was separated from the training data to facilitate the selection of a better model in multiple training sessions. The final division results are shown in Table 3.

[0079] Table 3. Results of Experimental Dataset Partitioning

[0080]

[0081] 3. Model Training

[0082] A schematic diagram of the overall structure of the model is shown below. Figure 4 As shown, this embodiment will explain the structure of the model by discussing its input and output, as well as the composition of its modules.

[0083] 3-1 Model Input and Output

[0084] The input to the forecasting model consists of two parts. Let the current forecast be the load value for time period t. Then, the first part of the model input data is... Figure 4 The left side shows x t =[x t0 x t1 , ..., x td ], x t ∈R 1×d and h t =[h t0 h t1 , ..., h td ], h t ∈R 1×k , representing the continuous feature vector and the categorical feature vector corresponding to time period t, respectively; the second part is the historical data encoding module on the right. u t ∈R s×c and p t ∈R s×1The two represent the date, weather-related features, and charging load value of time period t within the past s days, respectively. In our experiment, we take the historical data step size s = 7, that is, we take the feature data and charging load value corresponding to time period t within the past 7 days as the input of the historical data encoding module.

[0085] Accordingly, the output of the prediction model is the load value corresponding to the time period t on the day predicted by the model.

[0086] 3-2 Components of the Model

[0087] The model consists of three main modules: 1) feature embedding module; 2) historical data encoding module; and 3) fusion prediction module.

[0088] In the feature embedding module, continuous features and categorical features are input separately. Categorical features h t The input embedding layer transforms categorical features into continuous feature vectors h′. t ∈R 1×m Where m = k * embedding_size, in this embodiment we take embedding_size = 3, and the output result h′ of the categorical features after embedding is... t ∈R 1×3k With continuous feature x t The combination yields a new vector r. t =[h′ t |x t ], r t ∈R 1×e , e = d + 3k.

[0089] The input to the historical data encoding module is the model input data u. t p t And the output data g of other modules of the model t ∈R 1 ×(j-t) Composition, g t For quantity r t The feature vectors related to time and weather are obtained by vector slicing. i and j depend on the arrangement of features and can be defined as Equation (5).

[0090] g t =r t [:,i:j] (5)

[0092] from Figure 4 As can be seen, the historical data encoding module first encodes u t The input is into a network infrastructure module FA. A schematic diagram of the internal structure of the network infrastructure module FA is shown below. Figure 4The upper right corner, where Linear represents a linear layer, defined as shown in formula (6), where W and b represent the learnable weight matrix and offset, respectively, and X = [X0, X1, ..., X... i , ...] represents the input vector of this layer (hereinafter all refer to the input vector of the layer). The dimension of the output vector of this layer can be changed by setting the output dimension of the linear layer. In the historical data encoding module of the method described in this embodiment, in order to realize the jump addition between layers (i.e., residual connection mode), we set the output dimension and input dimension of the linear layer of this module to be equal.

[0093] f(X) = XW T +b (6)

[0095] The BatchNorm layer in the FA block is defined as shown in formula (7), μ represents the expectation of the input data X, σ is the standard deviation, and ∈ is a value close to 0. To avoid calculation errors when the standard deviation σ = 0, γ and β represent the learnable affine transformation parameter vectors, and their vector dimensions are the same as the dimensions of the input data in this layer.

[0096]

[0097] Tanh is the activation function, as shown in formula (8):

[0098]

[0099] In the historical data encoding module, u t The processing employs a residual connection method, which can be expressed as formula (9), where K t ∈R s×z z is a hyperparameter of the model, which can be manually adjusted based on prior knowledge. In this implementation case, z = 16.

[0100] K = FA(u t +FA(u t )) (9)

[0102] For another input g of this module t After processing using the same residual connection method, the following was obtained: Q t ∈R z×1 .

[0103] Q t =FA(g) t +FA(g t )) (10)

[0105] Next, K t With Q t After multiplying and then normalizing, we obtain the influence factor α of the historical data for time period t on the predicted time period t. t ∈R s×1 The calculation method is shown in formula (11), where the definition of the softmax function is given by formula (12).

[0106] α t =softmax(K) t ×Q t ) (11)

[0108]

[0109] Finally, use α t For p t By performing weighted summation, the output vector V of the historical data encoding module is obtained. t ∈R 1×1 As shown in formula (13):

[0110]

[0111] Input data O of the fusion prediction module t It is obtained by combining the output of the feature embedding module and the output of the historical data encoding module, i.e., O t =[r t V t ], O t ∈R 1×(e+1) .

[0112] The fusion prediction module also employs residual connections. However, unlike the historical data encoding module, the output dimension and input dimension of the linear layer in the network's foundation module FA differ. Therefore, we use feature combination instead of summation in the residual connections. This last part of the module... Figure 4 The Predict block in the model consists of two FA blocks and a linear layer, meaning the last layer of the entire model is a linear layer with an output dimension of 1. Its output is the logarithmically transformed loading value calculated by the model. The module calculation process can be expressed as formula (14), where W p ∈R c×1 b p ∈R 1×1 , where c represents the dimension of the output vector of the last FA block.

[0113]

[0114] Finally, regarding the selection of the model loss function, the task in this embodiment is a regression task, and the goal is to fit the load curve. Therefore, we adopted the mean-squared error (MSE) loss function commonly used in regression tasks, and its formula is defined as shown in formula (15). The method in this embodiment minimizes the loss function through the stochastic gradient descent (SGD) algorithm + momentum, realizes error backpropagation and updates the weights of the network. The initial learning rate of the model training is set to 0.12, and the learning rate adjustment strategy is ReduceLROnPlateau.

[0115]

[0116] Among them, y t This represents the actual charging load value corresponding to time t, obtained from historical data.

[0117] II. Model Prediction Stage

[0118] Similarly, the model prediction phase also consists of multiple steps: 1. Data preparation; 2. Model prediction; 3. Data restoration.

[0119] 1. Data Preparation

[0120] Since data acquisition and storage have already been configured in the model prediction stage, it is only necessary to ensure that the data acquisition and storage program runs normally. Therefore, this operation does not need to be repeated in the prediction stage. The feature processing method is the same as in the model training stage. Weather-related features are future weather forecast results obtained through the weather forecast interface.

[0121] 2. Model Prediction

[0122] In the model prediction process, there are two scenarios: 1) predicting the load value of the site for the next day; 2) predicting the load value of the site for the current day.

[0123] In the first scenario, we predict the charging load value of a station for each minute of the 1440 minutes of a day. In this case, the day is not yet over, so the historical data in the model's historical data encoding module is shifted forward by one day. In the second scenario, we can choose the prediction time range. The load value of the actual period does not need to be predicted by the model. That is, the prediction result is corrected by the real data before the current period. This can effectively reduce the model's inference time. Suppose we need to predict the charging load curve of a station for the day, then each station should have 1440 prediction samples. Suppose the current period is the t minute of the day, then the period [0, t-1] belongs to the period that has already occurred. The charging load value of the station within this period should be replaced with the real value. When the model performs inference, it only predicts the load value within the period [t, 1439]. Therefore, the data we input to the model is also the feature vector of the period [t, 1439].

[0124] 3. Data Restoration

[0125] In order to make the model label data distribution more stable, reduce the computational load of the model, and avoid introducing new computational errors due to the difference in data distribution between the training set and the test set, we logarithmically processed the charging load data of the site before inputting the data into the model. During the training phase, it is not necessary to restore the real load value, but during the prediction phase, we need to restore the real site load. The data restoration method is shown in formula (16), where y′ represents the model output value and y represents the restored charging load.

[0126] y = e y′ -1 (16)

[0128] Based on the above charging load prediction method, in order to verify the prediction accuracy and its progress compared with the prior art, this embodiment selects R as the evaluation index. 2 (R-Squared), also known as the goodness of fit, is usually used to measure the degree of fit between the predicted result and the actual situation. Its general definition is shown in formulas (17) to (20), where SST (Total Sum of Squares) is the sample variance, SSE (Sum of Squares due to Error) represents the residual sum of squares, and SSR (Sum of Squares of the Regression) represents the regression sum of squares.

[0129]

[0130]

[0131]

[0132]

[0133] As shown in Table 4, the experimental results demonstrate that the prediction model provided in this embodiment achieves good results in predicting the charging load of electric vehicle charging stations. The average Ra for each station on the test set is [data missing]. 2 The values ​​range from 0.72 to a maximum of 0.95, providing data support for the construction planning and daily operation of charging stations. Table 4 lists models 3-6, which are control models obtained by removing and replacing modules based on the model proposed in this invention. MLP is the model with the residual connection method and historical data encoding module removed; MLP_RES is the model with the historical data encoding module removed; MLP_ATT is the model with the residual connection method removed; and MLP_RES_GRU is the model that replaces the attention encoding layer in the historical encoding module with GRU. The experimental results in Table 4 show that LightGBM, XGBoost, MLP, and MLP_RES, lacking a historical data processing module, have poor model fitting performance. The models with removed and replaced modules also perform slightly worse than our proposed method, indicating that the modules in the model proposed in this embodiment are effective.

[0134] Table 4. R-values ​​of the control group and experimental model on the test set 2

[0135]

[0136] Using the above-described charging load prediction method, predictions were verified on four randomly selected charging stations. A comparison chart of the actual charging load and prediction results for the four stations is available. Figures 5 to 8 .

Claims

1. A charging load prediction method for charging stations based on an attention mechanism, characterized in that, It includes a prediction model, which comprises a feature embedding module, a historical data encoding module, and a fusion prediction module; The training steps for the prediction model are as follows: acquiring feature data of a charging station period t and a charging load value y corresponding to the period t t , all the feature data constituting a feature vector r t ; extracting a part related to time and weather features in the feature vector r t is denoted as g t ; Obtain historical data of charging stations over the past s days for time period t, including and These represent the date, time, weather characteristics, and load values ​​for time period t within the past s days; The input vector of the historical data encoding module is u t and g t ; The historical data encoding module is equipped with a network basic module FA, which consists of a linear layer, a BatchNorm layer, a Tanh layer and a Dropout layer from input to output. Vector X is input into the basic network module FA to obtain FA(X); The history data encoding module encodes the vector u t The processing of the vector u is a residual connection processing: K t =FA(u t +FA(u t )), For g t Similarly, we obtain: Q t =FA(g) t +FA(g t )); K t With Q t After multiplication and normalization, the feature data corresponding to time period t in the historical data is used to predict y. t Influence factor α t : α t =softmax(K t ×Q t ) With α t For p t The weighted sum is calculated to obtain the output vector V of the historical data encoding module. t : The input vector of the fusion prediction module is O t O t =[r t V t ]; The output of the fusion prediction module is: Among them, W p and b p These represent the weight matrix and the offset, respectively, which are the weights that need to be learned and updated after training in the prediction model; Define the mean square error loss function L MSE , Error backpropagation is performed based on the stochastic gradient descent algorithm and the momentum minimization loss algorithm to update the prediction model until the prediction model converges, thus obtaining the converged prediction model. The prediction steps of the prediction model are as follows: The time period to be predicted is denoted as t'. Feature data for time period t' is obtained, including weather-related features acquired from weather forecasts. These feature data are then substituted into the converged prediction model to calculate... This is the predicted charging load value for time period t'.

2. The charging load prediction method for charging stations based on an attention mechanism as described in claim 1, characterized in that, The feature data includes x t =[x t0 ,x t1 ,…,x td-1 ] and h t =[h t0 ,h t1 ,…,h tk-1 ], x t h represents the continuous feature vector consisting of d continuous feature data corresponding to time period t. t The categorical feature vector h represents the k categorical feature data corresponding to time period t. t The input feature embedding module transforms the input feature vector into a continuous feature vector h′. t Continuous eigenvector x t and continuous eigenvector h′ t The feature vector r is obtained by combination. t =[h′ t |x t ].

3. The charging load prediction method for charging stations based on an attention mechanism as described in claim 2, characterized in that, The feature embedding module processes the input categorical feature vector as follows: First, each feature is one-hot encoded, and then multiplied by a learnable weight matrix to transform it into a continuous feature vector of dimension r, where r is the hyperparameter of the model, determined through prior knowledge and manual debugging.

4. The charging load prediction method for charging stations based on an attention mechanism as described in claim 1, characterized in that, The input-output relationship of the linear layer is as follows: f(X)=XW T +b, X represents the input vector of this layer, and W and b represent the weight matrix and offset, respectively, which are the weights that need to be learned and updated after training in the prediction model. The input-output relationship of the BatchNorm layer is as follows: μ represents the expectation of the input vector X, σ is the standard deviation, ∈ is a positive number close to 0, γ and β represent the affine transformation parameter vectors, which are the weights that need to be learned and updated after training in the prediction model. The input-output relationship of the Tanh layer is as follows:

5. The charging load prediction method for charging stations based on an attention mechanism as described in claim 1, characterized in that, The feature data input to the prediction model is set as standardized feature data, and the standardization formula is: x′ represents the original data, μ represents the mean of the original data, S represents the standard deviation of the original data, and x represents the standardized data.

6. The charging load prediction method for charging stations based on an attention mechanism as described in claim 1, characterized in that, The charging load value is set as the logarithmically processed charging load value, and the logarithmic processing formula is: y = log(y′ + 1) Where y′ represents the original data and y represents the data after logarithmic transformation.

7. The charging load prediction method for charging stations based on an attention mechanism as described in claim 1, characterized in that, The formula for the softmax function is:

8. The charging load prediction method for charging stations based on an attention mechanism as described in claim 1, characterized in that, The feature data includes at least charging station information, the location information of the charging station, weather information, and time information.

9. The charging load prediction method for charging stations based on an attention mechanism as described in claim 8, characterized in that, The weather information includes the current temperature and humidity.

10. The charging load prediction method for charging stations based on an attention mechanism as described in claim 8, characterized in that, The time information includes the hour and minute of the current day.