Charging pile load prediction and power grid bearing capacity analysis method and related device

By preprocessing charging pile power data and optimizing model hyperparameters, combined with gated cyclic unit networks and graph attention networks, the accuracy and transparency issues of charging pile load prediction are solved, enabling accurate assessment of grid carrying capacity and improving the safety and economy of grid operation.

CN121457701APending Publication Date: 2026-02-03STATE GRID CHONGQING ELECTRIC POWER COMPANY MARKETING SERVICE CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511573939.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing technologies for charging pile load forecasting have low accuracy and lack transparent interpretation, affecting the safety and economy of power grid operation.

Method used

By performing seasonal analysis, outlier handling, and normalization on the raw charging pile power data, the hyperparameters of the prediction model are tuned using human evolutionary optimization algorithms, and a gated recurrent unit network is used for prediction. Subsequently, a graph attention network is used for interpretation, and finally, the grid carrying capacity is evaluated.

Benefits of technology

It improves the accuracy and interpretability of charging pile load forecasting, enables accurate assessment of grid carrying capacity, and enhances the safety and economy of grid operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121457701A_ABST
    Figure CN121457701A_ABST
Patent Text Reader

Abstract

The invention discloses a charging pile load prediction and power grid bearing capacity analysis method and a related device, and relates to the technical field of charging piles, and the method comprises the steps: carrying out the preprocessing of original charging pile power data; inputting the preprocessed power data of the charging pile and preset feature data into a trained prediction model, so as to predict the power of the charging pile through the prediction model; wherein hyper-parameters in the prediction model are adjusted and optimized through a preset human evolutionary optimization algorithm in the process of training the prediction model; performing post-processing interpretation on the prediction model according to the charging pile power predicted by the prediction model and the data input into the prediction model; determining the voltage amplitude of the power grid node according to the charging pile power predicted by the prediction model; and evaluating the power grid bearing capacity according to the voltage amplitude. According to the method, the accuracy and interpretability of charging pile load prediction can be improved, and the bearing capacity of a power grid can be accurately evaluated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of charging pile technology, and in particular to a method and related apparatus for predicting charging pile load and analyzing power grid carrying capacity. Background Technology

[0002] With the rapid development of electric vehicles and charging infrastructure, charging pile load forecasting is crucial for improving the safety, reliability, and economy of power grid operation. Accurate forecasting can help detect load fluctuation trends in advance, avoiding power outages or equipment damage caused by overload, thereby improving charging service quality and reducing operation and maintenance costs. However, related technologies suffer from low forecast accuracy and a lack of transparent explanation of the decision-making process in charging pile load forecasting. Therefore, improving the accuracy and interpretability of charging pile load forecasting has become a pressing technical problem for those skilled in the art. Summary of the Invention

[0003] The purpose of this application is to provide a method and related apparatus for predicting charging pile load and analyzing power grid carrying capacity, which can improve the accuracy and interpretability of charging pile load prediction and accurately assess the carrying capacity of the power grid.

[0004] To address the aforementioned technical problems, this application provides a method for predicting charging pile load and analyzing grid carrying capacity, comprising:

[0005] The raw charging pile power data is preprocessed; this preprocessing includes seasonal analysis, outlier handling, and normalization of the charging pile power data.

[0006] The preprocessed charging pile power data and preset feature data are input into the trained prediction model to predict the charging pile power; wherein, during the training of the prediction model, the hyperparameters in the prediction model are tuned using a preset human evolution optimization algorithm.

[0007] Based on the charging pile power predicted by the prediction model and the data input to the prediction model, the prediction model is post-processed and interpreted.

[0008] The voltage amplitude of the grid node is determined based on the charging pile power predicted by the prediction model.

[0009] The grid carrying capacity is assessed based on the voltage amplitude.

[0010] In some embodiments, seasonal analysis of raw charging pile power data includes:

[0011] Seasonal decomposition is performed on the original charging pile power data to determine the seasonal components, trend components, and residuals in the original charging pile power data;

[0012] The optimal trend component is determined based on the aforementioned trend components;

[0013] The residuals are decomposed using the empirical mode decomposition algorithm;

[0014] The weighted integration of the seasonal component, the optimal trend component, and the decomposition results of the residuals is performed.

[0015] In some embodiments, outlier processing of the raw charging pile power data includes:

[0016] Outliers in the original charging power data are detected using a local outlier factor algorithm.

[0017] The outlier values ​​are replaced with the average of a preset number of the original charging power data.

[0018] In some embodiments, tuning the hyperparameters of the prediction model using a preset human evolution optimization algorithm during the training of the prediction model includes:

[0019] Set the search range for the hyperparameters;

[0020] An initialization strategy based on heuristic center offset is adopted to generate an initial population for hyperparameters;

[0021] Under different combinations of hyperparameters, the prediction model is trained and its performance is evaluated; among them, the accuracy rate is selected to calculate the objective function value.

[0022] Compare individual fitness levels to determine whether to update the position or maintain the original position; specifically, during the human exploration phase, the individual's position is updated based on the Levy flight factor, the optimal exploration position, and the average position in the current population; during the human development phase, the proportion of different roles is dynamically adjusted based on the group fitness entropy.

[0023] Determine if the maximum number of iterations has been reached;

[0024] If the maximum number of iterations is reached, the optimal parameters will be returned.

[0025] In some embodiments, post-processing interpretation of the prediction model based on the predicted charging pile power and the data input to the prediction model includes:

[0026] The charging pile power predicted by the prediction model and the data input to the prediction model are mapped into a time graph;

[0027] A graph attention network is used to propagate attribution signals in the time graph to obtain a representation of node importance;

[0028] The graph neural network output is fused and corrected based on the node importance representation and attention weights.

[0029] Based on the correction results, an interpretation of each time step and feature is obtained.

[0030] In some embodiments, inputting preprocessed charging pile power data and preset feature data into a trained prediction model to predict the charging pile power through the prediction model includes:

[0031] The preprocessed charging pile power data, along with test time, temperature, humidity, geographical location characteristics, electricity price factors, and holiday and weekday characteristics, are input into the trained prediction model to predict the charging pile power; the prediction model is a gated cyclic unit.

[0032] In some embodiments, assessing the grid carrying capacity based on the voltage amplitude includes:

[0033] The voltage deviation index, voltage level compliance rate, voltage over-limit probability, and voltage over-limit risk of the power grid node are determined based on the voltage amplitude.

[0034] Determine the active power loss of the system;

[0035] The grid carrying capacity is determined based on the voltage deviation index, the voltage level compliance rate, the voltage over-limit probability, the voltage over-limit risk, and the system active power loss.

[0036] To address the aforementioned technical problems, this application also provides a charging pile load prediction and grid carrying capacity analysis device, comprising:

[0037] The preprocessing module is used to preprocess the raw charging pile power data; the preprocessing of the raw charging pile power data includes seasonal analysis, outlier handling and normalization.

[0038] The prediction module is used to input preprocessed charging pile power data and preset feature data into the trained prediction model, so as to predict the charging pile power through the prediction model; wherein, during the training of the prediction model, the hyperparameters in the prediction model are tuned through a preset human evolution optimization algorithm.

[0039] The post-processing interpretation module is used to perform post-processing interpretation on the prediction model based on the charging pile power predicted by the prediction model and the data input to the prediction model.

[0040] The voltage amplitude determination module is used to determine the voltage amplitude of the grid node based on the charging pile power predicted by the prediction model.

[0041] The power grid carrying capacity assessment module is used to assess the power grid carrying capacity based on the voltage amplitude.

[0042] To address the aforementioned technical problems, this application also provides an electronic device, comprising:

[0043] Memory, used to store computer programs;

[0044] A processor is used to execute the computer program to implement the steps of the charging pile load prediction and grid carrying capacity analysis method as described above.

[0045] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the charging pile load prediction and grid carrying capacity analysis method described above.

[0046] The charging pile load prediction and grid carrying capacity analysis method provided in this application includes: preprocessing the original charging pile power data; wherein, the preprocessing of the original charging pile power data includes seasonal analysis, outlier handling, and normalization of the charging pile power data; inputting the preprocessed charging pile power data and preset feature data into a trained prediction model to predict the charging pile power through the prediction model; wherein, during the training of the prediction model, the hyperparameters in the prediction model are tuned using a preset human evolutionary optimization algorithm; performing post-processing interpretation on the prediction model based on the charging pile power predicted by the prediction model and the data input to the prediction model; determining the voltage amplitude of the grid node based on the charging pile power predicted by the prediction model; and evaluating the grid carrying capacity based on the voltage amplitude.

[0047] As can be seen, the charging pile load prediction and grid carrying capacity analysis method provided in this application improves the stability and reliability of subsequent model predictions by performing seasonal analysis, outlier handling, and normalization on the original charging pile power data before making predictions based on the preprocessed data. Optimizing the hyperparameters of the prediction model using a preset human evolutionary optimization algorithm yields even better prediction results. Furthermore, the post-processing interpretation in this application makes the prediction results more transparent and credible, thereby improving the prediction accuracy and interpretability of the model. Finally, based on the predicted charging pile power, the grid carrying capacity can be accurately assessed.

[0048] The charging pile load prediction and power grid carrying capacity analysis device, equipment, and computer-readable storage medium provided in this application all have the aforementioned technical effects. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 A flowchart illustrating a method for predicting charging pile load and analyzing grid carrying capacity provided in an embodiment of this application;

[0051] Figure 2 This is a schematic diagram illustrating a hyperparameter optimization method provided in an embodiment of this application.

[0052] Figure 3 This is a schematic diagram of a prediction process provided in an embodiment of this application;

[0053] Figure 4 A schematic diagram of a charging pile load prediction and power grid carrying capacity analysis device provided in an embodiment of this application;

[0054] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0055] The core of this application is to provide a method, apparatus, equipment, and storage medium for predicting the load of charging piles, which can improve the accuracy and interpretability of charging pile load prediction.

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

[0057] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for predicting charging pile load and analyzing grid carrying capacity provided in an embodiment of this application. (Refer to...) Figure 1 As shown, the method includes:

[0058] S101: Preprocess the raw charging pile power data; the preprocessing of the raw charging pile power data includes seasonal analysis, outlier handling and normalization of the charging pile power data.

[0059] Charging pile power data is affected by various factors, exhibiting significant fluctuations and non-stationarity, which can impact the accuracy of charging pile load prediction, i.e., charging pile power prediction. Therefore, this application embodiment first performs preprocessing operations on the raw charging pile power data to improve the stability and reliability of subsequent model predictions. The preprocessing methods mainly include seasonality analysis, outlier handling, and normalization.

[0060] Seasonal analysis refers to the identification and analysis of periodic fluctuations in time series data, aiming to extract recurring seasonal patterns. Time series data is often influenced by seasonal factors, such as climate change, holiday effects, and fluctuations in market demand. Through seasonal analysis, time series data can be decomposed into multiple components (such as trend components, seasonal components, and residual components), thereby helping to better understand the long-term changes, periodic fluctuations, and random noise in the data.

[0061] In some embodiments, seasonal analysis of raw charging pile power data includes:

[0062] Seasonal decomposition is performed on the original charging pile power data to determine the seasonal components, trend components, and residuals in the original charging pile power data;

[0063] The optimal trend component is determined based on the aforementioned trend components;

[0064] The residuals are decomposed using the empirical mode decomposition algorithm;

[0065] The weighted integration of the seasonal component, the optimal trend component, and the decomposition results of the residuals is performed.

[0066] The seasonal analysis in this application mainly includes: seasonal decomposition, trend estimation, residual multiscale decomposition analysis, and reconstruction.

[0067] Seasonal decomposition: For each period, the STL (Seasonal and Trend decomposition using Loess) method can be used. Loess is applied to each time point t using a locally weighted regression to estimate the seasonal component. Removing seasonal components from the original charging pile power data yields a deseasonalized sequence, which facilitates subsequent trend estimation and residual multi-scale decomposition. The seasonal components extracted from the original charging pile power data can be represented as follows:

[0068] .

[0069] Where, x tThis is the original power data of the charging pile. It is a fixed, periodic, fluctuating seasonal component in the original charging pile power data. This refers to the trend components of long-term, overall data trends. This refers to the residuals that remain after removing seasonal and trend effects, which are irregular fluctuations or "noise".

[0070] Trend estimation: After removing seasonality, the trend component is modeled. The Hodrick-Prescott filter method can be used to fit the long-term trend changes, as shown below:

[0071] .

[0072] in, This indicates that by optimizing the calculation, we can find the optimal trend sequence T that minimizes the value of the entire expression within the square brackets.

[0073] Residual multi-scale decomposition analysis: After removing seasonal and trend components from the original charging pile power data, the residuals are obtained. It may still contain high-frequency fluctuations or structural changes. To further reveal potential information, embodiments of this application employ EMD (Empirical Mode Decomposition) to perform multi-scale decomposition of the residuals, extracting perturbations of different frequencies to improve the interpretability of the residuals, as specifically shown below:

[0074] .

[0075] in, It is the i-th intrinsic mode function. It is a residual trend.

[0076] Reconstruction: The components (seasonal components, trend components, residuals) are reconstructed to obtain a smooth estimated sequence that retains the main features. During the reconstruction process, a weighting mechanism is introduced to assign different importance weights to different components to adapt to the objectives of different scenarios, as shown below:

[0077] .

[0078] in, These are importance weights, and the values ​​of each importance weight can be: , , .

[0079] This application's embodiments, based on STL decomposition, integrate residual multi-scale decomposition analysis and a weighted reconstruction strategy. Seasonal components in the time series are extracted using the Loess method, trend changes are modeled using Hodrick-Prescott filtering, and multi-scale decomposition analysis is performed on the residuals to reveal hidden high-frequency information. Finally, by weighted integration of the components, a more stable, flexible, and interpretable time series structure is reconstructed. This method exhibits strong adaptability and robustness, and is suitable for handling complex nonlinear seasonality and variable trend patterns.

[0080] In charging pile power prediction, outliers may affect the training and prediction of the model. Therefore, in order to avoid the impact of outliers on the training and prediction of the model, it is necessary to identify and handle these outliers.

[0081] In some embodiments, outlier processing of the raw charging pile power data includes:

[0082] Outliers in the original charging power data are detected using a local outlier factor algorithm.

[0083] The outlier values ​​are replaced with the average of a preset number of the original charging power data.

[0084] Local Outlier Factor (LOF) is a density-based outlier detection method used to identify relatively sparse points in data whose density differs significantly from that of their neighbors. In this embodiment, after detecting outliers using the LOF algorithm, a strategy of replacing outliers with the mean is employed.

[0085] The Local Outlier Factor (LOF) algorithm identifies outliers by comparing the local density differences between each data point and its neighbors. If the local density of a data point is significantly lower than that of its neighbors, then that data point may be an outlier. Outlier handling using the Local Outlier Factor algorithm mainly includes: selecting the number of neighbors, calculating the LOF value, identifying outliers, and replacing outliers.

[0086] Choosing the number of neighbors: The choice of the number of neighbors k has a significant impact on the result. The optimal value of the number of neighbors k can be determined by rules of thumb.

[0087] LOF value calculation: To calculate the LOF value for each data point, the k-distance, reachability distance, local reachability density (LRCD), and local outlier factor (LOF) need to be calculated. The specific formulas are as follows:

[0088] .

[0089] in, Let p be the local reachability density of the data point. This represents the k nearest neighbors of data point p.

[0090] Outlier identification: If LOF(p) ≈ 1, it means that the density of data point p is similar to that of its neighbors, i.e., data point p is not an outlier. If LOF(p) > 1, it means that the density of data point p is significantly lower than that of its neighbors, and it may be an outlier. If LOF(p) < 1, it means that the density of data point p is higher than that of its neighbors, usually a dense region. A threshold of 1.5 can be set; if LOP(p) > 1.5, then data point p is considered an outlier. Outliers are marked with "1", and normal points are marked with "0".

[0091] Replace outliers: Replace outliers with the mean. The calculation formula is as follows:

[0092] .

[0093] in, The total length of the data. This represents the original observed power of the charging pile at time point t.

[0094] The dimensions and units of various data or evaluation indicators are not entirely the same, which greatly affects data processing and analysis. To solve this problem, this application uses data normalization to eliminate the adverse effects of different dimensions or outlier sample data. Furthermore, data normalization can simplify computational complexity and accelerate program convergence. Typically, min-max deviation normalization is used to summarize and unify the statistical distribution of samples, mapping the original charging pile power data to numbers within the range of 0 to 1 or -1 to 1. The specific transformation function is shown below:

[0095] .

[0096] in, Let i = 1, 2, 3, ..., n, X represent the sample sequence, n represent the sample size, min represent the minimum value in the data, and max represent the maximum value in the data.

[0097] S102: Input the preprocessed charging pile power data and preset feature data into the trained prediction model to predict the charging pile power through the prediction model; wherein, during the training of the prediction model, the hyperparameters in the prediction model are tuned through a human evolutionary optimization algorithm.

[0098] The embodiments of this application use neural networks to predict the power of charging piles.

[0099] In some embodiments, inputting preprocessed charging pile power data and preset feature data into a trained prediction model to predict the charging pile power through the prediction model includes:

[0100] The preprocessed charging pile power data, along with test time, temperature, humidity, geographical location characteristics, electricity price factors, and holiday and weekday characteristics, are input into the trained prediction model to predict the charging pile power; the prediction model is a gated cyclic unit.

[0101] The prediction model is a GRU (Gated Recurrent Unit) network. GRU is a variant of recurrent neural network (RNN) designed to alleviate the vanishing or exploding gradient problems encountered by traditional RNNs in long-term sequence modeling, and is a simplified version of LSTM (Long Short-Term Memory). By introducing a gating mechanism, GRU can efficiently capture long-term dependencies in sequence data while reducing computational complexity. Compared to LSTM, GRU has a simpler structure, without a separate memory unit, and does not require forget gates and input gates like LSTM. GRU's simple design makes it more efficient than LSTM in some tasks. GRU has low computational cost and fast training speed, yet achieves performance comparable to LSTM.

[0102] The main components of GRU include:

[0103] Update Gate: Determines how much long-term memory from the previous step should be retained in the current state, and how much new information from the current time step should be added.

[0104] Reset Gate: The reset gate controls how much information is discarded from the previous state.

[0105] State Update: GRU uses these two gating mechanisms to compute the new hidden state, which is a weighted combination of the previous hidden state and the current input information.

[0106] The input data for the prediction model includes: raw charging pile power data (after seasonal analysis, outlier detection and processing, and normalization), test time (normalized), temperature (normalized), humidity (normalized), geographical location characteristics (normalized), electricity price factors (normalized), and holiday and weekday characteristics (normalized).

[0107] To improve the performance of the prediction model, the hyperparameters in the prediction model are tuned using a preset human evolution optimization algorithm during the training process.

[0108] The preset human evolutionary optimization algorithm is IHEO (Improved Human Evolutionary Optimization Algorithm). This improved algorithm automatically tunes the hyperparameters (hidden layer dimension, learning rate, dropout rate, and batch size) of the GRU model. This method comprehensively simulates individual evolution, adaptive mutation, and the process of survival of the fittest, enhancing the ability to search for the globally optimal hyperparameter combination, resulting in more stable model training and stronger generalization ability.

[0109] In some embodiments, tuning the hyperparameters in the prediction model using a preset human evolution optimization algorithm includes:

[0110] Set the search range for the hyperparameters;

[0111] An initialization strategy based on heuristic center offset is adopted to generate an initial population for hyperparameters;

[0112] Under different combinations of hyperparameters, the prediction model is trained and its performance is evaluated; among them, the accuracy rate is selected to calculate the objective function value.

[0113] Compare individual fitness levels to determine whether to update the position or maintain the original position; specifically, during the human exploration phase, the individual's position is updated based on the Levy flight factor, the optimal exploration position, and the average position in the current population; during the human development phase, the proportion of different roles is dynamically adjusted based on the group fitness entropy.

[0114] Determine if the maximum number of iterations has been reached;

[0115] If the maximum number of iterations is reached, the optimal parameters will be returned.

[0116] The Human Evolutionary Optimization Algorithm (HEOA) is a metaheuristic algorithm inspired by human evolution. This algorithm simulates human exploration and development behavior within a group to solve optimization problems, exhibiting good performance in both local and global searches.

[0117] The core of HEOA lies in how it handles four different roles within the human population. The algorithm is mainly divided into three phases: population initialization, human exploration, and human development.

[0118] This application's embodiments improve upon the Human Evolutionary Optimization (HEOA) algorithm. First, in the initialization phase, HEOA uses a Logistic chaotic mapping to generate the initial population. This embodiment enhances population diversity by simulating chaotic behavior, thereby reducing the risk of getting trapped in local optima. However, this method relies entirely on random mechanisms and fails to effectively utilize potential prior knowledge or search space structural features, potentially leading to low efficiency and slow convergence in the early stages of the search in some problems. Therefore, this application's embodiments introduce an initialization strategy based on heuristic-biased initialization. This strategy assumes that in optimization problems, optimal solutions are often concentrated in certain regions of the search space (such as the geometric center or near empirical solutions). Therefore, the improved HEOA uses the geometric center of the search space as a heuristic "preference region" and generates initial individuals around it through controlled perturbations. This approach balances global randomness and local guidance, helping to accelerate the early convergence process and improve overall search efficiency.

[0119] Secondly, during the exploration phase, HEOA employs the classic Levy flight and jump perturbation strategy to expand the search range. However, this strategy lacks guidance in the search direction, which may cause some individuals to deviate from the potential solution domain. To enhance search direction control, this application proposes a direction-guided Levy flight strategy. This strategy integrates the directional information of the current individual relative to the optimal individual and the population average position, guiding the Levy distribution to make biased jumps, thereby improving the convergence and stability of the search while maintaining global search capability.

[0120] Finally, during the development phase, HEOA designed different search behaviors by statically dividing roles (leader, explorer, follower, loser). However, this fixed-ratio division may not adapt to dynamically changing search needs in different problems or at different evolutionary stages. Therefore, this application introduces a dynamic role division mechanism based on fitness fluctuations. This mechanism dynamically adjusts the role distribution ratio according to the standard deviation of population fitness: when population differences are large, the proportion of explorer roles is increased to enhance diversity; while when the population gradually converges, the proportion of leader and follower roles is increased to accelerate local optimization. This mechanism can enhance the algorithm's adaptability at different stages and help to more efficiently approach the optimal solution.

[0121] Therefore, the improved human evolution optimization algorithm proposed in this application is as follows:

[0122] Group initialization:

[0123] Introducing an initialization strategy based on heuristic center offset:

[0124] .

[0125] in, This represents the 0th generation of the initial individual i. 'ub' represents the center of the search space, 'lb' represents the upper bound of the variable's value, and 'lb' represents the lower bound of the variable's value. To be from the interval Random numbers sampled in the middle are used to control the perturbation range.

[0126] Human exploration phase:

[0127] At various stages of human development, when faced with unknown territories and limited knowledge, individuals adopt a unified search strategy, which can be represented as:

[0128] .

[0129] in, Control the overall step size; w1 and w2 are the weights. For example, it is advisable =0.6, =0.4, balancing guidance and global information; For Levy flight factor, Let 1.5 be the value; t represents the current iteration number. Indicates the current position. Indicates the location of subsequent updates. For the best location to explore, Represents the average position within the current population, denoted as .

[0130] Stages of human development:

[0131] At various stages of human development, human society can be divided into four distinct roles: leaders, explorers, followers, and losers.

[0132] The proportion of different roles is dynamically adjusted by using the group fitness entropy.

[0133] .

[0134] .

[0135] .

[0136] in, The value of the model performance evaluation index is calculated on the validation set after training the model with hyperparameters representing the i-th individual. This represents the average value of the model performance evaluation metrics; Indicates the standard deviation of fitness; , , and respectively represent the proportions of leaders, explorers, followers, and losers is the maximum value of the fitness standard deviation, and clip restricts the value to a reasonable range, i.e., clip(x, a, b), taking a when x b.

[0137] Leader: Usually located in the best areas. In the experiments conducted, it begins to explore superior areas of human development, and the exploration process is expressed as:

[0138] .

[0139] represents a random number that follows a normal distribution The function generates a row vector containing elements, where each element is set to 1 and dim = 4. R is a random number within the range [0, 1], representing the complexity of the situation related to the leader. A represents the evaluation value of the situation. For example, the value of A can be 0.6. decreases as the development progresses, expressed as:

[0140] .

[0141] where is the maximum number of iterations of the algorithm

[0142] Explorer: Plays a crucial role in exploring unknown areas to discover the global optimal solution. The exploration process is expressed as:

[0143] .

[0144] where represents a random number that follows a normal distribution represents the least fit position in the i-th iteration

[0145] Follower: Adheres to the guidance of the most adaptable leader and follows in their footsteps. The exploration process is expressed as:

[0146] .

[0147] where represents the position of the most adaptable individual in the population at the t-th iteration. Rd represents a random number within the range [1, dim], dim = 4 .

[0148] Loser: Someone who cannot adapt well and remains in the population. The non - adaptable losers will be eliminated, and the population will be replenished by reproduction in areas suitable for human development. The replenishment process is expressed as:

[0149] .

[0150] Optimizing the learning rate, number of hidden units, and number of GRU layers using IHEO can automatically find the optimal combination of hyperparameters, allowing the GRU to better adapt to specific tasks, reducing the risk of overfitting or underfitting, and improving generalization ability. The optimized GRU typically performs more stably in more complex tasks and has better robustness to data noise and variations.

[0151] refer to Figure 2 As shown, the process of optimizing GRU hyperparameters using IHEO includes:

[0152] Set the search range. Set reasonable search ranges for the hyperparameters to be optimized: hidden layer dimension, learning rate, dropout rate, and batch size. Hidden layer dimension should be between 32 and 512, learning rate between 0.0001 and 0.1, dropout rate between 0.1 and 0.5, and batch size between 16 and 128.

[0153] Generate an initial population with the learning rate, number of hidden units, and number of GRU layers.

[0154] Evaluate the objective function. For each combination of hyperparameters, train the GRU model and evaluate its performance, selecting the accuracy to calculate the objective function value.

[0155] Compare the fitness values ​​of each person. By comparing the fitness values, decide whether to update the position or maintain the original position.

[0156] Determine if the maximum number of iterations has been reached. If the maximum number of iterations has been reached, return the optimal parameters. If the requirement has not been met, return to the step of comparing the fitness values ​​of the participants.

[0157] refer to Figure 3 As shown, the prediction process includes:

[0158] The raw charging pile power data is preprocessed to improve the model's ability to learn power features and its prediction accuracy. Seasonal analysis identifies periodic fluctuations in power over time, helping the model better capture trends and recurring patterns in the data, thus periodically correcting power prediction results. Simultaneously, outlier detection and processing are performed to remove or repair abrupt changes and invalid data caused by equipment failures, communication interruptions, or extreme events, ensuring data quality stability. To further eliminate differences in the order of magnitude between feature dimensions, normalization is used to map all input features to a uniform numerical range, avoiding bias in model training caused by feature scale.

[0159] After data preprocessing, the data is input into a gated recurrent unit (GRU) neural network. The GRU can efficiently model short- and long-term dependencies in time series data. By memorizing and updating historical power data and related external features (such as temperature and humidity), it can predict future charging pile power. This model can not only capture the dynamic evolution of power over time but also accurately reflect changes in electricity demand under different scenarios.

[0160] An improved human evolutionary optimization algorithm is used to automatically tune the hyperparameters (hidden layer dimension, learning rate, dropout rate, and batch size) of the GRU. By comprehensively simulating individual evolution, adaptive mutation, and the winner selection process, the algorithm enhances the ability to search for the globally optimal combination of hyperparameters, resulting in more stable model training and stronger generalization ability.

[0161] S103: Based on the charging pile power predicted by the prediction model and the data input to the prediction model, perform post-processing interpretation on the prediction model.

[0162] This application's embodiments aim to provide post-hoc explanation. Post-hoc explanation is an explanatory method that reveals the decision-making basis of a machine learning model by analyzing its behavior and output results after the model has been trained. Post-hoc explanation can help researchers and users better understand how the model uses input features to make predictions, thereby improving its transparency and credibility.

[0163] In some embodiments, post-processing interpretation of the prediction model based on the predicted charging pile power and the data input to the prediction model includes:

[0164] The charging pile power predicted by the prediction model and the data input to the prediction model are mapped into a time graph;

[0165] A graph attention network is used to propagate attribution signals in the time graph to obtain a representation of node importance;

[0166] The graph neural network output is fused and corrected based on the node importance representation and attention weights.

[0167] Based on the correction results, an interpretation of each time step and feature is obtained.

[0168] To enhance the interpretability of the model, this application introduces the CTG-SHAP (Causal Time-aware Graph SHAP) post-processing interpretation method. This method integrates causal inference, temporal graph modeling, and attention mechanism guidance, enabling a structured interpretation of the prediction results. By constructing time series graphs and causal dependency graphs, CTG-SHAP can identify the dependencies and temporal transmission paths between input features (such as time, temperature, electricity price, etc.), and, combined with the model's internal attention mechanism, evaluate and attribute the marginal contribution of the input features at each time step.

[0169] Finally, by visualizing the feature importance scores calculated by CTG-SHAP, we can intuitively present the degree of influence of different features (such as historical power, weather, electricity price, holidays, etc.) on power prediction in different time periods, which helps to understand the prediction logic and key decision factors of the model and improve the transparency and credibility of the model.

[0170] CTG-SHAP is a novel feature attribution method for interpreting time series models. It combines causal reasoning, graph structure modeling, and attention-guided mechanisms to improve the credibility, structure, and time sensitivity of the interpretation.

[0171] The main steps of CTG-SHAP include: constructing a time graph structure, establishing causal combinations, graph propagation, and aggregate interpretation.

[0172] Constructing a time graph structure:

[0173] The input time series data and prediction results of the prediction model are mapped to a graph structure: each time step or feature is a graph node, and temporal adjacency, feature correlation, or GRU hidden states are used as edges to connect them. The graph is notated as follows:

[0174] .

[0175] in, Represents the feature nodes at all time steps. Represents the temporal and feature-dependent edge set.

[0176] Constructing causal feature combinations:

[0177] Generating feature causal graphs using the PC algorithm for causal discovery This constrains node combinations to a causal feasible set to avoid generating logically contradictory combinations. It also involves constructing feature subset combinations. Each combination It satisfies the causal graph constraints. Subsequent calculations involve traversing and evaluating combinations of feature subsets.

[0178] Graph neural networks propagate attribution information:

[0179] Using a graph attention network (GAT) on a time graph Attribution signal propagation is performed to form a node importance representation. :

[0180] .

[0181] Where 𝑋 is the input feature sequence tensor.

[0182] Attention-guided correction:

[0183] Introducing attention weights into the model The GNN output is then fused and corrected.

[0184] .

[0185] in, The fusion factor represents the weight balance between structural attribution and native attention. Since the model does not incorporate attention, it is set to... =1, Let represent the importance of the i-th node.

[0186] Normalization and aggregation explanation:

[0187] The normalized SHAP value is This yields the final interpretation of each time step and feature:

[0188] .

[0189] Where f(x) is the prediction result of GRU, This represents the average prediction result of the GRU model across the entire training dataset. Let represent the marginal contribution of feature i after attribution in the time context, and M be the total number of nodes.

[0190] S104: Determine the voltage amplitude of the grid node based on the charging pile power predicted by the prediction model;

[0191] S105: Assess the grid carrying capacity based on the voltage amplitude.

[0192] In some embodiments, assessing the grid carrying capacity based on the voltage amplitude includes:

[0193] The voltage deviation index, voltage level compliance rate, voltage over-limit probability, and voltage over-limit risk of the power grid node are determined based on the voltage amplitude.

[0194] Determine the active power loss of the system;

[0195] The grid carrying capacity is determined based on the voltage deviation index, the voltage level compliance rate, the voltage over-limit probability, the voltage over-limit risk, and the system active power loss.

[0196] The grid nodes where the charging piles are connected are obtained, and probabilistic power flow calculations are performed on the grid, as shown below:

[0197] .

[0198] Among them, P Gi and Q Gi P represents the base active and reactive power injected into node i. Di and Q Di Let P be the active and reactive loads of node i. EVi V represents the power of the charging pile access node i, and V represents the predicted power of the charging pile. i Let N be the voltage amplitude at node i. The voltage amplitude at node i can be calculated based on the above formula and the predicted charging pile power. GN and N CS These are conventional grid nodes and charging pile grid connection nodes, respectively. G ij and B ij Let θ be the real and imaginary parts of the nodal admittance matrix. ij Let be the phase difference between branches ij.

[0199] The probability density function of the voltage amplitude at power grid nodes is constructed using the kernel density estimation method, and a system evaluation framework is formed as follows:

[0200] .

[0201] Where η1 is the voltage offset index of node i. Let be the rated voltage of node i.

[0202] .

[0203] Where η2 is the voltage level compliance rate of node i. Let V be an index function, if V i exist[ , If it is within the range, it is 1; otherwise, it is 0.

[0204] .

[0205] Where η3 is the voltage crossing probability at node i. f(V i V represents the random variable V of the voltage magnitude at the i-th node. i The probability density function it follows.

[0206] .

[0207] Where η4 represents the voltage over-limit risk at node i. The severity of the voltage exceedance is defined as a function of the voltage amplitude, as shown below:

[0208] .

[0209] .

[0210] in, This indicates the importance of node i, which can be determined based on the actual situation of node i in the distribution network. W(V) i This indicates the voltage deviation at node i. , , , Perform a process of summing and then calculating the expectation.

[0211] .

[0212] Wherein, η5 represents the system's active power loss. G This represents the number of lines in the system. Let be the expected value of the random fluctuation of the transmitted active power of the i-th line. Let be the expected reactive power fluctuation of the i-th line. Let be the voltage on the i-th line; Let be the resistance parameter of the i-th line.

[0213] Regarding the above , , , , The five indicators undergo data processing in three stages to comprehensively assess the power grid's carrying capacity:

[0214] 1. Polarity reversal:

[0215] .

[0216] Where η+ represents the index data after positive polarity processing, and η represents the initial index data.

[0217] 2. Standardization:

[0218] .

[0219] Where, η nor,+ The index data are standardized and positive polarity processed.

[0220] 3. Combined weighting:

[0221] A combined weighting approach is used, integrating subjective and objective weighting. Subjective weights are calculated using the analytic hierarchy process (AHP) to obtain the subjective weights λsub=[λ1,λ2,…,λ5]. Objective weights are calculated using the entropy weighting method, as shown below:

[0222] .

[0223] .

[0224] Among them, E j Let N be the information entropy of the j-th type of indicator data. I For the index η j,nor,+ The dimension of N. η η represents the number of indicators. ij,nor,+ λ represents the i-th element of the j-th class after processing. j,obj represents the objective weight of the j-th type of indicator.

[0225] For λ sub and λ obj Perform combined weighting and calculate the comprehensive score as follows:

[0226] .

[0227] Where, λ i is the combined weight of the i-th type of indicator.

[0228] .

[0229] Among them, E C This is the comprehensive score for the load-bearing capacity analysis. k0 and b0 represent the slope and intercept of the linear change, respectively.

[0230] In summary, the charging pile load prediction method provided in this application improves the stability and reliability of subsequent model predictions by performing seasonal analysis, outlier handling, and normalization on the original charging pile power data before making predictions based on the preprocessed data. Optimizing the hyperparameters of the prediction model using a pre-set human evolutionary optimization algorithm yields even better prediction results. Furthermore, the post-processing interpretation in this application makes the prediction results more transparent and credible, thereby improving the prediction accuracy and interpretability of the model. Finally, based on the predicted charging pile power, the grid's carrying capacity can be accurately assessed.

[0231] This application also provides a device for predicting charging pile load and analyzing grid carrying capacity. The device described below can be referred to in conjunction with the method described above. Please refer to... Figure 4 , Figure 4 This is a schematic diagram of a charging pile load prediction and power grid carrying capacity analysis device provided in an embodiment of this application, combined with... Figure 4As shown, the device includes:

[0232] Preprocessing module 10 is used to preprocess the raw charging pile power data; wherein, the preprocessing of the raw charging pile power data includes seasonal analysis, outlier handling and normalization of the charging pile power data.

[0233] Prediction module 20 is used to input preprocessed charging pile power data and preset feature data into a trained prediction model to predict the charging pile power through the prediction model; wherein, during the training of the prediction model, the hyperparameters in the prediction model are tuned through a preset human evolution optimization algorithm.

[0234] The post-processing interpretation module 30 is used to perform post-processing interpretation on the prediction model based on the charging pile power predicted by the prediction model and the data input to the prediction model.

[0235] The voltage amplitude determination module 40 is used to determine the voltage amplitude of the grid node based on the charging pile power predicted by the prediction model.

[0236] The power grid carrying capacity assessment module 50 is used to assess the power grid carrying capacity based on the voltage amplitude.

[0237] In some embodiments, the preprocessing module 10 is used for:

[0238] Seasonal decomposition is performed on the original charging pile power data to determine the seasonal components, trend components, and residuals in the original charging pile power data;

[0239] The optimal trend component is determined based on the aforementioned trend components;

[0240] The residuals are decomposed using the empirical mode decomposition algorithm;

[0241] The weighted integration of the seasonal component, the optimal trend component, and the decomposition results of the residuals is performed.

[0242] In some embodiments, the preprocessing module 10 is used for:

[0243] Outliers in the original charging power data are detected using a local outlier factor algorithm.

[0244] The outlier values ​​are replaced with the average of a preset number of the original charging power data.

[0245] In some embodiments, the prediction module 20 is used for:

[0246] Set the search range for the hyperparameters;

[0247] An initialization strategy based on heuristic center offset is adopted to generate an initial population for hyperparameters;

[0248] Under different combinations of hyperparameters, the prediction model is trained and its performance is evaluated; among them, the accuracy rate is selected to calculate the objective function value.

[0249] Compare individual fitness levels to determine whether to update the position or maintain the original position; specifically, during the human exploration phase, the individual's position is updated based on the Levy flight factor, the optimal exploration position, and the average position in the current population; during the human development phase, the proportion of different roles is dynamically adjusted based on the group fitness entropy.

[0250] Determine if the maximum number of iterations has been reached;

[0251] If the maximum number of iterations is reached, the optimal parameters will be returned.

[0252] In some embodiments, the post-processing interpretation module 30 is used for:

[0253] The charging pile power predicted by the prediction model and the data input to the prediction model are mapped into a time graph;

[0254] A graph attention network is used to propagate attribution signals in the time graph to obtain a representation of node importance;

[0255] The graph neural network output is fused and corrected based on the node importance representation and attention weights.

[0256] Based on the correction results, an interpretation of each time step and feature is obtained.

[0257] In some embodiments, the prediction module 20 is used for:

[0258] The preprocessed charging pile power data, along with test time, temperature, humidity, geographical location characteristics, electricity price factors, and holiday and weekday characteristics, are input into the trained prediction model to predict the charging pile power; the prediction model is a gated cyclic unit.

[0259] In some embodiments, the power grid carrying capacity assessment module 50 is used for:

[0260] The voltage deviation index, voltage level compliance rate, voltage over-limit probability, and voltage over-limit risk of the power grid node are determined based on the voltage amplitude.

[0261] Determine the active power loss of the system;

[0262] The grid carrying capacity is determined based on the voltage deviation index, the voltage level compliance rate, the voltage over-limit probability, the voltage over-limit risk, and the system active power loss.

[0263] This application also provides an electronic device, referenced... Figure 5 As shown, the device includes a memory 1 and a processor 2.

[0264] Memory 1 is used to store computer programs;

[0265] Processor 2 is used to execute computer programs to perform the following steps:

[0266] The raw charging pile power data is preprocessed; this preprocessing includes seasonal analysis, outlier handling, and normalization of the charging pile power data.

[0267] The preprocessed charging pile power data and preset feature data are input into the trained prediction model to predict the charging pile power; wherein, during the training of the prediction model, the hyperparameters in the prediction model are tuned using a preset human evolution optimization algorithm.

[0268] Based on the charging pile power predicted by the prediction model and the data input to the prediction model, the prediction model is post-processed and interpreted.

[0269] The voltage amplitude of the grid node is determined based on the charging pile power predicted by the prediction model.

[0270] The grid carrying capacity is assessed based on the voltage amplitude.

[0271] For a description of the equipment provided in this application, please refer to the above method embodiments; further details will not be provided here.

[0272] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the following steps:

[0273] The raw charging pile power data is preprocessed; this preprocessing includes seasonal analysis, outlier handling, and normalization of the charging pile power data.

[0274] The preprocessed charging pile power data and preset feature data are input into the trained prediction model to predict the charging pile power; wherein, during the training of the prediction model, the hyperparameters in the prediction model are tuned using a preset human evolution optimization algorithm.

[0275] Based on the charging pile power predicted by the prediction model and the data input to the prediction model, the prediction model is post-processed and interpreted.

[0276] The voltage amplitude of the grid node is determined based on the charging pile power predicted by the prediction model.

[0277] The grid carrying capacity is assessed based on the voltage amplitude.

[0278] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0279] For a description of the computer-readable storage medium provided in this application, please refer to the above method embodiments; further details will not be repeated here.

[0280] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses, devices, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant details can be found in the method section.

[0281] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0282] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0283] The above provides a detailed description of the charging pile load prediction and power grid carrying capacity analysis method and related devices provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A method for predicting charging pile load and analyzing grid carrying capacity, characterized in that, include: The raw charging pile power data is preprocessed; this preprocessing includes seasonal analysis, outlier handling, and normalization of the charging pile power data. The preprocessed charging pile power data and preset feature data are input into the trained prediction model to predict the charging pile power; wherein, during the training of the prediction model, the hyperparameters in the prediction model are tuned using a preset human evolution optimization algorithm. Based on the charging pile power predicted by the prediction model and the data input to the prediction model, the prediction model is post-processed and interpreted. The voltage amplitude of the grid node is determined based on the charging pile power predicted by the prediction model. The grid carrying capacity is assessed based on the voltage amplitude.

2. The method for predicting charging pile load and analyzing grid carrying capacity according to claim 1, characterized in that, The process of training the prediction model involves optimizing the hyperparameters of the prediction model using a preset human evolutionary optimization algorithm, including: Set the search range for the hyperparameters; An initialization strategy based on heuristic center offset is adopted to generate an initial population for hyperparameters; Under different combinations of hyperparameters, the prediction model is trained and its performance is evaluated; among them, the accuracy rate is selected to calculate the objective function value. Compare individual fitness levels to determine whether to update the position or maintain the original position; specifically, during the human exploration phase, the individual's position is updated based on the Levy flight factor, the optimal exploration position, and the average position in the current population; during the human development phase, the proportion of different roles is dynamically adjusted based on the group fitness entropy. Determine if the maximum number of iterations has been reached; If the maximum number of iterations is reached, the optimal parameters will be returned.

3. The method for predicting charging pile load and analyzing grid carrying capacity according to claim 1, characterized in that, The post-processing interpretation of the prediction model, based on the predicted charging pile power and the data input to the prediction model, includes: The charging pile power predicted by the prediction model and the data input to the prediction model are mapped into a time graph; A graph attention network is used to propagate attribution signals in the time graph to obtain a representation of node importance; The graph neural network output is fused and corrected based on the node importance representation and attention weights. Based on the correction results, an interpretation of each time step and feature is obtained.

4. The method for predicting charging pile load and analyzing grid carrying capacity according to claim 1, characterized in that, The preprocessed charging pile power data and preset feature data are input into the trained prediction model to predict the charging pile power through the prediction model, including: The preprocessed charging pile power data, along with test time, temperature, humidity, geographical location characteristics, electricity price factors, and holiday and weekday characteristics, are input into the trained prediction model to predict the charging pile power; the prediction model is a gated cyclic unit.

5. The method for predicting charging pile load and analyzing grid carrying capacity according to claim 1, characterized in that, Seasonal analysis of raw charging pile power data includes: Seasonal decomposition is performed on the original charging pile power data to determine the seasonal components, trend components, and residuals in the original charging pile power data; The optimal trend component is determined based on the aforementioned trend components; The residuals are decomposed using the empirical mode decomposition algorithm; The weighted integration of the seasonal component, the optimal trend component, and the decomposition results of the residuals is performed.

6. The method for predicting charging pile load and analyzing grid carrying capacity according to claim 1, characterized in that, Outlier handling for raw charging pile power data includes: Outliers in the original charging power data are detected using a local outlier factor algorithm. The outlier values ​​are replaced with the average of a preset number of the original charging power data.

7. The method for predicting charging pile load and analyzing grid carrying capacity according to claim 1, characterized in that, Assessing the grid carrying capacity based on the voltage amplitude includes: The voltage deviation index, voltage level compliance rate, voltage over-limit probability, and voltage over-limit risk of the power grid node are determined based on the voltage amplitude. Determine the active power loss of the system; The grid carrying capacity is determined based on the voltage deviation index, the voltage level compliance rate, the voltage over-limit probability, the voltage over-limit risk, and the system active power loss.

8. A device for predicting charging pile load and analyzing grid carrying capacity, characterized in that, include: The preprocessing module is used to preprocess the raw charging pile power data; the preprocessing of the raw charging pile power data includes seasonal analysis, outlier handling and normalization. The prediction module is used to input preprocessed charging pile power data and preset feature data into the trained prediction model, so as to predict the charging pile power through the prediction model; wherein, during the training of the prediction model, the hyperparameters in the prediction model are tuned through a preset human evolution optimization algorithm. The post-processing interpretation module is used to perform post-processing interpretation on the prediction model based on the charging pile power predicted by the prediction model and the data input to the prediction model. The voltage amplitude determination module is used to determine the voltage amplitude of the grid node based on the charging pile power predicted by the prediction model. The power grid carrying capacity assessment module is used to assess the power grid carrying capacity based on the voltage amplitude.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the charging pile load prediction and grid carrying capacity analysis method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the charging pile load prediction and grid carrying capacity analysis method as described in any one of claims 1 to 7.