High-power electrical appliance load decomposition method based on long and short term recurrent neural network
By adopting a long-term and short-term recursive neural network method in load decomposition, combining the partitioning and governance strategy and adaptive moment estimation calculation method, the problems of high complexity of load decomposition and inefficiency of data processing in the prior art are solved, and high-quality load decomposition under limited power data is achieved.
Patent Information
- Application Number
- CN202411842894.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-09
Smart Images

Figure CN119961819A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of load decomposition, in particular to a method for decomposing high-power electrical appliance load based on long-term and short-term recursive neural networks. Background Art
[0002] With the prevalence of nonlinear load electrical appliances in household life, the safety of electrical appliances in residents has become increasingly prominent. If high-power electrical appliances exceed the load limit during use, it will cause equipment overload, which will not only shorten the service life of the appliances and increase costs, but may also cause failures in the internal circuits of the appliances, thereby causing fires. With the development of smart grids, it has become possible to carry out refined management of power loads, which can achieve load decomposition of high-power electrical appliances, identify abnormal usage behaviors, and troubleshoot potential safety hazards in electricity use. Domestic and foreign scholars have conducted a lot of research on load decomposition methods and proposed load decomposition methods based on optimization algorithms and traditional machine learning methods. In recent years, many studies have applied deep learning algorithms to load decomposition methods, especially long-short term recursive neural networks (LSTMs), which have performed well in terms of load feature recognition accuracy, processing time series data, and data analysis stability.
[0003] The main challenge of current load decomposition research is the lack of labeled data sets and effective data processing methods. In load decomposition, the power consumption data of electrical equipment is often scarce. Although many existing load decomposition methods are effective, they have high computational complexity, especially when processing large data sets, the time cost of model training and prediction is high. Generative adversarial networks (GANs) can be used to generate data, but the model is difficult to train and the generated samples lack diversity. The derivative model WGAN of the generative adversarial network (GAN) improves the generative adversarial network (GAN) from the perspective of loss function, making the training more stable and generating higher quality power consumption data sets. At the same time, since load data often have a certain temporal relationship, and the long-short-term recurrent neural network (LSTM) can solve the gradient vanishing and gradient exploding problems encountered by traditional recurrent neural networks (RNNs) when processing long-term dependencies, a load decomposition method based on long-short-term recurrent neural networks can be established to quickly identify the safety hazards of high-power electrical appliances, and load decomposition evaluation indicators can be designed to evaluate the effect of load identification from multiple dimensions after model identification. Summary of the invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the problem to be solved by the present invention is how to provide a method for decomposing the load of high-power electrical appliances based on long-term and short-term recursive neural networks, overcome the problems of limited data sets for load decomposition research and high computational cost of model training, generate high-quality load decomposition training data sets in a short time when power data is limited, and use LSTM to extract key load features such as active power, adopt a divide-and-conquer strategy to extract long-term dependencies in power time series data, and use an adaptive moment estimation algorithm to optimize the model training process to obtain a high-power electrical appliance load decomposition model. After the model adjustment and training is completed, the model is evaluated from three aspects: accuracy evaluation, generalization and expansion ability evaluation, and equipment power decomposition performance evaluation, so as to achieve the goal of accurately identifying the load.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In the first aspect, an embodiment of the present invention provides a method for decomposing a high-power electrical appliance load based on a long short-term recursive neural network, which includes obtaining power information of high-power electrical appliances and preprocessing them to obtain preprocessed data; performing feature recognition based on the preprocessed data to construct a long short-term memory recursive neural network model based on a divide-and-conquer strategy; updating and optimizing the long short-term memory recursive neural network model; and evaluating the updated and optimized long short-term memory recursive neural network model to accurately identify the load.
[0008] As a preferred solution of the high-power electrical appliance load decomposition method based on long-term and short-term recursive neural networks described in the present invention, the obtaining of high-power electrical appliance power information and preprocessing thereof refers to selecting low-voltage residential households as monitoring scenarios, obtaining high-power electrical appliance power information, and preprocessing of abnormal values and missing values for the collected original data related to the power load of high-power electrical appliances, including the following steps: using mean filling method and linear interpolation method to complete the missing data; using mean filling method for the mean of other objects with the same characteristics, and filling the missing values by filling the digital type.
[0009] As a preferred solution of the method for decomposing high-power electrical appliances load based on long-term and short-term recurrent neural networks described in the present invention, the feature recognition includes recognition of the switch states of multiple types of high-power electrical appliances and construction of a feature extraction network; the recognition of the switch states of multiple types of high-power electrical appliances means that before load decomposition, the switch states of various types of high-power electrical appliances in low-voltage household users need to be accurately identified; in terms of sample quantity, the number of samples of electrical appliances in the on state and the off state are pre-balanced; the recognition of the switch states of multiple types of high-power electrical appliances includes the following steps: when judging the switch state of an electrical appliance, a first threshold is set according to the power of the electrical appliance, and if it is detected that the real-time power of a certain electrical appliance exceeds the first threshold, the electrical appliance is determined to be in the on state; otherwise, the electrical appliance is in the off state; the minimum shutdown duration and the minimum startup duration are set to filter out false state changes caused by short-term fluctuations; the construction of the feature extraction network includes the following steps: importing the LSTM class from tensorflow.keras.layers; using the keras.Sequential model and adding the LSTM layer, wherein the number of neurons in the LSTM layer and whether to return a sequence parameter are set; selecting an optimizer and a loss function and compiling the model; and repeatedly training the model using the training data in the compiled model.
[0010] As a preferred solution of the method for decomposing high-power electrical appliance load based on long-short-term recurrent neural network described in the present invention, wherein: the construction of the long-short-term memory recurrent neural network model based on the divide-and-conquer strategy includes data decomposition, model decomposition, training process optimization, divide-and-conquer strategy calculation and long-short-term memory recurrent network construction; the data decomposition includes: splitting the long sequence data into multiple different shorter subsequences, wherein each subsequence is processed separately using the LSTM model, and then the processing results are merged; if the input data contains features of multiple dimensions, these features are grouped and processed separately using the LSTM model, and finally the results of each group are merged; the model decomposition includes: constructing a multi-layer LSTM network with the help of the divide-and-conquer strategy idea, each layer processes different levels of abstract information to solve a relatively simple sub-problem; for the situation where multiple sequence data need to be processed simultaneously, multiple LSTM models are used to process these sequences in parallel, each model works independently, and finally the results are merged; the training process optimization includes: when training the LSTM model, a batch training method is adopted, that is, the entire data set is divided into multiple small batches, and each batch is independently forward propagated and back-propagated; and the gradient clipping technology is used to limit the amplitude of the gradient.
[0011] As a preferred solution of the high-power electrical appliance load decomposition method based on long-term and short-term recurrent neural network described in the present invention, wherein: the divide-and-conquer strategy calculation refers to the divide-and-conquer strategy by defining three vectors, which respectively represent the query, key and value of the i-th point in the input sequence, including the following steps: the query of the i-th point in the input sequence i and the key of all points; perform correlation calculation on the above sequence to obtain the vector e i ; vector e i Import into the softmax function and get vector a i =softmax(e i ); all points of the input sequence corresponding to each component are weighted, and then the complete data is weighted. The higher the weight, the more important the corresponding information is. Conversely, the lower the weight, the less important the information is. The long short-term memory recursive network construction includes the following steps: layer normalization of the input data, and then weighting the input data according to the recursive score. The calculation formula is as follows:
[0012]
[0013] Q=K=V=Layer Normalization(O)
[0014] Among them, Q, K, V are query moment, key moment and value moment; m is the length of the input sequence; O is the output of the feature extraction network; d is the dimension of each value of the input data; the calculation result is normalized through the layer; in the calculation process of the divide-and-conquer strategy, both long-term and short-term recursive neural networks are connected using the residual method.
[0015] As a preferred solution of the method for decomposing high-power electrical appliance load based on long-term and short-term recursive neural network described in the present invention, wherein: the update optimization includes the construction of multi-layer perceptron artificial neural network and the adjustment of model hyperparameters; the construction of multi-layer perceptron artificial neural network includes the following steps: the calculation process of the bias b and weight value w of the multi-layer perceptron artificial neural network is to use the forward propagation algorithm to start from the input layer and perform a series of linear operations and activation operations backward layer by layer. Assuming that there are a total of m neurons in the l-1 layer, the jth neuron a in the lth layer l j The specific formula is as follows:
[0016]
[0017] in, is the weight value from neuron k in layer l-1 to neuron j in layer l; is the bias value of the kth neuron in layer l; is composed of linear operations of the jth neuron in layer l; is the kth neuron in layer l-1; σ is the activation function; when the forward propagation algorithm is calculated to the final layer, the output result can be obtained, and the calculation process of the multilayer perceptron artificial neural network is to continuously update the weight value w and the bias b. Therefore, the back propagation algorithm is used to reversely update the weights and biases of each layer to make the predicted value approach the true value continuously, so as to minimize the loss function value. The loss function is measured by the mean square error, and the calculation formula is as follows:
[0018]
[0019] in, is the true value of the jth node in the kth layer; is the true value of the jth node in the kth layer; m is the dimension of the output data; after obtaining the loss function, the gradient descent method is used to solve the weight w and bias b of each layer. The calculation of the gradient descent method follows the chain rule for obtaining derivatives. The specific formula for obtaining the updated weight w' and bias b' is as follows:
[0020]
[0021] Among them, η is the learning rate, which represents the amplitude of reverse movement; in the process of forward propagation, the input data reaches the output layer to generate prediction results after feature extraction and multi-layer processing; in the process of back propagation, the loss is transmitted back to the input layer by calculating the gradient of the loss function, and the weights and bias values are continuously updated in a cycle, so that the model gradually approaches the global optimal solution; the model hyperparameter adjustment refers to the optimization of the model training process by using the adaptive moment estimation Adam algorithm, in which the adaptive moment estimation Adam algorithm calculates an adaptive multiplier to achieve the update and control of the hyperparameters, and estimates the gradient by moment to achieve the dynamic adjustment of the learning rate of each parameter. The specific formula is as follows:
[0022]
[0023] m t =β1m t-1 +(1-β1)g t
[0024]
[0025] Furthermore, due to m t and v t It is initialized to a zero vector, so a bias correction process is performed in the initial training step to compensate for the bias. The calculation formula for the adaptive moment estimation Adam parameter is as follows:
[0026]
[0027] Among them, η is the learning rate; ε is a small parameter for numerical stability.
[0028] As a preferred solution of the method for decomposing high-power electrical appliance load based on long-short-term recursive neural network described in the present invention, wherein: the evaluation of the updated and optimized long-short-term memory recursive neural network model includes accuracy evaluation, generalization ability and expansion ability evaluation and equipment power decomposition performance evaluation; the accuracy evaluation refers to the use of precision, recall rate, accuracy and F1 value to measure the equipment signal decomposition efficiency of the non-invasive load decomposition algorithm performance; the generalization ability and expansion ability evaluation refers to the use of the average decomposition accuracy of all households to measure the generalization ability and expansion ability; the equipment power decomposition performance evaluation refers to the use of the equipment successful identification probability and the accuracy standard deviation of all types of loads to measure the equipment power decomposition performance.
[0029] On the second aspect, in order to further solve the safety problems existing in load decomposition, the present invention provides a high-power electrical appliance load decomposition system based on long-short-term recursive neural network in an embodiment, which includes: a data acquisition module, which is used to select low-voltage residential households as monitoring scenarios, obtain the power information of high-power electrical appliances and perform preprocessing to obtain preprocessed data; a model construction module, which is used to perform multi-type high-power electrical appliance switch state recognition and feature extraction network construction on the preprocessed data, and then construct a long-short-term memory recursive neural network model based on the divide-and-conquer strategy; an update optimization module, which is used to update and optimize the long-short-term memory recursive neural network model; a model evaluation module, which is used to evaluate the accuracy, generalization ability and expansion ability of the updated and optimized long-short-term memory recursive neural network model and the equipment power decomposition performance, so as to achieve accurate load identification.
[0030] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the method for decomposing high-power electrical appliance load based on long-short term recursive neural network as described in the first aspect of the present invention is implemented.
[0031] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the method for decomposing high-power electrical appliance load based on long-short-term recursive neural network as described in the first aspect of the present invention.
[0032] Beneficial effects of the present invention: The present invention proposes a method for decomposing the load of high-power electrical appliances based on long-term and short-term recursive neural networks. When the monitored power data of low-voltage households is limited, a high-quality load decomposition training data set is generated in a short time, and then the LSTM is used to extract the key features of the load, the divide-and-conquer strategy is used to process the long-term dependencies in the sequence data, and the adaptive moment estimation algorithm is used to optimize the model training process to obtain a high-power electrical appliance load decomposition model. Then, after the model adjustment and training is completed, the model is evaluated from three aspects: accuracy evaluation, generalization and expansion ability evaluation, and equipment power decomposition performance evaluation, so as to achieve the goal of accurately identifying the load; in view of the insufficient power data of low-voltage households, WGAN is used to obtain a high-quality training data set in a short time; by using LSTM, the power load data with time series characteristics can be effectively processed, and the divide-and-conquer strategy can better capture the long-term dependencies, so that the load decomposition results of high-power electrical appliances are more accurate and the data are more stable. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0034] Figure 1 This is an overall flow chart of the high-power electrical appliance load decomposition method based on long-term and short-term recurrent neural networks in Example 1.
[0035] Figure 2 This is a conceptual diagram of the divide-and-conquer strategy in Example 1.
[0036] Figure 3 This is a calculation process diagram of the divide-and-conquer strategy in Example 1.
[0037] Figure 4 This is a process diagram for updating the bias b and network weight w in Example 1.
[0038] Figure 5 This is a schematic diagram of the structure of the computer device in Example 3. DETAILED DESCRIPTION
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0040] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0041] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0042] Example 1
[0043] Reference Figure 1 to Figure 4 , which is the first embodiment of the present invention, and provides a high-power electrical appliance load decomposition method based on long-term and short-term recursive neural networks.
[0044] The existing load decomposition methods mainly have the following problems: in load decomposition, the power consumption data of electrical equipment is often scarce. Although many existing load decomposition methods are effective, they have high computational complexity, especially when processing large data sets, the time cost of model training and prediction is high; generative adversarial networks (GANs) can be used to generate data, but the model is difficult to train and the generated samples lack diversity.
[0045] The present application provides an effective solution to the above-mentioned problems. Next, multiple embodiments will be combined to explain in detail how to implement the high-power electrical appliance load decomposition method based on long-term and short-term recursive neural networks.
[0046] Figure 1 The overall flow chart of the high-power electrical appliance load decomposition method based on long-term and short-term recurrent neural network is shown, including:
[0047] S1: Obtain power information of high-power electrical appliances and perform preprocessing to obtain preprocessed data.
[0048] Preferably, obtaining power information of high-power electrical appliances and performing preprocessing means selecting low-voltage residential households as monitoring scenarios, obtaining power information of high-power electrical appliances, and performing unified preprocessing of abnormal values and missing values on the collected original data related to the power load of high-power electrical appliances, including the following steps: using mean filling method and linear interpolation method to complete the missing data.
[0049] For the mean of other objects with the same characteristics, the mean imputation method is used to supplement the missing values by filling in the numeric type.
[0050] Furthermore, the mean imputation method includes the following steps: for a variable with missing values, calculate the mean, median or mode of the variable on all non-missing observations.
[0051] Fill missing values with the mean, median, or mode.
[0052] Repeat the above steps until all variables with missing values are filled.
[0053] Specifically, the specific formula of the mean filling method is as follows:
[0054]
[0055] in, is the filling value of the missing part; n is the actual number of non-missing values in the existing data; j is the non-missing value in the collected data column.
[0056] Furthermore, the linear interpolation method includes the following steps: using the true value between two known points to obtain the corresponding point value between the two points, the interpolation error at each interpolation node is 0, assuming that the function y = f (x) at two points x j The values on x0 and x1 are y0 and y1 respectively, and the specific formula of the polynomial at the corresponding points is as follows:
[0057]
[0058] According to the polynomial analysis of the corresponding points, the specific formula of the function y=f(x) is as follows:
[0059]
[0060] because is f(x) at x i and x j The first-order mean difference at , denoted as f(xi,xj), gives the following formula:
[0061]
[0062] Arrange the above formula to get the following formula:
[0063]
[0064] It should be noted that the interpolation polynomial in the formula of the linear interpolation method is a first-order polynomial.
[0065] Furthermore, in order to conduct data comparison and analysis, it is necessary to uniformly aggregate the frequency of high-power electrical appliance data and power data by aligning timestamps. In addition, to eliminate the dimensional influence of power values, in addition to the maximum power value in the data set, it is also necessary to standardize the data. The specific formula for standardizing data is as follows:
[0066]
[0067] Among them, x * is the normalized signal; x is the original load signal; μ is the mean of all sample signals; σ is the standard deviation of all sample signals.
[0068] S2: Perform feature recognition based on preprocessed data and build a long short-term memory recursive neural network model based on the divide-and-conquer strategy.
[0069] Preferably, feature recognition includes recognition of switch states of multiple types of high-power electrical appliances and construction of a feature extraction network.
[0070] Furthermore, in order to ensure accurate model training results in practical applications, the switch status of various types of high-power electrical appliances needs to be accurately identified before load decomposition. In terms of sample quantity, the number of samples of electrical appliances in the on and off states needs to be balanced in advance to avoid prediction bias due to data imbalance.
[0071] Specifically, the identification of the switch status of multiple types of high-power electrical appliances includes the following steps: when judging the switch status of an electrical appliance, a first threshold is set according to the power of the electrical appliance. If it is detected that the real-time power of an electrical appliance exceeds the first threshold, it is determined that the electrical appliance is in the on state.
[0072] Otherwise, the appliance is in the off state.
[0073] Since brief fluctuations during the use of electrical appliances may also cross the threshold and cause misjudgment, relying solely on the power threshold as the basis for judgment may cause false positives. Therefore, it is necessary to combine the two parameters of minimum shutdown duration and minimum power-on duration to filter out false state changes caused by brief fluctuations and further improve the accuracy and stability of appliance state recognition.
[0074] It should be noted that the feature extraction network is composed of three to four layers of one-dimensional recursive neural networks. The typical features of high-power electrical appliances can be extracted from the input sequence data, and other redundant and noisy interference items need to be filtered out. In a one-dimensional recursive neural network, different local features can be extracted by using multiple filters to build a multi-layer one-dimensional recursive neural network stack to enhance the accuracy of the model. Since the long short-term memory recursive neural network can solve the gradient vanishing and gradient explosion problems encountered by traditional RNNs when dealing with long-term dependencies, the effective storage and access of information is achieved by introducing a "gate" control structure, so that good performance can be maintained when processing long sequence data. The uniqueness of the long short-term memory recursive neural network unit lies in its internal structure, which enables it to effectively learn and maintain long-term dependencies. Each network unit contains the key components of the forget gate, input gate, cell state, and output gate. These gates can finely control the flow of information, allowing the network to learn when to forget old information and when to add new information.
[0075] Furthermore, the residual connection method is used in the overall framework of the feature extraction network to handle and train the possible network degradation problem by alleviating the calculation. The present invention uses the Bayesian optimization method to adjust the hyperparameters, which greatly improves the search efficiency.
[0076] Specifically, the feature extraction network construction includes the following steps: Import the LSTM class from tensorflow.keras.layers.
[0077] Use the keras.Sequential model and add an LSTM layer, where you can set the number of neurons in the LSTM layer and whether to return sequence parameters.
[0078] Select an appropriate optimizer (such as Adam) and loss function (such as cross entropy) and compile the model.
[0079] Iteratively train the model using the training data from the compiled model.
[0080] It should be noted that if Figure 2The figure shows the idea diagram of the divide and conquer strategy. The divide and conquer strategy is an efficient algorithm design technology. It simplifies the problem-solving process by decomposing complex problems into several smaller and independent sub-problems, such as quick sort and merge sort, which significantly improves the efficiency and performance of the algorithm. The divide and conquer strategy is based on three core steps: problem decomposition, recursive solution, and merging results. First, the original problem is divided into multiple small problems that are easy to manage and solve; second, the same divide and conquer strategy is recursively applied to solve similar sub-problems; finally, the solutions to multiple sub-problems are merged and collected in an effective way and packaged to form the final solution to the original problem.
[0081] Furthermore, since LSTM is essentially a recurrent neural network, its original design intention is to process long-term dependencies in sequence data. Therefore, the present invention considers optimizing the training or application process of the LSTM model based on the idea of divide-and-conquer strategy.
[0082] Preferably, constructing a long short-term memory recursive neural network model based on a divide-and-conquer strategy includes data decomposition, model decomposition, training process optimization, divide-and-conquer strategy calculation, and long short-term memory recursive network construction.
[0083] Specifically, data decomposition includes: splitting long sequence data into multiple different shorter subsequences, each of which is processed separately using an LSTM model, and then merging the processing results to reduce the amount of information that a single LSTM unit needs to process, thereby improving the efficiency and accuracy of the model.
[0084] If the input data contains features of multiple dimensions, you can try to group these features and process them separately using the LSTM model, and finally merge the results of each group.
[0085] Specifically, the model decomposition includes: building a multi-layer LSTM network with the help of the divide-and-conquer strategy, where each layer processes different levels of abstract information to solve a relatively simple sub-problem.
[0086] When multiple sequence data need to be processed simultaneously, multiple LSTM models can be used to process these sequences in parallel, with each model working independently and then merging the results.
[0087] Specifically, the optimization of the training process includes: when training the LSTM model, a batch training method can be adopted, that is, the entire data set is divided into multiple small batches, and each batch performs forward propagation and back propagation independently.
[0088] Since LSTM is prone to gradient vanishing or gradient exploding problems when processing long sequences, gradient clipping technology can be used to limit the amplitude of the gradient. This can be seen as a method of applying a divide-and-conquer strategy in the gradient calculation process to avoid extreme situations by limiting the range of the gradient.
[0089] Specifically, Figure 3 The figure shows the calculation process of the divide-and-conquer strategy. The divide-and-conquer strategy calculation refers to the divide-and-conquer strategy by defining three vectors, which represent the query, key, and value of the i-th point in the input sequence respectively. It includes the following steps: i With the key of all points.
[0090] Carry out correlation calculation on the above sequence to obtain vector e i .
[0091] The vector e i Import into the softmax function and get vector a i =softmax(e i ), where each element is in the range of (0,1), and the sum of all compressed vector elements is guaranteed to be 1.
[0092] All points of the input sequence corresponding to each component are weighted, and then the complete data is weighted. The higher the weight, the more important the corresponding information is. Conversely, the lower the weight, the relatively unimportant the information is.
[0093] Specifically, the construction of the long short-term memory recursive network includes the following steps: normalizing the input data layer by layer to ensure that the data is within a reasonable range, and then weighting the input data according to the recursive score to improve the modeling of the dependency relationship. The calculation formula is as follows:
[0094]
[0095] Q=K=V=Layer Normalization(O)
[0096] Among them, Q, K, V are query moment, key moment and value moment; m is the length of the input sequence; O is the output of the feature extraction network; d is the dimension of each value of the input data.
[0097] After the above calculations, the results are normalized again through the layers. Due to the model enhancement of the two-layer feedforward network, the first layer can map the latent variables to a higher dimensional space, and the second layer restores the latent variables to the original dimension, thereby greatly improving the ability to represent nonlinear relationships.
[0098] In the calculation process of the divide-and-conquer strategy, both long-term and short-term recursive neural networks use the residual method to connect.
[0099] Preferably, the accuracy of the model training data is ensured by accurately identifying the on / off status of the electrical appliances before decomposing the high-power electrical load, thereby ensuring the high accuracy and stability of the load decomposition model training and avoiding the misidentification caused by short-term power fluctuations; by decomposing a complex problem into several small problems, and processing these sub-problems separately through multiple LSTM models, and then merging the results, the divide-and-conquer strategy significantly improves the efficiency and accuracy of the model training and avoids the gradient vanishing or exploding problem when processing long sequence data; through the unique structure of the LSTM network, it can effectively process the long-term dependencies in the long sequence data and avoid the gradient vanishing problem that may occur in the traditional RNN network when processing long sequences.
[0100] S3: Update and optimize the long short-term memory recurrent neural network model.
[0101] Preferably, the updating optimization includes constructing a multi-layer perceptron artificial neural network and adjusting model hyperparameters.
[0102] Specifically, the construction of the multilayer perceptron artificial neural network includes the following steps: the multilayer perceptron artificial neural network is composed of a large number of processing units connected to each other, and consists of three parts: the input layer, the hidden layer and the output layer. The calculation process of the bias b and weight value w of the multilayer perceptron artificial neural network is: first, the forward propagation algorithm is used starting from the input layer, and then a series of linear operations and activation operations are performed backward layer by layer. When it is assumed that there are a total of m neurons in the l-1 layer, the jth neuron a in the lth layer l j The specific formula is as follows:
[0103]
[0104] in, is the weight value from neuron k in layer l-1 to neuron j in layer l; is the bias value of the kth neuron in layer l; is composed of linear operations of the jth neuron in layer l; is the kth neuron in layer l-1; σ is the activation function.
[0105] When the forward propagation algorithm calculates to the final layer, the output result can be obtained. The calculation process of the multi-layer perceptron artificial neural network is to continuously update the weight value w and the bias b. Therefore, the back propagation algorithm is used to reversely update the weights and biases of each layer to make the predicted value approach the true value continuously, so as to minimize the loss function value. The loss function is generally measured by the mean square error, and the calculation formula is as follows:
[0106]
[0107] in, is the true value of the jth node in the kth layer; is the true value of the jth node in the kth layer; m is the dimension of the output data.
[0108] like Figure 4 The figure shows the process of updating the bias b and the network weight w. After obtaining the loss function, the gradient descent method is used to solve the weight w and bias b of each layer. The calculation of the gradient descent method follows the chain rule for obtaining derivatives. The specific formula for obtaining the updated weight w' and bias b' is as follows:
[0109]
[0110] Among them, η is the learning rate, which represents the magnitude of the reverse shift.
[0111] In addition, during the forward propagation process, the input data is extracted and processed in multiple layers before reaching the output layer to generate a prediction result. During the backward propagation process, the loss can be transferred back to the input layer by calculating the gradient of the loss function, combined with continuous cyclic updates of weights and bias values, so that the model gradually approaches the global optimal solution.
[0112] Specifically, the model hyperparameter adjustment means that the adaptive moment estimation Adam algorithm can effectively reduce the number of iterations and accelerate the convergence speed. Therefore, the present invention adopts the adaptive moment estimation Adam algorithm to optimize the model training process, wherein the adaptive moment estimation Adam algorithm can realize the update and control of the hyperparameters by calculating an adaptive multiplier, and realize the dynamic adjustment of each parameter learning rate by performing moment estimation on the gradient. The specific formula is as follows:
[0113]
[0114] m t =β1m t-1 +(1-β1)g t
[0115]
[0116] Furthermore, due to m t and v t It is initialized to a zero vector, so in the initial training step, bias correction processing is required to compensate for the bias. Therefore, the calculation formula of the adaptive moment estimation Adam parameter is as follows:
[0117]
[0118] Among them, η is the learning rate; ε is a small parameter for numerical stability.
[0119] Preferably, the LSTM training process is optimized through a multi-layer perceptron network, and the weights and biases are adjusted using forward propagation and back propagation algorithms to enhance the model's learning ability, allowing the model to capture more complex features and nonlinear relationships. The Adam optimization algorithm is used to update the model's hyperparameters through adaptive moment estimation, which can dynamically adjust the learning rate during model training, improve the convergence speed, reduce the training time, and effectively handle the gradient problems encountered during training, thus avoiding the shortcomings of the traditional gradient descent method.
[0120] S4: Evaluate the updated and optimized long short-term memory recurrent neural network model to achieve accurate load identification.
[0121] Preferably, the evaluation of the updated and optimized long short-term memory recursive neural network model includes accuracy evaluation, generalization and expansion capability evaluation, and device power decomposition performance evaluation.
[0122] Specifically, accuracy evaluation refers to the device signal decomposition efficiency of the non-intrusive load decomposition algorithm using precision, recall, accuracy, and F1 value. The specific formula is as follows:
[0123]
[0124] Specifically, the evaluation of generalization ability and extension ability refers to using the average decomposition accuracy of all families to measure the generalization ability and extension ability. The specific formula is as follows:
[0125]
[0126] Specifically, the equipment power decomposition performance evaluation refers to measuring the equipment power decomposition performance by using the equipment successful identification probability and the accuracy standard deviation of all types of loads. The specific formula is as follows:
[0127]
[0128] Among them, FAT μ FAT is the probability of successful device identification; σ is the standard deviation of accuracy for all types of loads.
[0129] In summary, the present invention proposes a method for decomposing the load of high-power electrical appliances based on long-term and short-term recursive neural networks. When the monitored power data of low-voltage households is limited, a high-quality load decomposition training data set is generated in a short time, and then the LSTM is used to extract the key features of the load, the divide-and-conquer strategy is used to process the long-term dependencies in the sequence data, and the adaptive moment estimation algorithm is used to optimize the model training process to obtain a high-power electrical appliance load decomposition model. Then, after the model adjustment and training is completed, the model is evaluated from three aspects: accuracy evaluation, generalization and expansion ability evaluation, and equipment power decomposition performance evaluation, so as to achieve the goal of accurately identifying the load; in view of the insufficient power data of low-voltage households, WGAN is used to obtain a high-quality training data set in a short time; by using LSTM, the power load data with time series characteristics can be effectively processed, and the divide-and-conquer strategy can better capture the long-term dependencies, so that the load decomposition results of high-power electrical appliances are more accurate and the data are more stable.
[0130] Embodiment 2 is an embodiment of the present invention, which provides a high-power electrical appliance load decomposition system based on a long-short-term recursive neural network, including: a data acquisition module, used to select low-voltage residential households as monitoring scenarios, obtain high-power electrical appliance power information and perform preprocessing to obtain preprocessed data; a model construction module, used to perform multi-type high-power electrical appliance switch state recognition and feature extraction network construction on the preprocessed data, and then construct a long-short-term memory recursive neural network model based on a divide-and-conquer strategy; an update optimization module, used to update and optimize the long-short-term memory recursive neural network model; a model evaluation module, used to perform accuracy evaluation, generalization ability and expansion ability evaluation and equipment power decomposition performance evaluation on the updated and optimized long-short-term memory recursive neural network model, so as to achieve accurate load identification.
[0131] Embodiment 3 is an embodiment of the present invention, which is different from the previous embodiment in that:
[0132] like Figure 5As shown, if the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0133] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0134] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0135] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0136] Example 4 is an embodiment of the present invention, which provides a method for decomposing high-power electrical appliance load based on long-term and short-term recursive neural networks. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through simulation experiments.
[0137] This example selects a low-voltage household electricity data monitoring scenario with a monitoring time series length of T = 100 sampling points, involving air conditioners, electric water heaters and microwave ovens. In view of the insufficient samples, the WGAN model is used to generate 10,000 samples and compared with the traditional load decomposition method. The specific data is shown in Table 1.
[0138] Table 1 Comparison between the load decomposition method of the present invention and the traditional load decomposition method
[0139]
[0140] It can be seen from Table 1 that the load decomposition method based on the long short-term memory recursive neural network proposed in the present invention is superior to the traditional method in accuracy evaluation, generalization and expansion ability evaluation, and equipment power decomposition performance evaluation, indicating that the load decomposition method based on the long short-term memory recursive neural network can more effectively identify the loads of various electrical appliances with a higher recognition accuracy.
[0141] 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 preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for decomposing high-power electrical loads based on long-term and short-term recurrent neural networks, characterized in that: include: Acquire power information of high-power electrical appliances and perform preprocessing to obtain preprocessed data; Performing feature recognition based on the preprocessed data, and constructing a long short-term memory recursive neural network model based on a divide-and-conquer strategy; Updating and optimizing the long short-term memory recursive neural network model; The updated and optimized long short-term memory recursive neural network model is evaluated to achieve accurate load identification.
2. The method for decomposing high-power electrical load based on long-term and short-term recurrent neural networks as claimed in claim 1, characterized in that: The method of obtaining the power information of high-power electrical appliances and performing preprocessing refers to selecting low-voltage residential households as monitoring scenarios, obtaining the power information of high-power electrical appliances, and performing preprocessing of abnormal values and missing values on the collected raw data related to the power load of high-power electrical appliances, including the following steps: Mean filling method and linear interpolation method were used to complete the missing data; For the mean of other objects with the same characteristics, the mean imputation method is used to supplement the missing values by filling in the numeric type.
3. The method for decomposing high-power electrical load based on long-term and short-term recurrent neural networks as claimed in claim 2 is characterized in that: The feature recognition includes recognition of the switch states of multiple types of high-power electrical appliances and construction of a feature extraction network; The identification of the switch states of various types of high-power electrical appliances refers to the need to accurately identify the switch states of various types of high-power electrical appliances in low-voltage household users before load decomposition; in terms of the number of samples, the number of electrical appliance samples in the on state and the off state are pre-balanced; The multi-type high-power electrical appliance switch state recognition comprises the following steps: When judging the switch state of an electrical appliance, a first threshold is set according to the power of the electrical appliance. If it is detected that the real-time power of an electrical appliance exceeds the first threshold, it is determined that the electrical appliance is in the on state; Otherwise, the appliance is in the off state; Set the minimum shutdown duration and the minimum startup duration to filter out false status changes caused by short-term fluctuations; The feature extraction network construction includes the following steps: Import the LSTM class from tensorflow.keras.layers; Use the keras.Sequential model and add an LSTM layer, in which the number of neurons in the LSTM layer and whether to return sequence parameters are set; Select the optimizer and loss function and compile the model; Iteratively train the model using the training data from the compiled model.
4. The method for decomposing high-power electrical load based on long-term and short-term recurrent neural networks as claimed in claim 3 is characterized in that: The construction of a long short-term memory recursive neural network model based on a divide-and-conquer strategy includes data decomposition, model decomposition, training process optimization, divide-and-conquer strategy calculation, and long short-term memory recursive network construction; The data decomposition includes: Split the long sequence data into multiple different shorter subsequences, each of which is processed separately using the LSTM model, and then the processing results are merged; If the input data contains features of multiple dimensions, these features are grouped and processed separately using the LSTM model, and finally the results of each group are merged; The model decomposition includes: A multi-layer LSTM network is constructed with the help of the divide-and-conquer strategy. Each layer processes different levels of abstract information to solve a relatively simple sub-problem. When multiple sequences need to be processed simultaneously, multiple LSTM models are used to process these sequences in parallel. Each model works independently and the results are merged at the end. The training process optimization includes: When training the LSTM model, batch training is adopted, that is, the entire data set is divided into multiple small batches, and each batch is independently forward propagated and backward propagated; Gradient clipping technique is used to limit the magnitude of the gradient.
5. The method for decomposing high-power electrical load based on long-term and short-term recurrent neural networks as claimed in claim 4, characterized in that: The divide-and-conquer strategy calculation refers to the divide-and-conquer strategy by defining three vectors, which respectively represent the query, key and value of the i-th point of the input sequence, including the following steps: Input the query of the i-th point in the sequence i The key of all points; Carry out correlation calculation on the above sequence and get vector e i ; The vector e i Import into the softmax function and get the vector a i =softmax(e i ); All points of the input sequence corresponding to each component are weighted, and then the complete data is weighted. The higher the weight, the more important the corresponding information is. Conversely, the lower the weight, the less important the information is. The long short-term memory recursive network construction includes the following steps: The input data is layer-normalized and then weighted according to the recursive score, calculated as follows: Q=K=V=Layer Normalization(O) in, are query moment, key moment and value moment; m is the length of the input sequence; O is the output of the feature extraction network; d is the dimension of each value of the input data; The calculation results are then normalized through the layer; In the calculation process of the divide-and-conquer strategy, both long-term and short-term recursive neural networks use the residual method to connect.
6. The method for decomposing high-power electrical load based on long-term and short-term recurrent neural networks as claimed in claim 5, characterized in that: The update optimization includes the construction of a multi-layer perceptron artificial neural network and the adjustment of model hyperparameters; The multi-layer perceptron artificial neural network construction comprises the following steps: The calculation process of the bias b and weight value w of the multilayer perceptron artificial neural network is to use the forward propagation algorithm to start from the input layer and perform a series of linear operations and activation operations layer by layer. Assuming that there are m neurons in the l-1 layer, the jth neuron in the lth layer The specific formula is as follows: in, is the weight value from neuron k in layer l-1 to neuron j in layer l; is the bias value of the kth neuron in layer l; is composed of linear operations of the jth neuron in layer l; is the kth neuron in layer l-1; σ is the activation function; When the forward propagation algorithm calculates to the final layer, the output result can be obtained. The calculation process of the multi-layer perceptron artificial neural network is to continuously update the weight value w and the bias b. Therefore, the back propagation algorithm is used to reversely update the weights and biases of each layer to make the predicted value continuously approach the true value, so as to minimize the loss function value. The loss function is measured by the mean square error, and the calculation formula is as follows: in, is the true value of the jth node in the kth layer; is the true value of the jth node in the kth layer; m is the dimension of the output data; After obtaining the loss function, the gradient descent method is used to solve the weight w and bias b of each layer. The calculation of the gradient descent method follows the chain rule for obtaining derivatives. The specific formula for obtaining the updated weight w' and bias b' is as follows: Among them, η is the learning rate, which represents the amplitude of reverse movement; In the process of forward propagation, the input data is extracted and processed in multiple layers before reaching the output layer to generate prediction results. In the process of backward propagation, the loss is transmitted back to the input layer by calculating the gradient of the loss function. Combined with the continuous cycle of updating the weights and bias values, the model gradually approaches the global optimal solution. The model hyperparameter adjustment refers to optimizing the model training process by using the adaptive moment estimation Adam algorithm, wherein the adaptive moment estimation Adam algorithm calculates an adaptive multiplier to update and control the hyperparameters, and estimates the gradient by moment to achieve dynamic adjustment of the learning rate of each parameter. The specific formula is as follows: m t =β1m t-1 +(1-β1)g t Furthermore, due to m t and v t It is initialized to a zero vector, so a bias correction process is performed in the initial training step to compensate for the bias. The calculation formula for the adaptive moment estimation Adam parameter is as follows: Among them, η is the learning rate; ε is a small parameter for numerical stability.
7. The method for decomposing high-power electrical load based on long-term and short-term recurrent neural networks as claimed in claim 6, characterized in that: The evaluation of the updated and optimized long short-term memory recursive neural network model includes accuracy evaluation, generalization and expansion ability evaluation, and device power decomposition performance evaluation; The accuracy evaluation refers to the device signal decomposition efficiency of the non-intrusive load decomposition algorithm performance measured by precision, recall, accuracy, and F1 value; The generalization ability and extension ability evaluation refers to measuring the generalization ability and extension ability using the average decomposition accuracy of all families; The device power decomposition performance evaluation refers to measuring the device power decomposition performance by using the device successful identification probability and the accuracy standard deviation of all types of loads.
8. A high-power electrical appliance load decomposition system based on a long-term and short-term recurrent neural network, based on a high-power electrical appliance load decomposition method based on a long-term and short-term recurrent neural network as claimed in any one of claims 1 to 7, characterized in that: include, A data acquisition module is used to select low-voltage residential households as monitoring scenes, obtain power information of high-power electrical appliances and perform preprocessing to obtain preprocessed data; The model building module is used to identify the switch states of multiple types of high-power electrical appliances and construct feature extraction networks based on preprocessed data, and then build a long short-term memory recursive neural network model based on the divide-and-conquer strategy; Update optimization module, used to update and optimize the long short-term memory recurrent neural network model; The model evaluation module is used to evaluate the accuracy, generalization and expansion capabilities of the updated and optimized long short-term memory recursive neural network model, as well as the equipment power decomposition performance, to achieve accurate load identification.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for decomposing high-power electrical appliance load based on long-term and short-term recurrent neural networks described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for decomposing high-power electrical appliance load based on a long-term and short-term recurrent neural network as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Microgrid short-term load prediction method and device, electronic equipment and storage medium
CN121328859A
Electricity consumption mode identification method and device, computer equipment and program product
CN121456391A