A power load prediction method based on adaptive multi-scale hypergraph neural network

By using an adaptive multi-scale hypergraph neural network, the problems of multi-scale feature interaction and temporal variation entanglement in power load forecasting are solved, achieving more accurate power load forecasting and showing broad application prospects.

CN119168113BActive Publication Date: 2026-02-06ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411011366.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2026-02-06
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

Existing power load forecasting methods suffer from semantic sparsity and noise interference when dealing with high-order interactions and temporal entanglement between multi-scale features, making it difficult to accurately predict power load changes.

Method used

An adaptive multi-scale hypergraph neural network is adopted. The adaptive hypergraph learning module models the high-order interactions between multi-scale features, introduces node and hyperedge constraint mechanisms, and uses the hypergraph convolutional attention mechanism to capture the high-order interactions between fine-grained and coarse-grained features. The updated features are then fused for prediction.

Benefits of technology

It improves the accuracy of power load forecasting, effectively aggregates features with similar semantic information and distinguishes temporal changes within each scale, thereby enhancing the accuracy of the forecast results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168113B_ABST
    Figure CN119168113B_ABST
Patent Text Reader

Abstract

The application discloses a power load prediction method based on an adaptive multi-scale hypergraph neural network, which comprises the following steps: obtaining sub-sequences of different time scales based on power load data and generating initial node features, initial hyperedge features and point-edge association matrices, and performing node constraints and hyperedge constraints; modeling high-order interactions between fine-grained features through a hypergraph convolution attention mechanism to obtain updated node features, and modeling high-order interactions between coarse-grained features through an attention mechanism to obtain updated hyperedge features; and fusing the updated node features and hyperedge features to perform power load prediction and model training and application. The method can adaptively model high-order interactions between multi-scale features and distinguish inherent time sequence changes within each scale, thereby improving the accuracy of power load prediction and having wide application prospects in the fields of power system operation, energy planning and energy efficiency management.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of power load prediction, and particularly relates to a power load prediction method based on an adaptive multi-scale supergraph neural network. BACKGROUND

[0002] With the continuous advancement of urbanization and industrialization, the demand for electricity is increasing, and the urban power load is gradually increasing, which has become an important problem. This situation not only affects people's daily life and work, but also brings great challenges to the relevant departments for power planning and energy management. Accurate prediction of future changes in power load can effectively guide people to supply power and deploy energy, and provide strong data support for power system management. Therefore, power load prediction has become one of the important and valuable research directions in the energy field.

[0003] Due to the influence of periodic human activities, the power load data in real life presents complex and diverse time series changes at different time scales. For example, the household electricity consumption usually decreases in the morning and increases at night at the day scale; and decreases during the week and increases on the weekend at the week scale. Considering the interaction between multi-scale features usually can obtain more accurate prediction results than analyzing single scale features alone, which has very important significance for long-term planning and early warning of power load.

[0004] In order to model the interaction between multi-scale features in power load data, many classic network structures have appeared, including Convolutional Neural Networks (CNNs), Graph Neural Networks (GNNs), Recurrent Neural Networks (RNNs) and Transformers. Although the above methods have achieved certain results, there are still two problems that limit their further development in the field of power load prediction.

[0005] The first point is semantic information sparsity. Unlike natural language processing (NLP) and computer vision (CV), a single time point in a time series contains less semantic information. Compared with pair-wise information interaction, high-order interaction between time points with similar semantic features (for example, adjacent time points and time points with a long distance but still with strong correlation) is more important in power load prediction. In order to solve the problem of semantic information sparsity, the existing method enhances local correlation and captures high-order interaction by dividing patches or using a pre-defined hypergraph structure. However, the simple patch division method or the pre-defined hypergraph structure may introduce a large amount of noise and it is difficult to discover implicit high-order interaction.

[0006] The second point is time series change entanglement. Due to the complexity and non-stationarity of power load sequences in real applications, the observed power load sequence usually contains a large amount of inherent time series changes (such as rising, falling and fluctuation, etc.), which may be mixed and overlapped with each other. Especially, the power load sequence presents different time series changes at different time scales. The time series changes at multiple scales are deeply entangled together, which brings great challenges to power load sequence prediction. In order to solve the problem of time series change entanglement, some recent methods use sequence decomposition or multi-period analysis to distinguish time series changes at different scales. However, the existing method is difficult to distinguish time series changes within each scale, so that multiple time series changes within each scale are overlapped and entangled together, which brings noise and redundant information interference. SUMMARY

[0007] In view of the above, the purpose of the present application is to provide a power load prediction method based on an adaptive multi-scale hypergraph neural network, which can adaptively model high-order interaction between multi-scale features in a power load prediction model, and can aggregate features with similar semantic information and distinguish inherent time series changes within each scale by introducing node and hyperedge constraint mechanisms, and has broad application prospects in the fields of power system operation, energy planning and energy efficiency management.

[0008] In order to achieve the above application purpose, the technical scheme provided by the present application is as follows:

[0009] The power load prediction method based on the adaptive multi-scale hypergraph neural network provided by the embodiment of the present application comprises the following steps:

[0010] The power load data is preprocessed and training samples are constructed;

[0011] In the multi-scale feature extraction module, the training samples are constructed into sub-sequences of different time scales;

[0012] In the adaptive hypergraph learning module, the initial node features, the initial hyperedge features and the point-edge association matrix of different time scales are obtained based on the subsequence, the node constraint based on the semantic similarity between nodes and corresponding hyperedges and the hyperedge constraint based on the distance similarity between hyperedges are performed, and a constraint loss is constructed;

[0013] In the multi-scale interaction module, the hypergraph convolution attention mechanism is used to model the high-order interaction between fine-grained features to obtain updated node features, and the attention mechanism is used to model the high-order interaction between coarse-grained features to obtain updated hyperedge features;

[0014] In the multi-scale fusion module, the updated node features and hyperedge features are fused for power load prediction, and the power load prediction model including the multi-scale feature extraction module, the adaptive hypergraph learning module, the multi-scale interaction module and the multi-scale fusion module is trained based on the prediction loss and the constraint loss;

[0015] The new power load data is input into the trained power load prediction model to obtain a prediction result.

[0016] Specifically, in the adaptive hypergraph learning module, the initial node features, the initial hyperedge features and the point-edge association matrix of different time scales are obtained based on the subsequence, including:

[0017] The power load data at different time points in the subsequence is taken as a node, the relationship between nodes is taken as a hyperedge, the initial node embedding and the hyperedge embedding are obtained, where N s and M s respectively represent the number of nodes and the number of hyperedges of the s-th scale, D is the feature dimension, is a real set, and the point-edge association matrix H s of the s-th scale is obtained by similarity calculation, and the calculation formula is as follows:

[0018]

[0019] where ReLU(·) is an activation function, Softmax(·) is a Softmax function, and is a bitwise multiplication, and the superscript T is a transpose operation, and finally the point-edge association matrix {H 1 ,…,H s ,…,H S} of S scales is obtained.

[0020] Given the subsequence of different time scales generated by the multi-scale feature extraction module, i.e., the subsequence of S scales {X 1 ,…,X s ,…,X S}, the initial node features of the s-th scale The calculation formula is as follows:

[0021]

[0022] Wherein, f(·) is realized by a multi-layer perception machine, and finally the initialization node features of S scales are obtained

[0023] After obtaining the initialization node features, the initialization hyperedge features are obtained by aggregating the node features connected by the hyperedge, and for the ith hyperedge on scale s The calculation formula of its features is as follows:

[0024]

[0025] Wherein, avg(·) is an average operation, is the neighbor node connected by the hyperedge on scale s, is the feature of the jth node on scale s , and finally the initialization hyperedge features of S scales are obtained 1 {ε s ,...,ε S}.

[0026] Preferably, the point-edge association matrix of the s-th scale is calculated by a sparsification strategy, and the calculation formula is as follows:

[0027]

[0028] Wherein, α∈[0,M s ] is the threshold value of the TopK(·) function, indicating the maximum number of neighbor hyperedges connected to the node, n is the node index, m is the hyperedge index, is all hyperedges connected to the nth node, and finally the calculation formula of the sparsified point-edge association matrix of the s-th scale is as follows:

[0029]

[0030] Wherein, β∈[0,1] is the threshold value of each element in the point-edge association matrix, and the final S-scale point-edge association matrix 1 {H s ,...,H S} is generated by

[0031] Specifically, in the adaptive hypergraph learning module, node constraints based on semantic similarity between nodes and hyperedges corresponding to the nodes and hyperedge constraints based on distance similarity between hyperedges are executed and constraint loss is constructed, including: ​

[0032] Perform node constraint, initialize node feature according to each scale And initialize hyperedge feature ε s Generate node constraint loss in each scale Including: for the jth node v j s The difference in semantic similarity with the corresponding hyperedge The calculation formula is as follows:

[0033]

[0034] Where, abs(·) is the absolute value operation, The node feature of The node feature of The hyperedge feature of the ith hyperedge in scale s The hyperedge feature of The neighbor node connected by the hyperedge In the s-th scale, the node constraint loss based on node constraint in the s-th scale The calculation formula is as follows:

[0035]

[0036] Where, N s The number of nodes in scale s;

[0037] Perform hyperedge constraint, initialize hyperedge feature correlation weight α i,j And the Euclidean distance Get the hyperedge constraint loss in each scale Including: first, calculate the correlation weight α i,j Between any two hyperedge features in scale s by calculating the cosine similarity

[0038]

[0039] Where, α i,j The correlation weight of the ith hyperedge And the jth hyperedge In scale s, cos<·> is the cosine similarity function, And The initialization feature of the ith and jth hyperedge in scale s, respectively, the superscript T is the transpose operation, ‖·‖2 is the 2-norm, then calculate the Euclidean distance Between the ith hyperedge And the jth hyperedge In scale s, the calculation formula is as follows:

[0040]

[0041] where D is the total feature dimension, d is the dimension index, and a is the correlation weight based on the relevance i,j and the Euclidean distance The hyper-edge constraint loss on the s-th scale is calculated The calculation formula is as follows:

[0042]

[0043] where γ>0 is the threshold of the Euclidean distance, and max(·) is the maximum operation;

[0044] According to the node constraint loss within each scale and the hyper-edge constraint loss The final constraint loss L is generated const , including: constraint loss L const The calculation formula is as follows:

[0045]

[0046] where λ∈[0,1] is a hyperparameter that controls the trade-off between the node constraint loss and the hyper-edge constraint loss.

[0047] Specifically, in the scale intra-interaction module of the multi-scale interaction module, the high-order interaction between fine-grained features is modeled through a hypergraph convolution attention mechanism, including:

[0048] Given the point-edge association matrix H s on scale s, first use the attention mechanism to capture the interaction strength of each node and its related hyper-edge on scale s, to obtain the updated point-edge association matrix The calculation formula is as follows:

[0049]

[0050] where [·,·] is the concatenation operation of node features and related hyper-edge features, g(c) is a trainable multi-layer perceptron, σ(·) is an activation function, is the adjacent hyper-edge connected to the i-th node on scale s, which is obtained through the point-edge association matrix H s on the s-th scale, is the feature of the k-th hyper-edge on scale s, is the feature of node ;

[0051] Then, input the updated point-edge association matrix The node features of each scale are updated by combining the multi-head attention mechanism and the normalized hypergraph Laplacian convolution The calculation formula is as follows:

[0052]

[0053] wherein, is an aggregation function for aggregating multi-head attention outputs, is the number of heads of the multi-head attention, and are the updated point-edge association matrix and the learnable weight adjacency matrix of the s-th scale, respectively, is the square inverse of the node degree matrix of the s-th scale, is the square inverse of the hyperedge degree matrix of the s-th scale, and the updated node features of the S scales are Specifically, in the scale-to-scale interaction module of the multi-scale interaction module, high-order interactions between coarse-grained features are modeled through an attention mechanism, including:

[0054] Based on the initialized hyperedge features of different time scales, the corresponding query Q, key K and value V are obtained through linear mapping, and then the high-order interactions between coarse-grained features are captured through an attention mechanism to output updated hyperedge features, and the calculation formula is as follows:

[0055]

[0056] wherein, Softmax(·) is a Softmax function, D K is the feature dimension of the key K, and the superscript T is a transpose operation,

[0057] is the updated hyperedge feature. Specifically, in the multi-scale fusion module, the updated node features and hyperedge features are fused for power load prediction, including:

[0058] The updated node features and hyperedge features are concatenated and input into a linear layer for multi-scale feature fusion, and the predicted power load values of the future H steps are output.

[0059] Specifically, in the multi-scale fusion module, the loss function used for training the power load prediction model includes:

[0060] The prediction loss is the error between the predicted value output by the power load prediction model and the true value, and the network parameters of the entire power load prediction model are adjusted according to the prediction loss of all samples;

[0061]

[0062] ​The constraint loss includes a node constraint loss of performing a node constraint construction and a hyperedge constraint loss of performing a hyperedge constraint construction, and the parameters of the adaptive hypergraph learning module are adjusted according to the constraint loss of all samples.

[0063] Specifically, the power load data is preprocessed and training samples are constructed, including:

[0064] The power load data is preprocessed including outlier processing and normalization processing, and the preprocessed power load data is divided into a training data set through a sliding time window; the training data set is batched according to a fixed batch size; and training samples are selected from the training data set by batch.

[0065] Specifically, in the multi-scale feature extraction module, the training samples are constructed into sub-sequences of different time scales, including:

[0066] The training samples are input into the multi-scale feature extraction module, and different time scale sub-sequences are generated by setting different aggregation windows using an aggregation function, the length of the next time scale sub-sequence is the length of the previous time scale sub-sequence divided by the aggregation window size corresponding to the previous time scale, and finally all sub-sequences form a sub-sequence set.

[0067] The present application captures rich and implicit high-order interactions between multi-scale features through the adaptive hypergraph learning module, and explicitly considers features with similar semantic information and inherent temporal changes within each scale through constraints. Compared with the prior art, the present application has at least the following beneficial effects:

[0068] (1) The present application designs an adaptive hypergraph learning module to model the rich and implicit high-order correlations between multi-scale features, and introduces a multi-scale interaction module to perform a hypergraph convolution attention mechanism, so that the model can capture the high-order interactions between multi-scale features in the power load sequence.

[0069] (2) The present application introduces a node and hyperedge constraint mechanism in the hypergraph learning process, which aggregates features with similar semantic information in the power load sequence using semantic similarity, and distinguishes inherent temporal changes within each scale using distance similarity, thereby improving the accuracy of the prediction result. BRIEF DESCRIPTION OF DRAWINGS

[0070] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0071] Figure 1is the overall flowchart of the power load prediction method based on the adaptive multi-scale hypergraph neural network provided by the embodiment of the application;

[0072] Figure 2 is the overall framework diagram of the power load prediction method based on the adaptive multi-scale hypergraph neural network provided by the embodiment of the application.

[0073] Figure 3 is the detailed schematic diagram of the node and hyperedge constraint mechanism provided by the embodiment of the application. DETAILED DESCRIPTION

[0074] In order to make the object, technical scheme and advantages of the application clearer, the application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the protection scope of the application.

[0075] The inventive concept of the application is that, in order to solve the problem of insufficient prediction accuracy caused by semantic information sparsity and time sequence change entanglement in the existing power load prediction, the embodiment of the application provides a power load prediction method based on an adaptive multi-scale hypergraph neural network. First, given power load data is preprocessed to construct training samples. Second, a multi-scale feature extraction module is used to map input sequences to multi-scale features to construct sub-sequences of different time scales. Then, an adaptive hypergraph learning module is introduced to automatically infer the hypergraph structure under different scales, fully excavate the rich and implicit high-order correlation between multi-scale features, and introduce node constraints and hyperedge constraints in the process of hypergraph learning, so that the model can aggregate features with similar semantic information and distinguish the inherent time sequence change in each scale. Second, a multi-scale interaction module is introduced to model the high-order interaction between multi-scale features based on the hypergraph structure. The intra-scale interaction module models the high-order interaction between fine-grained features, and the inter-scale interaction module models the high-order interaction between coarse-grained features. Finally, the updated multi-scale features are fused to realize the prediction of the power load sequence.

[0076] Figure 1 is the overall flowchart of the power load prediction method based on the adaptive multi-scale hypergraph neural network provided by the embodiment of the application, Figure 2 is the overall framework diagram of the power load prediction method based on the adaptive multi-scale hypergraph neural network provided by the embodiment of the application. As shown in Figure 1 and Figure 2 The embodiment provides a power load prediction method based on an adaptive multi-scale hypergraph neural network, which comprises the following steps:

[0077] The power load prediction task is defined as: given the observation value of the power load sequence of a certain station or region at T time points predict the power load value at H time points in the future

[0078] Step 1, according to the power load sensor collected power consumption data to build power load sequence, and then through the sliding time window to the processed data division obtained training data set.

[0079] For a given power load sequence, abnormal value detection, and remove the invalid value (such as beyond the normal range of values and zero value) in it. The data after eliminating outliers are normalized by Z-score, which is used to convert the data into a standard normal distribution with zero mean and unit variance, the formula is as follows:

[0080]

[0081] Where, x t is the value of the time step t in the power load sequence after eliminating outliers, μ is the average value of the power load sequence data, σ is the standard deviation of the power load sequence, x t ′ is the normalized value of time step t.

[0082] According to the experience of human set window size T, using fixed length of sliding step to divide the normalized data to get training data set.

[0083] Step 2, the training data set is divided into batches according to the fixed batch size, and the total number of batches is B.

[0084] According to the experience of human set batch size P, the training data set is divided into batches, and the total number of batches is B, the formula is as follows:

[0085]

[0086] Where, N Samples is the total number of samples in the training data set, is the integer.

[0087] Step 3, from the training data set, a batch of training samples with index b is selected in sequence, where b∈{1,2,…,B}. For each training sample in the batch, repeat steps 4-13.

[0088] Step 4, the training sample sequence is input into the multi-scale feature extraction module to construct S scale subsequence {X 1 ,…,X s ,…,X S}, where is the original input sample sequence, X s is the subsequence of the s(1

[0089] Given a sample power load sequence The multi-scale feature extraction module generates S scale sub-sequences by setting different aggregation windows, and the s-th scale sub-sequence is represented as Wherein is the power load sequence at the s-th scale t moment, D is the feature dimension, is a real set, is the sequence length of the s-th scale, that is, the number of nodes, l s-1 is the aggregation window size of the s-1-th scale. The calculation formula of the specific aggregation process is as follows:

[0090]

[0091] Wherein, Agg(·) is an aggregation function, including convolution or pooling, etc. θ s-1 is the learnable parameter of the aggregation function at the s-1-th scale.

[0092] Finally, the multi-scale feature extraction module generates S scale sub-sequences {X 1 ,…,X s ,…,X S}, wherein represents the original input sample sequence, X s represents the s-th (1<s≤S) scale sub-sequence.

[0093] Step 5, embed each scale node and hyperedge embedding into the adaptive hypergraph learning module to obtain S scale point edge association matrix {H 1 ,…,H s ,…,H S}, wherein H s is the s-th (1<s≤S) scale point edge association matrix.

[0094] As shown in (b) of Figure 2 , the power load data at different time in the sub-sequence is taken as the node, and the relationship between the nodes is taken as the hyperedge. First, initialize two parameters, node embedding and hyperedge embedding , wherein M s is a hyperparameter, representing the number of hyperedges at the s-th scale. Then the s-th scale point edge association matrix H s is obtained by similarity calculation, and the calculation formula is as follows:

[0095]

[0096] where ReLU(·) is an activation function to eliminate weak connections, and Softmax(·) is a Softmax function to normalize the values of H s , and is a bit-wise multiplication, and T is a transpose operation. To reduce the subsequent computational cost and noise interference, a sparsification strategy is designed, and its calculation formula is as follows:

[0097]

[0098] where α∈[0,M s ] is the threshold value of the TopK(·) function, represents the maximum number of neighbor hyper-edges connected to the node, n is the node index, m is the hyper-edge index, is all hyper-edges connected to the nth node, and the calculation formula of the sparsified point-edge association matrix H of the s-th scale is as follows:

[0099]

[0100] where β∈[0,1] is the threshold value of each element in the point-edge association matrix. Finally, the S-scale point-edge association matrix set {H 1 ,…,H s ,…,H S} is obtained.

[0101] It should be noted that the hypergraph is defined as where ε={e1,...,e m ,...,e M} is a hyper-edge set, is a node set. Each hyper-edge represents high-order interaction by connecting a group of nodes . The topology structure of the hypergraph is represented by the point-edge association matrix H , and its elements H nm are defined as follows:

[0102]

[0103] where the degree of the nth node is defined as and the degree of the m-th hyper-edge is defined as The degrees of the nodes and the hyper-edges are stored in the diagonal matrices D and D .

[0104] Step 6, according to the S-scale subsequence set {X 1 ,…,X s ,…,X S} and the point-edge association matrix set {H 1 ,…,H s ,…,H S, obtain the initialized node features at S scales and the initialized hyperedge features {ε 1 ,…, ε s ,..., ε S}, where and ε s are the initialized node features and initialized hyperedge features at the s-th (1 < s ≤ S) scale, respectively.

[0105] Given the S-scale subsequences {X 1 ,…, X s ,…, X S} generated by the multi-scale feature extraction module, first obtain the initialized node features at the s-th scale The calculation formula is as follows:

[0106]

[0107] where f(·) is implemented by a multi-layer perceptron (MLP). Then obtain the initialized node features at S scales

[0108] As Figure 3 shown in (a), after obtaining the initialized node features, the initialized hyperedge features are obtained by aggregating the node features connected by the hyperedges. Specifically, for the i-th hyperedge at scale s its feature The calculation formula is as follows:

[0109]

[0110] where avg(·) is the averaging operation, is the neighbor nodes connected by the hyperedge at scale s, is the feature of the j-th node at scale s. Finally, obtain the S-scale initialized hyperedge features {ε 1 ,…, ε s ,…, ε S}.

[0111] Step 7, perform node constraints, and generate the node constraint loss within each scale according to the initialized node features and the initialized hyperedge features ε s at each scale

[0112] After obtaining the initialized node features and the initialized hyperedge features ε sSubsequently, to aggregate features with similar semantic information and reduce noise interference, node constraints based on the semantic similarity between nodes and their corresponding hyperedges were introduced. For example... Figure 3 As shown in (b), for the j-th node at scale s Its semantic similarity difference with the corresponding hyperedge The calculation formula is as follows:

[0113]

[0114] Where abs(·) is the absolute value operation, and the node constraint loss based on node constraints at the s-th scale is... The calculation formula is as follows:

[0115]

[0116] Where, N s Let be the number of nodes at scale s.

[0117] Step 8: Implement hyperedge constraints by calculating the correlation weights α between hyperedge features at each scale. i,j and European distance Obtain the hyperedge constraint loss within each scale.

[0118] To address the problem of temporally variable entanglement, a hyperedge constraint mechanism based on distance similarity is introduced. For example... Figure 3 As shown in (c), the correlation weight α between any two hyperedge features at scale s is first obtained by calculating the cosine similarity. i,j To reflect its correlation, its calculation formula is as follows:

[0119]

[0120] Where, α i,j Let i be the i-th hyperedge on scale s and the j-th superedge The relevance weights are given by cos<·>, which is the cosine similarity function. and Let be the initialization features of the i-th and j-th hyperedges at scale s, respectively. The superscript T indicates the transpose operation, and ||·|2 represents the 2-norm. Then, the i-th hyperedge at scale s is calculated. and the j-th superedge Euclidean distance between The calculation formula is as follows:

[0121]

[0122] Where D is the total feature dimension, and d is the dimension index. Subsequently, based on the relevance weight α... i,jand Euclidean distance Computing hyper-edge constraint loss on the s-th scale The formula is as follows:

[0123]

[0124] Wherein, α>0 is the threshold of Euclidean distance, max(·) is the maximum operation. When α i,j =1, and Similarly, the hyper-edge constraint loss is If becomes larger, that is, the similar hyper-edge Euclidean distance becomes larger, at this time, the hyper-edge constraint loss will increase. On the contrary, when α i,j =0, and are not similar, at this time, the hyper-edge constraint loss is If is lower than the threshold and becomes smaller, that is, the dissimilar hyper-edge Euclidean distance becomes smaller, at this time, the hyper-edge constraint loss will increase. Other cases are between the above two.

[0125] Step 9, generating the final constraint loss L according to the node constraint loss and the hyper-edge constraint loss const in each scale.

[0126] Generating the final constraint loss L according to the node constraint loss and the hyper-edge constraint loss const , the formula is as follows:

[0127]

[0128] Wherein, λ∈[0,1] is a hyper-parameter for controlling the trade-off between the node constraint loss and the hyper-edge constraint loss.

[0129] Step 10, sending the point-edge association matrix {H 1 ,…,H s ,…,H S} of S scales, the initialized node features and the initialized hyper-edge features {ε 1 ,…,ε s ,...,ε S} into the intra-scale interaction module, capturing the high-order interaction between the node and the node fine-grained features in the scale through the hypergraph convolution attention mechanism, and outputting the updated multi-scale node features

[0130] To capture high-order interactions between fine-grained features within a scale, a hypergraph convolutional attention mechanism is introduced into the scale-interaction module. Specifically, given H... s First, an attention mechanism is used to capture each node at scale s. The updated vertex-edge correlation matrix is ​​obtained by considering the interaction strength of the vertex and its associated hyperedges. The calculation formula is as follows:

[0131]

[0132] Where [·,·] represents the concatenation operation of node features and their associated hyperedge features, g(·) is a trainable multilayer perceptron, and σ(δ) is an activation function, such as LeakerReLU and ELU. To connect to the i-th node on scale s The adjacent hyperedges are connected through the point-edge correlation matrix H at the s-th scale. s Obtain Let k be the hyperedge at scale s. Features For nodes Its characteristics.

[0133] Finally, input the updated vertex-edge association matrix. The node features at each scale are updated by combining multi-head attention and normalized hypergraph Laplacian convolution. The calculation formula is as follows:

[0134]

[0135] in, An aggregation function that aggregates the outputs of multi-head attention. The number of heads receiving multi-head attention. and They are respectively the first on scale s The updated vertex-edge association matrix and the learnable weighted adjacency matrix. The squared inverse of the degree matrix of nodes at scale s. The square inverse of the hypermarginality matrix at scale s is given, and the updated node features at S scales are:

[0136] Step 11, initialize the hyperedge features {δ} at S scales. 1 ,…,ε s ,...,ε S The data is fed into the inter-scale interaction module, where an attention mechanism is used to capture the high-order interactions between the hyperedge and its coarse-grained features, resulting in updated hyperedge features.

[0137] The inter-scale interaction module is used to capture high-order interactions between coarse-grained features, specifically, based on multi-scale hyperedge features 1 ,…,ε s ,...,ε S}Firstly, the corresponding query Q, key K and value V are obtained through linear mapping, and then the high-order interaction between coarse-grained features is captured through attention mechanism, and the updated hyperedge feature is output, and the calculation formula is as follows:

[0138]

[0139] Wherein, D K is the feature dimension of the key K, the superscript T is the transposition operation, is the updated hyperedge feature.

[0140] Step 12, the updated node and hyperedge features are spliced to input the linear layer (Linear layer), and the power load prediction value of future H steps is output

[0141] Through the intra-scale interaction module and the inter-scale interaction module, the updated node features of S scales And the updated hyperedge feature After splicing, it is input into the linear layer for multi-scale feature fusion, and the power load prediction value of future H steps is output

[0142] Step 13, calculate the prediction loss L mse , that is, the error between the true value Corresponding to the training sample and the prediction value Output by the actual model.

[0143] In the present application, the mean square error loss is used as the prediction loss L mse , that is, the error between the true value Corresponding to the training sample and the prediction value Output by the actual model, and the calculation formula is as follows:

[0144]

[0145] Wherein, And The true value and the prediction value of future H steps are respectively.

[0146] Step 14, calculate the prediction loss And the constraint loss

[0147] The prediction loss The calculation formula is as follows:

[0148]

[0149] wherein L mse (k) is the prediction loss of the kth sample in the batch, and K is the number of samples in each batch. The constraint loss of all samples in the batch is The calculation formula is as follows:

[0150]

[0151] wherein L const (k) is the constraint loss of the kth sample in the batch.

[0152] Step 15: Adjust the network parameters in the entire power load prediction model according to the prediction loss of all samples in the batch Adjust the network parameters in the entire power load prediction model.

[0153] Adjust the network parameters in the entire power load prediction model according to the prediction loss of all samples in the batch Update the network parameters in the entire power load prediction model, and the calculation formula is as follows:

[0154]

[0155] wherein θ all is the network parameter in the entire model, and η is the learning rate.

[0156] Step 16: Adjust the parameters of the adaptive hypergraph learning module according to the constraint loss of all samples in the batch Adjust the parameters of the adaptive hypergraph learning module.

[0157] Adjust the parameters of the adaptive hypergraph learning module according to the constraint loss of all samples in the batch Update the parameters of the adaptive hypergraph learning module, and the calculation formula is as follows:

[0158]

[0159] wherein θ hyper is the network parameter of the adaptive hypergraph learning module, and η is the learning rate.

[0160] Step 17: Repeat steps 3-16 until all batches of the training data set participate in model training.

[0161] Step 18: Repeat steps 3-17 until the specified number of iterations is reached.

[0162] Step 19: Input the power load sequence to be predicted into the trained model to obtain the prediction result.

[0163] To sum up, the power load prediction method based on the adaptive multi-scale hypergraph neural network provided by the embodiment of the application designs an adaptive hypergraph learning module to model the rich and implicit high-order correlation between multi-scale features, and introduces a multi-scale interaction module to perform a hypergraph convolution attention mechanism, so that the model can capture the high-order interaction between the multi-scale features in the power load sequence. In the hypergraph learning process, a node and hyperedge constraint mechanism is introduced, which aggregates the features with similar semantic information in the power load sequence by using semantic similarity, and distinguishes the inherent time sequence change within each scale by using distance similarity, thereby improving the accuracy of the prediction result. It has broad application prospects in the fields of power system operation, energy planning and energy efficiency management.

[0164] The above detailed description of the specific embodiments of the application has described the technical solutions and beneficial effects of the application. It should be understood that the above description is only the most preferred embodiment of the application and is not intended to limit the application. Any modifications, supplements and equivalent replacements made within the principle range of the application shall be included in the protection scope of the application.

Claims

1. A power load forecasting method based on an adaptive multi-scale hypergraph neural network, characterized in that, Includes the following steps: Preprocess the power load data and construct training samples; In the multi-scale feature extraction module, the training samples are constructed into subsequences at different time scales; In the adaptive hypergraph learning module, initial node features, initial hyperedge features, and point-edge association matrices at different time scales are obtained based on subsequences. Node constraints based on semantic similarity between nodes and their corresponding hyperedges and hyperedge constraints based on distance similarity between hyperedges are executed, and constraint loss is constructed. In the multi-scale interaction module, the updated node features are obtained by modeling the high-order interaction between fine-grained features through the hypergraph convolutional attention mechanism, and the updated hyperedge features are obtained by modeling the high-order interaction between coarse-grained features through the attention mechanism. In the multi-scale fusion module, the updated node features and hyperedge features are fused to predict power load. The power load prediction model, which includes a multi-scale feature extraction module, an adaptive hypergraph learning module, a multi-scale interaction module, and a multi-scale fusion module, is trained based on prediction loss and constraint loss. The new power load data is input into the trained power load prediction model to obtain the prediction results.

2. The power load forecasting method based on adaptive multi-scale hypergraph neural network according to claim 1, characterized in that, In the adaptive hypergraph learning module, initial node features, initial hyperedge features, and vertex-edge association matrices at different time scales are obtained based on subsequences, including: The node embedding is initialized by treating the power load data at different times in the subsequence as nodes and the relationships between nodes as hyperedges. and hyper-edge embedding Where N s and M s Let represent the number of nodes and the number of hyperedges at the s-th scale, respectively, and D be the feature dimension. Given a set of real numbers, the point-edge association matrix H at the s-th scale is obtained through similarity calculation. s The calculation formula is as follows: Where ReLU(·) is the activation function, Softmax(·) is the softmax function, ⊙ represents bitwise multiplication, and the superscript T indicates the transpose operation. Finally, we obtain the point-edge affinity matrix {H} with S scales. 1 ,…,H s ,…,H S }; Given S subsequences {X} at different scales generated by a multi-scale feature extraction module. 1 ,…,X s ,…,X S }, thus obtaining the initial node features at the s-th scale. The calculation formula is as follows: Here, f(·) is implemented by a multilayer perceptron, and finally, S initial node features at different scales are obtained. After obtaining the initialized node features, the initialized hyperedge features are obtained by aggregating the node features connected by the hyperedges. For the i-th hyperedge at scale s... Its characteristics The calculation formula is as follows: Where avg(·) is the averaging operation. For scale s, by hyperedge Connected neighbor nodes, For the j-th node on scale s The features are then used to obtain S initial hyperedge features at different scales {ε}. 1 ,…,ε s ,…,ε S } 3. The power load forecasting method based on adaptive multi-scale hypergraph neural network according to claim 2, characterized in that, The sparsity strategy is used to calculate the point-edge affinity matrix at the s-th scale, and the calculation formula is as follows: Where α∈[0,M] s [] is the threshold of the TopK(·) function, representing the maximum number of neighbor hyperedges connected to the node, where n is the node index and m is the hyperedge index. To connect all hyperedges of the nth node, the final sparsed vertex-edge incidence matrix at scale s is... The calculation formula is as follows: Where β∈[0,1] is the threshold of each element in the vertex-edge association matrix, through Generate the final point-edge association matrices {H} at S scales. 1 ,…,H s ,…,H S } 4. The power load forecasting method based on adaptive multi-scale hypergraph neural network according to claim 1, characterized in that, In the adaptive hypergraph learning module, node constraints based on semantic similarity between nodes and their corresponding hyperedges and hyperedge constraints based on distance similarity between hyperedges are executed, and constraint losses are constructed, including: Execute node constraints and initialize node features according to each scale. and initialization of hyperedge features ε s Generate node constraint loss within each scale Including: for the j-th node on scale s Its semantic similarity difference with the corresponding hyperedge The calculation formula is as follows: Here, abs(·) is the absolute value operation. for Node characteristics, For the i-th hyperedge on scale s The hyperedge features, For scale s, by hyperedge The node constraint loss based on node constraints at the s-th scale for connected neighboring nodes. The calculation formula is as follows: Where, N s Let be the number of nodes at scale s; To enforce hyperedge constraints, initialize the correlation weights α between hyperedge features at each scale. i,j and European distance Obtain the hyperedge constraint loss within each scale. This includes: firstly, calculating the cosine similarity to obtain the correlation weight α between any two hyperedge features at scale s. i,j The calculation formula is as follows: Where, α i,j For the i-th hyperedge on scale s and the j-th superedge The relevance weights are given by cos<·>, which is the cosine similarity function. and Let be the initialization features of the i-th and j-th hyperedges at scale s, respectively. The superscript T indicates the transpose operation, and ||·|2 represents the 2-norm. Then, the i-th hyperedge at scale s is calculated. and the j-th superedge Euclidean distance between The calculation formula is as follows: Where D is the total feature dimension, d is the dimension index, and then the relevance weight α is applied. i,j and European distance Calculate the hyperedge constraint loss at the s-th scale. The calculation formula is as follows: Where γ>0 is the threshold for Euclidean distance, and max(·) is the maximum value operation; Based on node constraint loss within each scale and super-edge constraint loss Generate the final constraint loss L const Including: constraint loss L const The calculation formula is as follows: Where λ∈[0,1] is the hyperparameter that balances the control node constraint loss and the hyperedge constraint loss.

5. The power load forecasting method based on adaptive multi-scale hypergraph neural network according to claim 1 or 2, characterized in that, In the intra-scale interaction module of the multi-scale interaction module, high-order interactions between fine-grained features are modeled through a hypergraph convolutional attention mechanism, including: Given the point-edge incidence matrix H at scale s s First, an attention mechanism is used to capture each node at scale s. The updated vertex-edge correlation matrix is ​​obtained by considering the interaction strength of the vertex and its associated hyperedges. The calculation formula is as follows: Where [·,·] represents the concatenation operation of node features and their related hyperedge features, g(·) is a trainable multilayer perceptron, and σ(·) is the activation function. To connect to the i-th node on scale s The adjacent hyperedges are connected through the point-edge correlation matrix H at the s-th scale. s Obtain Let k be the hyperedge at scale s. Features For nodes Features; Then, input the updated vertex-edge association matrix. The node features at each scale are updated by combining a multi-head attention mechanism and a normalized hypergraph Laplacian convolution. The calculation formula is as follows: Where ⊕ is the aggregation function that aggregates the outputs of multi-head attention. The number of heads for multi-head attention. and They are respectively the first on scale s The updated vertex-edge association matrix and the learnable weighted adjacency matrix. The squared inverse of the degree matrix of nodes at scale s. The square inverse of the hypermarginality matrix at scale s is given, and the updated node features at S scales are:

6. The power load forecasting method based on adaptive multi-scale hypergraph neural network according to claim 1 or 2, characterized in that, In the inter-scale interaction module of the multi-scale interaction module, high-order interactions between coarse-grained features are modeled through an attention mechanism, including: Based on the initialized hyperedge features at different time scales, the corresponding query Q, key K, and value V are first obtained through linear mapping. Then, an attention mechanism is used to capture the high-order interactions between coarse-grained features, and the updated hyperedge features are output. The calculation formula is as follows: Where Softmax(·) is the Softmax function, D K Let K be the feature dimension of key K, and the superscript T denotes the transpose operation. This is the updated hyperedge feature.

7. The power load forecasting method based on adaptive multi-scale hypergraph neural network according to claim 1, characterized in that, In the multi-scale fusion module, the updated node features and hyperedge features are fused to predict power load, including: The updated node features and hyperedge features are concatenated and then input into a linear layer for multi-scale feature fusion, outputting the predicted power load value for the next H steps.

8. The power load prediction method based on adaptive multi-scale hypergraph neural network according to claim 4, characterized in that, In the multi-scale fusion module, the loss functions used to train the power load prediction model include: Prediction loss is the error between the predicted value and the actual value output by the power load prediction model. The network parameters of the entire power load prediction model are adjusted based on the prediction loss of all samples. The constraint loss, which includes the node constraint loss constructed by performing node constraints and the hyperedge constraint loss constructed by performing hyperedge constraints, is used to adjust the parameters of the adaptive hypergraph learning module based on the constraint loss of all samples.

9. The power load forecasting method based on adaptive multi-scale hypergraph neural network according to claim 1, characterized in that, The preprocessing of power load data and the construction of training samples include: The power load data is preprocessed, including outlier handling and normalization. The preprocessed power load data is divided into training datasets by using a sliding time window. The training datasets are then divided into batches according to a fixed batch size. Training samples are selected from the training datasets in batches.

10. The power load forecasting method based on adaptive multi-scale hypergraph neural network according to claim 1, characterized in that, In the multi-scale feature extraction module, the training samples are constructed into subsequences at different time scales, including: The training samples are input into the multi-scale feature extraction module. The aggregation function is used to generate subsequences at different time scales by setting different aggregation windows. The length of the subsequence at the next time scale is the length of the subsequence at the previous time scale divided by the size of the aggregation window corresponding to the previous time scale. Finally, all the subsequences are combined into a subsequence set.