Power system load online prediction method based on space-time dynamic graph

By constructing a dynamic graph model of space-time, combined with matrix polynomials and graph drift perception mechanisms, the problem of transformer correlation dynamic modeling in online prediction of power systems is solved, and efficient and accurate load prediction is achieved, adapting to flow data changes and reducing resource consumption.

CN120377247APending Publication Date: 2025-07-25NANKAI UNIV

Patent Information

Application Number
CN202510475584.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing power system time series prediction methods are difficult to adapt to the complex changes in flow data in online learning scenarios, resulting in a decrease in prediction accuracy and real-time reduction, and it is impossible to effectively model the dynamic correlation between different transformers.

Method used

The power system load online prediction method based on space-time dynamic graph is adopted, and the space-time dynamic graph model is constructed through time-domain convolution network and graph convolution network. Combined with matrix polynomials and graph drift perception mechanism, the graph structure offset is detected and online learning is carried out. The graph memory module is used to avoid catastrophic forgetting, and dynamic modeling of the transformer association mode is realized.

Benefits of technology

It improves the online prediction accuracy of the load time series of the power system, reduces the computational complexity and resource consumption of the model, and enhances the real-time response speed and adaptability of the model in industrial scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120377247A_ABST
    Figure CN120377247A_ABST
Patent Text Reader

Abstract

The invention provides a power system load online prediction method based on a space-time dynamic graph, and belongs to the technical field of time series prediction, and the method comprises the following steps: S1, power system time series data collection; s2, constructing a space-time dynamic graph model, wherein a main body of the space-time dynamic graph model is composed of a time domain convolutional network (TCN) and a graph convolutional network (GCN); s3, constructing an online time domain convolution module; s4, constructing an online graph convolution module which comprises a matrix polynomial, a graph drift sensing mechanism and a graph memory module; the method aims to construct a time series online prediction model based on a space-time dynamic graph by using power system load data, the whole model captures space-time correlation of the power system load data through a time domain convolutional network TCN and a graph convolutional network GCN, a dynamic adjacency matrix is generated based on a matrix polynomial in a GCN module, and the dynamic adjacency matrix is predicted and trained online. And modeling the evolution trend of the transformer association mode to improve the accuracy of online prediction of the time series of the power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of time series prediction, and particularly relates to an online prediction method for power system load based on a spatio-temporal dynamic graph. Background Art

[0002] The load values of all transformers at different times in a power system form a set of multivariate time series. Predicting future data based on the historical data of this series can guide future production planning and early warning of equipment failures. In production practice, due to reasons such as equipment aging and faults, power time series often have the problem of concept drift, that is, the statistical distribution of the time series changes dynamically with time, and the correlation between different transformers also changes accordingly. Existing time series prediction methods are mainly divided into statistical methods and deep learning methods. The former has too high requirements for the statistical characteristics of the series and is slow in processing large-scale power system data. The latter generally assumes that the statistical distribution of the time series remains unchanged during training, resulting in a gradual decrease in its prediction accuracy over time. Retraining the model will also consume additional time and computing power, resulting in a reduction in the real-time performance of the prediction.

[0003] Currently, existing patents on power system time series analysis mainly perform model training based on an offline batch learning method. For example, CN119129157A: A power grid transient angle stability evaluation method based on a spatio-temporal dynamic graph model; CN116129212A: A power load prediction method and system based on a graph neural network; CN110298490A: A time series power load combined prediction method and a computer-readable storage medium based on multiple regression, which are difficult to adapt to the complex changes of streaming data in an online learning scenario and have large errors in real-time prediction. Existing time series online prediction technologies mainly use statistical methods, with slow prediction speeds and unable to model the dynamic correlation between different transformers in multivariate time series. For example, CN103456021B: An online prediction method for electroencephalogram signals based on a kernel recursive least squares adaptive tracking algorithm; CN103197983B: An online time series prediction method for service component reliability based on a probabilistic graph model. Summary of the Invention

[0004] Compared with the prior art, the present invention designs an online prediction method for power system load based on a spatio-temporal dynamic graph, models the evolutionary trend of the transformer association pattern based on the dynamic graph idea, and efficiently performs online prediction of the power system load time series.

[0005] The present invention adopts the following technical solutions to solve the above problems:

[0006] An online prediction method for power system load based on a spatio-temporal dynamic graph, the method comprising the following steps:

[0007] S1: Power system time-series data acquisition: At each time step t, the system obtains the load data sequence D by collecting the load values of several transformers at fixed positions currently. (t) ∈R N , where N represents the number of transformers;

[0008] S2: Spatiotemporal dynamic graph network construction: Construct a spatiotemporal dynamic graph model whose main body consists of a temporal convolutional network (TCN) and a graph convolutional network (GCN). For time step t, the model receives the historical load time-series data D (t-H+1 : t) ∈R H×N×1 , where H is the number of historical time steps for looking back, and it is obtained through linear transformation C is the number of hidden features:

[0009]

[0010] Subsequently, is input into the S-layer TCN and GCN to obtain the output of the last layer After linear transformation and ReLu activation function, the final prediction is obtained

[0011]

[0012] S3: Online temporal convolutional module construction: Based on the traditional temporal convolutional network TCN, the online temporal convolutional network module promotes the online learning of the model from the time dimension based on the existing FSNet technology;

[0013] S4: Online graph convolutional module construction: Based on the available data, the Pearson correlation coefficient between each transformer is calculated to obtain the matrix basis. Subsequently, a matrix polynomial is generated by combining variable coefficients. Whether the graph structure has shifted is detected through the graph drift perception mechanism. If a shift occurs, the graph memory is extracted. The matrix polynomial, graph drift perception mechanism, and graph memory module construct the online graph convolutional module;

[0014] S5: Model online prediction and training: Different from the conventional time-series prediction setting, in online time-series prediction, data arrives in batches in the form of a data stream, and the training and prediction of the model are carried out synchronously for each batch.

[0015] Furthermore, in S1, in online prediction, the acquisition of time-series data is presented in the form of stream data, and the system predicts the future load data synchronously with data acquisition.

[0016] Furthermore, in S1, before online prediction, a part of the historical data D warm is selected for overall data normalization and cross-validation of model hyperparameters.

[0017] Further, in S3, the construction process of the online time-domain convolution module is as follows:

[0018] At time step t, the l-th layer of TCN (l ∈ [1, S]) receives the input H l-1 is the length of the time dimension after being transformed by the (l - 1)-th layer of TCN (H0 = H), and there is:

[0019]

[0020] where Conv1D is the one-dimensional convolution adopted in TCN, and θ l is the parameter of the l-th layer of TCN, is the output of the l-th layer of TCN, and H l is the length of the time dimension after being transformed by the l-th layer of TCN;

[0021] Through the FSNet technology, is updated online adaptively to obtain

[0022]

[0023] Further, in S4, the construction process of the matrix polynomial is as follows

[0024] S411: Based on the available data The matrix basis A ∈ R N×N of the matrix polynomial is obtained by calculating the Pearson correlation coefficient between each transformer, and the value of the element in the i-th row and j-th column of it is:

[0025]

[0026] Here, N represents the number of transformers, represents the load value of the i-th transformer;

[0027] S412: For time step t, the l-th layer of GCN (l ∈ [1, S]), maps the gradient at time step t - 1 to the coefficients of the matrix polynomial through a linear layer K is the order of the matrix polynomial, and the coefficients are given a non-linear representation through the activation function of Sigmoid:

[0028]

[0029] S413: Introduce the obtained matrix polynomial coefficients into the graph convolution operation, and fit the evolution function of the transformer adjacency matrix through the corresponding matrix polynomial;

[0030] S414: For the output of the same-layer TCN Transform the dimension to obtain Perform operations with the fused matrix polynomial to obtain the output of the GCN

[0031]

[0032] Here, P l ∈R C×C is the parameter matrix, is the i-th order coefficient of

[0033] Furthermore, in S4, catastrophic forgetting is detected by judging whether the currently generated graph structure is similar to the most recent historical graph structure. If not, it means that the learned graph structure has shifted, and then the graph memory is read and written

[0034] Furthermore, in S4, considering that the graph structure describing the transformer association in the power system has no complex deep topological relationship, to reduce the complexity of the model, the similarity can be represented by calculating the Manhattan distance between two adjacency matrices, so as to pay attention to the differences of individual elements through the L1 norm and better capture the similarity of the graph structure; for general matrices A, B ∈ R m×n , the calculation method of their Manhattan distance is as follows, a i,j , b i,j respectively represent the elements in the i-th row and j-th column of matrices A and b

[0035]

[0036] For simplicity of writing, the subscript l is omitted in this section. Based on the characteristics of matrix polynomials, when the coefficients of two matrix polynomials are relatively close, their corresponding graphs must be similar. As long as the coefficients corresponding to the graph G (t-1) in the previous time step and the current graph G (t) differ greatly, the graph memory M l is read and written, which can ensure the detection of graph drift. Therefore, the trigger condition of the graph memory is as follows

[0037] ||a (t-1) - a (t) ||2 ≥ ε

[0038] where a (t-1) is the matrix polynomial coefficient corresponding to G (t-1) , a (t) is the matrix polynomial coefficient corresponding to G (t)The corresponding matrix polynomial coefficients, ε is a preset threshold. The L2 norm of the difference of the corresponding matrix polynomial coefficients can represent the similarity between two graphs, which not only reduces the computational complexity but also reflects the lossless information mapping between the matrix polynomial and its coefficients, enhancing the consistency of the model.

[0039] Furthermore, in S4, historical memory may be needed for auxiliary learning when generating dynamic graphs. The property of the matrix polynomial enables the coefficient vector a to represent the corresponding entire graph matrix. Therefore, the graph can be stored by storing the coefficient vector a to save storage space, and a graph memory bank M is constructed for each layer. l ∈R m×(K+1) , storing typical graph patterns, where m is the number of memory units and K is the order of the matrix polynomial. When catastrophic forgetting may occur, the model reads the historical graph memory to update the current matrix polynomial coefficients a. l , and write it into the memory.

[0040] Furthermore, before performing graph convolution operations, the memory needs to be read first, and the process is as follows:

[0041] S431: Calculate the attention score according to the similarity between the current matrix polynomial coefficients and the memory units in the graph memory bank:

[0042] score l =Softmax(M l a l )

[0043] S422: Select r highest attention scores score′ l ∈R r , and their corresponding r most relevant memory units M′ l ∈R r×(K+1) :

[0044] M′ l ,score′ l =TopK(score l )

[0045] S433: Multiply the historical memory by the corresponding weights to extract the fused memory:

[0046]

[0047] where score′ l,i is the i-th score of score′ l , and M′ l,i is the i-th memory unit of M′ l :;

[0048] S434: Combine the extracted historical memories Update the matrix polynomial coefficients of the current layer to obtain

[0049]

[0050] where ρ is the coefficient vector update weight. Use the obtained to replace a l Generate a matrix polynomial and perform a graph convolution operation;

[0051] S435: Use a l to update the corresponding memory bank:

[0052]

[0053] Here, σ is the update weight of the memory bank, represents the tensor product operation.

[0054] Furthermore, in S5, set T batches (b1, b2,..., b T ), in batch b t (t ∈ [1, T]), the model receives the lookback window x (t) = D (t-H+1:t) = (D (t-H+1) , D (t-H+2) ,..., D (t) ), H is the number of historical time steps for lookback, and predict for the next F time steps, there is At the next time step, the model will receive the corresponding true value y (t) , and train once accordingly to update the parameters. The training for each batch uses the MSE loss. For batch b t , its loss function is:

[0055]

[0056] Here, and are the predicted value and the true value of the i-th transformer respectively, N is the number of transformers. At each time step t, the model parameters can be continuously optimized by minimizing L (t) .

[0057] The beneficial effects of the present invention are as follows:

[0058] 1. The core innovation point of this method is to model the evolutionary trend of the transformer association pattern based on the dynamic graph idea, and efficiently perform online prediction of the power system load time series.

[0059] 2. The association between different transformers can be represented by an adjacency matrix. Based on a fixed matrix basis, this method fits the evolution function of the transformer adjacency matrix by learning a gradient matrix polynomial to online model the dynamic changes of transformer associations.

[0060] 3. The proposed graph memory module and graph drift perception mechanism can avoid the catastrophic forgetting problem during the online learning process.

[0061] 4. In the graph memory module, this method establishes a lossless mapping between the matrix polynomial and its corresponding coefficients, realizes the storage of transformer association patterns at a low memory consumption cost, and fully considers the resource occupancy in the actual application of industrial scenarios.

[0062] 5. The graph drift perception mechanism also utilizes this mapping relationship to efficiently perceive the changes in the graph structure through the differences between the matrix polynomial coefficients, which will also serve as a trigger for graph memory, that is, the graph memory is read and written only when significant changes occur in the transformer associations, ensuring that only typical transformer association patterns are stored, and improving the real-time response speed of the model during online deployment. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the specific embodiments of the present invention, the drawings required for the description of the specific embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0064] Figure 1 is the flowchart of this method;

[0065] Figure 2 is the main process schematic diagram of Embodiment 2. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0066] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be described in detail below with reference to the drawings and specific embodiments.

[0067] This invention patent discloses an online load prediction method for power systems based on spatio-temporal dynamic graphs, aiming to use power system load data to construct an online time series prediction model based on spatio-temporal dynamic graphs. The overall model captures the spatio-temporal associations of power system load data through a temporal convolutional network (TCN) and a graph convolutional network (GCN), and generates a dynamic adjacency matrix based on matrix polynomials in the GCN module to model the evolutionary trend of transformer association patterns, so as to improve the accuracy of online time series prediction for power systems.

[0068] Embodiment 1

[0069] AsFigure 1 As shown in the figure, the online prediction method of the present invention includes the following steps:

[0070] S1: Power system time series data acquisition: At each time step t, the system obtains the load data sequence D by collecting the load values of several transformers at fixed positions currently. (t) ∈R N , where N represents the number of transformers.

[0071] In online prediction, the acquisition of time series data is presented in the form of streaming data, and the system's prediction of future load data and data acquisition are carried out synchronously; before performing online prediction, usually a part of historical data D warm is selected for overall data normalization and cross-validation of model hyperparameters.

[0072] S2: Spatiotemporal dynamic graph network construction: Construct a spatiotemporal dynamic graph model whose main body consists of a temporal convolutional network (TCN) and a graph convolutional network (GCN). For time step t, the model receives the historical load time series data D (t-H+1 : t) ∈R H×N×1 , where H is the number of historical time steps to look back, and through linear transformation, C is the number of hidden features:

[0073]

[0074] Subsequently, is input into the S-layer TCN and GCN to obtain the output of the last layer After linear transformation and ReLu activation function, the final prediction

[0075]

[0076] S3: Online temporal convolutional module construction: Based on the traditional temporal convolutional network TCN, the online temporal convolutional network module promotes the online learning of the model from the time dimension based on the existing FSNet technology.

[0077] The process is as follows:

[0078] At time step t, the l-th layer TCN (l ∈ [1, S]) receives the input H l-1 is the length of the time dimension after being transformed by the (l - 1)-th layer TCN (H0 = H), and there is:

[0079]

[0080] where Conv1D is the one-dimensional convolution adopted in the TCN, and θ l is the parameter of the l-th layer TCN. is the output of the l-th layer of TCN, and H l is the length of the time dimension after being transformed by the l-th layer of TCN.

[0081] Subsequently, through the FSNet technology, is updated online adaptively to obtain

[0082]

[0083] S4: Construction of the online graph convolutional module: Based on the available data, the matrix basis is obtained by calculating the Pearson correlation coefficient between each transformer, and then the matrix polynomial is generated by combining the variable coefficients. The graph drift perception mechanism is used to detect whether the graph structure has shifted. If it has shifted, the graph memory is extracted. The matrix polynomial, the graph drift perception mechanism, and the graph memory module construct the online graph convolutional module.

[0084] Specifically, it includes the following components:

[0085] S41: Graph Convolutional Network GCN based on matrix polynomial

[0086] The construction process of the matrix polynomial is as follows.

[0087] S411: Based on the available data The matrix basis A∈R of the matrix polynomial is obtained by calculating the Pearson correlation coefficient between each transformer. N×N The value of the element in the i-th row and j-th column is:

[0088]

[0089] Here, N represents the number of transformers. represents the load value of the i-th transformer;

[0090] S412: For time step t, the l-th layer of GCN (l∈[1, S]), the gradient at time step t-1 is mapped to the coefficients of the matrix polynomial through a linear layer. K is the order of the matrix polynomial, and the coefficients are given a non-linear representation through the activation function of Sigmoid:

[0091]

[0092] S413: The obtained matrix polynomial coefficients are introduced into the graph convolution operation, and the evolution function of the transformer adjacency matrix is fitted through the corresponding matrix polynomial.

[0093] For the output of the same layer of TCN Obtained by transforming dimensions Perform operations with the fused matrix polynomial to obtain the output of the GCN

[0094]

[0095] Here, P l ∈R C×C is the parameter matrix, is the i-th order coefficient of

[0096] S42: Graph drift perception mechanism

[0097] Catastrophic forgetting does not always occur. Therefore, a trigger is needed to determine when catastrophic forgetting occurs and then extract the graph memory. Catastrophic forgetting is detected by judging whether the currently generated graph structure is similar to the most recent historical graph structure. If not, it means that the learned graph structure has shifted, and then the graph memory is read and written. Considering that the graph structure describing the transformer association in the power system does not have complex deep topological relationships, to reduce the complexity of the model, the similarity can be represented by calculating the Manhattan distance between two adjacency matrices, so as to focus on the differences of individual elements through the L1 norm and better capture the similarity of the graph structure. For general matrices A, B ∈ R m×n , the calculation method of their Manhattan distance is as follows, a i,j , b i,j respectively represent the elements in the i-th row and j-th column of matrices A and b:

[0098]

[0099] For simplicity of writing, the subscript l is omitted in this section.

[0100] Furthermore, based on the characteristics of matrix polynomials, when the coefficients of two matrix polynomials are relatively close, their corresponding graphs must also be similar. Then, as long as the coefficients corresponding to the graph G (t-1) at the previous time step and the current graph G (t) differ greatly, the graph memory M l is read and written, which can ensure the detection of graph drift. Therefore, the trigger condition of the graph memory is as follows:

[0101] ||a (t-1) - a (t) ||2 ≥ ε

[0102] where a (t-1) is the matrix polynomial coefficient corresponding to G (t-1) , a (t) is the matrix polynomial coefficient corresponding to G (t)The corresponding matrix polynomial coefficients, where ε is a preset threshold. In this way, the L2 norm of the difference of the corresponding matrix polynomial coefficients can represent the similarity between two graphs, which not only reduces the computational complexity but also reflects the lossless information mapping between the matrix polynomial and its coefficients, enhancing the consistency of the model.

[0103] S43: Graph Memory Module

[0104] Online learning often faces the problem of catastrophic forgetting, that is, it may forget the learned knowledge when learning new knowledge. This phenomenon also appears in dynamic graph learning. Therefore, historical memory may be needed to assist learning when generating dynamic graphs.

[0105] The characteristics of the matrix polynomial enable the coefficient vector a to represent the entire corresponding graph matrix. Therefore, the graph can be stored by storing the coefficient vector a to save storage space. A graph memory bank M is constructed for each layer l ∈R m×(K+1) , storing typical graph patterns, where m is the number of memory units and K is the order of the matrix polynomial. When catastrophic forgetting may occur, the model reads the historical graph memory to update the current matrix polynomial coefficient a l , and writes it into memory.

[0106] Before performing graph convolution operations, the memory needs to be read first. The process is as follows:

[0107] S431: Calculate the attention score according to the similarity between the current matrix polynomial coefficient and the memory units in the graph memory bank

[0108] Attention score:

[0109] score l = Softmax(M l a l )

[0110] S422: Select r highest attention scores score′ l ∈R r , and their corresponding r most relevant memory units M′ l ∈R r×(K+1) :

[0111] M′ l ,score′ l = TopK(score l )

[0112] S433: Multiply the historical memory by the corresponding weights and extract the fused memory:

[0113]

[0114] where score′ l,i is the i-th score of score′ l , and M′ l,i is the i-th memory cell of M′ l :;

[0115] S434: Combine the extracted historical memories to update the matrix polynomial coefficients of the current layer, obtaining

[0116]

[0117] where ρ is the coefficient vector update weight. Use the obtained to replace a l to generate a matrix polynomial and perform graph convolution operations;

[0118] S435: Use a l to update the corresponding memory bank:

[0119]

[0120] Here, σ is the memory bank update weight, representing the tensor product operation.

[0121] S5: Online prediction and training of the model: Different from the conventional time series prediction setting, in online time series prediction, data arrives in batches in the form of a data stream, and the training and prediction of the model are synchronized for each batch.

[0122] Set T batches (b1, b2,..., b T ), and in batch b t (t ∈ [1, T]), the model receives the lookback window x (t) = D (t-H+1 : t) = (D (t-H+1) , D (t-H+2) ,..., D (t) ), where H is the number of historical time steps for lookback, and predict for the next F time steps, having At the next time step, the model will receive the corresponding true value y (t) , and based on this, train once to update the parameters. The training for each batch uses the MSE loss. For batch b t , its loss function is:

[0123]

[0124] Here, and They are the predicted value and the true value of the i-th transformer respectively, and N is the number of transformers. At each time step t, by minimizing L (t) the model parameters can be continuously optimized.

[0125] Embodiment 2

[0126] As a preferred embodiment, aiming to combine the method flow and the system architecture, an example of parameter setting and training details in a real industrial application environment is given, which is convenient for those skilled in the art to better understand and apply the technical solution of the present invention. This embodiment is not limited to the following numerical values, and relevant parameters can be adjusted according to actual production requirements. The main process is as follows:

[0127] S1: Acquisition of time-series data of the power system

[0128] The system in this embodiment obtains the time-series data of the power system by collecting the numerical values of the transformers in the power system. This time-series data covers the data of 6 transformers and 1 oil temperature data, the number of variables N = 7, and the sampling frequency is once every 15 minutes. The look-back time step is set to H = 60, and the future prediction time step is set to F = 24. Under the setting of the streaming data, the model needs to predict the future data based on the current sampled data before the true value of the future data can be obtained.

[0129] S2: Construction of the spatio-temporal dynamic graph network

[0130] In this embodiment, at time step t, the initial input of the model is D (t) ∈R 60×7×1 , and a linear transformation is performed on the last dimension to obtain

[0131]

[0132] which is input into the TCN and GCN parts. The TCN and GCN are set to 4 blocks, with 4 layers in each block, for a total of 16 layers. The output of the last layer is passed through the ReLu activation function and a linear transformation to obtain the final prediction

[0133]

[0134] Among them, the detailed transformation processes in the TCN and GCN are as follows:

[0135] S3: Construction of the online time-domain convolution module

[0136] The convolution kernel size of each layer of the TCN is 2, and the dilation factor d of each block is initially 1. For each additional layer, the dilation factor is multiplied by 2. At time step t, the l-th layer of the TCN (l ∈ [1, 16]) receives the input Calculation:

[0137]

[0138] Subsequently, online adaptive update is performed on through the FSNet technology:

[0139]

[0140] S4: Construction of Online Graph Convolution Module

[0141] As Figure 2 shown, the order of each section in this part is slightly different from that in the technical details, which is the actual order of implementation of each module.

[0142] S401 Graph Convolutional Network GCN Based on Matrix Polynomial

[0143] Based on obtain the matrix basis A ∈ R of the matrix polynomial N ×N :

[0144]

[0145] Here, represents the load value of the i-th transformer.

[0146] For time step t, layer l (l ∈ [1, 16]), take the matrix polynomial order K = 3 to ensure that the change process of the graph can be fitted with high accuracy, and map to the coefficients of the matrix polynomial

[0147]

[0148] S402 Graph Drift Sensing Mechanism

[0149] Detect whether drift occurs according to the trigger condition of graph memory (default no drift at t = 1):

[0150] ||a (t-1) - a (t) ||2 ≥ ε

[0151] 4.3 Graph Memory Module

[0152] Take m = 32 and construct a graph memory bank M for each layer l ∈ R 32×4 . When graph drift is detected, before performing graph convolution operation, first read the memory, and the process is as follows:

[0153] 1) Calculate the attention score:

[0154]

[0155] 2) Set r = 2 and select the 2 highest attention scores score′ l ∈R 2 , and their corresponding 2 most relevant memory units M′ l ∈R 2×5 :

[0156] M′ l , score′ l =TopK(score l )

[0157] 3) Multiply the historical memory by the corresponding weights and extract the fused memory:

[0158]

[0159] Take ρ = 0.75, update the matrix polynomial coefficients of the current layer to obtain

[0160]

[0161] Use the obtained to replace Generate the matrix polynomial and perform graph convolution operations to obtain the output

[0162]

[0163] Finally, take σ = 0.75 and use to update the corresponding memory bank:

[0164]

[0165] S5: Model online prediction and training

[0166] In this embodiment, a total of 14400 time points of power load data are collected. To simulate a real streaming data scenario, the data of the first 3600 time points are selected as D warm Perform overall data normalization and cross-validation of model hyperparameters. The remaining 10800 time points of data are used for online prediction. The dataset is divided in the form of a sliding window. For the look-back time step H = 60 and the future prediction time step F = 24. A total of 10777 data can be obtained.

[0167] For the set T = 10777 batches (b1, b2,..., b 10777 ), in batch b t (t ∈ [1, 10777]), the model receives the look-back window x (t) = D(t-60+1:t) =(D (t-60+1) , D (t-60+2) , …, D (t) ), to predict for the next 24 time steps, there is At the next time step, the model will receive the corresponding true value y (t) , and based on this, it is trained once to update the parameters.

[0168] For each batch of training, the MSE loss is used. For batch b t , its loss function is:

[0169]

[0170] And the AdamW optimizer is used for parameter optimization. The initial learning rate is 1×10-3. To simulate the actual prediction scenario, the number of iterations during online prediction is 1, that is, all data can only be used once.

[0171] In the actual prediction of this embodiment, the average MSE of all time steps is 0.529, and the accuracy is relatively high. It can guide industrial planning to a certain extent and prevent equipment failures. And in the case of matrix operations based on the lossless information mapping between the matrix polynomial and its corresponding coefficient vector, the model can process and learn 31 examples per second on average, meeting the real-time requirements of online prediction. The present invention has high scalability and can adapt to power systems under different environmental conditions.

[0172] The above has described the present invention in detail through embodiments, but the content is only the preferred embodiment of the present invention and cannot be considered as limiting the scope of implementation of the present invention. All equivalent changes and improvements made according to the scope of the application of the present invention should still fall within the scope covered by the patent of the present invention.

Claims

1. An online prediction method for power system load based on spatio-temporal dynamic graph, characterized in that: The method includes the following steps: S1: Temporal data acquisition of the power system: At each time step t, the system obtains the load data sequence D by collecting the load values of several transformers at fixed positions currently. (t) ∈R N , where N represents the number of transformers; S2: Spatiotemporal Dynamic Graph Network Construction: Construct a spatiotemporal dynamic graph model whose main body consists of a Temporal Convolutional Network (TCN) and a Graph Convolutional Network (GCN). For time step t, the model receives historical load time series data D (t-H+1 : t) ∈R H×N×1 , where H is the number of historical time steps to look back, obtained through linear transformation C is the number of hidden features: Subsequently, is input into the S-layer TCN and GCN to obtain the output of the last layer and the final prediction is obtained through linear transformation and the ReLu activation function S3: Construction of the online time-domain convolution module: Based on the traditional time-domain convolution network (TCN), the online time-domain convolution network module promotes the online learning of the model from the time dimension based on the existing FSNet technology; S4: Construction of the online graph convolution module: Based on the available data, the Pearson correlation coefficient between each transformer is calculated to obtain the matrix basis, and then the matrix polynomial is generated by combining the variable coefficient. The graph drift perception mechanism is used to detect whether the graph structure has shifted. If a shift occurs, the graph memory is extracted. The matrix polynomial, the graph drift perception mechanism, and the graph memory module construct the online graph convolution module; S5: Online prediction and training of the model: Different from the conventional time-series prediction setting, in online time-series prediction, data arrives in batches in the form of a data stream, and the training and prediction of the model are carried out synchronously for each batch.

2. The on-line load prediction method for a power system based on a spatio-temporal dynamic graph according to claim 1, characterized in that: In S1, in online prediction, the acquisition of time-series data is presented in the form of stream data, and the system predicts the future load data and collects data synchronously.

3. The online load prediction method of a power system based on a spatio-temporal dynamic graph according to claim 1, characterized in that: In S1, before online prediction, a part of historical data D is selected first. warm Overall data normalization and cross-validation of model hyperparameters are carried out.

4. A method for online prediction of power system load based on spatio-temporal dynamic graph according to claim 1, characterized in that: In S3, the construction process of the online time-domain convolution module is as follows: At time step t, the l-th layer TCN (l ∈ [1, S]) receives the input H l-1 is the length of the time dimension after being transformed by the (l - 1)-th layer TCN (H0 = H), and we have: Among them, Conv1D is the one-dimensional convolution adopted in the TCN, and θ l is the parameter of the l-th layer of the TCN, is the output of the l-th layer of the TCN, and H l is the length of the time dimension after being transformed by the l-th layer of the TCN; Through the FSNet technology for perform online adaptive updates to obtain 5. A method for online prediction of power system load based on spatio-temporal dynamic graph according to claim 1, characterized in that: In S4, the construction process of the matrix polynomial is as follows, S411: Based on the available data Obtain the matrix basis A ∈ R of the matrix polynomial by calculating the Pearson correlation coefficients between each pair of transformers N×N , and the value of the element in its i-th row and j-th column is as follows: Here, N represents the number of transformers, represents the load value of the i-th transformer; S412: For time step t, the l-th layer GCN (l ∈ [1, S]) maps the gradient at time step t - 1 to the coefficients of a matrix polynomial through a linear layer where K is the order of the matrix polynomial, and the coefficients are given a non-linear representation through the activation function of Sigmoid: S413: Introduce the obtained matrix polynomial coefficients into the graph convolution operation, and fit the evolution function of the transformer adjacency matrix through the corresponding matrix polynomial; S414: For the output of the same-layer TCN Transform the dimension to obtain Perform operations with the fused matrix polynomial to obtain the output of the GCN Here, P l ∈R C×C is a parameter matrix, is the i-th order coefficient of 6. The online load prediction method for a power system based on a spatio-temporal dynamic graph according to claim 1, characterized in that: In S4, catastrophic forgetting is detected by judging whether the currently generated graph structure is similar to the most recent historical graph structure. If they are not similar, it means that the learned graph structure has shifted, and then the graph memory is read and written.

7. The on-line load prediction method for power system based on spatio-temporal dynamic graph according to claim 6, wherein: In S4, considering that the graph structure describing the association of transformers in the power system has no complex deep topological relationships, to reduce the complexity of the model, the similarity can be represented by calculating the Manhattan distance between two adjacency matrices, so as to focus on the differences of individual elements through the L1 norm and better capture the similarity of the graph structure; for general matrices A, B ∈ R m×n , the calculation method of their Manhattan distance is as follows, a i,j , b i,j respectively represent the elements in the i-th row and j-th column of matrices A and b. To simplify the writing, the subscript l is omitted in this section. Based on the characteristics of matrix polynomials, when the coefficients of two matrix polynomials are relatively close, their corresponding graphs must also be similar. As long as the graph G (t-1) in the previous time step and the current graph G (t) have a large difference in corresponding coefficients, the graph memory M l is read and written, which can ensure the detection of graph drift. Therefore, the trigger condition of the graph memory is as follows: ||a (t-1) -a (t) ||2≥ε where a (t-1) is the matrix polynomial coefficient corresponding to G (t-1) , a (t) is the matrix polynomial coefficient corresponding to G (t) , ε is a preset threshold. The L2 norm of the difference of the corresponding matrix polynomial coefficients can represent the similarity between two graphs, which not only reduces the computational complexity but also reflects the lossless information mapping between the matrix polynomial and its coefficients, enhancing the consistency of the model.

8. A method for online prediction of power system load based on spatio-temporal dynamic graph according to claim 1, characterized in that: In S4, historical memory may be needed to assist learning when generating dynamic graphs. The characteristics of matrix polynomials enable the coefficient vector a to represent the corresponding entire graph matrix. Therefore, the graph can be stored by storing the coefficient vector a to save storage space. A graph memory bank M is constructed for each layer. l ∈R m×(K+1) , and typical graph patterns are stored, where m is the number of memory units and K is the order of the matrix polynomial. When catastrophic forgetting may occur, the model reads the historical graph memory to update the current matrix polynomial coefficient a. l , and writes it into the memory.

9. A method for online prediction of power system load based on spatio-temporal dynamic graph according to claim 8, characterized in that: Before performing graph convolution operations, the memory needs to be read first, and the process is as follows: S431: Calculate the attention score according to the similarity between the current matrix polynomial coefficient and the memory unit in the graph memory bank: score l = Softmax(M l a l ) S422: Select the r highest attention scores score l ′ ∈ R r , and their corresponding r most relevant memory units M l ′ ∈ R r×(K+1) : M l ′, score l ′ = TopK(score l ) S433: Multiply the historical memory by the corresponding weight to extract the fused memory: where score l ′ ,i is the i-th score of score l ′, and M′ l,i is the i-th memory cell of M l ′:; S434: Combine the extracted historical memories Update the matrix polynomial coefficients of the current layer to obtain Among them, ρ is the coefficient vector update weight. Using the obtained to replace a l generate a matrix polynomial and perform graph convolution operations; S435: Use a l Update the corresponding memory bank: Here, σ is the update weight of the memory bank, represents the tensor product operation.

10. A method for online prediction of power system load based on spatio-temporal dynamic graph according to claim 1, characterized in that: In S5, T batches (b1, b2, …, b T ) are set. In batch b t (t ∈ [1, T]), the model receives the lookback window x (t) = D (t-H+1:t) = (D (t-H+1) , D (t-H+2) , …, D (t) ), where H is the number of historical time steps for lookback, and predictions are made for the next F time steps. There is At the next time step, the model receives the corresponding true value y (t) . Based on this, it is trained once to update the parameters. The training for each batch uses the MSE loss. For batch b t , its loss function is: Here, and are the predicted value and the true value of the i-th transformer respectively, N is the number of transformers. At each time step t, by minimizing L (t) the model parameters can be continuously optimized.

Citation Information

Patent Citations

  • Service component reliability online time sequence predicting method based on probability graph model

    CN103197983B

  • A cloth defect detection method based on morphological analysis

    CN103456021B

  • Time sequence power load combination prediction method based on multivariate regression and computer readable storage medium

    CN110298490A

  • Power load prediction method and system based on graph neural network

    CN116129212A

  • Power grid transient power angle stability evaluation method based on space-time dynamic graph model

    CN119129157A

Cited By

  • Non-intrusive load identification method based on high-frequency power data

    CN120873561A

  • A non-intrusive load identification method based on high-frequency power data

    CN120873561B