A charging load scenario generation method and system

By combining dynamic graph convolutional networks and quantum attention mechanisms, the problems of spatiotemporal coupling and uncertainty in charging load prediction are solved, achieving high-precision charging load prediction and multi-scenario generation, supporting power grid scheduling and planning.

CN121901768BActive Publication Date: 2026-06-19STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-26
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing charging load forecasting methods are unable to effectively capture the spatiotemporal coupling, strong volatility, and uncertainty of electric vehicle charging behavior, and lack the ability to generate multiple scenarios, resulting in insufficient forecast accuracy and generalization ability, making it difficult to support risk warning and decision optimization in power grid dispatching.

Method used

A physical prior-guided dynamic graph convolutional network (DGCN) is used to adaptively extract the spatiotemporal features of the load sequence, and a quantum attention mechanism (QAN) is combined to enhance the modeling ability of key time steps. The features are then mapped to quantum phase distribution features through a multilayer perceptron to generate high-precision charging load predictions.

Benefits of technology

It improves the accuracy of charging load prediction and scene generation, reduces the risk of prediction bias and scene distortion, enhances the accuracy of characterizing key power consumption patterns and fluctuations, and improves the model's noise resistance and the reliability of multi-scene generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901768B_ABST
    Figure CN121901768B_ABST
Patent Text Reader

Abstract

This invention proposes a method and system for generating charging load scenarios, belonging to the field of power system technology. The method includes: initializing graph node features based on a charging load sequence; generating dynamic graph convolutional features from the initial graph node features using a dynamic graph convolutional network; constructing a query matrix based on the dynamic graph convolutional features; modulating the phase of the query matrix using a quantum phase tensor; calculating quantum attention output features to generate the final predicted charging load value; calculating the mean squared error loss value by combining it with the target charging load sequence; and training a dynamic graph convolutional network-quantum attention mechanism model; randomly selecting an input window from a historical normalized charging load sequence; inputting the model for rolling prediction to generate actual charging load scenario curves; repeating the above process to generate a set of actual charging load scenario curves; and clustering the set to extract typical charging load scenario curves. This invention improves the efficiency and accuracy of charging load scenario construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system technology, and more specifically, relates to a method and system for generating charging load scenarios. Background Technology

[0002] With the rapid development of new power systems, especially the large-scale grid connection of flexible charging loads represented by electric vehicles and distributed energy storage, the characteristics of power system charging loads exhibit significant spatiotemporal coupling, strong volatility, and uncertainty. Traditional charging load forecasting methods mainly rely on statistical models, such as but not limited to ARIMA and exponential smoothing, and classic machine learning algorithms, such as but not limited to support vector machines and random forests. These methods perform well when dealing with stationary time series, but when faced with complex charging load scenarios involving non-stationary, nonlinear, and multivariate coupling, they often struggle to effectively extract spatiotemporal correlation features, limiting prediction accuracy and generalization ability.

[0003] Existing deep learning technologies, such as but not limited to recurrent neural networks, long short-term memory networks, graph convolutional networks and their variants, still have the following shortcomings: First, most models adopt static graph structures, which make it difficult to reflect the dynamic correlation characteristics of power charging load changes over time; second, although attention mechanisms can increase the weight of key time steps, traditional attention is easily affected by noise in complex sequence modeling and has limited ability to model time-series dependencies; third, existing prediction models focus on single-point prediction and lack the ability to systematically generate multiple scenarios and paths that may occur in the future, making it difficult to support risk warning and decision optimization in power grid dispatching.

[0004] Furthermore, in the prediction of electric vehicle charging load, due to the strong randomness, spatiotemporal clustering, and heterogeneity of its behavior, traditional prediction methods often struggle to accurately capture its intraday fluctuation patterns and multi-day evolution patterns. Although some studies have attempted to combine clustering, generative adversarial networks, and other methods to generate scenarios, there is still room for improvement in terms of scenario diversity, realism, and computational efficiency. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method that adaptively extracts spatiotemporal features of load sequences using a physically prior-guided Dynamic Graph Convolution Network (DGCN) and enhances the modeling capability of key time steps using a Quantum Attention Network (QAN) mechanism that characterizes the quantum phase distribution of uncertainty. This method enables high-precision prediction of the load for the next 24 hours by fully utilizing historical data. By integrating dynamic spatiotemporal feature extraction, adaptive attention enhancement, and efficient multi-scenario generation into an integrated charging load prediction method, this invention improves the accuracy of charging load prediction and scenario construction capabilities, providing reliable data support for power grid dispatching, risk assessment, and planning simulation. It also possesses good scalability and engineering application value.

[0006] The present invention adopts the following technical solution.

[0007] A first aspect of the present invention provides a method for generating a charging load scenario, comprising:

[0008] The charging load sequence is obtained to determine the graph model nodes and initialize the graph node features. A physical prior adjacency matrix is ​​constructed based on the similarity between the date types of the graph model nodes. The physical prior adjacency matrix is ​​combined with the graph node features to generate dynamic graph convolution features through a dynamic graph convolutional network.

[0009] A query matrix, a key matrix, and a value matrix are constructed based on the convolutional features of the dynamic graph. The convolutional features of the dynamic graph are mapped to quantum phase distribution features through a multilayer perceptron. The quantum phase tensor is obtained through differentiable sampling to modulate the phase of the query matrix. The quantum attention output features are calculated through an attention mechanism based on the phase-modulated query matrix, key matrix, and value matrix.

[0010] The final predicted charging load value is generated based on the output features of quantum attention. The mean square error loss value is calculated by combining the target sequence of charging load. The dynamic graph convolutional network-quantum attention mechanism model is trained with the goal of minimizing the mean square error loss value.

[0011] Data from the historical normalized charging load sequence is randomly selected from the input window and input into the model for rolling prediction. The results of each rolling prediction are spliced ​​together in the order of the rolling prediction to generate the actual charging load scenario curve. The above process is repeated to generate a set of actual charging load scenario curves. The set of actual charging load scenario curves is clustered to extract typical charging load scenario curves.

[0012] Preferably, the generated dynamic graph convolutional features include:

[0013] Using time in the charging load sequence as graph model nodes, one-hot encoding is used to identify the date type of the graph model nodes;

[0014] Construct a physical prior adjacency matrix based on the similarity between the date types of all graph model nodes;

[0015] The graph node features are initialized based on the charging load sequence. The dynamically generated adjacency matrix of the first layer is determined based on the initial features of the graph nodes. The hybrid adjacency matrix of the first layer is determined based on the dynamic adjacency matrix and the physical prior adjacency matrix of the first layer.

[0016] The dynamic graph convolutional features of the first layer are updated based on the hybrid adjacency matrix of the first layer;

[0017] Repeat the above process until the dynamic adjacency matrix of the final layer is generated, and then generate the dynamic graph convolutional features of the final layer based on the dynamic adjacency matrix of the final layer.

[0018] Preferably, the physical prior adjacency matrix is ​​expressed by the following formula:

[0019]

[0020] In the formula, This represents the physical prior adjacency matrix between time c and time d. This represents the absolute time interval between time c and time d. , Indicates the length of the charging load sequence window. Indicates the maximum valid time range. Indicates the time decay coefficient. This indicates the similarity between the date types of time c and time d.

[0021] Preferably, The similarity between the date types of time c and time d is expressed by the following formula:

[0022]

[0023] In the formula, These represent the date types for time c and time d, respectively. This represents the Euclidean norm.

[0024] Preferably, the date type is obtained by concatenating the unique hot codes of the day of the week, the unique hot codes of the holiday signs, and the unique hot codes of the intraday time period types in that order.

[0025] Preferably, the hybrid adjacency matrix is ​​expressed by the following formula:

[0026]

[0027] In the formula, Indicates the first l The hybrid adjacency matrix of the layer, Indicates the first l The dynamic adjacency matrix of the layer, This represents the learnable fusion gating coefficient.

[0028] Preferably, calculating the quantum attention output characteristics includes:

[0029] Construct query matrix, key matrix, and value matrix based on dynamic graph convolution features;

[0030] The dynamic graph convolutional features are mapped to quantum phase distribution features using a multilayer perceptron.

[0031] The quantum phase distribution features are evenly divided along the attention head dimension. The evenly divided results are set as the original mean vector and the original concentration parameter, respectively. The mean of the quantum phase angle is generated according to the original mean vector. The concentration of the quantum phase angle is obtained by exponential transformation of the original concentration parameter.

[0032] Based on the mean and concentration of the quantum phase angle, a quantum phase tensor is obtained through differentiable sampling, and the query matrix is ​​phase-modulated according to the quantum phase tensor.

[0033] The phase-modulated query matrix, key, and value matrix are used to calculate the quantum attention output features through an attention mechanism.

[0034] Preferably, the mean value of the quantum phase angle is generated based on the original mean vector, and is expressed by the following formula:

[0035]

[0036] In the formula, The mean value of the quantum phase angle. , This represents the tanh activation function. This represents the original mean vector.

[0037] Preferably, the query matrix is ​​phase-modulated according to the quantum phase tensor, as expressed by the following formula:

[0038]

[0039] In the formula, This represents the query matrix after phase modulation. Represents the quantum phase tensor. This represents element-wise multiplication. The quantum phase tensor is expressed by the following formula:

[0040]

[0041] In the formula, Represents the quantum phase tensor. , Indicates the distribution from the standard normal distribution The random noise tensor sampled independently and identically distributed in the middle. This indicates the concentration of the quantum phase angle.

[0042] A second aspect of the present invention provides a charging load scenario generation system, which runs the charging load scenario generation method described in the first aspect, including:

[0043] The dynamic graph convolution module is used to acquire the charging load sequence to determine the graph model nodes and initialize the graph node features. It constructs a physical prior adjacency matrix based on the similarity between the date types of the graph model nodes. The physical prior adjacency matrix, combined with the graph node features, generates dynamic graph convolution features through the dynamic graph convolution network.

[0044] The quantum attention mechanism module is used to construct a query matrix, a key matrix, and a value matrix based on the convolutional features of a dynamic graph. It maps the convolutional features of the dynamic graph to quantum phase distribution features through a multilayer perceptron. It obtains a quantum phase tensor through differentiable sampling to modulate the phase of the query matrix. Based on the phase-modulated query matrix, key matrix, and value matrix, it calculates the quantum attention output features through the attention mechanism.

[0045] The model training module is used to generate the final charging load prediction value based on the quantum attention output features, calculate the mean square error loss value by combining the charging load target sequence, and train the dynamic graph convolutional network-quantum attention mechanism model with the goal of minimizing the mean square error loss value.

[0046] The typical scenario generation module is used to randomly select data from the historical normalized charging load sequence within the input window, input it into the model for rolling prediction, and splice the results of each rolling prediction in the order of the rolling prediction to generate the actual charging load scenario curve. The above process is repeated to generate a set of actual charging load scenario curves. The set of actual charging load scenario curves is clustered to extract typical charging load scenario curves.

[0047] Compared with the prior art, the beneficial effects of the present invention include at least the following:

[0048] By employing physical prior-guided dynamic graph convolution, the accuracy of extracting the implicit evolutionary laws in the non-stationary and nonlinear fluctuations of charging load is improved, the accuracy of generating charging load scenarios is enhanced, and the risk of charging load prediction deviation and charging load scenario distortion caused by the model's inability to capture the effective spatiotemporal dependence of charging load is reduced.

[0049] By mapping the convolutional features of dynamic graphs to quantum phase distribution features representing uncertainty using a multilayer perceptron, and calculating the quantum attention output features through an attention mechanism based on the phase-modulated query matrix, the accuracy of the charging load scenario in characterizing key electricity consumption patterns (such as morning and evening peak hours) is improved. This enhances the model's perception and noise resistance to key fluctuations (such as peaks and troughs) in the charging load sequence, reduces the probability of attention weights being misled by outliers or noise fragments, and thus enhances the extraction of key temporal features of the charging load. Furthermore, by using the quantum phase distribution features of the uncertainty parameter, the risk of blind randomness and uninterpretability in the generation process of the charging load scenario is reduced, thereby improving the quality of the generated charging load scenario. Attached Figure Description

[0050] Figure 1 This is a schematic diagram of the charging load scenario generation process provided in accordance with an embodiment of the present invention;

[0051] Figure 2 This is a schematic diagram of the charging load prediction curve provided according to an embodiment of the present invention;

[0052] Figure 3 This is a schematic diagram of charging load curves for 200 scenarios provided in accordance with embodiments of the present invention;

[0053] Figure 4 This is a schematic diagram of the clustering results of charging load scenarios provided in accordance with the embodiments of the present invention. Detailed Implementation

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

[0055] like Figure 1 As shown, Embodiment 1 of the present invention provides a method for generating a charging load scenario, comprising the following steps:

[0056] Step 1: Divide the historical charging load data into a charging load sequence and a charging load target sequence, which are the input sequence and output sequence for supervised learning, respectively.

[0057] In a preferred but non-limiting embodiment of the present invention, step 1 includes:

[0058] Step 1.1, the sampled historical charging load data sequence is expressed by the following formula:

[0059] (1)

[0060] In the formula, This represents the charging load value at time t. This indicates the total length of the historical sequence.

[0061] Step 1.2: To improve the convergence of deep learning model training and avoid excessive numerical differences affecting model learning, the historical charging load data sequence sampled in Step 1.1 is normalized.

[0062] (2)

[0063] In the formula, This represents the charging load data sequence after normalization at time t. This represents the minimum charging load in the historical charging load data series. , This represents the maximum charging load value in the historical charging load data sequence. .

[0064] Obtain the historical normalized charging load sequence .

[0065] Step 1.3: To achieve supervised learning of the charging load sequence, a sliding window approach is used to divide the historical normalized charging load sequence into charging load sequences. and charging load target sequence :

[0066] (3)

[0067] (4)

[0068] in, Indicates the first The charging load sequence of each sample. Indicates the first The target sequence of charging load for each sample. , The length of the charging load sequence window is represented by 48 in this invention, representing 48 hours. M represents the time step of one prediction, which is 2 in this invention. A large number of input-output sequence pairs are formed for training the model.

[0069] Step 2: Obtain the charging load sequence to determine the graph model nodes and initialize the graph node features. Construct a physical prior adjacency matrix based on the similarity between the date types of the graph model nodes. Combine the physical prior adjacency matrix with the graph node features to generate dynamic graph convolutional features through DGCN (Dynamic Graph Convolutional Network).

[0070] In a preferred but non-limiting embodiment of the present invention, step 2 includes:

[0071] Step 2.1: Using the time in the charging load sequence as the graph model node, the date type of the graph model node is identified by one-hot encoding.

[0072] More preferably, step 2.1 includes:

[0073] The date type includes day of the week characteristics, holiday markers, and intraday time period types, which are obtained by concatenating the unique hot codes of the day of the week characteristics, the holiday markers, and the intraday time period types in that order.

[0074] The unique hot code representation of the day of the week is, for example but not limited to, [1,0,0,0,0,0,0] representing Monday, [0,1,0,0,0,0,0] representing Tuesday, etc.; the unique hot code representation of the holiday sign is, for example but not limited to, [1] indicating that the time belongs to the rest day, including statutory holidays, Saturday and Sunday, [0] indicating the working day, including Monday to Friday; the unique hot code representation of the intraday time period is, for example but not limited to, 00:00-06:00 set as the charging load off-peak period, the unique hot code is [1,0,0,0], 07:00-10:00 set as the charging load morning peak period, the unique hot code is [0,1,0,0], 11:00-17:00 set as the charging load midday flat period, the unique hot code is [0,0,1,0], 18:00-23:00 set as the charging load evening peak period, the unique hot code is [0,0,0,1].

[0075] Assume time c is 9:00 AM on a Wednesday, the day of the week feature is the one-hot code of Wednesday [0, 0, 1, 0, 0, 0, 0], the holiday marker is a weekday [0], and the intraday time period type is the charging load morning peak period. Therefore, the date type of time c is concatenated according to the day of the week feature, holiday marker, and intraday time period type as [0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0].

[0076] Step 2.2: Construct a physical prior adjacency matrix based on the similarity between the date types of all graph model nodes, expressed by the following formula:

[0077] (5)

[0078] In the formula, This represents the physical prior adjacency matrix between time c and time d. This represents the absolute time interval between time c and time d. , Indicates the maximum valid time range. This represents the time decay coefficient. In charging load forecasting, the load state at a given moment is typically more correlated with the state at more recent moments, while the correlation with more distant moments weakens as the time interval increases. The smaller the value, the faster the decay; the model focuses more on recent effects. The larger the value, the slower the decay, and it may also be assigned a certain weight in the long term. The similarity between the date types of time c and time d is expressed by the following formula:

[0079] (6)

[0080] In the formula, Let c and d represent the date types, respectively. Even if time c and time d are far apart in absolute time, their load patterns may be highly similar if they have the same date type, such as 9 AM on a weekday. The similarity between date types is used to ensure that the model can capture this cross-period pattern association. If the date types of two times are exactly the same, the similarity between the two times is 1. If the date types of two times are completely different, such as, but not limited to, one being a weekday morning and the other being a weekend night, then the vectors are orthogonal and the similarity between the two times is 0. If they partially match, such as, but not limited to, being weekdays but at different times, then the similarity between the two times is between 0 and 1.

[0081] Step 2.3, initialize the graph node characteristics based on the charging load sequence, expressed by the following formula:

[0082] (7)

[0083] In the formula, Represents the initial graph node features, and the set of charging load sequences. , This indicates the total number of samples.

[0084] The dynamic adjacency matrix of the first layer is determined based on the characteristics of the initial graph nodes, and is expressed by the following formula:

[0085] (8)

[0086] (9)

[0087] In the formula, This represents the dynamic adjacency matrix of the first layer. This represents the activation function. This represents the learnable weights of the first layer. T This indicates transpose.

[0088] The hybrid adjacency matrix of the first layer is determined based on the dynamic adjacency matrix and the physical prior adjacency matrix of the first layer, and is expressed by the following formula:

[0089] (10)

[0090] In the formula, This represents the hybrid adjacency matrix of layer 1. Represents the physical prior adjacency matrix. This represents the learnable fusion gating coefficient.

[0091] The first-layer dynamic graph convolutional features are updated based on the hybrid adjacency matrix of the first layer, as expressed by the following formula:

[0092] (11)

[0093] In the formula, This represents the convolutional features of the first layer of dynamic graphs.

[0094] Step 2.4: Repeat the above process until the dynamic adjacency matrix of the final layer is generated. Based on the dynamic adjacency matrix of the final layer, generate the dynamic graph convolutional features of the final layer, expressed by the following formula:

[0095] (12)

[0096] (13)

[0097] (14)

[0098] (15)

[0099] In the formula, Indicates the first l-1 Layer node characteristics, This represents the activation function. Indicates the first l Layer learnable weights Indicates the first l The dynamic adjacency matrix of the layer, This represents the Softmax function. T Indicates transpose. Indicates the first l The hybrid adjacency matrix of the layer, Indicates the first l -1 layer dynamic graph convolutional features, Indicates learnable weights, l This represents the total number of layers in the dynamic graph convolution, the th layer. l This is the final layer.

[0100] It is worth noting that this invention combines the physical prior adjacency matrix with the input graph node features. Through a dynamic graph convolutional network, the adjacency matrix is ​​adaptively generated and optimized based on the data, and features are propagated and aggregated. This solves the bottleneck that static graph models cannot capture the dynamic correlation characteristics of charging load changes over time, and that traditional time series models have difficulty extracting complex spatiotemporal coupling features of charging load. It improves the accuracy of the model in dynamically extracting and adaptively representing the implicit evolution laws in the non-stationary and nonlinear fluctuations of charging load, and lays a more reliable feature foundation for subsequent high-precision charging load prediction and scene generation.

[0101] Step 3: Based on QAN (Quantum Attention Network), construct query matrix, key matrix and value matrix according to the convolutional features of dynamic graph. Map the convolutional features of dynamic graph to quantum phase distribution features through multilayer perceptron. Obtain quantum phase tensor through differentiable sampling to perform phase modulation on query matrix. Calculate quantum attention output features through attention mechanism based on the phase-modulated query matrix, key matrix and value matrix.

[0102] In a preferred but non-limiting embodiment of the present invention, step 3 includes:

[0103] Step 3.1: Construct the query, key, and value matrix based on the dynamic graph convolution features, expressed by the following formula:

[0104] (16)

[0105] In the formula, Represents the query matrix. Represents the key matrix, Represents a value matrix, , and This represents the learnable linear transformation weight matrix.

[0106] Step 3.2: The convolutional features of the dynamic graph are mapped to quantum phase distribution features using a multilayer perceptron, as expressed by the following formula:

[0107] (17)

[0108] In the formula, This represents a multilayer perceptron. Indicates the characteristics of quantum phase distribution. It is a three-dimensional vector, with the total number of samples as the vector. The batch dimension of the quantum phase distribution characteristics is given by the charging load sequence window length. The sequence dimension of the quantum phase distribution characteristics is twice the dimension of each attention head. The attention head dimension is a characteristic of the quantum phase distribution.

[0109] Step 3.3: Divide the quantum phase distribution features equally along the attention head dimension, and set the equalization results as the original mean vector and the original concentration parameter, respectively. Generate the mean of the quantum phase angle based on the original mean vector, expressed by the following formula:

[0110] (18)

[0111] In the formula, The mean value of the quantum phase angle. , This represents the tanh activation function. This represents the original mean vector.

[0112] The concentration of the quantum phase angle is obtained by exponentially transforming the original concentration parameter, and is expressed by the following formula:

[0113] (19)

[0114] In the formula, Represents the original concentration parameter. The concentration of the quantum phase angle. The numerical stability term is represented by a very small positive constant; the value used in this invention is... .

[0115] Step 3.4: Based on the mean and concentration of the quantum phase angle, the quantum phase tensor is obtained through differentiable sampling, expressed by the following formula:

[0116] (20)

[0117] In the formula, Represents the quantum phase tensor. , Indicates the distribution from the standard normal distribution The random noise tensor sampled independently and identically distributed in the middle. This indicates the concentration of the quantum phase angle.

[0118] Phase modulation of the query matrix based on the quantum phase tensor is expressed by the following formula:

[0119] (twenty one)

[0120] In the formula, This represents the query matrix after phase modulation. Represents the quantum phase tensor. This indicates element-wise multiplication. It represents the imaginary unit.

[0121] Step 3.5: Calculate the quantum attention output features using an attention mechanism on the phase-modulated query matrix, key-value matrix, and other matrix, expressed as follows:

[0122] (twenty two)

[0123] In the formula, This represents the output characteristics of quantum attention. This represents the dimension of each attention head.

[0124] It is worth noting that this invention constructs a query, key, and value matrix based on dynamic graph convolution features, and generates quantum phase distribution parameters representing uncertainty through a lightweight network. The phase tensor obtained through differentiable sampling modulates the query matrix, and finally the attention output is calculated. This solves the problems of traditional attention mechanisms being susceptible to noise interference and having limited ability to distinguish and focus on key temporal patterns in complex sequence modeling. It improves the model's ability to perceive, distinguish, and resist noise in key fluctuations (such as peaks, troughs, and turning points) in the charging load sequence, as well as the granularity of charging load temporal dependency modeling. It also reduces the probability that attention weights are misled by outliers or random noise segments, thereby enhancing the extraction quality of key charging load temporal features. At the same time, the uncertainty parameters provide a deterministic basis for subsequent charging load scene generation.

[0125] Step 4: Generate the final charging load prediction value based on the quantum attention output features, calculate the mean squared error loss value in combination with the charging load target sequence, and train the DGCN-QAN (Dynamic Graph Convolutional Network-Quantum Attention Network) model with the goal of minimizing the mean squared error loss value.

[0126] In a preferred but non-limiting embodiment of the present invention, step 4 includes:

[0127] Step 4.1: Map the quantum attention output features from Step 3 to normalized predicted values ​​through a fully connected layer, expressed by the following formula:

[0128] (twenty three)

[0129] In the formula, Represents the normalized predicted value. Indicates the flattening operation. This represents the weight matrix of the output layer. This represents the bias vector of the output layer.

[0130] Step 4.2: Obtain the final charging load forecast by inverse normalizing the normalized forecast value, expressed by the following formula:

[0131] (twenty four)

[0132] In the formula, This represents the final predicted charging load.

[0133] Step 4.3: Calculate the mean squared error loss value based on the final predicted charging load and the target charging load sequence, expressed by the following formula:

[0134] (25)

[0135] In the formula, This indicates the total number of samples. Let Y represent the element in the b-th row and m-th column of matrix Y. , express The element in row b and column m.

[0136] Step 4.4: With the goal of minimizing the mean squared error loss, adjust all learnable parameters until the training reaches the maximum number of iterations, and obtain the trained DGCN-QAN model.

[0137] During the training phase, random batch samples and iterative optimization algorithms are used, and an early stopping strategy is implemented between the training and validation sets to ensure that the model does not overfit.

[0138] It is worth noting that by mapping the quantum attention output features to the final predicted value and combining them with the real target to calculate the mean squared error loss, and by introducing a regularization term for the uncertainty parameter, the model is trained with a multi-objective loss function until convergence. This solves the problems of deep prediction models being prone to overfitting on complex data, having insufficient generalization ability, and lacking a reliable measure (uncertainty calibration) for their prediction results. It improves the stability, generalization ability, and intrinsic calibration of the final prediction model and reduces the risk of overfitting caused by the model's excessive reliance on specific patterns in the training data, as well as the probability of misjudgment due to the model making high-risk erroneous predictions.

[0139] Step 5: Randomly select an input window from the historical normalized charging load sequence, input it into the model for rolling prediction, and sequentially stitch together the results of each rolling prediction to generate the actual charging load scenario curve. Repeat the above process to generate a set of actual charging load scenario curves.

[0140] In a preferred but non-limiting embodiment of the present invention, step 5 includes:

[0141] Step 5.1: Randomly select the starting time step of the input window from the historical normalized charging load sequence and set a window of a set length as the input window, as expressed by the following formula:

[0142] (26)

[0143] In the formula, This indicates the input window for the 0th step of the rolling prediction. This indicates a randomly selected start time step. , Indicates the total length of the historical sequence. This represents the charging load value of the historical normalized charging load sequence at time step s.

[0144] Step 5.2: Input the trained DGCN-QAN model into the input window for rolling prediction. Each rolling prediction outputs a normalized charging load prediction value. It can be expressed by the following formula:

[0145] (27)

[0146] In the formula, This represents the normalized charging load forecast values ​​at M time points in the rolling forecast at step k. , Indicates the number of rolling predictions. , This invention represents the total length of the future sequence generated by the target. Values ​​are taken over 24 hours. This indicates that 12 rolling forecasts are needed to cover 24 hours. This represents the trained DGCN-QAN model. This represents the input window for the k-th step of the rolling prediction.

[0147] Step 5.3: Based on the normalized charging load prediction value output from each rolling prediction... The input window is updated using the following formula:

[0148] (28)

[0149] In the formula, This represents the input window for the (k+1)th step of the rolling prediction. This represents the concatenation function. Indicates will and splicing, Indicates taking The subsequence from the (M+1)th charging load to the last charging load has a length of LM .

[0150] Step 5.4: The normalized charging load prediction values ​​obtained from each rolling prediction are concatenated sequentially, and the concatenation result is inversely normalized to obtain the actual charging load scenario curve of the total length of the future sequence generated by the target, expressed by the following formula:

[0151] (29)

[0152] In the formula, Represents a generated future Actual charging load scenario curve for hours. This indicates that the normalized charging load forecast values ​​are spliced ​​together in the order of rolling forecasts.

[0153] Step 5.5, repeat The process of generating the actual charging load scenario curve is as follows: The different actual charging load scenario curves constitute the set of actual charging load scenario curves, which is represented by the following formula:

[0154] (30)

[0155] In the formula, This represents the set of curves for actual charging load scenarios. This represents the actual charging load scenario curve generated for the nth time. This indicates the number of actual charging load scenario curves generated.

[0156] It is worth noting that this invention randomly selects multiple starting windows from historical data and purposefully samples or perturbs the uncertainty parameters (quantum phase) learned in step 3 during rolling prediction. Through uncertainty-driven multi-scenario rolling generation, a large number of diverse future load scenario curves are generated. This solves the limitations of traditional deterministic prediction methods in characterizing the uncertainty and multi-path possibilities of future load evolution, as well as the problems of low quality due to lack of physical guidance in simply random perturbation-generated scenarios. It greatly improves the ability to characterize the physical reliability of charging load scenarios, reduces the blind randomness and uninterpretability of the charging load scenario generation process, and makes the differences in generated scenarios (such as large fluctuation range in a certain period) traceable to the high uncertainty patterns identified by the model. This improves the diversity and realism of generated charging load scenarios and enhances the quality of charging load scenarios.

[0157] Step 6: Determine the optimal number of clusters. Perform K-Means++ clustering on the set of actual charging load scenario curves, minimize the sum of squared errors within clusters, and extract the optimal number of clusters for typical charging load scenario curves.

[0158] In a preferred but not limiting embodiment of the present invention, step 6 includes:

[0159] Step 6.1: Set the number of candidate clusters. Calculate the sum of squared errors within clusters curves corresponding to different numbers of candidate clusters using the elbow method. Calculate the vertical distance from each point on the sum of squared errors within clusters curve to the line connecting the beginning and end of the curve. Select the point with the largest vertical distance as the optimal number of clusters, expressed by the following formula:

[0160] (31)

[0161] In the formula, This represents the optimal number of clusters. Represents the maximum number of candidate clusters. Denotes the minimum number of candidate clusters. Indicates in The sum of squared errors within the cluster calculated at [location] express The sum of squared errors within the cluster is calculated at [location]. This indicates that when the number of clusters is Sum of squared errors within the cluster at that time This indicates the number of candidate clusters currently being calculated.

[0162] Step 6.2: Based on the optimal number of clusters, perform K-Means++ clustering on the set of actual charging load scenario curves to obtain the initial optimal number of cluster centers. and the corresponding initial cluster partitioning Based on the initial optimal cluster centers and corresponding initial clusters, the sum of squared errors within the clusters is minimized through iterative optimization, and the optimal cluster centers and optimal clusters are output. The optimal cluster centers are then set as the optimal cluster centers for typical charging load scenario curves.

[0163] Minimize the sum of squared errors within the cluster, expressed by the following formula:

[0164] (32)

[0165] In the formula, The sum of squared intra-cluster errors represents the optimal clustering number. This represents the set of actual charging load scenario curves for the h-th cluster. This represents a single actual charging load scenario curve. , This represents the cluster center of the h-th cluster. This represents the Euclidean norm.

[0166] It is worth noting that this invention performs collaborative clustering analysis on a large number of generated scenario curves, not only based on their load patterns but also combining multi-view features such as dynamic adjacency matrix patterns and attention uncertainty patterns during their generation process. The most representative cluster centers are extracted as typical scenarios, solving the problem that massive generated scenario data is complex, disordered, and difficult to use directly for power grid planning and dispatch decision analysis. This improves the representativeness, distinguishability, and interpretability of typical scenarios extracted from massive scenarios. Each typical scenario can clearly correspond to a physical evolution mode (such as "morning peak-dominated type"), reducing the data complexity and cognitive burden of subsequent decision analysis such as risk assessment and optimized dispatch, making the decision support system more efficient and operable.

[0167] Embodiment 2 of the present invention provides a charging load scenario generation system, which runs the charging load scenario generation method described in Embodiment 1, including:

[0168] The dynamic graph convolution module is used to acquire the charging load sequence to determine the graph model nodes and initialize the graph node features. It constructs a physical prior adjacency matrix based on the similarity between the date types of the graph model nodes. The physical prior adjacency matrix, combined with the graph node features, generates dynamic graph convolution features through the dynamic graph convolution network.

[0169] The quantum attention mechanism module is used to construct a query matrix, a key matrix, and a value matrix based on the convolutional features of a dynamic graph. It maps the convolutional features of the dynamic graph to quantum phase distribution features through a multilayer perceptron. It obtains a quantum phase tensor through differentiable sampling to modulate the phase of the query matrix. Based on the phase-modulated query matrix, key matrix, and value matrix, it calculates the quantum attention output features through the attention mechanism.

[0170] The model training module is used to generate the final charging load prediction value based on the quantum attention output features, calculate the mean square error loss value by combining the charging load target sequence, and train the dynamic graph convolutional network-quantum attention mechanism model with the goal of minimizing the mean square error loss value.

[0171] The typical scenario generation module is used to randomly select data from the historical normalized charging load sequence within the input window, input it into the model for rolling prediction, and splice the results of each rolling prediction in the order of the rolling prediction to generate the actual charging load scenario curve. The above process is repeated to generate a set of actual charging load scenario curves. The set of actual charging load scenario curves is clustered to extract typical charging load scenario curves.

[0172] Embodiment 3 of this invention examines the effectiveness of a charging load prediction and multi-scenario generation method based on dynamic graph convolution and quantum attention. Historical charging load data collected in region A is selected as the example data. The data has a time resolution of 1 hour, covering multiple daily cycles of continuous operation, exhibiting obvious peak-valley characteristics and some random fluctuations, reflecting typical user charging behavior patterns. In the example, a sliding window training set is first constructed based on the historical load sequence. Normalized load from the past few hours is selected as the model input, and the load for a future period is used as the supervision label. The model uses the optimal parameters obtained during training to predict future loads on an independent test set, and its performance is evaluated using the aforementioned MAPE, MdAPE, and the percentage of samples with errors ≤10%.

[0173] The experiment uses a real charging load dataset from region A with 1-hour intervals, containing two types of features: charging load and timestamps. The training and test sets are divided in an 8:2 ratio. The Transformer model is used for comparison, and the evaluation metrics are MAPE (Mean Absolute Percentage Error), MdAPE (Median Percentage Error), and the percentage of samples with errors ≤10%. The prediction results are compared with the evaluation metrics of different models. Figure 2 As shown in Table 1.

[0174] Table 1 Comparison of Evaluation Indicators for Prediction Models

[0175]

[0176] This table compares the performance of the DGCN-QAN and Transformer prediction models on three metrics: MAPE (Mean Absolute Percentage Error), MdAPE (Median Percentage Error), and the percentage of samples with errors ≤10%. The DGCN-QAN model performs best on all three metrics.

[0177] The above method was used to analyze 200 charging load scenarios. First, to visually demonstrate the overall distribution characteristics and fluctuations of the original dataset, three-dimensional visualizations of the 200 scenarios were created, as shown below. Figure 3 As shown.

[0178] Depend on Figure 3 As can be seen, the x-axis represents the number of scenarios (1-200), the y-axis represents time (0-23h), and the z-axis represents the charging load (kW). The 3D surface plot intuitively reflects that the peak load times differ significantly under different scenarios, and the power amplitude fluctuates within a large range, reflecting the randomness and spatiotemporal uncertainty of electric vehicle charging behavior.

[0179] Based on the elbow method, the optimal number of clusters, K=4, was determined. The characteristics of the four typical scenarios after clustering are as follows: Figure 4 As shown.

[0180] Cluster analysis effectively reduced 200 disordered scenarios into 4 typical scenarios with significant statistical characteristics, providing data support for subsequent power grid charging load scheduling and capacity planning.

[0181] Compared with the prior art, the beneficial effects of the present invention include at least the following:

[0182] By employing physical prior-guided dynamic graph convolution, the accuracy of extracting the implicit evolutionary laws in the non-stationary and nonlinear fluctuations of charging load is improved, the accuracy of generating charging load scenarios is enhanced, and the risk of charging load prediction deviation and charging load scenario distortion caused by the model's inability to capture the effective spatiotemporal dependence of charging load is reduced.

[0183] By mapping the convolutional features of dynamic graphs to quantum phase distribution features representing uncertainty using a multilayer perceptron, and calculating the quantum attention output features through an attention mechanism based on the phase-modulated query matrix, the accuracy of the charging load scenario in characterizing key electricity consumption patterns (such as morning and evening peak hours) is improved. This enhances the model's perception and noise resistance to key fluctuations (such as peaks and troughs) in the charging load sequence, reduces the probability of attention weights being misled by outliers or noise fragments, and thus enhances the extraction of key temporal features of the charging load. Furthermore, by using the quantum phase distribution features of the uncertainty parameter, the risk of blind randomness and uninterpretability in the generation process of the charging load scenario is reduced, thereby improving the quality of the generated charging load scenario.

[0184] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A method of generating a charging load scenario, characterized by, include: The charging load sequence is obtained to determine graph model nodes and initialize graph node features. A physical prior adjacency matrix is ​​constructed based on the similarity between date types of graph model nodes. The physical prior adjacency matrix, combined with graph node features, generates dynamic graph convolutional features through a dynamic graph convolutional network. A query matrix, key matrix, and value matrix are constructed based on the dynamic graph convolutional features. The dynamic graph convolutional features are mapped to quantum phase distribution features through a multilayer perceptron. A quantum phase tensor is obtained through differentiable sampling to modulate the query matrix. Quantum attention output features are calculated through an attention mechanism based on the phase-modulated query matrix, key matrix, and value matrix. The final predicted charging load value is generated based on the output features of quantum attention. The mean square error loss value is calculated by combining the target sequence of charging load. The dynamic graph convolutional network-quantum attention mechanism model is trained with the goal of minimizing the mean square error loss value. Data from the historical normalized charging load sequence is randomly selected from the input window and input into the model for rolling prediction. The results of each rolling prediction are spliced ​​together in the order of the rolling prediction to generate the actual charging load scenario curve. The above process is repeated to generate a set of actual charging load scenario curves. Cluster the actual charging load scenario curves and extract the curves for typical charging load scenarios.

2. The charging load scenario generation method according to claim 1, characterized in that: The features generated by the convolutional generation of dynamic graphs include: Using time in the charging load sequence as graph model nodes, one-hot encoding is used to identify the date type of the graph model nodes; Construct a physical prior adjacency matrix based on the similarity between the date types of all graph model nodes; The graph node features are initialized based on the charging load sequence. The dynamically generated adjacency matrix of the first layer is determined based on the initial features of the graph nodes. The hybrid adjacency matrix of the first layer is determined based on the dynamic adjacency matrix and the physical prior adjacency matrix of the first layer. The dynamic graph convolutional features of the first layer are updated based on the hybrid adjacency matrix of the first layer; Repeat the above process until the dynamic adjacency matrix of the final layer is generated, and then generate the dynamic graph convolutional features of the final layer based on the dynamic adjacency matrix of the final layer.

3. The charging load scenario generation method according to claim 2, characterized in that: The physical prior adjacency matrix is ​​expressed by the following formula: In the formula, This represents the physical prior adjacency matrix between time c and time d. This represents the absolute time interval between time c and time d. , Indicates the length of the charging load sequence window. Indicates the maximum valid time range. Indicates the time decay coefficient. This indicates the similarity between the date types of time c and time d.

4. The charging load scenario generation method according to claim 3, characterized in that: The similarity between the date types of time c and time d is expressed by the following formula: In the formula, These represent the date types for time c and time d, respectively. This represents the Euclidean norm.

5. The charging load scenario generation method according to claim 2, characterized in that: The date type is obtained by concatenating the unique hot codes of the day of the week, the holiday signs, and the intraday time period types in that order.

6. The charging load scenario generation method according to claim 2, characterized in that: The hybrid adjacency matrix is ​​expressed by the following formula: In the formula, Indicates the first l The hybrid adjacency matrix of the layer, Indicates the first l The dynamic adjacency matrix of the layer, This indicates that the learnable fusion gating coefficients can be used. This represents the physical prior adjacency matrix.

7. The charging load scenario generation method according to claim 1, characterized in that: The quantum phase distribution features are evenly divided along the attention head dimension. The evenly divided results are set as the original mean vector and the original concentration parameter, respectively. The mean of the quantum phase angle is generated according to the original mean vector. The concentration of the quantum phase angle is obtained by exponential transformation of the original concentration parameter. Based on the mean and concentration of the quantum phase angle, a quantum phase tensor is obtained through differentiable sampling, and the query matrix is ​​phase-modulated according to the quantum phase tensor. The phase-modulated query matrix, key matrix, and value matrix are used to calculate the quantum attention output features through an attention mechanism.

8. The charging load scenario generation method according to claim 7, characterized in that: The mean of the quantum phase angle is generated from the original mean vector, and is expressed by the following formula: In the formula, The mean value of the quantum phase angle. , This represents the tanh activation function. Represents the original mean vector; The concentration of the quantum phase angle is obtained by exponentially transforming the original concentration parameter, and is expressed by the following formula: In the formula, Represents the original concentration parameter. The concentration of the quantum phase angle. This represents the numerical stability term.

9. The charging load scenario generation method according to claim 8, characterized in that: Based on the mean and concentration of the quantum phase angle, the quantum phase tensor is obtained through differentiable sampling, expressed by the following formula: In the formula, , Indicates the distribution from the standard normal distribution The random noise tensor sampled independently and identically distributed in the middle; Phase modulation of the query matrix based on the quantum phase tensor is expressed by the following formula: In the formula, This represents the query matrix after phase modulation. Represents the quantum phase tensor. This indicates element-wise multiplication. It represents the imaginary unit.

10. A charging load scenario generation system, comprising the charging load scenario generation method according to any one of claims 1-9, characterized in that: The dynamic graph convolution module is used to acquire the charging load sequence to determine the graph model nodes and initialize the graph node features. It constructs a physical prior adjacency matrix based on the similarity between the date types of the graph model nodes. The physical prior adjacency matrix, combined with the graph node features, generates dynamic graph convolution features through the dynamic graph convolution network. The quantum attention mechanism module is used to construct a query matrix, a key matrix, and a value matrix based on the convolutional features of a dynamic graph. It maps the convolutional features of the dynamic graph to quantum phase distribution features through a multilayer perceptron. It obtains a quantum phase tensor through differentiable sampling to modulate the phase of the query matrix. Based on the phase-modulated query matrix, key matrix, and value matrix, it calculates the quantum attention output features through the attention mechanism. The model training module is used to generate the final charging load prediction value based on the quantum attention output features, calculate the mean square error loss value by combining the charging load target sequence, and train the dynamic graph convolutional network-quantum attention mechanism model with the goal of minimizing the mean square error loss value. The typical scenario generation module is used to randomly select data from the historical normalized charging load sequence within the input window, input it into the model for rolling prediction, and stitch the results of each rolling prediction in the order of rolling prediction to generate the actual charging load scenario curve. The above process is repeated to generate a set of actual charging load scenario curves. Cluster the actual charging load scenario curves and extract the curves for typical charging load scenarios.

Citation Information

Patent Citations

  • Electric vehicle charging station load prediction method and system of time-space multi-graph convolutional network based on attention

    CN117273076A

  • AUV lithium ion battery thermal state prediction method

    CN121633862A