Charging pile power consumption prediction method based on improved deep learning
By improving the deep learning method, combined with technical means such as dynamic sparse connection network, self-supervised learning and variational information bottleneck mechanism, the problems of insufficient accuracy and poor generalization capabilities in charging pile power consumption prediction are solved, and high-precision, stable and reliable power consumption prediction are achieved.
Patent Information
- Application Number
- CN202411125597.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2025-03-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When facing complex and changing charging demands and environmental factors, the existing charging pile power consumption prediction methods lack prediction accuracy, poor model generalization capabilities, and difficulty in effectively using multi-source data, resulting in limited accuracy and stability of prediction results.
The charging pile power consumption prediction method based on improved deep learning is adopted, combined with a deep pseudo-label generator with dynamic sparse connection network and self-supervised learning, a variational information bottleneck mechanism and an improved tensor fusion network are introduced, and a neural evolution strategy optimization algorithm and a variational Bayesian verification method are used. Finally, an adversarial evaluation mechanism is adopted to achieve high-precision power consumption prediction.
This method can effectively capture long-term dependencies, extract and fuse multi-source data features, improve the generalization ability and prediction accuracy of the model, and ensure the stability and reliability of the prediction results.
Smart Images

Figure CN119130713B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric vehicle charging pile power consumption prediction, and in particular to a charging pile power consumption prediction method based on improved deep learning. Background Art
[0002] With the popularity of electric vehicles, the prediction of charging pile power consumption has become an important part of power system and energy management. Accurate power consumption prediction is helpful for grid load management, energy optimization scheduling and reducing charging waiting time. However, existing charging pile power consumption prediction methods often show problems such as insufficient prediction accuracy and poor model generalization ability when facing complex and changeable charging demands and environmental factors.
[0003] Traditional methods for predicting power consumption mainly rely on statistical methods and time series analysis, such as ARIMA models, support vector machines, etc. These methods have certain advantages in dealing with linear relationships and short-term dependencies, but have obvious deficiencies in capturing long-term dependencies and complex nonlinear features. In addition, these traditional methods are difficult to effectively utilize multidimensional features when facing multi-source data fusion, resulting in limited accuracy and stability of the prediction results. Although deep learning models, such as long short-term memory networks and convolutional neural networks, have shown great potential in processing time series data and extracting local features, a single deep learning model still faces challenges in capturing complex dependencies and processing multi-source data fusion. LSTM is good at capturing long-term dependencies in time series, while CNN excels in extracting local features. However, when used alone, the two fail to fully combine their respective advantages, resulting in poor performance of the model in dealing with complex power consumption prediction tasks.
[0004] In time series prediction, traditional models treat data of all time steps equally, and fail to highlight the time steps and features that are most critical to the prediction results. This equal treatment of data processing fails to effectively distinguish the time points and features that have the greatest impact on the prediction, affecting the prediction accuracy and reliability of the model. The introduction of the attention mechanism has alleviated this problem to a certain extent, but the traditional attention mechanism often cannot fully adapt to complex power consumption data scenarios. Existing methods lack an effective multi-source data fusion mechanism when processing historical power consumption data of charging piles and other external data, resulting in insufficient input information for the prediction model. This fusion difficulty makes it impossible for the model to fully utilize multi-dimensional information for prediction, thereby affecting the accuracy and stability of the prediction results. Especially in the face of changing environmental factors and complex charging behaviors, traditional data fusion methods are particularly weak.
[0005] During the training process, deep learning models are prone to overfitting problems. Overfitting means that the model performs well on the training data, but performs poorly on the test data or in actual applications, and has insufficient generalization ability. This is because deep learning models often learn the noise and irrelevant features in the training data during training, resulting in the model being unable to maintain high performance when processing new data. Although overfitting can be alleviated to a certain extent through regularization, early stopping and other technologies, it is still difficult to fundamentally solve the problem.
[0006] In terms of model performance evaluation, traditional methods and some deep learning models usually only use a single evaluation indicator, such as mean square error or root mean square error. A single indicator cannot fully reflect the predictive ability and stability of the model because different indicators focus on different evaluation angles. For example, MSE is very sensitive to outliers, while MAE pays more attention to the size of the average error. The lack of multi-dimensional evaluation methods makes it difficult to fully measure the performance of the model in practical applications, which in turn affects the optimization and improvement of the model.
[0007] Therefore, how to provide a charging pile power consumption prediction method based on improved deep learning is a problem that technical personnel in this field urgently need to solve. Summary of the invention
[0008] One purpose of the present invention is to propose a charging pile power consumption prediction method based on improved deep learning. The present invention makes full use of deep learning, variational information bottleneck mechanism, tensor fusion network, neuroevolution strategy optimization algorithm and adversarial evaluation mechanism, and describes in detail the algorithm for realizing high-precision power consumption prediction through multi-source data fusion, feature extraction, model optimization and verification evaluation. It has the advantages of strong ability to capture long-term dependencies, good feature extraction and fusion effects, superior model generalization ability and high prediction accuracy.
[0009] The charging pile power consumption prediction method based on improved deep learning according to an embodiment of the present invention comprises the following steps:
[0010] S1. Clean, process outliers and normalize the collected charging pile power consumption data to generate pre-processed data;
[0011] S2, extracting and generating relevant features from the preprocessed data, including weather data, time features, and special events, to form a feature data set;
[0012] S3. Using the generated feature data set, a hybrid deep learning model is constructed by improving deep learning, wherein the hybrid deep learning model combines a dynamic sparse connection network and a deep pseudo-label generator based on self-supervised learning to generate preliminary prediction results;
[0013] S4. Introducing the variational information bottleneck mechanism into the hybrid deep learning model, by finding the best balance between information compression and feature extraction, the model can effectively capture key features, optimize the preliminary prediction results, and generate optimized feature representations;
[0014] S5. Using an improved tensor fusion network, the optimized feature representation is combined with the preprocessed data and feature data set into a feature representation by introducing high-order feature interaction and dynamic weight adjustment mechanism, so as to achieve deep fusion of data and feature extraction and obtain a new feature representation.
[0015] S6. Use the neural evolution strategy optimization algorithm to train the new feature representation, optimize the neural network structure and parameters through the evolutionary algorithm, and generate an optimized model;
[0016] S7. By introducing the variational Bayesian validation method, the optimized model is validated. Based on the principle of Bayesian reasoning, the distribution of the validation set is dynamically adjusted through variational inference, so that the validation process can reflect the performance of the model on unknown data.
[0017] S8. Use an adversarial evaluation mechanism to evaluate the verified model. By generating adversarial samples, the robustness and anti-interference ability of the model are evaluated to optimize the reliability and accuracy of the prediction results in real applications.
[0018] Optionally, the S3 specifically includes:
[0019] S31. Input the feature data set X into the dynamic sparse connection network DSCN. The dynamic sparse connection network can capture the sparse features of the input data and generate a preliminary feature representation by dynamically adjusting the network structure:
[0020]
[0021] Among them, Y DSCN is the output of the dynamic sparse connection network, σ is the activation function, α i is the dynamic sparse connection coefficient, is the i-th sparse weight matrix, X (i) is the i-th part of the feature dataset, b DSCN is the bias term;
[0022] S32, the feature data set X is input into the deep pseudo label generator SSDPLG based on self-supervised learning. The deep pseudo label generator based on self-supervised learning uses the self-supervised learning method to generate pseudo labels, performs nonlinear transformation through the hyperbolic tangent activation function, and combines the self-supervised learning weight coefficient and parameter matrix to finally generate pseudo labels for further feature representation:
[0023]
[0024] Among them, L pseudo is the generated pseudo label, tanh is the hyperbolic tangent activation function, β j is the self-supervised learning weight coefficient, is the jth self-supervised learning parameter matrix, γ j is the bias term, ∈ is the noise term;
[0025] S33, using the fusion function, the output Y of the dynamic sparse connection network DSCN And the generated pseudo label L pseudo Fusion, combining the fusion weight coefficient and the high-order feature interaction coefficient, forms a new feature representation Z:
[0026]
[0027] Among them, ω is the fusion function, λ1 and λ2 are the fusion weight coefficients, δ k is the high-order feature interaction coefficient, ⊙ represents the element-wise product, Y DSCN ⊙L pseudok represents the kth high-order feature interaction term;
[0028] S34, the fused feature representation Z is further extracted and processed to generate a preliminary prediction result
[0029] Optionally, the S4 specifically includes:
[0030] S41. Generate preliminary prediction results Input into the variational information bottleneck layer to calculate the mean μ and variance λ of the preliminary prediction results:
[0031]
[0032] in, and Respectively represent the mean function and variance function of the preliminary prediction results, W μ and W λ is the weight matrix, b μ and b λ is the bias term;
[0033] S42. Based on the calculated mean and variance, by introducing standard normal distribution noise ∈, the variational information bottleneck layer can generate output with a certain degree of randomness. The output of the variational information bottleneck layer is calculated.
[0034]
[0035] in, represents the output of the variational information bottleneck layer, ∈ is the standard normal distribution noise;
[0036] S43. Calculate the loss function L of the variational information bottleneck layer VIB , combining the reconstruction loss and the Kullback-Leibler divergence:
[0037]
[0038] Among them, L recon is the reconstruction loss, β is the weight parameter, D KL is the Kullback-Leibler divergence, is the variational posterior distribution, p(Z) is the prior distribution;
[0039] S44, according to the output of the variational information bottleneck layer Through further feature extraction and processing, the optimized feature representation Y is generated VIB .
[0040] Optionally, the S5 specifically includes:
[0041] S51. Using the improved tensor fusion network, the optimized feature representation Y VIB , preprocessed data X and feature dataset X feat Perform fused tensor calculations:
[0042]
[0043] Where T is the fused tensor, is the fusion weight matrix, X j and are the i-th, j-th and k-th parts of the optimized feature representation, preprocessed data and feature dataset, respectively;
[0044] S52. Perform high-order feature interaction on the fused tensor T to generate interactive feature representation Z interaction :
[0045]
[0046] Among them, Z interaction is the interactive feature representation, σ is the activation function, δ k is the high-order feature interaction coefficient, T⊙T k is the kth element-wise product, b interaction is the bias term;
[0047] S53, the interactive feature is represented by Z interaction The adjusted feature representation Z is obtained by dynamic weight adjustment adjusted, the dynamic weight adjustment mechanism adjusts the weight of feature representation in real time according to the dynamic changes of input data:
[0048]
[0049] Among them, Z adjusted is the adjusted feature representation, ω is the dynamic weight adjustment function, λ l To adjust the weight coefficient, is the lth part of the interactive feature representation, b adjustment is the bias term;
[0050] S54, use the recurrent neural network to represent the adjusted feature Z adjusted Extract time series features, capture the time dependency and dynamic change rules of data, and generate new feature representation Y RNN .
[0051] Optionally, the S6 specifically includes:
[0052] S61, the generated new feature represents Y RNN Input into the neural evolution strategy optimization algorithm to initialize the neural network individuals in the population, represented as {N i}, where i = 1, 2, ..., P, P is the population size. The neural evolution strategy optimization algorithm initializes a population of P neural network individuals by simulating the natural evolution process. Each individual N i Represents a different neural network structure and parameter settings;
[0053] S62. For each neural network individual N i Evaluation is performed by calculating the prediction error of each individual on a given feature representation, measuring its performance on a specific task, and calculating its fitness f(N i ):
[0054] f(Ni)=L(Ni(Y RNN ),Ytrue);
[0055] Among them, L is the loss function, N i (Y RNN ) is the neural network individual N i Represent the input feature Y RNN The predicted output, Y true is the true label;
[0056] S63, according to the fitness value f(N i) Select several neural network individuals with higher fitness to perform crossover and mutation operations. Through the crossover operation, combine some genes of two individuals with higher fitness to generate new individuals. Through the mutation operation, introduce random changes to increase the diversity of the population and generate a new population:
[0057] Nnew=Crossover(Nselected)+Mutation(Nselected);
[0058] Among them, N new is the newly generated population, N selected The individuals with higher fitness are selected, Crossover and Mutation are crossover and mutation operations respectively;
[0059] S64, repeat steps S62 and S63 until the predetermined evolutionary generation G is reached or the stopping condition is met, and finally the neural network individual N with the highest fitness is selected. best As the optimized model;
[0060] S65, the optimized model N best For the final training:
[0061]
[0062] Among them, θ best are the optimized model parameters, is the loss function, N best Y RNN ; θ is the optimized model with parameter θ for the input feature representation Y RNN The predicted output.
[0063] Optionally, the S7 specifically includes:
[0064] S71, the optimized model N best and feature representation Y RNN As input, construct a variational Bayesian validation model and initialize the variational parameters φ and λ, denoted as q φ (Z)≈p(Z|Y RNN ), the variational Bayesian validation model introduces variational inference techniques to approximate the posterior distribution q φ The relationship between (Z) and the prior distribution p(Z) is used to dynamically adjust the model's predictive distribution during the validation process;
[0065] S72. Calculate the variational lower bound of the model:
[0066]
[0067] Among them, p(Y true |z) is the likelihood function, qφ (Z) is the variational posterior distribution, p(Z) is the prior distribution, and D KL is the Kullback-Leibler divergence;
[0068] S73. Use the stochastic gradient descent method to optimize the variational parameter φ and the model parameter θ. By maximizing the variational lower bound and adjusting the variational parameter and the model parameter, the model's prediction ability on the validation data is optimized:
[0069]
[0070] Among them, φ is the variational parameter, θ is the model parameter;
[0071] S74. Calculate the predicted distribution of the validation set based on the optimized variational parameter φ and model parameter θ:
[0072] p(Yval|Y RNN )=∫p(Yval|Z)qφ(Z)dZ;
[0073] Among them, p(Y val |Y RNN ) is the label of the validation set, p(Y val |Z) is the conditional probability distribution;
[0074] S75. Evaluate the verification results. Adjust the model parameters θ and variational parameters φ based on the verification results to minimize the verification error. The verification results are evaluated by comparing the error between the predicted distribution and the verification set label, dynamically adjusting the model parameters and variational parameters, and ultimately optimizing the prediction performance of the model.
[0075] Optionally, the S8 specifically includes:
[0076] S81, the optimized model N best and feature representation Y RNN As input, build an adversarial evaluation model;
[0077] S82. Generate adversarial sample X adv , by adding small perturbations to change the input data, and by calculating the gradient information of the input data, the adversarial sample makes slight adjustments based on the original data:
[0078]
[0079] Among them, X is the original input data, ∈ is the anti-disturbance coefficient, is the gradient of the loss function with respect to the input data, Y true is the true label;
[0080] S83. Use the generated adversarial sample X advPerform model evaluation to quantify the model's performance in the face of perturbed data by calculating the proportion of correct predictions made by the model on adversarial examples:
[0081]
[0082] Where N is the number of adversarial samples, I is the indicator function, which takes the value of 1 when the prediction result is consistent with the true label, otherwise it is 0;
[0083] S84. Based on the adversarial evaluation results, adjust the model parameters θ and training strategy, and retrain the model:
[0084]
[0085] Among them, L adv is the loss function on adversarial samples;
[0086] S85. By continuously generating adversarial samples and adjusting model parameters, the model is iteratively optimized to achieve optimal performance on adversarial samples. Through multiple iterations, adversarial sample generation and model parameter optimization are performed alternately to optimize the performance of the model on adversarial samples.
[0087] The beneficial effects of the present invention are:
[0088] The present invention adopts a dynamic sparse connection network and a deep pseudo-label generator of self-supervised learning to effectively capture the long-term dependencies and complex nonlinear features in the charging pile power consumption data. This hybrid deep learning model architecture makes full use of the dynamic adjustment ability of the dynamic sparse connection network and the advantages of the deep pseudo-label generator of self-supervised learning to generate pseudo-labels, so that the model can more accurately reflect the inherent patterns and trends in the data. The variational information bottleneck mechanism is introduced into the model. By finding the optimal balance between information compression and feature extraction, the preliminary prediction results are optimized and a more accurate feature representation is generated. This mechanism not only increases the model's attention to key features, but also effectively prevents information loss, allowing the model to perform well when processing complex data.
[0089] The present invention adopts an improved tensor fusion network to fuse the optimized feature representation with the preprocessed data and feature data set through high-order feature interaction and dynamic weight adjustment mechanism, thereby realizing deep fusion and feature extraction of multi-source data. Through this improved fusion method, the model can make full use of multi-dimensional information and improve the stability and accuracy of prediction. In terms of model optimization, the present invention introduces a neural evolution strategy optimization algorithm to train the fused feature representation, optimize the neural network structure and parameters through an evolutionary algorithm, and generate an optimized model with superior performance. The neural evolution strategy optimization algorithm significantly improves the generalization ability of the model by simulating the natural evolution process, selecting and optimizing the optimal neural network individuals.
[0090] The present invention adopts a variational Bayesian verification method. Based on the principle of Bayesian reasoning, the distribution of the verification set is dynamically adjusted through variational inference, so that the verification process can reflect the performance of the model on unknown data. The variational Bayesian verification method not only improves the verification effect of the model, but also ensures the stability and reliability of the model in practical applications. An adversarial evaluation mechanism is adopted to evaluate the robustness and anti-interference ability of the model by generating adversarial samples, thereby optimizing the reliability and accuracy of the prediction results in real applications. By continuously generating adversarial samples and adjusting model parameters, the model gradually improves its performance in the face of perturbed data, and finally shows higher reliability in real applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0092] Figure 1 A flowchart of the method for predicting electric vehicle charging pile power consumption based on improved deep learning proposed by the present invention;
[0093] Figure 2 A flow chart of introducing the variational information bottleneck mechanism in the present invention;
[0094] Figure 3 A schematic diagram of the structure of the improved tensor fusion network in the present invention for multi-source data fusion and high-order feature interaction. DETAILED DESCRIPTION
[0095] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0096] refer to Figure 1-3 , a charging pile power consumption prediction method based on improved deep learning includes the following steps:
[0097] S1. Clean, process outliers and normalize the collected charging pile power consumption data to generate pre-processed data;
[0098] S2, extracting and generating relevant features from the preprocessed data, including weather data, time features, and special events, to form a feature data set;
[0099] S3. Using the generated feature data set, a hybrid deep learning model is constructed by improving deep learning, wherein the hybrid deep learning model combines a dynamic sparse connection network and a deep pseudo-label generator based on self-supervised learning to generate preliminary prediction results;
[0100] S4. Introducing the variational information bottleneck mechanism into the hybrid deep learning model, by finding the best balance between information compression and feature extraction, the model can effectively capture key features, optimize the preliminary prediction results, and generate optimized feature representations;
[0101] S5. Using an improved tensor fusion network, the optimized feature representation is combined with the preprocessed data and feature data set into a feature representation by introducing high-order feature interaction and dynamic weight adjustment mechanism, so as to achieve deep fusion of data and feature extraction and obtain a new feature representation.
[0102] S6. Use the neural evolution strategy optimization algorithm to train the new feature representation, optimize the neural network structure and parameters through the evolutionary algorithm, and generate an optimized model;
[0103] S7. By introducing the variational Bayesian validation method, the optimized model is validated. Based on the principle of Bayesian reasoning, the distribution of the validation set is dynamically adjusted through variational inference, so that the validation process can reflect the performance of the model on unknown data.
[0104] S8. Use an adversarial evaluation mechanism to evaluate the verified model. By generating adversarial samples, the robustness and anti-interference ability of the model are evaluated to optimize the reliability and accuracy of the prediction results in real applications.
[0105] In this implementation, S3 specifically includes:
[0106] S31. Input the feature data set X into the dynamic sparse connection network DSCN. The dynamic sparse connection network can capture the sparse features of the input data and generate a preliminary feature representation by dynamically adjusting the network structure:
[0107]
[0108] Among them, Y DSCN is the output of the dynamic sparse connection network, σ is the activation function, α i is the dynamic sparse connection coefficient, is the i-th sparse weight matrix, X (i) is the i-th part of the feature dataset, b DSCN is the bias term;
[0109] S32, the feature data set X is input into the deep pseudo label generator SSDPLG based on self-supervised learning. The deep pseudo label generator based on self-supervised learning uses the self-supervised learning method to generate pseudo labels, performs nonlinear transformation through the hyperbolic tangent activation function, and combines the self-supervised learning weight coefficient and parameter matrix to finally generate pseudo labels for further feature representation:
[0110]
[0111] Among them, L pseudo is the generated pseudo label, tanh is the hyperbolic tangent activation function, β j is the self-supervised learning weight coefficient, is the jth self-supervised learning parameter matrix, γ j is the bias term, ∈ is the noise term;
[0112] S33, using the fusion function, the output Y of the dynamic sparse connection network DSCN And the generated pseudo label L pseudo Fusion, combining the fusion weight coefficient and the high-order feature interaction coefficient, forms a new feature representation Z:
[0113]
[0114] Among them, ω is the fusion function, λ1 and λ2 are the fusion weight coefficients, δ k is the high-order feature interaction coefficient, ⊙ represents the element-wise product, Y DSCN ⊙L pseudok represents the kth high-order feature interaction term;
[0115] S34, the fused feature representation Z is further extracted and processed to generate a preliminary prediction result
[0116] In this implementation manner, the S4 specifically includes:
[0117] S41. Generate preliminary prediction results Input into the variational information bottleneck layer to calculate the mean μ and variance λ of the preliminary prediction results:
[0118]
[0119] in, and Respectively represent the mean function and variance function of the preliminary prediction results, W μ and W λ is the weight matrix, b μ and b λ is the bias term;
[0120] S42. Based on the calculated mean and variance, by introducing standard normal distribution noise ∈, the variational information bottleneck layer can generate output with a certain degree of randomness. The output of the variational information bottleneck layer is calculated.
[0121]
[0122] in, represents the output of the variational information bottleneck layer, ∈ is the standard normal distribution noise;
[0123] S43. Calculate the loss function L of the variational information bottleneck layer VIB , combining the reconstruction loss and the Kullback-Leibler divergence:
[0124]
[0125] Among them, L recon is the reconstruction loss, β is the weight parameter, D KL is the Kullback-Leibler divergence, is the variational posterior distribution, p(Z) is the prior distribution;
[0126] S44, according to the output of the variational information bottleneck layer Through further feature extraction and processing, the optimized feature representation Y is generated VIB .
[0127] In this implementation manner, S5 specifically includes:
[0128] S51. Using the improved tensor fusion network, the optimized feature representation Y VIB , preprocessed data X and feature dataset X feat Perform fused tensor calculations:
[0129]
[0130] Where T is the fused tensor, is the fusion weight matrix, X j and are the i-th, j-th and k-th parts of the optimized feature representation, preprocessed data and feature dataset, respectively;
[0131] S52. Perform high-order feature interaction on the fused tensor T to generate interactive feature representation Z interaction :
[0132]
[0133] Among them, Z interaction is the interactive feature representation, σ is the activation function, δ k is the high-order feature interaction coefficient, T⊙T k is the kth element-wise product, b interaction is the bias term;
[0134] S53, the interactive feature is represented by Z interaction The adjusted feature representation Z is obtained by dynamic weight adjustment adjusted, the dynamic weight adjustment mechanism adjusts the weight of feature representation in real time according to the dynamic changes of input data:
[0135]
[0136] Among them, Z adjusted is the adjusted feature representation, ω is the dynamic weight adjustment function, λ l To adjust the weight coefficient, is the lth part of the interactive feature representation, b adjustment is the bias term;
[0137] S54, use the recurrent neural network to represent the adjusted feature Z adjusted Extract time series features, capture the time dependency and dynamic change rules of data, and generate new feature representation Y RNN .
[0138] In this implementation manner, S6 specifically includes:
[0139] S61, the generated new feature represents Y RNN Input into the neural evolution strategy optimization algorithm to initialize the neural network individuals in the population, represented as {N i}, where i = 1, 2, ..., P, P is the population size. The neural evolution strategy optimization algorithm initializes a population of P neural network individuals by simulating the natural evolution process. Each individual N i Represents a different neural network structure and parameter settings;
[0140] S62. For each neural network individual N i Evaluation is performed by calculating the prediction error of each individual on a given feature representation, measuring its performance on a specific task, and calculating its fitness f(N i ):
[0141] f(Ni)=L(Ni(Y RNN ),Ytrue);
[0142] Among them, L is the loss function, N i (Y RNN ) is the neural network individual N i Represent the input feature Y RNN The predicted output, Y true is the true label;
[0143] S63, according to the fitness value f(N i) Select several neural network individuals with higher fitness to perform crossover and mutation operations. Through the crossover operation, combine some genes of two individuals with higher fitness to generate new individuals. Through the mutation operation, introduce random changes to increase the diversity of the population and generate a new population:
[0144] Nnew=Crossover(Nselected)+Mutation(Nselected);
[0145] Among them, N new is the newly generated population, N selected The individuals with higher fitness are selected, Crossover and Mutation are crossover and mutation operations respectively;
[0146] S64, repeat steps S62 and S63 until the predetermined evolutionary generation G is reached or the stopping condition is met, and finally the neural network individual N with the highest fitness is selected. best As the optimized model;
[0147] S65, the optimized model N best For the final training:
[0148]
[0149] Among them, θ best are the optimized model parameters, is the loss function, N best Y RNN ; θ is the optimized model with parameter θ for the input feature representation Y RNN The predicted output.
[0150] In this implementation manner, the S7 specifically includes:
[0151] S71, the optimized model N best and feature representation Y RNN As input, construct a variational Bayesian validation model and initialize the variational parameters φ and λ, denoted as q φ (Z)≈p(Z|Y RNN ), the variational Bayesian validation model introduces variational inference techniques to approximate the posterior distribution q φ The relationship between (Z) and the prior distribution p(Z) is used to dynamically adjust the model's predictive distribution during the validation process;
[0152] S72. Calculate the variational lower bound of the model:
[0153]
[0154] Among them, p(Y true |z) is the likelihood function, qφ (Z) is the variational posterior distribution, p(Z) is the prior distribution, and D KL is the Kullback-Leibler divergence;
[0155] S73. Use the stochastic gradient descent method to optimize the variational parameter φ and the model parameter θ. By maximizing the variational lower bound and adjusting the variational parameter and the model parameter, the model's prediction ability on the validation data is optimized:
[0156]
[0157] Among them, φ is the variational parameter, θ is the model parameter;
[0158] S74. Calculate the predicted distribution of the validation set based on the optimized variational parameter φ and model parameter θ:
[0159] p(Yval|Y RNN )=∫p(Yval|Z)qφ(Z)dZ;
[0160] Among them, p(Y val |Y RNN ) is the label of the validation set, p(Y val |Z) is the conditional probability distribution;
[0161] S75. Evaluate the verification results. Adjust the model parameters θ and variational parameters φ based on the verification results to minimize the verification error. The verification results are evaluated by comparing the error between the predicted distribution and the verification set label, dynamically adjusting the model parameters and variational parameters, and ultimately optimizing the prediction performance of the model.
[0162] In this implementation manner, S8 specifically includes:
[0163] S81, the optimized model N best and feature representation Y RNN As input, build an adversarial evaluation model;
[0164] S82. Generate adversarial sample X adv , by adding small perturbations to change the input data, and by calculating the gradient information of the input data, the adversarial sample makes slight adjustments based on the original data:
[0165]
[0166] Among them, X is the original input data, ∈ is the anti-disturbance coefficient, is the gradient of the loss function with respect to the input data, Y true is the true label;
[0167] S83. Use the generated adversarial sample X advPerform model evaluation to quantify the model's performance in the face of perturbed data by calculating the proportion of correct predictions made by the model on adversarial examples:
[0168]
[0169] Where N is the number of adversarial samples, I is the indicator function, which takes the value of 1 when the prediction result is consistent with the true label, otherwise it is 0;
[0170] S84. Based on the adversarial evaluation results, adjust the model parameters θ and training strategy, and retrain the model:
[0171]
[0172] Among them, L adv is the loss function on adversarial samples;
[0173] S85. By continuously generating adversarial samples and adjusting model parameters, the model is iteratively optimized to achieve optimal performance on adversarial samples. Through multiple iterations, adversarial sample generation and model parameter optimization are performed alternately to optimize the performance of the model on adversarial samples.
[0174] Embodiment 1:
[0175] In order to verify the feasibility of the present invention in implementation, the present invention is applied to a city where the scale of the electric vehicle charging pile network is gradually expanding, but the accuracy and stability of the power consumption prediction has always been a headache for the management department. Especially during peak electricity consumption periods and holidays, the charging demand fluctuates greatly, and the deviation of the power consumption prediction leads to difficulties in grid load management, and even power supply shortages in local areas. Therefore, improving the accuracy and reliability of the charging pile power consumption prediction is of great significance for optimizing grid scheduling, reducing charging waiting time, and improving user experience.
[0176] The electric vehicle charging pile power consumption prediction method based on improved deep learning proposed in this invention is applied to the main charging pile network in the city to solve the defects of the existing technology in prediction. The historical power consumption data, weather data (including temperature, humidity, precipitation, etc.), time characteristics (such as hours, weeks, months) and special events (such as holidays, major events) of the main charging piles in the city are collected. The collected data is preprocessed, including data cleaning, outlier processing and normalization, to generate preprocessed data.
[0177] The preprocessed data is initially extracted and processed using a dynamic sparsely connected network and a deep pseudo-label generator with self-supervised learning. DSCN extracts long-term dependencies and local features in the data by dynamically adjusting the network structure, while SSDPLG generates deep pseudo-labels through self-supervised learning, further enriching the feature representation.
[0178] Based on the preliminary feature extraction, the variational information bottleneck mechanism is introduced to optimize the preliminary prediction results and generate optimized feature representations through the optimal balance between information compression and feature extraction. In this process, the mean and variance of the preliminary prediction results are calculated and standard normal distribution noise is introduced to ensure that the model can effectively capture key features and avoid information loss.
[0179] The improved tensor fusion network is used to fuse the optimized feature representation with the preprocessed data and feature data set. By introducing high-order feature interaction and dynamic weight adjustment mechanism, multi-source data is fused into feature representation to achieve deep data fusion and feature extraction. High-order feature interaction enriches the feature expression capability, and dynamic weight adjustment ensures the adaptability of the model under different data distributions.
[0180] The fused high-dimensional tensor is trained using a neuroevolutionary strategy optimization algorithm. The evolutionary algorithm simulates the natural selection process, continuously optimizes the neural network structure and parameters, and generates an optimization model with superior performance. During the training process, the optimization model introduces diversity and randomness through crossover and mutation operations, effectively improving the generalization ability of the model.
[0181] In order to verify the effect of the model, the variational Bayesian verification method is introduced. Through the principle of Bayesian reasoning, the distribution of the verification set is dynamically adjusted so that the verification process can reflect the performance of the model on unknown data. The variational Bayesian verification maximizes the variational lower bound and optimizes the variational parameters and model parameters to ensure the stability and reliability of the model on different data sets.
[0182] The adversarial evaluation mechanism is used to evaluate the robustness and anti-interference ability of the model by generating adversarial samples. The adversarial samples are generated by adding small perturbations, the robustness index of the model on the adversarial samples is calculated, and the model parameters and training strategies are adjusted based on the evaluation results to further optimize the robustness of the model.
[0183] A one-year experiment was conducted on the city's main charging pile network from June 2023 to June 2024 to verify the effectiveness of the present invention. Data collection: Data from 500 charging piles in the city, covering a variety of situations including weekdays, weekends, and holidays. Weather data is obtained from the local meteorological bureau, and time characteristics and special events are provided by relevant departments. At the beginning of the experiment, the mean square error (MSE) of the traditional prediction method was 125.8, the root mean square error (RMSE) was 11.2, and the mean absolute error (MAE) was 8.4. After applying the method of the present invention, the model was optimized after several iterations. The following is the data performance at key time points:
[0184] September 2023: MSE dropped to 98.3, RMSE dropped to 9.9, and MAE dropped to 7.2.
[0185] December 2023: MSE further drops to 85.6, RMSE drops to 9.2, and MAE drops to 6.5.
[0186] March 2024: MSE reaches 72.4, RMSE drops to 8.5, and MAE drops to 5.8.
[0187] June 2024: MSE stabilizes at 65.7, RMSE drops to 7.8, and MAE drops to 5.1.
[0188] The robustness of the model on adversarial samples was evaluated through the adversarial evaluation mechanism. The results show that the prediction accuracy of the model on adversarial samples increased by 15%, showing strong anti-interference ability. The introduction of the variational Bayesian verification method makes the performance of the model more stable on different data sets, reduces the verification error by 20%, and makes the performance of the model more reliable in practical applications.
[0189] Table 1 Model prediction performance indicators at different time points before and after the experiment
[0190]
[0191] Table 2 Improvement effects of model optimization and verification
[0192] Time Adversarial sample prediction accuracy improvement Verification error reduction ratio September 2023 10% 10% December 2023 12% 15% March 2024 14% 18% June 2024 15% 20%
[0193] It can be seen from the above table that after applying the method of the present invention, the mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE) of the model all decreased significantly. Specifically, MSE dropped from 125.8 at the beginning of the experiment to 65.7 in June 2024, RMSE dropped from 11.2 to 7.8, and MAE dropped from 8.4 to 5.1. The significant decline in these indicators shows that the prediction accuracy of the model has been significantly improved. By introducing the adversarial evaluation mechanism and the variational Bayesian verification method, the adversarial sample prediction accuracy and verification error of the model have been significantly improved. Specifically, the adversarial sample prediction accuracy has gradually increased from 10% in September 2023 to 15% in June 2024, and the verification error reduction ratio has increased from 10% to 20%. This shows that the model shows higher robustness when facing perturbed data, and the verification process also more accurately reflects the performance of the model on unknown data.
[0194] The method of the present invention significantly improves the accuracy, stability and generalization ability of the prediction of electric vehicle charging pile power consumption. Compared with traditional methods, the present invention has achieved breakthroughs in many aspects, including improved prediction accuracy, enhanced robustness and optimized verification effect. Specifically, the MSE, RMSE and MAE have significantly decreased, indicating that the prediction accuracy of the model has been greatly improved; the prediction accuracy of adversarial samples has been significantly improved, indicating that the model is more stable and reliable when facing perturbed data; the reduction ratio of verification error has increased significantly, indicating that the model is more reliable in practical applications.
[0195] In summary, the present invention significantly improves the accuracy, stability and generalization ability of the prediction of electric energy consumption of electric vehicle charging piles, overcomes the defects of the prior art such as insufficient capture of long-term dependencies, limited feature extraction ability, difficulty in multi-source data fusion, model overfitting and single evaluation index, and has broad application prospects and practical value.
[0196] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A charging pile power consumption prediction method based on improved deep learning, characterized in that: The steps include: S1. Clean, process outliers and normalize the collected charging pile power consumption data to generate pre-processed data; S2, extracting and generating relevant features from the preprocessed data, including weather data, time features, and special events, to form a feature data set; S3. Using the generated feature data set, a hybrid deep learning model is constructed by improving deep learning, wherein the hybrid deep learning model combines a dynamic sparse connection network and a deep pseudo-label generator based on self-supervised learning to generate preliminary prediction results; S4. Introducing the variational information bottleneck mechanism into the hybrid deep learning model, by finding the best balance between information compression and feature extraction, the model can effectively capture key features, optimize the preliminary prediction results, and generate optimized feature representations; S5. Using an improved tensor fusion network, the optimized feature representation is combined with the preprocessed data and feature data set. By introducing high-order feature interaction and dynamic weight adjustment mechanism, deep fusion and feature extraction of data are achieved to obtain a new feature representation. S6. Use the neural evolution strategy optimization algorithm to train the new feature representation, optimize the neural network structure and parameters through the evolutionary algorithm, and generate an optimized model; S7. By introducing the variational Bayesian validation method, the optimized model is validated. Based on the principle of Bayesian reasoning, the distribution of the validation set is dynamically adjusted through variational inference, so that the validation process can reflect the performance of the model on unknown data; S8. Use an adversarial evaluation mechanism to evaluate the verified model. By generating adversarial samples, the robustness and anti-interference ability of the model are evaluated to optimize the reliability and accuracy of the prediction results in real applications.
2. The charging pile power consumption prediction method based on improved deep learning according to claim 1 is characterized in that: The S3 specifically includes: S31, feature data set X feat Input into the dynamic sparse connection network DSCN, the dynamic sparse connection network can capture the sparse features of the input data and generate a preliminary feature representation by dynamically adjusting the network structure: Among them, Y DSCN is the output of the dynamic sparse connection network, σ is the activation function, α i is the dynamic sparse connection coefficient, is the i-th sparse weight matrix, X feat (i) is the i-th part of the feature dataset, b DSCN is the bias term; S32, feature data set X feat The input is sent to the deep pseudo-label generator SSDPLG based on self-supervised learning. The deep pseudo-label generator based on self-supervised learning uses the self-supervised learning method to generate pseudo-labels, performs nonlinear transformation through the hyperbolic tangent activation function, and combines the self-supervised learning weight coefficient and parameter matrix to finally generate pseudo-labels for further feature representation: Among them, L pseudo is the generated pseudo label, tanh is the hyperbolic tangent activation function, β j is the self-supervised learning weight coefficient, is the jth self-supervised learning parameter matrix, γ j is the bias term, ∈ is the noise term; S33, using the fusion function, the output Y of the dynamic sparse connection network DSCN And the generated pseudo label L pseudo Fusion, combining the fusion weight coefficient and the high-order feature interaction coefficient, forms a new feature representation Z: Among them, ω is the fusion function, λ1 and λ2 are the fusion weight coefficients, δ k is the high-order feature interaction coefficient, ⊙ represents the element-wise product, (Y DSCN ⊙L pseudo ) k represents the kth high-order feature interaction term; S34, the fused feature representation Z is further extracted and processed to generate a preliminary prediction result 3. The charging pile power consumption prediction method based on improved deep learning according to claim 1 is characterized in that: The S4 specifically includes: S41. Generate preliminary prediction results Input into the variational information bottleneck layer to calculate the mean μ and variance λ of the preliminary prediction results: in, and Respectively represent the mean function and variance function of the preliminary prediction results, W μ and W λ is the weight matrix, b μ and b λ is the bias term; S42. Based on the calculated mean and variance, by introducing standard normal distribution noise ∈, the variational information bottleneck layer can generate output with a certain degree of randomness. The output of the variational information bottleneck layer is calculated. in, represents the output of the variational information bottleneck layer, ∈ is the standard normal distribution noise; S43. Calculate the loss function L of the variational information bottleneck layer VIB , combining the reconstruction loss and the Kullback-Leibler divergence: Among them, L recon is the reconstruction loss, β is the weight parameter, D KL is the Kullback-Leibler divergence, is the variational posterior distribution, p(Z) is the prior distribution; S44, according to the output of the variational information bottleneck layer In the loss function L VIB Under the optimization of , through further feature extraction and processing, the optimized feature representation Y is generated VIB .
4. The charging pile power consumption prediction method based on improved deep learning according to claim 1 is characterized in that: The S5 specifically includes: S51. Using the improved tensor fusion network, the optimized feature representation Y VIB , preprocessed data X and feature dataset X feat Perform fused tensor calculations: Where T is the fused tensor, is the fusion weight matrix, X (j) and are the i-th, j-th and k-th parts of the optimized feature representation, preprocessed data and feature dataset, respectively; S52. Perform high-order feature interaction on the fused tensor T to generate interactive feature representation Z interaction : Among them, Z interaction is the interactive feature representation, σ is the activation function, δ k is the high-order feature interaction coefficient, (T⊙T) k is the kth element-wise product, b interaction is the bias term; S53, the interactive feature is represented by Z interaction The adjusted feature representation Z is obtained by dynamic weight adjustment adjusted , the dynamic weight adjustment mechanism adjusts the weight of feature representation in real time according to the dynamic changes of input data: Among them, Z adjusted is the adjusted feature representation, ω is the dynamic weight adjustment function, λ l To adjust the weight coefficient, is the lth part of the interactive feature representation, b adjustment is the bias term; S54, use the recurrent neural network to represent the adjusted feature Z adjusted Extract time series features, capture the time dependency and dynamic change rules of data, and generate new feature representation Y RNN .
5. The charging pile power consumption prediction method based on improved deep learning according to claim 1 is characterized in that: The S6 specifically includes: S61, the generated new feature represents Y RNN Input into the neural evolution strategy optimization algorithm to initialize the neural network individuals in the population, represented as {N i }, where i = 1, 2, ..., P, P is the population size. The neural evolution strategy optimization algorithm initializes a population of P neural network individuals by simulating the natural evolution process. Each individual N i Represents a different neural network structure and parameter settings; S62. For each neural network individual N i Evaluation is performed by calculating the prediction error of each individual on a given feature representation, measuring its performance on a specific task, and calculating its fitness f(N i ): f(N i )=L(N i (Y RNN ),Y true ); Among them, L is the loss function, N i (Y RNN ) is the neural network individual N i Represent the input feature Y RNN The predicted output, Y true is the true label; S63, according to the fitness value f(N i ) Select several neural network individuals with higher fitness to perform crossover and mutation operations. Through the crossover operation, combine some genes of two individuals with higher fitness to generate new individuals. Through the mutation operation, introduce random changes to increase the diversity of the population and generate a new population: N new =Crossover(N selected )+Mutation(N selected ); Among them, N new is the newly generated population, N selected The individuals with higher fitness are selected, Crossover and Mutation are crossover and mutation operations respectively; S64, repeat steps S62 and S63 until the predetermined evolutionary generation G is reached or the stopping condition is met, and finally the neural network individual N with the highest fitness is selected. best As the optimized model; S65. The neural network individual N with the highest fitness best For the final training: Among them, θ best are the optimized model parameters, is the loss function, N best (Y RNN ; θ) is the optimized model with parameter θ for the input feature representation Y RNN The predicted output.
6. The charging pile power consumption prediction method based on improved deep learning according to claim 1 is characterized in that: The S7 specifically includes: S71, the optimized model N best and feature representation Y RNN As input, construct a variational Bayesian validation model and initialize the variational parameter φ, denoted as q φ (Z)≈p(Z|Y RNN ), the variational Bayesian validation model introduces variational inference techniques to approximate the posterior distribution q φ The relationship between (Z) and the prior distribution p(Z) is used to dynamically adjust the model's predictive distribution during the validation process; S72. Calculate the variational lower bound of the model: Among them, p(Y true |z) is the likelihood function, q φ (Z) is the variational posterior distribution, p(Z) is the prior distribution, and D KL is the Kullback-Leibler divergence; S73. Use the stochastic gradient descent method to optimize the variational parameter φ and the model parameter θ. By maximizing the variational lower bound and adjusting the variational parameter and the model parameter, the model's prediction ability on the validation data is optimized: Among them, φ is the variational parameter, θ is the model parameter; S74. Calculate the predicted distribution of the validation set based on the optimized variational parameter φ and model parameter θ: p(Y val |Y RNN )=∫p(Y val |Z)q φ (Z)dZ; Among them, p(Y val |Y RNN ) is the label of the validation set, p(Y val |Z) is the conditional probability distribution; S75. Evaluate the verification results. Adjust the model parameters θ and variational parameters φ based on the verification results to minimize the verification error. The verification results are evaluated by comparing the error between the predicted distribution and the verification set label, dynamically adjusting the model parameters and variational parameters, and ultimately optimizing the prediction performance of the model.
7. The charging pile power consumption prediction method based on improved deep learning according to claim 1 is characterized in that: The S8 specifically includes: S81, the optimized model N best and feature representation Y RNN As input, build an adversarial evaluation model; S82. Generate adversarial sample X adv , by adding small perturbations to change the input data, and by calculating the gradient information of the input data, the adversarial sample makes slight adjustments based on the original data: Among them, X is the original input data, ∈ is the anti-disturbance coefficient, is the gradient of the loss function with respect to the input data, Y true is the true label; S83. Use the generated adversarial sample X adv Perform model evaluation to quantify the model's performance in the face of perturbed data by calculating the proportion of correct predictions made by the model on adversarial examples: Where N is the number of adversarial samples, I is the indicator function, which takes the value of 1 when the prediction result is consistent with the true label, otherwise it is 0; S84. Based on the adversarial evaluation results, adjust the model parameters θ and training strategy, and retrain the model: Among them, L adv is the loss function on adversarial samples; S85. By continuously generating adversarial samples and adjusting model parameters, the model is iteratively optimized to achieve optimal performance on adversarial samples. Through multiple iterations, adversarial sample generation and model parameter optimization are performed alternately to optimize the performance of the model on adversarial samples.
Citation Information
Patent Citations
Household user short-term load prediction method based on load decomposition technology
CN111009893A
SAR image change detection method based on sparse representation and capsule network
CN112270285A