A power grid multivariate time series prediction model and method

CN122020067BActive Publication Date: 2026-09-11DATA SPACE RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610466362.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-10
Publication Date
2026-09-11
Estimated Expiration
2046-04-10

AI Technical Summary

Technical Problem

[0005]为了克服上述现有技术中多变量时间序列预测方法周期性建模方式单一、通道建模静态化和计算复杂度高的缺陷,本发明提出了一种电网多变量时间序列预测模型,能够显式刻画多周期时间信息,并利用时间信息动态调制通道权重进行高效的时间序列预测

Benefits of technology

(1)考虑到电网数据在复杂多变的情况下,也遵循着一定的周期性特点。本发明引入多尺度周期进行时间先验,实现了显式多周期建模;然后利用时间查询动态生成通道权重,实现了提高模型特征表达能力的时间驱动通道调制,保证了时序预测的时间周期依赖和高效。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122020067B_ABST
    Figure CN122020067B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of time series prediction and deep learning, and particularly relates to a power grid multivariate time series prediction model and method. The time series prediction model comprises a sequentially connected time embedding network, a cycle gating network and a multilayer perceptron. The time embedding network generates time embedding related to the time step length of the input data in the form of multivariate time series based on a multi-cycle time index. The cycle gating network maps the weight corresponding to each cycle used in the time embedding network after normalizing the input data in the time dimension. Then, the weight and the time embedding of each cycle are fused based on a time query mechanism to obtain modulation features. The multilayer perceptron processes the dimension superposition result of the modulation features and the input data represented by channel priority to obtain the time series prediction result. The present application overcomes the problems of single periodic modeling method, static channel modeling and high computational complexity of the multivariate time series prediction method in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of time series forecasting and deep learning technology, and in particular to a multivariate time series forecasting model and method for power grids. Background Technology

[0002] Existing multivariate time series prediction methods are mainly based on recurrent neural networks, temporal convolutional networks, or Transformer architectures, which achieve prediction by modeling dependencies in the time dimension or feature dimension.

[0003] However, most existing methods only implicitly learn temporal periodicity, making it difficult to explicitly characterize multi-scale periods (such as daily or weekly periods); channel dependencies are usually modeled using fixed parameters or static attention, making it difficult to dynamically adjust channel importance based on temporal context. In addition, some methods based on self-attention mechanisms have high computational and storage overhead in long sequence scenarios, which is not conducive to engineering deployment.

[0004] Multivariate time series forecasting is becoming increasingly common under the current big data trend, especially in the power grid sector, where there are many variables, complex situations, and high requirements for fault prediction. Current multivariate time series forecasting methods are difficult to meet these needs. Summary of the Invention

[0005] To overcome the shortcomings of existing multivariate time series prediction methods, such as the single periodic modeling approach, static channel modeling, and high computational complexity, this invention proposes a power grid multivariate time series prediction model that can explicitly characterize multi-period time information and use time information to dynamically modulate channel weights for efficient time series prediction.

[0006] The present invention proposes a training method for a multivariate time series prediction model for power grids. First, a time series prediction model is constructed, which predicts the next multivariate time series based on an existing multivariate time series, with the two multivariate time series having the same data structure. Then, the time series prediction model is trained on a known dataset until convergence. Temporal prediction models include sequentially connected temporally embedded networks, periodically gated networks, and multilayer perceptrons; The temporal embedding network generates temporal embeddings based on multi-period time indexing, which are related to the time step length of the input data in the form of multivariate time series. Periodic gating networks normalize the input data in the time dimension to obtain a sample-level statistical representation g. Then, g is mapped to obtain the weights corresponding to each period used in the temporal embedding network. Then, the weights of each period are integrated based on the time query mechanism. and time embedding Modulation characteristics are obtained. ; Multilayer perceptron for modulation features The time series prediction results are obtained by superimposing the dimensions of the input data with the channel-first representation.

[0007] Preferably, the input to the time embedding network is multivariate time series data and a set K periods; Temporal embedding networks construct index sequences for each period and periodic time characteristics Then, the periodic time characteristics The mapping is a time embedding; r is the time step index with a step size of 1; ; ; ; in, for The r-th index value in the middle, Let be the number of unit times in the k-th period. mod This indicates a modulo operation.

[0008] Preferably, the periodic gating network integrates the weights of each period based on a time query mechanism. and time embedding Modulation characteristics are obtained. The method is as follows: First, combine the periodic weights to embed the time of each period. Perform weighted fusion to obtain the time query matrix Q; represent the channels of Q in priority. After aggregation and activation along the time dimension, the channel weights are obtained; the channel weights and the channel-first representation of the input data are then applied. Perform channel-by-channel multiplication to obtain modulation characteristics. .

[0009] Preferably, the periodic gating network combines periodic weights with the time embedding of each period. The weighted fusion method is as follows , This indicates a feature splicing operation.

[0010] Preferably, the activation function adopts The function is activated by first weighting the aggregation results at the channel level, and then activating them.

[0011] Preferably, the periodic gated network sample-level statistical representation g is activated after a two-layer mapping to obtain a result containing the weights of each period. Periodic weight vector .

[0012] Preferably, in the periodic gating network, the sample-level statistical representation g is activated by a nonlinear activation function after the first mapping, and by a Sigmoid activation function after the second mapping.

[0013] Preferably, the time series prediction model further includes a preprocessing module, which is used to normalize the input multivariate time series of the same batch; the input data of the time embedding network is the normalized multivariate time series.

[0014] The present invention proposes a method for multivariate time series forecasting of power grids. First, a time series forecasting model is trained using the training method of the aforementioned multivariate time series forecasting model of power grids. Then, current data is collected to construct a multivariate time series of data of a specified length, which is input into the time series forecasting model to generate the next time series as the forecast result.

[0015] The present invention proposes a system comprising a memory and a processor. The memory stores a computer program, and the processor is connected to the memory. The processor is used to execute the computer program to implement the power grid multivariate time series forecasting method.

[0016] The advantages of this invention are: (1) Considering that power grid data also follows certain periodic characteristics under complex and volatile conditions, this invention introduces multi-scale periodicity for time prior and realizes explicit multi-period modeling; then, it uses time query to dynamically generate channel weights, realizes time-driven channel modulation to improve the model's feature expression capability, and ensures the time periodicity dependence and efficiency of time series prediction.

[0017] (2) This invention introduces prior time information into the channel modeling process by explicitly constructing a multi-period sine and cosine time query, and uses a time-driven channel dynamic modulation mechanism to achieve adaptive enhancement of multivariate time series features. Specifically, this invention first generates multi-period sine and cosine time features based on multiple preset periods, and obtains a time embedding consistent with the input channel space through linear mapping; further, it combines the global statistical features of the input sequence and adaptively generates the weights of each period through a periodic gating network, thereby constructing a time query matrix; subsequently, based on the aggregation result of the time query matrix in the time dimension, it generates time-aware channel weights and performs channel-by-channel dynamic modulation on the input features to achieve "time information-driven channel selection and feature enhancement"; finally, it completes the prediction modeling through a simple multilayer perceptron, which significantly improves prediction accuracy and robustness while ensuring computational efficiency. Attached Figure Description

[0018] Figure 1 This is a flowchart of the training process for a multivariate time series prediction model for power grids proposed in this invention.

[0019] Figure 2 This is a comparison of the efficiency of each model in the examples. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0021] The present invention proposes a multivariate time series prediction model for power grids, referred to as the time series prediction model, which includes a preprocessing module, a time embedding network, a periodic gating network, and a multilayer perceptron.

[0022] The preprocessing module is used to preprocess the acquired raw data x to obtain input data in the form of multivariate time series. Preprocessing can specifically employ a normalization method.

[0023] For example, when the input raw data is batch data X={x(1),x(2),……,x(B)}, batch normalization can be used to normalize each raw data to obtain the raw data x. Corresponding input data S represents the historical time step length, C represents the number of channels, and B represents the batch size. The formula is expressed as: ; in, and These represent the input data within the batch. The mean and variance over time, i.e. the mean and variance of the set {x(1),x(2),……,x(B)}; To prevent extremely small constants from being divided by zero, the specific value is 1e-5.

[0024] Temporal embedding networks, based on input data (multivariate time series). The time step length generates the time embedding, expressed by the formula: ; Among them, time embedding S represents the time step length of the input data, and C represents the number of channels of the input data; K is the linear mapping matrix from time features to channel space, where K is the set number of periods; For bias terms; E represents the multi-period time feature, and it is obtained as follows: A1. Set the period set ,in, Let K be the number of units of time in the k-th period, where K is the number of periods. ; A2. Construct the index sequence for each period, denoted as... ; r is the time step index, with a step size of 1; for The r-th index value; ; Modulo operation.

[0025] For example: Let S=96, K=2, =24, =168, the unit of time can be specifically set to hours; correspond The index sequence is as follows: ; correspond The index sequence is as follows: .

[0026] A3. Generate the periodic time features corresponding to each period. Then, the time features of each period are concatenated along the feature dimension to obtain the multi-period time feature representation E; The formula is expressed as: ; ; in, This indicates a feature concatenation operation. .

[0027] Periodic gating networks, which process input data in the time dimension Normalization is performed to obtain a sample-level statistical representation g. Then, g is mapped and activated to obtain the weights corresponding to each period. Then, based on the weights of each period... and time embedding Construct a query matrix and channel weights, then perform channel-by-channel multiplication on the channel features of the input data in conjunction with the channel weights to obtain the modulation features. .

[0028] Specifically, the processing procedure of the periodic gating network is as follows: B1. First, regarding the input data Calculate the sample-level statistical representation g; ; in, Input data Features at time step 1, time step 2, time step r, and time step S; S is the time series length of the input data, i.e., the time step length.

[0029] B2. Apply linear mapping and nonlinear activation to the sample-level statistical representation g to obtain the features. The formula is expressed as: ; in, This represents a non-linear activation function; specifically, the LeakyReLU activation function can be selected. As weight, This is a bias term.

[0030] B3. Features Perform a linear mapping to obtain features : ; in, and These are the weights and biases, respectively, and K is the number of periods; B4. Generate periodic weight vector , This represents the Sigmoid activation function. This represents the weight of the k-th period.

[0031] Modulation characteristics The methods for obtaining it are as follows: C1. First, the time embedding z is split along the period dimension to obtain the time embedding corresponding to each period. The time query matrix Q is obtained by weighting and fusing the data according to the periodic weights. ,get: ; That is, for the product The concatenation operation yields Q.

[0032] In practice, the periodic time characteristic may not be considered. Perform splicing to calculate according to the following formula : ; K is the linear mapping matrix from time features to channel space, where K is the set number of periods; For bias terms; superscript T This indicates the matrix transpose.

[0033] C2. Rearrange the time query matrix Q to obtain the channel-first representation. ; C3. In terms of time dimension Aggregation is performed to obtain channel-level time representations. and based on Generate time-aware channel weights ; ; ; in, They represent The first, second, r, and S features in the time dimension.

[0034] ; in, The channel-level time representation represents the weights; softmax represents the activation function.

[0035] C4. Input data Perform dimensional rearrangement to obtain a channel-major representation. Then to Perform channel-by-channel weighting to obtain features The formula is expressed as: ; in, This indicates a channel-by-channel multiplication operation; S is the length of the historical time step, and C represents the number of channels.

[0036] Specifically, This is a time-step-priority row vector, which is the vector obtained by concatenating rows of the S×C matrix. This is a dimension-first row vector, which is the vector obtained by concatenating the columns of an S×C matrix and then transposing it.

[0037] Multilayer perceptron, based on features With channel priority representation The dimensions of the input data are superimposed to generate the time series prediction result. Specifically, the time series prediction result has the same dimensions as the input data, denoted as: ; in, This represents a multilayer perceptron.

[0038] Specifically, let the batch size be B, then the input data for a single batch can be denoted as B. The normalized sequence is denoted as , Channel priority for a single batch is denoted as Thus, the final output of the model can be denoted as... .

[0039] Building a training dataset The aforementioned time-series prediction model can be trained on the training dataset. The time step length; For multivariate data collected at time t, and so on, The data are multivariate data collected at times t+1, t+S-1, t+S, t+S+1, and t+2S-1, respectively.

[0040] Reference Figure 1 The training process for the time series prediction model is as follows: S1, First from the dataset B training samples are extracted from the data, and the time series prediction model is used to process the training samples in batches to obtain the predicted sequence of the training samples. [ The corresponding predicted sequence is denoted as ; The time series prediction models are based on The predicted values ​​are obtained at time steps t+S, t+S+1, and t+2S-1.

[0041] S2, through comparison and Calculate the loss function; the specific loss function can be cross-entropy loss, mean squared error loss, contrast loss, etc.

[0042] In practice, a loss function can be constructed based on the prediction target. For example, if the prediction target includes multiple target variables, the loss function can be calculated on the prediction results of multiple target variables, and then the average of the loss functions along the target variable dimension can be taken as the final loss function of the model. If the prediction target is a single target variable, then the loss function only needs to be calculated on that target variable.

[0043] S3. Determine whether the model has converged; The model convergence condition can be set as follows: The model has reached the set number of updates; Alternatively, the range of the loss function in the most recent N iterations is less than a set value; N is the set number of iterations. If the model converges, fix the time series prediction model; otherwise, update the model using the loss function and return to step S1.

[0044] Specifically, in this embodiment, a multivariate time series prediction method for power grids is proposed. First, current data is collected to construct a data sequence with a time length of S and a number of channels of C. The current data sequence is then processed by a trained time series prediction model to generate the next time series as the prediction result.

[0045] The time series prediction model proposed in this embodiment allows for customization of the channel dimension of input data in a power grid environment. This means selecting relevant indicators, such as current, voltage, and power, based on the object to be predicted. Taking multivariate time series prediction of transformers as an example, the channel dimension of the multivariate time series can be selected as the power index under different load conditions of the transformer.

[0046] The time-series prediction model (MPTQNet) of this invention is compared with TimeXer, iTransformer, and PatchTST models on two benchmark power transformer temperature prediction datasets (ETTH1 and ETTH2). In this embodiment, a multivariate time series is constructed using all indicators of datasets ETTH1 and ETTH2. During training, the loss function is calculated on the prediction target of the datasets; during testing, the model performance is calculated on the prediction target of the datasets.

[0047] Taking dataset ETTH1 as an example, it is based on six power metrics {HUFL (high load full power), HULL (high load low power), MUFL (medium load full power), MULL (medium load low power), LUFL (low load full power), LULL (low load low power)}, labeled with the target value "OT (oil temperature)". In this embodiment, a seven-variable time series including the six power metrics and oil temperature is constructed. During the training of the time series prediction model, the loss function is calculated based on the oil temperature in the prediction results to update the model; during the model testing process, the performance of the predicted oil temperature is evaluated.

[0048] The prediction range was set to four types, namely {96,192,336,720}. The MAE results of the above four types were averaged, as shown in Table 1 below.

[0049] Specifically, on the specified dataset, the training and testing methods for each model are the same: the dataset is first divided into a training set and a test set; each model is trained on the training set and then tested on the test set. The time-series prediction model of this invention introduces two periods (i.e., K=1). and , in hours.

[0050] Table 1: Comparison of Mean Absolute Error (MAE) of the Four Models on the Test Set

[0051] As can be seen from Table 1, on the ETTH1 dataset, the MPTQNet model of this invention performs best, followed by the TimeXer model in comparison; on the ETTH2 dataset, the opposite is true.

[0052] In this embodiment, the average training time of each model on the baseline power load prediction dataset (ETTH1) is shown in Table 2 below. Figure 2 As shown. The prediction range (i.e., the time step length S of the multivariate time series) is set to four types: {96, 192, 336, 720}. The specific statistical metric is the average training time required per epoch.

[0053] Table 2: Average training time for each model

[0054] As can be seen from Table 2 above, the model of this invention takes the least amount of time for any prediction range. Compared with the TimeXer model, which has the closest performance, the efficiency of this invention is about twice that of the model in each prediction range.

[0055] It is evident that this invention significantly improves prediction efficiency while maintaining accuracy.

[0056] Of course, those skilled in the art will recognize that the present invention is not limited to the details of the exemplary embodiments described above, but also includes the same or similar structures that can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0057] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

[0058] The technologies, shapes, and structures not described in detail in this invention are all known technologies.

Claims

1. A training method for a multivariate time series prediction model for power grids, characterized in that: First, a time series prediction model is constructed, which predicts the next multivariate time series based on an existing multivariate time series. The two multivariate time series have the same data structure. Then, the time series prediction model is trained on the known dataset until convergence. Temporal prediction models include sequentially connected temporally embedded networks, periodically gated networks, and multilayer perceptrons; The temporal embedding network generates temporal embeddings based on multi-period time indexing, which are related to the time step length of the input data in the form of multivariate time series. The periodic gating network normalizes the input data in the time dimension to obtain a sample-level statistical representation g, and then maps g to obtain weights corresponding to each period used in the time embedding network ; Fusing the weights of each cycle based on a time query mechanism and time embedding , obtaining modulation features ; Modulation features for multilayer perceptron and processing the dimension stacking result of the input data of the channel priority representation to obtain a time series prediction result. The time series prediction model is applied in a power grid environment, and the data channel dimensions of the multivariate time series include: current, voltage, and power; When the time series prediction model is applied to a transformer, the data channel dimension of the multivariate time series includes power indicators under different load conditions. The input to the time-embedded network is multivariate time series data and a set K periods; The time embedding network constructs an index sequence for each cycle and cycle time features The cycle time features are then mapped to time embeddings; r is the time step index, with a step size of 1; ; wherein is the rth index value in the set of is the number of unit times in the kth period, mod denotes the modulo operation; S is the time step length, and K is the total number of periods.

2. The training method for the power grid multivariate time series prediction model as described in claim 1, characterized in that, Periodic gating networks integrate weights from each period based on a time-query mechanism. and time embedding Modulation characteristics are obtained. The method is as follows: First, combine the periodic weights to embed the time of each period. Perform weighted fusion to obtain the time query matrix Q; represent the channels of Q in priority. After aggregation and activation along the time dimension, the channel weights are obtained; the channel weights and the channel-first representation of the input data are then applied. Perform channel-by-channel multiplication to obtain modulation characteristics. .

3. The training method for the power grid multivariate time series prediction model as described in claim 2, characterized in that, Periodic gating networks combine periodic weights to embed the time of each period. The weighted fusion method is as follows , This indicates a feature splicing operation.

4. The training method for the power grid multivariate time series prediction model as described in claim 2, characterized in that, Activation function uses The function is activated by first weighting the aggregation results at the channel level, and then activating them.

5. The training method for the power grid multivariate time series prediction model as described in claim 1, characterized in that, The periodic gated network sample-level statistical representation g is activated after a two-layer mapping, resulting in a result containing the weights for each period. Periodic weight vector .

6. The training method for the power grid multivariate time series prediction model as described in claim 5, characterized in that, In a periodic gated network, the sample-level statistical representation g is activated by a nonlinear activation function after the first mapping and by a Sigmoid activation function after the second mapping.

7. The training method for the power grid multivariate time series prediction model as described in claim 1, characterized in that, The time series prediction model also includes a preprocessing module, which is used to normalize the input batch of multivariate time series; the input data of the time embedding network is the normalized multivariate time series.

8. A power grid multivariate time series prediction method employing the training method of the power grid multivariate time series prediction model as described in any one of claims 1-7, characterized in that, First, the time series prediction model is trained using the training method of the power grid multivariate time series prediction model as described in any one of claims 1-7; then, the current data is collected to construct a data multivariate time series of a specified length, which is input into the time series prediction model to generate the next time series as the prediction result.

9. A system, characterized in that, It includes a memory and a processor. The memory stores a computer program, and the processor is connected to the memory. The processor is used to execute the computer program to implement the power grid multivariate time series forecasting method as described in claim 8.

Citation Information

Patent Citations

  • Digital integrated circuit perceptible optimization before-wiring time sequence prediction method, electronic equipment and storage medium

    CN119918478A

  • Multivariable time sequence prediction method based on GRU and computer program product

    CN120336812A