A new energy vehicle charging time prediction method
By weighted fusion of temporal convolutional networks and random forest models, combined with multi-dimensional data collection and intelligent algorithm optimization, the problem of low accuracy in predicting charging time for new energy vehicles has been solved, achieving high-precision and stable charging time prediction results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LIAONING JIDIAN POLYTECHNIC
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-12
AI Technical Summary
Existing methods for predicting charging time for new energy vehicles have low prediction accuracy in complex and ever-changing real-world charging environments, making it difficult to balance prediction accuracy with generalization ability, and they do not fully consider the coupled effects of vehicle status, charging mode, and environmental factors.
A weighted fusion method combining a temporal convolutional network model and a random forest model is adopted, along with multi-dimensional data collection and intelligent algorithm optimization, to construct a charging time prediction model. The final prediction value is output through a weighted fusion strategy, taking into account the coupled influence of battery status, charging equipment, environment, and vehicle operation data.
It achieves accurate charging time prediction under different charging modes, with a prediction error of less than 7 minutes and an average prediction error rate of less than 5%. It demonstrates high accuracy and stability in both fast and slow charging modes.
Smart Images

Figure CN122198230A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of new energy vehicle charging technology, and specifically relates to a method for predicting the charging time of new energy vehicles. Background Technology
[0002] Electric vehicles are a core direction for the green transformation of the transportation sector, and lithium-ion batteries, as their core power source, play a crucial role in accurately predicting charging time. This is essential for improving charging efficiency, optimizing the allocation of public charging resources, and enhancing the user's travel experience. Current methods for predicting electric vehicle charging time mainly fall into three categories: methods based on mathematical statistics, methods based on physical analytical models, and data-driven methods. Methods based on mathematical statistics rely on simple empirical rules or fitting formulas to build models. While the implementation process is simple, they can only capture linear or simple nonlinear relationships between data, resulting in low prediction accuracy. Furthermore, they are only applicable to a single charging mode and limited scenarios, making it difficult to cope with complex and ever-changing real-world charging environments. Methods based on physical analytical models predict charging time by simulating the internal electrochemical mechanisms or equivalent circuit characteristics of the battery. Although they can achieve a certain level of accuracy under specific experimental conditions, the model construction process is complex, requiring precise acquisition of internal battery parameters. These parameters dynamically change with factors such as battery aging and temperature variations, making real-time calibration difficult and limiting practicality. Data-driven methods, leveraging massive amounts of historical data to learn complex relationships, have become the mainstream research direction, but significant shortcomings remain. Traditional machine learning algorithms, such as random forests and XGBoost, struggle to fully exploit the temporal features and high-dimensional nonlinear correlations in charging data. While single deep learning models, such as LSTM and Transformer, have advantages in sequence modeling, they are susceptible to data noise, risk overfitting, and have poor adaptability to special scenarios such as battery aging and short-term charging. Furthermore, existing research often fails to adequately consider the coupled effects of multiple variables, including vehicle state, charging mode, and environmental factors. Single models struggle to balance prediction accuracy and generalization ability, resulting in significant prediction errors in practical applications and failing to meet the demands for high-precision, multi-scenario charging time prediction. Summary of the Invention
[0003] The purpose of this invention is to provide a method for predicting the charging time of new energy vehicles, which can accurately predict the charging time under different charging modes.
[0004] The technical solution provided by this invention is as follows:
[0005] A method for predicting charging time for new energy vehicles, comprising:
[0006] Step 1: Obtain existing operational data of new energy vehicles and preprocess it to construct the original dataset;
[0007] Step 2: Construct a new energy vehicle charging time prediction model, and train and optimize the new energy vehicle charging time prediction model using the original dataset; wherein, the charging time prediction model includes: a temporal convolutional network model, a random forest model, and a weighted fusion and prediction module;
[0008] Step 3: Preprocess the real-time operating data of the new energy vehicle and input it into the trained and optimized charging time prediction model to obtain the predicted charging time.
[0009] The weighted fusion and prediction module employs a weighted fusion strategy to fuse the prediction results of the temporal convolutional network model and the random forest model, and outputs the final predicted charging time value of the charging time prediction model. The formula for the final predicted charging time value is as follows:
[0010] ;
[0011] In the formula, The predicted charging time value is used to train the optimized charging time prediction model; The optimal weight parameters; The predicted charging time for training the optimized temporal convolutional network model; This is the predicted charging time value for the trained and optimized random forest model.
[0012] Preferably, the operational data includes: battery status data, charging equipment data, environmental data, and vehicle operation data; wherein, the battery status data includes: state of charge, total voltage, total current, individual cell voltage, and individual cell temperature; the charging equipment data includes: rated power of the charging pile, real-time output power, and charging mode; the environmental data includes: ambient temperature and relative humidity of the charging area; and the vehicle operation data includes: cumulative mileage before charging and average vehicle speed in the first hour before charging.
[0013] Preferably, the preprocessing of the operational data includes: Step 1, standardizing the operational data; Step 2, cleaning the operational data; Step 3, classifying the charging modes, defining charging power below 10kW as slow charging mode and charging power of 20kW and above as fast charging mode; Step 4, calculating the actual charging time for each charging segment as the label for model training; using principal component analysis to select features strongly correlated with charging time as input features of the charging time prediction model; extracting the input features and corresponding actual charging time labels from the fast charging mode and slow charging mode and combining them to form fast charging mode datasets and slow charging mode datasets respectively; wherein, the input features include: initial and final state of charge, initial total battery voltage, initial maximum voltage of individual cells, minimum voltage, and minimum temperature; Step 5, standardizing the selected input features using zero-mean unit variance standardization to construct the original dataset.
[0014] Preferably, the temporal convolutional network model includes: an input layer, a group of residual blocks, a multi-head attention layer, and an output layer; wherein each residual block includes: two causal dilated convolutional layers, two weight normalization layers, two ReLU function layers, and two dropout layers.
[0015] Preferably, the temporal convolutional network model is trained and optimized using a particle swarm optimization algorithm.
[0016] Preferably, the calculation formula of the weighted fusion and prediction module is as follows:
[0017] ;
[0018] In the formula, These are the weighting coefficients; This is the predicted final charging time. The charging time prediction value for the temporal convolutional network model; This is the predicted charging time value for the random forest model.
[0019] Preferably, the weight coefficients are obtained through training on the original dataset, and the training formula for the weight coefficients is:
[0020] α * = arg min α ∈ [ 0 , 1 ] 1 N ∑ i = 1 N [ α · T TCN i + ( 1 − α ) T RF i − T label i ] 2 ;
[0021] In the formula, The total number of samples in the original dataset. For the temporal convolutional network model, the first Predicted charging time for each sample; For the random forest model, the first Predicted charging time for each sample; For the first The actual charging time tag value of each sample; To find the minimum value operator.
[0022] The beneficial effects of the present invention are: the new energy vehicle charging time prediction method provided by the present invention can achieve accurate prediction of charging time under different charging modes. Attached Figure Description
[0023] Figure 1 This is a flowchart of the prediction stage of the new energy vehicle charging time prediction method described in this invention.
[0024] Figure 2 This is a flowchart of the training phase of the new energy vehicle charging time prediction method described in this invention.
[0025] Figure 3 This is the predicted charging time of the plug-in hybrid electric vehicle described in this invention under fast charging mode.
[0026] Figure 4 This refers to the charging time prediction error of the plug-in hybrid electric vehicle described in this invention in fast charging mode.
[0027] Figure 5 This is the predicted charging time of the pure electric vehicle in fast charging mode according to the present invention.
[0028] Figure 6 This refers to the charging time prediction error of the pure electric vehicle in fast charging mode as described in this invention.
[0029] Figure 7 This is the predicted charging time of the plug-in hybrid electric vehicle described in this invention under slow charging mode.
[0030] Figure 8 This refers to the predicted charging time error of the plug-in hybrid electric vehicle in slow charging mode as described in this invention.
[0031] Figure 9 This is the predicted charging time of the pure electric vehicle in slow charging mode according to the present invention.
[0032] Figure 10 This refers to the charging time prediction error of the pure electric vehicle in slow charging mode as described in this invention.
[0033] Figure 11 These are the charging time prediction results of different models described in this invention under fast charging mode.
[0034] Figure 12 These are the charging time prediction results of different models described in this invention under slow charging mode. Detailed Implementation
[0035] The present invention will now be described in further detail with reference to the accompanying drawings, so that those skilled in the art can implement it based on the description.
[0036] like Figure 1-2 As shown, this invention provides a method for predicting the charging time of new energy vehicles, and the specific implementation process is as follows:
[0037] Step 1: Collect vehicle operation data using various sensors and instruments installed on the vehicle, and generate time-series data sequences at a frequency of 10 seconds per sequence; preprocess the acquired existing operation data of new energy vehicles to construct the original dataset.
[0038] The operational data includes: battery status data, charging equipment data, environmental data, and vehicle operation data; wherein, the battery status data includes: state of charge, total voltage, total current, individual cell voltage, and individual cell temperature; the charging equipment data includes: rated power of the charging pile, real-time output power, and charging mode; the environmental data includes: ambient temperature and relative humidity of the charging area; and the vehicle operation data includes: cumulative mileage before charging and average vehicle speed in the first hour before charging.
[0039] The preprocessing procedure for the aforementioned operational data includes:
[0040] Step 1: Standardize the operational data: Convert the collected time data into a date-time series format, and uniformly convert voltage, current, and other data into their corresponding smallest unit of measurement to ensure consistent and standardized data format. Step 2: Clean the operational data: Based on the preset normal range standard for operational data, use the 3σ criterion to identify and remove outliers exceeding the reasonable range; for missing data with consecutive sampling times and gaps resulting from outlier removal, use linear interpolation to fill in the gaps; for non-continuous missing data, directly delete the corresponding rows; filter and delete duplicate data with the same sampling time to avoid data redundancy; use the moving average method to smooth and reduce noise in the data to reduce the impact of random noise on data quality. Step 3: Combine charging voltage, current, and average power data to clarify the charging mode classification standard and classify the charging modes: define charging power below 10kW as slow charging mode, and define charging power... A charging rate of 20kW or higher is defined as fast charging mode; Step 4: Calculate the actual charging time for each charging segment as the label for model training; Use principal component analysis to select features strongly correlated with charging time as input features for the charging time prediction model; Extract the input features and corresponding actual charging time labels from fast charging mode and slow charging mode, and combine them to form fast charging mode dataset and slow charging mode dataset respectively; In this application, the input features include: initial and final state of charge, initial total battery voltage, initial maximum voltage of individual cells, minimum voltage, and minimum temperature; Step 5: Standardize the selected input features using zero-mean unit variance standardization to ensure consistent feature scales and construct the original dataset; Divide the original dataset into a training set, a test set, and a validation set in a 7:2:1 ratio for model training, parameter tuning, and accuracy verification of the charging time prediction model, respectively. In this application, the original dataset includes fast charging mode dataset and slow charging mode dataset.
[0041] Step 2: Construct a new energy vehicle charging time prediction model, and train and optimize the model using the original dataset. The charging time prediction model includes: a temporal convolutional network model, a random forest model, and a weighted fusion and prediction module.
[0042] The temporal convolutional network model includes: an input layer, residual block groups, a multi-head attention layer, and an output layer; wherein each residual block includes: two causal dilated convolutional layers, two weight normalization layers, two ReLU function layers, and two dropout layers; the convolution formula for the causal dilated convolutional layers is:
[0043] ;
[0044] In the formula, The output value of the convolution; This is a time index, corresponding to the sampling time of the time series data; The kernel size; For location index; For the first One convolutional kernel; Input feature values; The expansion rate;
[0045] ;
[0046] In the formula, This is the output value of the residual block; This represents the original input feature vector of the residual block; This is the sum of the output values after two causal dilation convolutions, weight normalization, ReLU activation, and dropout within the residual block.
[0047] The multi-head attention layer calculates the weight distribution of temporal features by scaling dot product attention, thereby enhancing the feature contribution of key temporal nodes; the calculation formula for the multi-head attention layer is as follows:
[0048] ;
[0049] ;
[0050] ;
[0051] In the formula, For attention mechanism functions; The query matrix is obtained by outputting feature maps from the residual block group; The key matrix is obtained from the feature maps output by the residual block group; The value matrix is obtained from the feature mapping output by the residual block group; Feature dimensions for each attention head; For the first One point of attention; For location index; For the number of attention heads; For activation functions; For splicing operations; To output the projection matrix; , , For the first The projection matrix of attention.
[0052] The temporal convolutional network model is trained and optimized using a particle swarm optimization algorithm. The specific process is as follows: Step 1: The parameters of the temporal convolutional network model are used as optimization parameters for the particle swarm optimization algorithm, and the particle swarm parameters are initialized. The parameters of the temporal convolutional network model include: the number of convolutional kernels, the kernel size, the number of residual blocks, the dropout factor, the initial learning rate, the number of attention heads in the multi-head attention layer, and the feature dimension. Each particle corresponds to a set of parameters of the temporal convolutional network model. In this application, the number of convolutional kernels is 8~128, the kernel size is 3~7, the number of residual blocks is 2~6, the dropout factor is 0.01~0.1, the initial learning rate is 0.0001~0.01, the number of attention heads in the multi-head attention layer is 4~8, and the feature dimension is 64~256. The initialized particle swarm parameters are: number of particles = 30, inertia weight = 0.7, learning factor = 2, and number of iterations = 100.
[0053] Step 2: Update velocity and position: The particle searches for the optimal solution in the solution space by updating its velocity and position, as shown in the formula:
[0054] ;
[0055] ;
[0056] In the formula, For location index; This represents the current iteration number; The updated particle velocity; Inertial weight; The current particle velocity; , For learning factors; , for [ 0 , 1 ] A random number within a given range; This represents the optimal position for each individual particle. This represents the globally optimal position for all particles. For the updated particle positions; This represents the particle position at the current iteration number.
[0057] Step 3: Use the root mean square error of the temporal convolutional network model as the fitness function of the particle swarm optimization algorithm. The smaller the fitness value, the better the hyperparameter combination. The root mean square error of the temporal convolutional network model is:
[0058] ;
[0059] In the formula, For location index; The mean squared error of the temporal convolutional network model; This represents the total number of samples. For the temporal convolutional network model, the first Predicted charging time for each sample For the first The actual charging time label for each sample.
[0060] Step 4: When the number of iterations reaches the preset maximum number of iterations or the fitness is less than the preset threshold, the iteration terminates. The global optimal position at this time is taken as the optimal parameter combination of the temporal convolutional network model, and the training and optimization of the temporal convolutional network model is completed.
[0061] The specific process of training and optimizing the random forest model is as follows:
[0062] Step 1: Initialize the parameters of the random forest model: Set the total number of decision trees, sampling ratio, number of candidate features for node splitting, minimum number of samples per node, and maximum depth of the decision tree; wherein, the sampling ratio is used to extract training samples for a single decision tree from the original dataset; the number of candidate features for node splitting is the number of candidate features randomly selected from the original input features when each decision tree node splits; the minimum number of samples per node is the minimum sample threshold at which a decision tree node stops splitting, and when the number of samples per node is less than the minimum number of samples per node, splitting stops and the node is determined to be a leaf node; the maximum depth of the decision tree is the maximum number of layers in the decision tree, used to suppress model overfitting.
[0063] Step 2: For each decision tree, extract samples from the original dataset using the bootstrap sampling method to construct a training sample set specific to that decision tree:
[0064] ;
[0065] In the formula, For the first The training sample set for each decision tree; For the first A decision tree; The input feature matrix; Label for actual charging time; This is the function for the bootstrap sampling method.
[0066] Step 3: Based on the training sample set specific to the decision tree, split layer by layer starting from the root node. Node splitting is achieved by selecting the optimal split point until all child nodes satisfy the condition that the number of node samples is less than the minimum number of node samples or the node depth reaches the maximum depth of the decision tree, at which point the splitting stops.
[0067] The node splitting is performed using the minimum mean square error criterion. The splitting criterion formula is as follows:
[0068] in, ;
[0069] In the formula, The mean squared error of the training sample set; This is the sample set corresponding to the current node to be split; The number of samples in the sample set; The average actual charging time label for all samples in the sample set;
[0070] For each candidate feature, all possible values of that feature are traversed as split points. The mean squared error corresponding to each split point is calculated, and the split point with the smallest mean squared error is selected as the optimal split point for the current node. Samples with split feature values less than the optimal split point are assigned to the left child node, and samples with values greater than or equal to the optimal split point are assigned to the right child node. For each leaf node, the mean of the charging time tags of all samples contained in that leaf node is used as the output value of that leaf node, as shown in the formula:
[0071] ;
[0072] In the formula, This is the output value of the leaf node, that is, the predicted charging time value of the sample corresponding to the leaf node; This represents the number of samples contained in the leaf node. This is the sample set corresponding to the current leaf node.
[0073] Repeat steps 2 and 3 to train all decision trees in sequence, using an independent method for each decision tree. By sampling a sample set and selecting independent candidate features, the diversity of multiple decision trees is ensured, and model overfitting is avoided. After training, a total decision tree is obtained, and each decision tree can independently output the predicted charging time value of the sample.
[0074] The temporal convolutional network model outputs the charging time prediction value of the temporal convolutional network model; the random forest model outputs the charging time prediction value of the random forest model; the weighted fusion and prediction module uses a weighted fusion strategy to fuse the prediction results of the temporal convolutional network model and the prediction results of the random forest model, and outputs the final charging time prediction value of the new energy vehicle charging time prediction model.
[0075] The predicted charging time value of the temporal convolutional network model is:
[0076] ;
[0077] In the formula, The charging time prediction value for the temporal convolutional network model; As weight; For bias; This represents the output value of the multi-head attention layer.
[0078] The charging time prediction value of the random forest model is:
[0079] ;
[0080] In the formula, The predicted charging time for the random forest model; This represents the total number of decision trees; For the first The predicted charging time of each decision tree;
[0081] The calculation formula for the weighted fusion and prediction module is as follows:
[0082] ;
[0083] In the formula, These are the weighting coefficients; This is the predicted final charging time.
[0084] The weight coefficients are obtained through training on the original dataset to optimize the prediction accuracy of the fused model. The training formula for the weight coefficients is as follows:
[0085] α * = arg min α ∈ [ 0 , 1 ] 1 N ∑ i = 1 N [ α · T TCN i + ( 1 − α ) T RF i − T label i ] 2 ;
[0086] In the formula, The optimal weight parameters; The total number of samples in the original dataset. For the temporal convolutional network model, the first Predicted charging time for each sample; For the random forest model, the first Predicted charging time for each sample; For the first The actual charging time tag value of each sample; To find the minimum value operator.
[0087] Step 3: Preprocess the real-time operating data of the new energy vehicle and input it into the trained and optimized charging time prediction model to obtain the predicted charging time.
[0088] The final predicted charging time is:
[0089] ;
[0090] In the formula, The predicted charging time value is used to train the optimized charging time prediction model; The predicted charging time for training the optimized temporal convolutional network model; This is the predicted charging time value for the trained and optimized random forest model.
[0091] like Figure 3-6 As shown, the charging time prediction model provided in this application is used to predict the charging time of pure electric vehicles and plug-in hybrid electric vehicles in fast charging mode. The error is basically controlled within 7 minutes, and the average prediction error for both vehicles is less than 5 minutes. The maximum prediction error rate for both models in fast charging mode does not exceed 8%. It is evident that the charging time prediction model provided in this application has high accuracy in predicting charging time in fast charging mode. Specifically, the average prediction error rate for charging time in fast charging mode for plug-in hybrid electric vehicles is 5.27%, while the average prediction error rate for charging time in fast charging mode for pure electric vehicles is 4.93%, with the latter showing higher prediction accuracy. This is because plug-in hybrid electric vehicles have smaller battery capacity and shorter charging time, leading to a larger prediction error. However, the maximum prediction error still does not exceed 8 minutes, indicating that the charging time prediction model provided in this application can simultaneously predict the charging time of pure electric vehicles and plug-in hybrid electric vehicles, exhibiting high prediction accuracy regardless of their battery capacity.
[0092] like Figure 7-10 As shown, the predicted curves for both pure electric vehicles and plug-in hybrid electric vehicles can follow the actual value trends well, demonstrating excellent prediction results. The prediction error of the charging time prediction model provided in this application is basically controlled within 12 minutes. Calculations show that the average prediction error for both vehicles does not exceed 7 minutes, and the average prediction error rates are only 1.96% and 1.48%, respectively. This indicates that the charging time prediction model provided in this application has high accuracy in predicting the charging time of both pure electric vehicles and plug-in hybrid electric vehicles in slow charging mode.
[0093] like Figure 11-12As shown, four other models were compared: a BiLSTM-RF fusion model, an RF model, a Transformer model, and an XGBoost model. All models used the same training dataset and optimized their parameter combinations through hyperparameter optimization to ensure optimal prediction performance. Among them, BiLSTM-RF and RF showed the worst prediction performance, exhibiting significant deviations from the true values. Transformer and XGBoost showed relatively similar prediction performance, but their overall accuracy was lower than the charging time prediction model provided in this application. The charging time prediction model provided in this application showed the best prediction performance and the highest prediction accuracy. As clearly seen in the enlarged sub-figure, the prediction curve of the charging time prediction model provided in this application is generally consistent with the true values without significant fluctuations. XGBoost and RF showed the worst prediction performance, with prediction curves deviating from the true values and exhibiting large fluctuations, indicating insufficient stability. In summary, the charging time prediction model provided in this application has stable overall prediction performance, strong robustness, and high prediction accuracy for the charging time required by vehicles in different modes.
[0094] Table 1: Prediction errors of different models in fast charging mode:
[0095] Model Name MAE / min RMSE / min MAPE / % This invention 4.25 5.16 4.33 BiLSTM-RF 7.51 8.81 6.52 RF 9.01 10.68 8.71 Transformer 4.92 6.07 5.14 XGBoost 6.08 7.25 5.85
[0096] Table 2: Prediction errors of different models under slow charging mode:
[0097] Model Name MAE / min RMSE / min MAPE / % This invention 6.68 7.84 3.86 BiLSTM-RF 7.81 9.16 5.42 RF 12.64 13.77 9.27 Transformer 8.57 10.24 6.04 XGBoost 11.42 12.55 8.67
[0098] As shown in Tables 1 and 2, the charging time prediction model provided in this application was evaluated using three metrics: MAE, RMSE, and MAPE. In fast charging mode, the MAE and RMSE of the model were 4.25 min and 5.16 min, respectively, with a MAPE of only 4.33%, all of which were superior to the other models. In slow charging mode, the MAE and RMSE of the model provided in this application were 6.68 min and 7.84 min, respectively, with a MAPE of only 3.86%, again showing the best performance. This demonstrates that the charging time prediction model provided in this application has high prediction accuracy in different modes, with better prediction results in slow charging.
[0099] This invention provides a new energy vehicle charging time prediction method with the following features: multi-dimensional data collection: covering four major categories of data—battery status, charging equipment, environment, and vehicle operation—fully considering the coupled influence of various factors on charging time, laying a data foundation for accurate prediction; mode-specific data processing: dividing charging power into fast charging and slow charging modes, constructing separate datasets to improve the model's adaptability to different charging scenarios; multi-model fusion advantages: combining the strong extraction capability of temporal convolutional network models for time series features and the strong fitting capability of random forest models for nonlinear relationships, achieving complementary advantages through weighted fusion to improve prediction accuracy; intelligent algorithm optimization: using particle swarm optimization algorithm to optimize the hyperparameters of temporal convolutional network models, effectively solving the problems of low hyperparameter tuning efficiency and significant influence of hyperparameters on prediction accuracy, further improving model performance; and a comprehensive preprocessing process: through multiple preprocessing steps such as normalization, cleaning, feature selection, and standardization, eliminating the influence of data noise and dimensional differences, improving the efficiency and stability of model training.
[0100] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A method for predicting charging time of new energy vehicles, characterized in that, include: Step 1: Obtain existing operational data of new energy vehicles and preprocess it to construct the original dataset; Step 2: Construct a new energy vehicle charging time prediction model, and train and optimize the new energy vehicle charging time prediction model using the original dataset; wherein, the charging time prediction model includes: a temporal convolutional network model, a random forest model, and a weighted fusion and prediction module; Step 3: Preprocess the real-time operating data of the new energy vehicle and input it into the trained and optimized charging time prediction model to obtain the predicted charging time. The weighted fusion and prediction module employs a weighted fusion strategy to fuse the prediction results of the temporal convolutional network model and the random forest model, and outputs the final predicted charging time value of the charging time prediction model. The formula for the final predicted charging time value is as follows: ; In the formula, The predicted charging time value is used to train the optimized charging time prediction model; The optimal weight parameters; The predicted charging time for training the optimized temporal convolutional network model; This is the predicted charging time value for the trained and optimized random forest model.
2. The method for predicting charging time for new energy vehicles according to claim 1, characterized in that, The operational data includes: battery status data, charging equipment data, environmental data, and vehicle operation data; wherein, the battery status data includes: state of charge, total voltage, total current, individual cell voltage, and individual cell temperature; the charging equipment data includes: rated power of the charging pile, real-time output power, and charging mode; the environmental data includes: ambient temperature and relative humidity of the charging area; and the vehicle operation data includes: cumulative mileage before charging and average vehicle speed in the first hour before charging.
3. The method for predicting charging time for new energy vehicles according to claim 1, characterized in that, The preprocessing of the operational data includes: Step 1, standardizing the operational data; Step 2, cleaning the operational data; Step 3, classifying the charging modes, defining charging power below 10kW as slow charging mode and charging power of 20kW and above as fast charging mode; Step 4, calculating the actual charging time for each charging segment as the label for model training; using principal component analysis to select features strongly correlated with charging time as input features for the charging time prediction model; extracting the input features and corresponding actual charging time labels from fast charging and slow charging modes and combining them to form fast charging mode datasets and slow charging mode datasets respectively; wherein, the input features include: initial and final state of charge, initial total battery voltage, initial maximum voltage of individual cells, minimum voltage, and minimum temperature; Step 5, standardizing the selected input features using zero-mean unit variance standardization to construct the original dataset.
4. The method for predicting charging time for new energy vehicles according to claim 1, characterized in that, The temporal convolutional network model includes: an input layer, a group of residual blocks, a multi-head attention layer, and an output layer; wherein each residual block includes: two causal dilated convolutional layers, two weight normalization layers, two ReLU function layers, and two dropout layers.
5. The method for predicting charging time for new energy vehicles according to claim 4, characterized in that, The temporal convolutional network model is trained and optimized using the particle swarm optimization algorithm.
6. The method for predicting charging time for new energy vehicles according to claim 1, characterized in that, The calculation formula for the weighted fusion and prediction module is as follows: ; In the formula, These are the weighting coefficients; This is the predicted final charging time. The charging time prediction value for the temporal convolutional network model; This is the predicted charging time value for the random forest model.
7. The method for predicting charging time for new energy vehicles according to claim 6, characterized in that, The weight coefficients are obtained through training on the original dataset, and the training formula for the weight coefficients is as follows: ; In the formula, The total number of samples in the original dataset. For the temporal convolutional network model, the first Predicted charging time for each sample; For the random forest model, the first Predicted charging time for each sample; For the first The actual charging time tag value of each sample; To find the minimum value operator.