Short-term adjustable load forecasting method and system based on SA-TCN model

Through the preprocessing and feature extraction of the SA-TCN model, the timing characteristics of the load data are considered, which solves the problems of insufficient preprocessing and failure to consider the timing characteristics in the existing technology, and improves the accuracy and stability of the adjustable load power prediction.

CN115859815BActive Publication Date: 2024-10-18STATE GRID JIANGSU ELECTRIC POWER CO LTD MARKETING SERVICE CENT
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202211564394.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-07
Publication Date
2024-10-18
Estimated Expiration
2042-12-07

AI Technical Summary

Technical Problem

The existing technology has insufficient preprocessing in adjustable load power prediction, causing abnormal data to affect model training, and lacks consideration of the own timing characteristics of the load data, resulting in low prediction accuracy.

Method used

The SA-TCN model is used to collect and preprocess the adjustable load historical data, perform outlier processing, gap value filling and standardization processing, build a vertical and horizontal adjustable load matrix, and use the self-attention mechanism and stacked hole convolution to extract the load. Features, combined with fully connected layer fusion prediction results.

Benefits of technology

It effectively reduces the prediction error, improves the accuracy and stability of the prediction results, enhances the perception of load fluctuations, and reduces the prediction variance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115859815B_ABST
    Figure CN115859815B_ABST
Patent Text Reader

Abstract

A short-term adjustable load prediction method and system based on the SA-TCN model, comprising collecting adjustable load power history data and preprocessing it to obtain a history adjustable load power sequence; dividing the preprocessed history adjustable power sequence to obtain a horizontal and a vertical adjustable load power matrix respectively; for the horizontal and vertical adjustable load power matrices, using the SA-TCN prediction model respectively to obtain the mapping relationship between the horizontal and vertical adjustable load power data to be predicted and the input sequence, and outputting the prediction results respectively; using a fully connected layer to fuse the horizontal and vertical prediction results to obtain the final adjustable load power prediction result. The present invention can reduce the adjustable load power prediction error and improve the accuracy and stability of the prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of adjustable load power prediction, and in particular relates to a short-term adjustable load prediction method and system based on a SA-TCN model. Background Art

[0002] With the development of new energy and the change of grid characteristics, the problem of imbalance between power supply and demand has become increasingly prominent, and it is urgent to effectively develop and plan adjustable load resources. As an important part of user participation in demand response, grid companies and load aggregators can reasonably use monthly adjustable load forecast data to guide and encourage power users to tap into peak-shaving resources, which will help further tap the potential for user-side regulation, improve the interactive response capabilities of the grid and the power generation and demand sides, and promote the transformation of the traditional "source follows load" model to the "source-load interaction" collaborative model.

[0003] The currently widely used adjustable load power forecasting methods are mainly divided into statistical methods and physical methods, and also include combined forecasting methods that combine multiple methods. Among them, the physical method is a forecasting method based on historical data and numerical weather forecasts and other multi-factor adjustable load physical data. The advantages of adjustable load power forecasting based on physical methods are that the amount of data relied on is small, the model is simple, and the forecast is convenient and fast; but there is a large error between the predicted physical data and the real data, which makes the physical method generally low in forecasting accuracy for adjustable loads. The statistical method is a virtual power plant power forecasting method that updates and adjusts the model weights and parameters based on the error between the predicted value and the real value. This method is usually divided into probabilistic statistical models, machine learning models, and deep learning models. Compared with the physical method, the probabilistic statistical model can better follow the changing trend of the virtual power plant power; the prediction accuracy of the machine learning model is better than that of the traditional probabilistic model; the deep learning model can fully explore the time and space characteristics of the input sequence, and further improve the accuracy of adjustable load forecasting. The statistical method can well extract the linear and nonlinear relationship of historical data and improve the forecasting accuracy of adjustable loads, but it has high requirements for the consistency of the changing law of historical data.

[0004] Prior art document 1 (CN 114819352 A) discloses a load forecasting method, storage medium and computer system based on MIC-TCN-LSTM, wherein the method comprises the following steps: S1, pre-processing the original data and then normalizing it; S2, using the maximum correlation coefficient MIC to perform correlation analysis on the data, and propose data with less correlation or no correlation; S3, using a sliding window to divide the data set formed by the processed data in step 2 into a training set and a test set; S4, constructing a TCN-LSTM model, and sending the training set in step 3 into the TCN-LSTM model for training; S5, using the model trained in step 4 to predict the test set, and finally obtaining the prediction result and outputting it. The disadvantage of prior art document 1 is that the pre-processing of the original load in step S1 is only the processing of data format and missing items, but there may be over-full values, negative values ​​and garbled values ​​in the actual load data, and these abnormal data will affect the training of the prediction model; the model in document 1 lacks the consideration of the time series characteristics of the load data itself. Summary of the invention

[0005] In order to address the deficiencies in the prior art, the purpose of the present invention is to provide a short-term adjustable load forecasting method and system based on the SA-TCN model, which can reduce the adjustable load power forecasting error and improve the accuracy and stability of the forecasting results.

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

[0007] The short-term adjustable load forecasting method based on the SA-TCN model includes the following steps:

[0008] Step 1, collecting and preprocessing the historical data of adjustable load power to obtain a historical adjustable load power sequence;

[0009] Step 2, dividing the preprocessed historical adjustable power sequence to obtain horizontal and vertical adjustable load power matrices respectively;

[0010] Step 3: Based on the SA-TCN prediction model, the self-attention mechanism output matrix of the horizontal and vertical adjustable load power matrices is calculated, and the vertical and horizontal load prediction results of the day to be predicted are output;

[0011] Step 4: Use the fully connected layer to fuse the horizontal and vertical prediction results to obtain the final adjustable load power prediction result.

[0012] In step 1, the historical data of the instantaneous active power of the adjustable load N days before the day to be predicted is collected with a set sampling period.

[0013] The preprocessing in step 1 includes: outlier processing, missing value filling and standardization;

[0014] Abnormal value processing includes: directly setting zero to process negative values, and using the average value of the adjustable load power values ​​at two moments before and after to correct the over-full value and garbled code;

[0015] The gap value filling includes: filling the gap value with the average value of the adjustable load power values ​​at two moments before and after;

[0016] The standardization process is to normalize the adjustable load power sequence after outlier processing and vacancy filling processing.

[0017] In step 2, a vertical adjustable load power matrix is ​​constructed based on the adjustable load data before the day to be predicted, the historical adjustable load power sequences are sorted by similarity, and sample days with higher similarity are selected as the similar day set of the day to be predicted. Based on the selected similar day set, a horizontal adjustable load power matrix is ​​constructed.

[0018] Step 2 includes:

[0019] Step 2.1: Select the adjustable load data for 30 days before the forecast date and construct a 96×30 vertical adjustable load power data matrix P. vertical :

[0020]

[0021] P′ i =[P′ i,1 ···P′ i,j ···P′ i,30 ],j=1,2,3,···,30

[0022] Among them, P i ' is the vector matrix composed of the historical load values ​​of 30 days at the i-th time point; P i, ' j is the load value at the i-th time point on the j-th day;

[0023] Step 2.2, sort the historical adjustable load power sequences by similarity, and select m sample days with higher similarity as the similar day set of the day to be predicted;

[0024] Step 2.3: Based on the selected similar day set, construct an m×96 horizontally adjustable load power matrix P horizontal , as shown below:

[0025]

[0026] P′ a =[P′ a,1 ···P′ a,b···P′ a,96 ],b=1,2,3,···,96

[0027] Where P a ' is a vector matrix composed of the historical load values ​​of 96 time points in m similar days; P′ a,b is the load value at the bth time point on the ath similar day.

[0028] In step 2.2, the comprehensive similarity is calculated in the following way:

[0029] η i =D i ·W i

[0030]

[0031] W i =1-f(X i )-f(X0)

[0032] Among them, η i is the comprehensive similarity; D i is the time gap factor, W i is the week type factor;

[0033] β1 is the daily attenuation coefficient; β2 is the weekly attenuation coefficient;

[0034] S i It is a 0-1 variable. When the i-th sample day and the day to be predicted are the same holiday, the value is 1, otherwise it is 0; mod is the remainder operation; int is the integer operation;

[0035] X i , X0 are the week types of the i-th sample day and the day to be predicted, and their values ​​are 1, 2, 3, 4, 5, 6, and 7 respectively;

[0036] f(X i ), f(X0) are respectively X i and the value after mapping from X0.

[0037] Preferably, β1 is 0.96, β2 is 0.94, f(X i ), f(X0) takes the value of:

[0038] 0.1,X i =1, X0=1;

[0039] 0.2,X i =2, X0=2;

[0040] 0.2,X i =3, X0=3;

[0041] 0.2,X i =4, X0=4;

[0042] 0.3,X i =5, X0=5;

[0043] 0.7,X i =6, X0=6

[0044] 1, X i =7, X0=7.

[0045] In step 3, based on the longitudinal adjustable load power matrix and the transverse adjustable load power matrix, the self-attention mechanism output matrix of the longitudinal and transverse adjustable load power matrices is calculated, and then the output matrix obtained by weighted averaging the longitudinal adjustable load power matrix and the transverse adjustable load power matrix through the self-attention mechanism is used to establish a mapping relationship between the adjustable load power of the day to be predicted and the transverse and longitudinal load matrices through stacked hole convolution, and the longitudinal and transverse load prediction results of the day to be predicted are output.

[0046] Step 3 includes:

[0047] Step 3.1: transform the longitudinal adjustable load power matrix P vertical and the lateral adjustable load power matrix P horizontal Linearly map them to three different spaces respectively; the mapping calculation process is shown as follows:

[0048] [Q ver ,K ver ,V ver ]=[W q ver ,W k ver ,W v ver ]P vertical

[0049] [Q hor ,K hor ,V hor ]=[W q hor ,W k hor ,W v hor ]P horizontal

[0050] Among them, W q , W k , W v is the linear mapping weight matrix, Q, K, V are the query matrix, key matrix and value matrix respectively;

[0051] Step 3.2: Calculate the corresponding attention score matrix A for the input longitudinal and transverse adjustable load power matrices respectively. ver and A hor ;

[0052] Step 3.3, calculate the self-attention mechanism output matrix H of the longitudinal and transverse load data matrix ver and H hor , as shown below:

[0053] H ver =V ver A ver

[0054] H hor =V hor A hor

[0055] Step 3.4: The output matrix H is obtained by weighted averaging the input sequence through the self-attention mechanism ver and H hor , through stacking dilated convolution, the mapping relationship between adjustable load power and horizontal and vertical load matrices is respectively mined, and then the vertical and horizontal load prediction results of the predicted day are output. and

[0056]

[0057] O t =RELU(h t +F(h t ))

[0058] Where H = {h1,h2,h3,···,h 96} is (H ver ) T or H hor , (H ver ) T H ver The transposed matrix of

[0059] The corresponding h t is a column vector t = [1, 2, ···, 96]; d represents the dilation factor; K represents the filter size;

[0060] The filter is F = {f1, f2, ..., f K}, * is the convolution symbol; h t-d(K-k) is the column vector h of the td(Kk)th input matrix i , the value range of i is [tK, t], RELU is the corrected linear function, O t The output result is or

[0061] The attention score matrix A in step 3.2 ver and A hor The calculation process is shown as follows:

[0062] A ver =softmax((K ver ) T Q ver )

[0063] A hor =softmax((K hor ) T Q hor )

[0064] Among them, softmax is normalized by column, (K ver ) T is the transposed matrix of the key matrix.

[0065] The normalized expression is:

[0066]

[0067] Among them, P t ' is the adjustable load power at time t after normalization, P t is the adjustable load power at time t before normalization, max(P) is the maximum value in the adjustable load power sequence after outlier processing and gap filling, and min(P) is the minimum value in the adjustable load power sequence after outlier processing and gap filling.

[0068] In step 4, the fully connected layer is used to fuse the horizontal and vertical prediction results to obtain the final adjustable load power prediction result, as shown in the following formula:

[0069]

[0070] Among them, α is the linearized output after fusion of the fully connected layer, R is the weight matrix of the fully connected layer, and F is the bias matrix of the fully connected layer. is the longitudinal load forecast result of the day to be predicted, It is the lateral load prediction result for the day to be predicted.

[0071] A short-term adjustable load forecasting system based on the SA-TCN model includes a data acquisition module, a preprocessing module, a matrix partitioning module, a model prediction module, a prediction result output module,

[0072] The data acquisition module is used to collect historical data of adjustable load power;

[0073] The preprocessing module is used to preprocess the adjustable load power historical data;

[0074] The matrix partitioning module is used to partition the pre-processed historical adjustable power sequence;

[0075] The model prediction module is used to output the longitudinal and transverse load prediction results of the forecasting day based on the SA-TCN prediction model;

[0076] The prediction result output module uses a fully connected layer to fuse the horizontal and vertical prediction results and output the final adjustable load power prediction result.

[0077] The beneficial effects of the present invention are that, compared with the prior art, preprocessing of the collected data compensates for the impact of abnormal data on the training of the prediction model; the model in the present invention takes into account the inherent timing characteristics of the adjustable load power data, and uses the longitudinal load sequence as the input of the model, which can effectively cover the load's own timing characteristics.

[0078] The beneficial effects of the present invention also include: 1. The use of the TCN-based prediction model can effectively consider the longitudinal trend of the load, enhance the perception of load fluctuations, and effectively reduce the prediction deviation of the model; similar days selected based on similarity theory as the horizontal load input set can enhance the ability to predict the load trend of the predicted day and effectively reduce the prediction variance of the model.

[0079] 2. The multi-channel recurrent neural network model can effectively extract the common features of adjustable load data, derive more effective input components through the attention mechanism, and effectively improve the accuracy and stability of load forecasting. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 It is a flow chart of a short-term adjustable load forecasting method based on the SA-TCN model provided by an embodiment of the present invention;

[0081] Figure 2 is a dilated convolution graph of the TCN model in an embodiment of the present invention;

[0082] Figure 3 Schematic diagram of the structure of the SA-TCN model in an embodiment of the present invention;

[0083] Figure 4 is the transverse and longitudinal load sequence constructed in the embodiment of the present invention;

[0084] Figure 5 This is a diagram of the prediction results of the adjustable load power in an embodiment of the present invention. DETAILED DESCRIPTION

[0085] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0086] Example 1.

[0087] like Figures 1 to 5 ,The short-term adjustable load forecasting method based on the SA-TCN model includes steps 1 to 4, as follows:

[0088] Step 1: collect and preprocess historical data of adjustable load power to obtain a historical adjustable load power sequence.

[0089] In a preferred but non-limiting embodiment, in step 1, every 15 minutes is a sampling moment, and historical data of the instantaneous active power of the adjustable load 30 days before the day to be predicted is collected.

[0090] Specifically, in step 1, preprocessing the historical data of the instantaneous active power of the adjustable load includes: abnormal value processing, vacancy value filling and standardization processing;

[0091] Specifically, the abnormal value processing includes: processing negative values ​​by directly setting them to zero, and correcting the over-full value and garbled code by using the average value of the adjustable load power values ​​at two moments before and after; the vacancy value filling includes: filling the vacancy value by using the average value of the adjustable load power values ​​at two moments before and after; and normalizing the historical power series. The normalization expression is:

[0092]

[0093] Among them, P t ' is the adjustable load power at time t after normalization, P t is the adjustable load power at time t before normalization, max(P) is the maximum value in the adjustable load power sequence after outlier processing and gap filling, and min(P) is the minimum value in the adjustable load power sequence after outlier processing and gap filling.

[0094] In step 2, a vertical adjustable load power matrix is ​​constructed based on the adjustable load data before the day to be predicted, the historical adjustable load power sequences are sorted by similarity, and sample days with higher similarity are selected as the similar day set of the day to be predicted. Based on the selected similar day set, a horizontal adjustable load power matrix is ​​constructed.

[0095] Step 2, dividing the preprocessed historical adjustable power sequence to obtain horizontal and vertical adjustable load power matrices respectively. Specifically, step 2 includes:

[0096] Step 2.1: Select the adjustable load data for 30 days before the forecast date and construct a 96×30 vertical adjustable load power data matrix P. vertical , as shown below.

[0097]

[0098] P i '=[P i ' ,1 ···P i ' ,j ···P i ' ,30 ],j=1,2,3,···,30

[0099] Among them, P i ' is the vector matrix composed of the historical load values ​​of 30 days at the i-th time point; P i, ' j is the load value at the i-th time point on the j-th day.

[0100] Step 2.2, according to the comprehensive similarity η i The historical adjustable load power sequences are sorted by similarity, and m sample days with higher similarity are selected to be added to the similar day set of the day to be predicted. The comprehensive similarity is calculated as follows:

[0101] η i =D i ·W i

[0102]

[0103] W i =1-f(X i )-f(X0)

[0104] Among them, D i is the time gap factor, W i is the week type factor;

[0105] β1 is the daily attenuation coefficient, which is 0.96; β2 is the weekly attenuation coefficient, which is 0.94; S i is a 0-1 variable. When the i-th sample day and the day to be predicted are the same holiday, the value is 1, otherwise it is 0; mod is the remainder operation; int is the integer operation; X i , X0 are the week types of the i-th sample day and the day to be predicted, and their values ​​are 1, 2, 3, 4, 5, 6, and 7 respectively. i ), f(X0) are respectively X iThe values ​​after mapping with X0 are 0.1, 0.2, 0.2, 0.2, 0.3, 0.7, 1. The mapping rule here is: for example, X i Or when the week type value of X0 is 1, the mapped value f(X i ) or f(X0) takes the value of 0.1; if the i-th sample day is Monday and the predicted day is Wednesday, then f(X i ) takes the value of 0.1, and f(X0) takes the value of 0.2.

[0106] Step 2.3: Based on the selected similar day set, construct an m×96 horizontally adjustable load power matrix P horizontal , as shown below:

[0107]

[0108] P a '=[P a ' ,1 ···P a ' ,b ···P a ' ,96 ],b=1,2,3,···,96

[0109] Step 3, based on the SA-TCN prediction model, the mapping relationship between the horizontal and vertical adjustable load power data to be predicted and the horizontal and vertical adjustable load power matrices is obtained, and the prediction results are output respectively; where SA is the self-attention mechanism; TCN is the temporal convolutional network. In step 3, based on the vertical adjustable load power matrix and the horizontal adjustable load power matrix, the self-attention mechanism output matrix of the vertical and horizontal adjustable load power matrices is calculated, and then the output matrix obtained by weighted averaging the vertical adjustable load power matrix and the horizontal adjustable load power matrix through the self-attention mechanism is used to establish the mapping relationship between the adjustable load power of the day to be predicted and the horizontal and vertical load matrices through stacked dilated convolution, and the vertical and horizontal load prediction results of the day to be predicted are output.

[0110] Specifically, step 3 includes:

[0111] Step 3.1: First, the longitudinal adjustable load power matrix P vertical and the lateral adjustable load power matrix P horizontal Linearly map them to three different spaces respectively, and the mapping calculation process is shown as follows:

[0112] [Q ver ,K ver ,V ver ]=[W qver ,W k ver ,W v ver ]P vertical

[0113] [Q hor ,K hor ,V hor ]=[W q hor ,W k hor ,W v hor ]P horizontal

[0114] Among them, W q , W k , W v is the linear mapping weight matrix, Q, K, V are the query matrix, key matrix and value matrix respectively;

[0115] Step 3.2: Calculate the corresponding attention score matrix A for the input longitudinal and transverse adjustable load power matrices respectively. ver and A hor , the calculation process is shown as follows:

[0116] A ver =softmax((K ver ) T Q ver )

[0117] A hor =softmax((K hor ) T Q hor )

[0118] Among them, softmax is normalized by column, (K ver ) T is the transposed matrix of the key matrix;

[0119] Step 3.3, calculate the self-attention mechanism output matrix H of the longitudinal and transverse load data matrix ver and H hor , as shown below:

[0120] H ver =V ver A ver

[0121] H hor =V hor A hor

[0122] Step 3.4: The output matrix H is obtained by weighted averaging the input sequence through the self-attention mechanism ver and H hor , through stacking dilated convolution, the mapping relationship between adjustable load power and horizontal and vertical load matrices is respectively mined, and then the vertical and horizontal load prediction results of the predicted day are output. and

[0123]

[0124] O t =RELU(h t +F(h t ))

[0125] Where H = {h1,h2,h3,···,h 96} is (H ver ) T or H hor , (H ver ) T H ver The transposed matrix of t , t=[1,2,···,96] is a column vector, d represents the dilation factor, K represents the filter size, and the filter is F={f1,f2,…,f K}, * is the convolution symbol, h t-d(K-k) is the column vector h of the td(Kk)th input matrix i , the value range of i is [tK, t], RELU is the corrected linear function, O t The output result is or Preferably, the value of K is 60, and the value range of the expansion factor d is 50-500.

[0126] Step 4: Use the fully connected layer to fuse the horizontal and vertical prediction results to obtain the final adjustable load power prediction result. Specifically, step 4 includes:

[0127] In step 4, the fully connected layer is used to fuse the horizontal and vertical prediction results to obtain the final adjustable load power prediction result, as shown in the following formula.

[0128]

[0129] Among them, α is the linearized output after fusion of the fully connected layer, R is the weight matrix of the fully connected layer, and F is the bias matrix of the fully connected layer. is the longitudinal load forecast result of the day to be predicted, It is the lateral load prediction result for the day to be predicted.

[0130] Step 4 also includes evaluating the performance of the prediction model using mean absolute error and root mean square error, and the calculation formula is as follows.

[0131] 1) Mean absolute error MAE, satisfies the following relationship:

[0132]

[0133] 2) Root mean square error MSE, satisfies the following relationship:

[0134]

[0135] Among them, y i and are the true value and predicted value at time i respectively.

[0136] Example 2.

[0137] This embodiment adopts the short-term adjustable load prediction method based on the self-attention mechanism and TCN model proposed by the present invention, and predicts the adjustable load of a region based on the typical adjustable load sample data of a region; the first 80% of the sample data is used as the training set, and the last 20% is used as the test set. The TCN prediction model based on the self-attention mechanism is used to extract features and perform short-term prediction of adjustable load power. The prediction results are as follows: Figure 5 The performance indicators are shown in Table 1. Compared with the single TCN model, the TCN prediction model based on the self-attention mechanism can effectively improve the accuracy of load forecasting. The MSE of the prediction results is reduced by 0.0014 and the MAE is reduced by 0.0184.

[0138] Table 1 Performance indicators

[0139]

[0140] The short-term adjustable load forecasting system based on the SA-TCN model is used to implement the short-term adjustable load forecasting method based on the self-attention mechanism and the TCN model. The system includes a data acquisition module, a preprocessing module, a matrix partitioning module,

[0141] Model prediction module, prediction result output module,

[0142] The data acquisition module is used to collect historical data of adjustable load power;

[0143] The preprocessing module is used to preprocess the adjustable load power historical data;

[0144] The matrix partitioning module is used to partition the pre-processed historical adjustable power sequence;

[0145] The model prediction module is used to output the longitudinal and transverse load prediction results of the forecasting day based on the SA-TCN prediction model;

[0146] Preferably, the data collection module is used to collect historical data of the instantaneous active power of the adjustable load 30 days before the day to be predicted, with every 15 minutes as a sampling moment, and collect the week type of each sample day;

[0147] The preprocessing module is used to process the historical data of adjustable load power and perform abnormal value processing, vacancy filling and standardization;

[0148] The matrix partitioning module is used to partition the preprocessed historical adjustable power sequence to obtain the horizontal and vertical adjustable load power matrices respectively;

[0149] The model prediction module is used to obtain the mapping relationship between the horizontal and vertical adjustable load power data to be predicted and the input sequence based on the SA-TCN prediction model, and output the vertical and horizontal load prediction results of the day to be predicted respectively;

[0150] The prediction result output module uses a fully connected layer to fuse the horizontal and vertical prediction results and output the final adjustable load power prediction result.

[0151] It should be appreciated that embodiments of the present invention may be implemented or enforced by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques - including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in an assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed ASIC for this purpose.

[0152] Furthermore, the operations of the processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed collectively on one or more processors, by hardware, or a combination thereof. The computer program includes a plurality of instructions that may be executed by one or more processors.

[0153] Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and / or write storage medium, a RAM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or part thereof, can be transmitted via a wired or wireless network. When such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor, the invention described herein includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques described in the present invention, the present invention also includes the computer itself. The computer program can be applied to input data to perform the functions described herein, thereby converting the input data to generate output data stored in a non-volatile memory. The output information can also be applied to one or more output devices such as a display. In a preferred embodiment of the present invention, the converted data represents a physical and tangible object, including a specific visual depiction of the physical and tangible object produced on a display.

[0154] As used in this application, the terms "component", "module", "system", etc. are intended to refer to a computer-related entity, which can be hardware, firmware, a combination of hardware and software, software, or software in operation. For example, a component can be, but is not limited to: a process running on a processor, a processor, an object, an executable file, a thread in execution, a program, and / or a computer. As an example, an application running on a computing device and the computing device can both be components. One or more components can exist in a process and / or thread in execution, and a component can be located in a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media having various data structures thereon. These components can communicate in a local and / or remote process manner, such as according to a signal having one or more data packets (e.g., data from a component that interacts with another component in a local system, a distributed system, and / or interacts with other systems in a signal manner through a network such as the Internet).

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

[0156] 1. The self-attention mechanism and TCN prediction model can effectively consider the longitudinal trend of the load, enhance the perception of load fluctuations, and effectively reduce the prediction deviation of the model; similar days selected based on similarity theory as the horizontal load input set can enhance the ability to predict the load trend of the predicted day and effectively reduce the prediction variance of the model.

[0157] 2. The multi-channel recurrent neural network model can effectively extract the common features of adjustable load data, derive more effective input components through the attention mechanism, and effectively improve the accuracy and stability of load forecasting.

[0158] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings of the specification, but those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, and is not a limitation on the protection scope of the present invention. On the contrary, any improvement or modification based on the inventive spirit of the present invention should fall within the protection scope of the present invention. The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.

[0159] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0160] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0161] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0162] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0163] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0164] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0165] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A short-term adjustable load forecasting method based on the SA-TCN model is characterized by: The following steps are involved: Step 1, collecting and preprocessing the historical data of adjustable load power to obtain a historical adjustable load power sequence; Step 2, dividing the preprocessed historical adjustable power sequence to obtain horizontal and vertical adjustable load power matrices respectively; In step 2, a vertical adjustable load power matrix is ​​constructed based on the adjustable load data before the day to be predicted, the historical adjustable load power sequences are sorted by similarity, and sample days with higher similarity are selected as the similar day set of the day to be predicted. Based on the selected similar day set, a horizontal adjustable load power matrix is ​​constructed; Step 2 includes: Step 2.1: Select the adjustable load data for 30 days before the forecast date and construct a 96×30 vertical adjustable load power data matrix P. vertical : P i '=[P’ i,1 ···P’ i,j ···P’ i,30 ],j=1,2,3,···,30 Among them, P i ' is the vector matrix composed of the historical load values ​​of 30 days at the i-th time point; P' i,j is the load value at the i-th time point on the j-th day; Step 2.2, sort the historical adjustable load power sequences by similarity, and select m sample days with higher similarity as the similar day set of the day to be predicted; Step 2.3: Based on the selected similar day set, construct an m×96 horizontally adjustable load power matrix P horizontal , as shown below: P a '=[P’ a,1 ···P’ a,b ···P’ a,96 ],b=1,2,3,···,96 Where P a ' is a vector matrix consisting of the historical load values ​​at 96 time points in m similar days; P' a,b is the load value at the bth time point on the ath similar day; Step 3: Based on the SA-TCN prediction model, the self-attention mechanism output matrix of the horizontal and vertical adjustable load power matrices is calculated, and the vertical and horizontal load prediction results of the day to be predicted are output; Step 4: Use the fully connected layer to fuse the horizontal and vertical prediction results to obtain the final adjustable load power prediction result, as shown in the following formula: Among them, α is the linearized output after fusion of the fully connected layer, R is the weight matrix of the fully connected layer, and F is the bias matrix of the fully connected layer. is the longitudinal load forecast result of the day to be predicted, It is the lateral load prediction result for the day to be predicted.

2. The short-term adjustable load forecasting method based on the SA-TCN model according to claim 1 is characterized in that: In step 1, historical data of the instantaneous active power of the adjustable load N days before the day to be predicted is collected at a set sampling period.

3. The short-term adjustable load forecasting method based on the SA-TCN model according to claim 2 is characterized in that: The preprocessing in step 1 includes: outlier processing, missing value filling and standardization; Abnormal value processing includes: directly setting zero to process negative values, and using the average value of the adjustable load power values ​​at two moments before and after to correct the over-full value and garbled code; The gap value filling includes: filling the gap value with the average value of the adjustable load power values ​​at two moments before and after; The standardization process is to normalize the adjustable load power sequence after outlier processing and vacancy filling processing.

4. The short-term adjustable load forecasting method based on the SA-TCN model according to claim 3 is characterized in that: The normalized expression is: Among them, P t ′ is the adjustable load power at time t after normalization, P t is the adjustable load power at time t before normalization, max(P) is the maximum value in the adjustable load power sequence after outlier processing and gap filling, and min(P) is the minimum value in the adjustable load power sequence after outlier processing and gap filling.

5. The short-term adjustable load forecasting method based on the SA-TCN model according to claim 1 is characterized in that: In step 2.2, the comprehensive similarity is calculated in the following way: or i =D i ·W i W i =1-|f(X i )-f(X0)| Among them, η i is the comprehensive similarity; D i is the time gap factor, W i is the week type factor; β1 is the daily attenuation coefficient, β2 is the weekly attenuation coefficient; S i It is a 0-1 variable. When the i-th sample day and the day to be predicted are the same holiday, the value is 1, otherwise it is 0; mod is the remainder operation; int is the integer operation; X i , X0 are the week types of the i-th sample day and the day to be predicted, and their values ​​are 1, 2, 3, 4, 5, 6, and 7 respectively; f(X i ), f(X0) are respectively X i and the value after mapping from X0.

6. The short-term adjustable load forecasting method based on the SA-TCN model according to claim 5 is characterized in that: β1 is 0.96, β2 is 0.94, f(X i ), f(X0) takes the value of: 0.1,X i =1,X0=1; 0.2,X i =2,X0=2; 0.2,X i =3,X0=3; 0.2,X i =4,X0=4; 0.3,X i =5,X0=5; 0.7,X i =6,X0=6 1,X i =7,X0=7。 7. The short-term adjustable load forecasting method based on the SA-TCN model according to claim 1 is characterized in that: In step 3, based on the longitudinal adjustable load power matrix and the transverse adjustable load power matrix, the self-attention mechanism output matrix of the longitudinal and transverse adjustable load power matrices is calculated, and then the output matrix obtained by weighted averaging the longitudinal adjustable load power matrix and the transverse adjustable load power matrix through the self-attention mechanism is used to establish a mapping relationship between the adjustable load power of the day to be predicted and the transverse and longitudinal load matrices through stacked hole convolution, and the longitudinal and transverse load prediction results of the day to be predicted are output.

8. The short-term adjustable load forecasting method based on the SA-TCN model according to claim 1 is characterized in that: Step 3 includes: Step 3.1: transform the longitudinal adjustable load power matrix P vertical and the lateral adjustable load power matrix P horizontal Linearly map them to three different spaces respectively; the mapping calculation process is shown as follows: [Q ver ,K ver ,V ver ]=[W q ver ,W k ver ,W v ver ]P vertical [Q hor ,K hor ,V hor ]=[W q hor ,W k hor ,W v hor ]P horizontal Among them, W q , W k , W v is the linear mapping weight matrix, Q, K, V are the query matrix, key matrix and value matrix respectively; Step 3.2: Calculate the corresponding attention score matrix A for the input longitudinal and transverse adjustable load power matrices respectively. ver and A hor ; Step 3.3, calculate the self-attention mechanism output matrix H of the longitudinal and transverse load data matrix ver and H hor , as shown below: H ver =V ver And ver H hor =V hor And hor Step 3.4: The output matrix H is obtained by weighted averaging the input sequence through the self-attention mechanism ver and H hor , through stacking dilated convolution, the mapping relationship between adjustable load power and horizontal and vertical load matrices is respectively mined, and then the vertical and horizontal load prediction results of the predicted day are output. and O t =RELU(h t +F(h t )) Where H = {h1,h2,h3,···,h 96 } is (H ver ) T or H hor , (H ver ) T H ver The transposed matrix of The corresponding h t is a column vector t = [1, 2, ···, 96]; d represents the dilation factor; K represents the filter size; The filter is F = {f1, f2, ..., f K }, * is the convolution symbol; h t-d(K-k) is the column vector h of the td(Kk)th input matrix i , the value range of i is [tK, t], RELU is the corrected linear function, O t The output result is or 9. The short-term adjustable load forecasting method based on the SA-TCN model according to claim 8 is characterized in that: The attention score matrix A in step 3.2 ver and A hor The calculation process is shown as follows: A ver =softmax((K ver ) T Q ver ) A hor =softmax((K hor ) T Q hor ) Among them, softmax is normalized by column, (K ver ) T is the transposed matrix of the key matrix.

10. A short-term adjustable load forecasting system based on the SA-TCN model, based on the short-term adjustable load forecasting method based on the SA-TCN model according to any one of claims 1 to 9, characterized in that: The system includes a data acquisition module, a preprocessing module, a matrix division module, a logic calculation module, a prediction result output module, The data acquisition module is used to collect historical data of adjustable load power; The preprocessing module is used to preprocess the adjustable load power historical data; The matrix partitioning module is used to partition the pre-processed historical adjustable power sequence; The model prediction module is used to output the longitudinal and transverse load prediction results of the forecasting day based on the SA-TCN prediction model; The prediction result output module uses a fully connected layer to fuse the horizontal and vertical prediction results and output the final adjustable load power prediction result.

11. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Load prediction method based on MIC-TCN-LSTM, storage medium and computer system

    CN114819352A

  • Power system short-term load prediction method based on deep learning neural network

    CN111931989A

  • Adjustable load power multi-step prediction method based on improved TCN correction accumulative error

    CN114066052A