Power load decomposition and identification method and system based on TCN and BiGRU
By using the method of combining the GAM attention mechanism in power load decomposition, the problem of insufficient feature extraction and long-term dependence on information in the prior art is solved, and a higher power load decomposition accuracy and identification effect of electrical power sequences are achieved.
Patent Information
- Application Number
- CN202411754557.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-02
AI Technical Summary
The existing non-invasive power load decomposition methods have shortcomings in insufficient feature extraction and the inability to take into account global features and long-term dependence information, resulting in poor decomposition accuracy and recognition effects.
The power load decomposition and identification method based on TCN and BiGRU is adopted to extract the long-term dependence information of the sequence through the TCN network. The BiGRU network extracts deep bidirectional timing characteristics, and combines the GAM attention mechanism to consider the global sequence characteristics and retain key information, and finally output the predicted sequence midpoint.
It improves the accuracy of power load decomposition and recognition, can better extract long-term dependency information, shorten model training time, and enhances the ability to identify electrical power sequences.
Smart Images

Figure CN119671413A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of non-intrusive power load decomposition, and in particular to a method and system for decomposing and identifying power load based on TCN and BiGRU. Background Art
[0002] The load monitoring method can not only help users understand their own electricity consumption behavior and regulate their own electricity consumption habits, but also help power grid companies to achieve scientific power dispatching. General load monitoring methods are divided into non-invasive load monitoring and invasive load monitoring. Invasive power load monitoring requires the use of multiple sensors to achieve monitoring, while non-invasive power load monitoring only requires the use of smart meters at the incoming line to achieve the goal. It has the characteristics of low cost and good privacy, which is conducive to large-scale promotion and high user acceptance.
[0003] In recent years, a variety of non-intrusive power load decomposition methods have been proposed. Han Xiao proposed the use of high-frequency VI curves for non-intrusive power load decomposition, which achieved good results. However, the high cost of high-frequency acquisition is not conducive to large-scale promotion. Therefore, most studies are based on low-frequency data. Machine learning algorithms are widely used in the field of non-intrusive power load decomposition, including decision trees (DT), support vector machines (SVM), k-nearest neighbors and other machine learning methods. Their advantages are that they require fewer data sets and shorter training time, but their generalization performance is weak and the decomposition accuracy is low. In recent years, deep learning methods have gradually replaced machine learning methods and become the mainstream of research. Kelly et al. first used models such as denoising autoencoders (DAE) and LSTM for low-frequency power power load decomposition, proving that the accuracy is higher than that of machine learning algorithms. Zhang C et al. applied fully convolutional neural networks to power load decomposition tasks and achieved good accuracy. In addition, Seq2Seq models, transformers, CNN_LSTM and other models have also been used in this task. Although these models have improved the decomposition accuracy and feature extraction capabilities to a certain extent, they can effectively identify the power curves of electrical appliances in the total power curve. However, these models all face some problems such as insufficient feature extraction, inability to take into account global features, and inability to identify long-term dependencies in power sequences. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for decomposing and identifying power loads based on TCN and BiGRU, which are conducive to extracting long-term dependent information and improving the accuracy of power load decomposition and identification.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is: a method for decomposing and identifying power loads based on TCN and BiGRU, comprising the following steps:
[0006] Step S1, obtaining a data set of total household power consumption and power consumption of each electrical appliance, and performing data preprocessing on the data set to establish a training data set and a test data set;
[0007] Step S2, constructing a TCN_BiGRU network model including a TCN network, a BiGRU network and a GAM attention mechanism; inputting the power sequence into the TCN network for preliminary feature extraction, extracting the long-term dependency information of the sequence, and obtaining the shallow features of the power sequence; using the obtained shallow features as the input features of the BiGRU network, and extracting bidirectional deep sequence features from the shallow features; using the bidirectional deep sequence features as the input sequence information of the GAM attention mechanism, considering the global sequence features while retaining the key information, reducing information loss and amplifying the global dimension features, and outputting the predicted sequence midpoint; training and verifying the TCN_BiGRU network model through the training data set and the test data set to obtain a trained TCN_BiGRU network model;
[0008] Step S3: Decompose and identify power load using the trained TCN_BiGRU network model.
[0009] Furthermore, in step S1, the implementation method of performing data preprocessing on the data set is as follows:
[0010] Step S11, clearing abnormal values in the total power sequence, and filling the missing values with the value of the previous point in the total power sequence;
[0011] Step S12: the total power sequence [X 1 ,X 2 ,X 3 ,...,X n ] Use sliding window to split into fixed-length power sequences, and take the midpoint of the corresponding electrical appliance power sequence as the label value;
[0012] Step S13: Divide the segmented power sequences and labels into a training data set and a test data set according to a set ratio.
[0013] Furthermore, in step S2, the implementation method of the TCN network is as follows:
[0014] Split the temporal convolution into causal convolution, dilated convolution and residual network; the time series is in x t The causal convolution calculation formula at is as follows:
[0015]
[0016] Where F is the filter sequence [f 1 ,f 2 ,f3 ,...,f K ], f k is the value of the kth filter in the filter sequence F, and X is the time series [x 1 ,x 2 ,x 3 ,...,x T ], x t-k is the tkth time point in the time series X. From the above formula, we can see that the causal convolution calculation only uses the sequence value before time t, and has nothing to do with the sequence value after time t, so it has causal characteristics;
[0017] Time series in x t The calculation formula for the dilated convolution at is as follows:
[0018]
[0019] Where F is the filter sequence [f 1 ,f 2 ,f 3 ,...,f K ], f k is the value of the kth filter in the filter sequence F, and X is the time series [x 1 ,x 2 ,x 3 ,...,x T ], x t-(K-k)d is the t-(Kk)dth time point in the time series X, d is the expansion factor;
[0020] Residual connections are introduced to transfer information across layers to alleviate the gradient vanishing and gradient exploding problems; the residual connection calculation formula is as follows:
[0021] y=W 1x1 ·x+b
[0022] Among them, b is the bias term, W 1×1 is a 1×1 convolution kernel, and x is the feature map calculated by temporal convolution;
[0023] After the input time series data is subjected to causal convolution and dilated convolution to extract features, the residual network link is used to transmit information across layers, and finally the long-term dependency information of the sequence is extracted and the shallow feature information is output.
[0024] Furthermore, in step S2, the implementation method of the BiGRU network is as follows:
[0025] The BiGRU network is implemented by overlapping unidirectional GRUs in opposite directions; in GRU, the output of the update gate is expressed as follows:
[0026] z t =σ(Wr ·[h t-1 ,x t ]+b z )
[0027] The output of the reset gate is represented as follows:
[0028] r t =σ(W r ·[h t-1 ,x t ]+b r )
[0029] The candidate hidden state is calculated through the reset gate, and the output of the candidate hidden state is expressed as follows:
[0030]
[0031] The updated hidden state is calculated by the candidate state and the update gate. The output of the updated hidden state is expressed as follows:
[0032]
[0033] Among them, σ represents the Sigmoid activation function, tanh represents the hyperbolic tangent activation function, and W r , W, W are weight matrices, x t is the shallow feature extracted by TCN, b r 、b z and b h is the bias, h t-1 is the hidden state feature of the previous time step;
[0034] The BiGRU network combines the outputs of two GRUs in opposite directions, thereby extracting bidirectional deep temporal features.
[0035] Further, in step S2, the GAM attention mechanism includes a channel attention module and a spatial attention module, and its implementation method is as follows:
[0036] Step S41: Input load characteristic diagram F 1 , F 1 ∈R H×W×C , where C is the number of channels of the input load characteristic graph, H and W are the height and width of the input load characteristic graph, and the input load characteristic graph F 1 After the channel attention module is redistributed, a feature weight M is generated C (F 1 ), and the input load characteristic diagram F 1 After point multiplication, we get the feature map F 2 And output, the specific formula is as follows:
[0037]
[0038] Step S42: Output feature map F 2 Input spatial attention module to generate attention weight M S (F 2 ), M S (F 2 ) Weights and feature maps F 2 Multiply to get the load characteristic F with the same dimension as the original characteristic 3 ; The specific formula is as follows:
[0039]
[0040] Step S43: Perform two layers of fully connected layers on the sequence features re-extracted by the GAM attention mechanism to achieve dimensionality change, and then output the sequence midpoint prediction value, where the fully connected layer is represented as follows:
[0041] z 1 =W 1 ·x 1 +b 1
[0042] z 2 =W 2 ·z 1 +b 2
[0043] Among them, x 1 is the feature map output by the GAM attention mechanism, W 1 and W 2 is the weight matrix, z 1 is the output vector of the first fully connected layer, z 2 is the output vector of the second fully connected layer, b 1 and b 2 For bias.
[0044] Furthermore, in step S2, the implementation method of training and verifying the TCN_BiGRU network model through the training data set and the test data set is as follows:
[0045] Set Adam training parameters, train the model in batches using the training data set, and use the network weights of the best batch as the model training result; verify the result in the test data set, and use F 1 The average absolute error between the predicted value and the true value of the electrical power is calculated to evaluate the decomposition performance of the model. 1 To evaluate the model's recognition performance of turning electrical appliances on and off.
[0046] The present invention also provides a power load decomposition and identification system based on TCN and BiGRU, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the above-mentioned method steps can be implemented.
[0047] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a method and system for decomposing and identifying power loads based on TCN and BiGRU. The method inputs the power sequence into the TCN network to extract the long-term dependency in the sequence, obtains the shallow sequence features, and then inputs the shallow features into the BiGRU network to extract the deep bidirectional time series features, and then obtains the bidirectional time series feature information through the GAM attention mechanism, considers the global sequence features while retaining the key information, reduces the information loss and amplifies the global dimension features, and finally outputs the midpoint information of the sequence through the fully connected layer dimension transformation. The method and system provided by the present invention can better extract long-term dependency information, improve the accuracy of power load decomposition and identification, and shorten the model training time. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A flowchart of a method implementation of an embodiment of the present invention;
[0049] Figure 2 It is the overall structure diagram of the TCN_BiGRU network model in the embodiment of the present invention;
[0050] Figure 3 This is a schematic diagram of sliding window data preprocessing in an embodiment of the present invention;
[0051] Figure 4 A diagram of a temporal convolution structure in an embodiment of the present invention;
[0052] Figure 5 This is a BiGRU network structure diagram in an embodiment of the present invention;
[0053] Figure 6 This is a structural diagram of the GAM attention mechanism in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0055] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0056] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0057] like Figure 1 As shown, this embodiment provides a method for decomposing and identifying power loads based on TCN and BiGRU, comprising the following steps:
[0058] Step S1: Obtain a data set of total household power consumption and power consumption of each electrical appliance, perform data preprocessing on the data set, and establish a training data set and a test data set.
[0059] Step S2: Construct TCN_BiGRU network model, such as Figure 2 As shown in the figure, the model mainly includes TCN network, BiGRU network and GAM attention mechanism. The power sequence is input into the TCN network for preliminary feature extraction, the long-term dependency information of the sequence is extracted, and the shallow features of the power sequence are obtained; the shallow features obtained are used as the input features of the BiGRU network, and the bidirectional deep sequence features are extracted from the shallow features; the bidirectional deep sequence features are used as the input sequence information of the GAM attention mechanism, considering the global sequence features while retaining the key information, reducing information loss and amplifying the global dimension features, and outputting the predicted sequence midpoint. The TCN_BiGRU network model is trained and verified through the training data set and the test data set to obtain the trained TCN_BiGRU network model.
[0060] Step S3: Decompose and identify power load using the trained TCN_BiGRU network model.
[0061] like Figure 3 As shown, the implementation method of data preprocessing for the data set is as follows:
[0062] Step S11, clear the abnormal values in the total power sequence, and fill the missing values with the value of the previous point in the total power sequence.
[0063] In this embodiment, the specific method of cleaning up the abnormal value is: detecting the abnormal value in the total power sequence, removing the power point of the abnormal value, and filling the abnormal value with the value to the left of the abnormal value.
[0064] Step S12: the total power sequence [X 1 ,X 2 ,X 3 ,...,Xn ] Use a sliding window to split the data into power sequences of fixed length, take the window size as 127, and take the midpoint of the power sequence of the corresponding appliance as the label value.
[0065] In this embodiment, the specific method of using the sliding window to segment the data is as follows: Since the length of the total power curve is uncertain, and the length of the time series data required to be input by the deep learning network is fixed, it is necessary to perform sliding window segmentation on the total power data. The process of sliding window processing power data is as follows Figure 3 As shown. The sliding window size is the required sequence size. Each time the sequence data in the sliding window is split, [X 1 ,X 2 ,X 3 ,...,X n ] After segmenting the sequence, the sliding window moves back a fixed step size n to segment new time series data, and so on, until the window slides to the end of the sequence.
[0066] Step S13: Divide the segmented power sequences and labels into a training data set and a test data set according to a set ratio.
[0067] In this embodiment, the specific method of dividing the training set and the test set is: select the power curves and total power curves of 5 common electrical appliances to form the training set and the test set. In this embodiment, air conditioners, kettles, dishwashers, washing machines, and microwave ovens are selected as labels. This paper uses the Seq2point output method to output the midpoint of the sequence of electrical appliance sequences corresponding to the total power of the sliding window as the label. A total of five sets of electrical appliance data sets are constructed, and finally the data sets are normalized and divided into 7:3 training set and test set data.
[0068] In this embodiment, the structure of the TCN network (temporal convolutional network) is as follows: Figure 4 As shown. The value of each layer of the time convolution is only related to the corresponding position of the previous layer and the previous convolution unit. The time convolution network combines the convolution network of dilated convolution and causal convolution. For causal convolution, the output of each time step is only related to the input of the corresponding time step of the previous layer and the input of the previous time step, and does not depend on future data. Therefore, it is causal. The disadvantage is that the receptive field is small, while the dilated convolution has a larger receptive field and can sense longer time series data. The time convolution combines the advantages of these two convolutions, has both causality and a larger receptive field, can better extract the long-term dependency of time series data, and extract deeper feature connections.
[0069] Split the temporal convolution into causal convolution, dilated convolution and residual network; the time series is in x t The causal convolution calculation formula at is as follows:
[0070]
[0071] Where F is the filter sequence [f 1 ,f 2 ,f 3 ,...,f K ], f k is the value of the kth filter in the filter sequence F, and X is the time series [x 1 ,x 2 ,x 3 ,...,x T ], x t-k is the tkth time point in the time series X. From the above formula, we can see that the causal convolution calculation only uses the sequence value before time t and has nothing to do with the sequence value after time t, so it has causal characteristics.
[0072] Time series in x t The calculation formula for the dilated convolution at is as follows:
[0073]
[0074] Where F is the filter sequence [f 1 ,f 2 ,f 3 ,...,f K ], f k is the value of the kth filter in the filter sequence F, and X is the time series [x 1 ,x 2 ,x 3 ,...,x T ], x t-(K-k)d is the t-(Kk)dth time point in the time series X, d is the dilation factor. In the dilated convolution, the filter of the same width has a larger receptive field and can extract longer time series features.
[0075] The temporal convolutional network is deep, so residual connections are introduced to transfer information across layers to alleviate the gradient disappearance and gradient explosion problems; the residual connection calculation formula is as follows:
[0076] y=W 1x1 ·x+b
[0077] Among them, b is the bias term, W 1×1 is a 1×1 convolution kernel, x is the feature map calculated by temporal convolution, and residual connections are used to alleviate gradient explosion and gradient disappearance.
[0078] After the input time series data is subjected to causal convolution and dilated convolution to extract features, the residual network link is used to transmit information across layers, and finally the long-term dependency information of the sequence is extracted and the shallow feature information is output.
[0079] In this embodiment, the structure of the BiGRU network is as follows: Figure 5 As shown in the figure. The BiGRU network is realized by overlapping unidirectional GRUs in opposite directions. The output vectors of the two layers of GRUs in opposite directions are fused and output. The single-layer GRU network can only extract positive time series features and easily ignore some reverse time series relationships. The use of BiGRU can effectively avoid this situation. GRU is an improved network unit of LSTM, which introduces update gate and reset gate units. Compared with LSTM network, the amount of calculation is smaller.
[0080] In GRU, the output of the update gate is represented as follows:
[0081] z t =σ(W r ·[h t-1 ,x t ]+b z )
[0082] The output of the reset gate is represented as follows:
[0083] r t =σ(W r ·[h t-1 ,x t ]+b r )
[0084] The candidate hidden state is calculated through the reset gate, and the output of the candidate hidden state is expressed as follows:
[0085]
[0086] The updated hidden state is calculated by the candidate state and the update gate. The output of the updated hidden state is expressed as follows:
[0087]
[0088] Among them, σ represents the Sigmoid activation function, tanh represents the hyperbolic tangent activation function, and W r , W, W are weight matrices, x t is the shallow feature extracted by TCN, b r 、b z and b h is the bias, h t-1 is the hidden state feature of the previous time step.
[0089] The GRU unit has faster calculation and better performance. The BiGRU network is composed of two GRUs with opposite directions. The shallow features of TCN are input into the BiGRU network, and the bidirectional sequence features are extracted to obtain the deepened sequence features.
[0090] In this embodiment, the structure of the BiGRU network is as follows: Figure 6 The GAM attention mechanism includes a channel attention module and a spatial attention module, and its implementation method is as follows:
[0091] Step S41: Input load characteristic diagram F 1 , F 1 ∈R H×W×C , where C is the number of channels of the input load characteristic graph, H and W are the height and width of the input load characteristic graph, and the input load characteristic graph F 1 After the channel attention module is redistributed, a feature weight M is generated C (F 1 ), and the input load characteristic diagram F 1 After point multiplication, we get the feature map F 2 And output, the specific formula is as follows:
[0092]
[0093] Step S42: Output feature map F 2 Input spatial attention module to generate attention weight M S (F 2 ), M S (F 2 ) Weights and feature maps F 2 Multiply to get the load characteristic F with the same dimension as the original characteristic 3 ; The specific formula is as follows:
[0094]
[0095] Step S43: Perform two layers of fully connected layers on the sequence features re-extracted by the GAM attention mechanism to achieve dimensionality change, and then output the sequence midpoint prediction value, where the fully connected layer is represented as follows:
[0096] z 1 =W 1 ·x 1 +b 1
[0097] z 2 =W 2 ·z 1 +b 2
[0098] Among them, x 1 is the feature map output by the GAM attention mechanism, W 1 and W 2 is the weight matrix, z 1 is the output vector of the first fully connected layer, z 2 is the output vector of the second fully connected layer, b1 and b 2 is the bias. Finally, z 2 The output is the predicted sequence midpoint.
[0099] The implementation method of training and verifying the TCN_BiGRU network model through training data sets and test data sets is as follows:
[0100] Set Adam training parameters, train the model in batches using the training data set, and use the network weights of the best batch as the model training result; verify the result in the test data set, and use F 1 The average absolute error between the predicted value and the true value of the electrical power is calculated to evaluate the decomposition performance of the model. 1 To evaluate the recognition performance of the model for the on and off of the electrical appliance. In this embodiment, the Adam parameter lr is set to 0.001, beta1 is set to 0.9, and beta2 is set to 0.999.
[0101] This embodiment also provides a power load decomposition and identification system based on TCN and BiGRU, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the above-mentioned method steps can be implemented.
[0102] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0103] The present application is described 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 application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0104] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0105] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0106] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A method for decomposing and identifying power loads based on TCN and BiGRU, characterized in that: The following steps are involved: Step S1, obtaining a data set of total household power consumption and power consumption of each electrical appliance, and performing data preprocessing on the data set to establish a training data set and a test data set; Step S2, construct a TCN_BiGRU network model including a TCN network, a BiGRU network and a GAM attention mechanism; input the power sequence into the TCN network for preliminary feature extraction, extract the long-term dependency information of the sequence, and obtain the shallow features of the power sequence; The shallow features obtained are used as the input features of the BiGRU network, and the bidirectional deep sequence features are extracted from the shallow features; the bidirectional deep sequence features are used as the input sequence information of the GAM attention mechanism, and the key information is retained while considering the global sequence features, reducing information loss and amplifying the global dimension features, and outputting the predicted sequence midpoint; the TCN_BiGRU network model is trained and verified through the training data set and the test data set to obtain the trained TCN_BiGRU network model; Step S3: Decompose and identify power load using the trained TCN_BiGRU network model.
2. According to claim 1, a method for decomposing and identifying power loads based on TCN and BiGRU is characterized in that: In step S1, the implementation method of data preprocessing on the data set is as follows: Step S11, clearing abnormal values in the total power sequence, and filling the missing values with the value of the previous point in the total power sequence; Step S12: the total power sequence [X1, X2, X3, ..., X n ] Use sliding window to split into fixed-length power sequences, and take the midpoint of the corresponding electrical appliance power sequence as the label value; Step S13: Divide the segmented power sequences and labels into a training data set and a test data set according to a set ratio.
3. The method for decomposing and identifying power loads based on TCN and BiGRU according to claim 1, characterized in that: In step S2, the implementation method of the TCN network is as follows: Split the temporal convolution into causal convolution, dilated convolution and residual network; the time series is in x t The causal convolution calculation formula at is as follows: Where F is the filter sequence [f1,f2,f3,...,f K ], f k is the value of the kth filter in the filter sequence F, X is the time series [x1,x2,x3,...,x T ], x t-k is the tkth time point in the time series X. From the above formula, we can see that the causal convolution calculation only uses the sequence value before time t, and has nothing to do with the sequence value after time t, so it has causal characteristics; Time series in x t The calculation formula for the dilated convolution at is as follows: Where F is the filter sequence [f1,f2,f3,...,f K ], f k is the value of the kth filter in the filter sequence F, X is the time series [x1,x2,x3,...,x T ], x t-(K-k)d is the t-(Kk)dth time point in the time series X, d is the expansion factor; Residual connections are introduced to transfer information across layers to alleviate the gradient vanishing and gradient exploding problems; the residual connection calculation formula is as follows: y=W 1x1 ·x+b Among them, b is the bias term, W 1×1 is a 1×1 convolution kernel, and x is the feature map calculated by temporal convolution; After the input time series data is subjected to causal convolution and dilated convolution to extract features, the residual network link is used to transmit information across layers, and finally the long-term dependency information of the sequence is extracted and the shallow feature information is output.
4. The method for decomposing and identifying power loads based on TCN and BiGRU according to claim 1, characterized in that: In step S2, the implementation method of the BiGRU network is as follows: The BiGRU network is implemented by overlapping unidirectional GRUs in opposite directions; in GRU, the output of the update gate is expressed as follows: z t =σ(W r ·[h t-1 ,x t ]+b z ) The output of the reset gate is represented as follows: r t =σ(W r ·[h t-1 ,x t ]+b r ) The candidate hidden state is calculated through the reset gate, and the output of the candidate hidden state is expressed as follows: The updated hidden state is calculated by the candidate state and the update gate. The output of the updated hidden state is expressed as follows: Among them, σ represents the Sigmoid activation function, tanh represents the hyperbolic tangent activation function, and W r , W, W is the weight matrix, x t is the shallow feature extracted by TCN, b r 、b z and b h is the bias, h t-1 is the hidden state feature of the previous time step; The BiGRU network combines the outputs of two GRUs in opposite directions, thereby extracting bidirectional deep temporal features.
5. The method for decomposing and identifying power loads based on TCN and BiGRU according to claim 1 is characterized in that: In step S2, the GAM attention mechanism includes a channel attention module and a spatial attention module, and its implementation method is as follows: Step S41: Input load characteristic diagram F1, F1∈R H×W×C , where C is the number of channels of the input load feature map, H and W are the height and width of the input load feature map, and the input load feature map F1 is redistributed by the channel attention module to generate a feature weight M C (F1), multiplied by the input load characteristic diagram F1, obtains the characteristic diagram F2 and outputs it. The specific formula is as follows: Step S42: Input the output feature map F2 into the spatial attention module to generate the attention weight M S (F2), M S The weight (F2) is multiplied by the feature map F2 to obtain the load feature F3 with the same feature dimension as the original feature; the specific formula is as follows: Step S43: Perform two layers of fully connected layers on the sequence features re-extracted by the GAM attention mechanism to achieve dimensionality change, and then output the sequence midpoint prediction value, where the fully connected layer is represented as follows: z1=W1·x1+b1 z2=W2·z1+b2 Among them, x1 is the feature map output by the GAM attention mechanism, W1 and W2 are weight matrices, z1 is the output vector of the first fully connected layer, z2 is the output vector of the second fully connected layer, and b1 and b2 are biases.
6. The method for decomposing and identifying power loads based on TCN and BiGRU according to claim 1, characterized in that: In step S2, the implementation method of training and verifying the TCN_BiGRU network model through the training data set and the test data set is as follows: Set Adam training parameters, train the model in batches using the training data set, and use the network weights of the best performing batch as the model training result; verify the result in the test data set, use F1 and MAE as model evaluation indicators, calculate the mean absolute error between the predicted value and the true value of the predicted electrical power, and use this to evaluate the model decomposition performance. Use F1 to evaluate the model's recognition performance for whether the electrical appliance is turned on or off.
7. A power load decomposition and identification system based on TCN and BiGRU, characterized in that: The method comprises a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, the method steps as described in any one of claims 1 to 6 can be implemented.
Citation Information
Patent Citations
Multi-network combined multi-region time-frequency-space wind power output prediction method
CN116522761A
Network anomaly traffic detection method based on hybrid space-time neural network
CN117829201A
Load prediction method based on fusion of attention mechanism and spatio-temporal characteristics
CN118940919A
Non-Intrusive Load Decomposition Method Based on Informer Model Coding Structure
US20220397874A1
Cited By
Load identification method and electronic equipment
CN121256281A
Power load accurate prediction method and system based on machine learning
CN121355889A
Distributed power supply configuration detection method and system based on deep learning fusion model
CN121579985A