Load data classification method and device under multi-resolution condition, equipment and medium
By combining the feature extraction and fusion methods of convolutional neural networks and Transformer models, the characteristics of the characteristics of load data at different time resolution have not been effectively considered, and it has achieved efficient and accurate load data classification, which improves the operation of the power grid operation. reliability.
Patent Information
- Application Number
- CN202411481964.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art fails to effectively consider the characteristics of load data at different time resolutions in load data classification, resulting in inaccurate classification results and lack of objectivity.
Using data -based multi -resolution data classification methods, the feature extraction and fusion model combined with the combination of convolutional neural networks and Transformer models, capture the short -term and long -term dependencies of load data, build multi -resolution load data features, and realize High -efficiency and accurate load data classification.
Realize the classification of load data at different time resolution, improve the accuracy and efficiency of classification, provide more refined user electrical characteristics and behavior analysis, and enhance the reliability of the power grid operation.
Smart Images

Figure CN119377771A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric load classification, and in particular to a method, device, equipment and medium for classifying load data in a data-driven multi-resolution situation. Background Art
[0002] With the high penetration of renewable energy generation, the widespread access to energy storage devices, and the further liberalization of the electricity sales market, users in the new power system have greater freedom in their electricity choices. The diversification of users' electricity consumption behavior makes load data have certain potential rules at different resolutions. In addition, non-power factors such as season, climate, industrial and commercial attributes, and production rhythm will also affect users' electricity consumption behavior, and thus affect the characteristics and rules of load data. Therefore, the analysis of load data from a multi-resolution perspective based on data-driven methods is an important basis for load forecasting, time-of-use electricity price formulation, and load modeling. It is of great significance to promote the interaction between power grid supply and demand, balance the supply and demand relationship, promote the timely consumption of renewable energy generation, and improve the reliability of power grid operation.
[0003] In the current power trading platform, the load attributes of users mostly rely on self-declaration by users or platform inspections. This method lacks objectivity due to limitations on user or platform resources and professional knowledge. In addition, factors such as inaccurate information caused by users' false reports and missed reports and untimely data updates may lead to misunderstandings of load attributes, which in turn poses a potential risk to the safe operation of the power grid. In recent years, the popularization of smart meters has not only greatly improved the level of electricity consumption information collection, but the massive data generated has also helped power companies to classify and analyze electricity loads, thereby obtaining more detailed user electricity consumption characteristics and behaviors.
[0004] At present, the mainstream methods of load classification are unsupervised classification and supervised classification. Among them, unsupervised classification mainly clusters according to the characteristics and similarities of the data itself, that is, by using various distance measurement criteria to judge the similarity of load data, and then realize the classification of loads. Different from unsupervised classification, supervised classification is mainly based on statistical principles such as Bayesian theorem, maximum likelihood estimation, or neural network-based methods. It should be pointed out that most of these classification methods do not consider the characteristics of load data at different time resolutions such as day and night, month and season. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, equipment and medium for load data classification in a data-driven multi-resolution situation, taking into account the characteristics at different time resolutions to achieve efficient and accurate load data classification.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] A load data classification method based on data-driven multi-resolution situation includes the following steps:
[0008] Step S1, obtaining multi-point historical electricity consumption data information and load category information divided according to time steps within a load cycle of a preset time length, and preprocessing the load data to obtain a labeled load data set;
[0009] Step S2, considering the differences in power consumption characteristics of different types of loads, the load data of each day is processed at different time resolutions to construct load data matrices respectively;
[0010] Step S3, for load data matrices at different resolutions, a multi-branch feature extraction model is constructed by using a convolutional neural network to capture short-term dependencies between load data matrices, thereby obtaining local features of the load data;
[0011] Step S4, for the local features of the multi-branch load data obtained in step S3, a Transformer-based long-distance dependency capture model is used to capture the dependencies between various positions in the input sequence through a self-attention mechanism, model the long-distance dependencies, and add relative position encoding to help the model understand the relative distance and order relationship between different elements, thereby obtaining multi-branch load data features;
[0012] Step S5, constructing a feature fusion model based on deep convolution to achieve deep fusion of the multi-branch load data features obtained in step S4 to obtain fusion features;
[0013] Step S6, classifying based on the fusion features obtained in step S5, outputting the probability of each load belonging to a category, and obtaining the load category according to the maximum probability.
[0014] The preprocessing includes outlier detection and correction, missing value filling and normalization processing.
[0015] The step S2 specifically includes: calculating the statistical data of the load data at different resolutions, and constructing a load data matrix under a multi-resolution situation according to the statistical data of each time period at different resolutions, wherein the statistical data includes peak and valley values, average values and variance.
[0016] Each row of the load data matrix represents the load power data information of a certain time period, and each column represents the serial number value, power peak value, power valley value, power peak-valley difference, average power and variance in order, wherein the serial number value is a sequence value determined according to the order of the time periods.
[0017] The multi-branch feature extraction model is composed of a convolution layer, a normalization layer, an activation function and a maximum pooling layer. Specifically:
[0018] The convolution layer realizes local feature extraction of input data by sliding a set of learnable convolution kernels on the load data feature matrix, wherein the convolution layer realizes preliminary extraction of load data features under three branches of minute, hour and day by setting the size, stride and padding parameters of the convolution kernel;
[0019] The normalization layer normalizes the features output by the convolutional layer to solve the problem of internal covariate shift;
[0020] Use Gaussian error linear unit as activation function to perform nonlinear transformation on input data;
[0021] The maximum pooling layer is used to extract the maximum value of the convolutional layer features, reduce the spatial dimension of the convolutional features, and reduce overfitting.
[0022] The Transformer-based long-distance dependency capture model further extracts features based on the load data features under the three branches of minute, hour and day obtained in step S3 to obtain long-distance load data features under the three branches of day, month and quarter. The model consists of an encoder, a decoder and an output layer. Specifically:
[0023] The encoder is composed of a cascade of a self-attention layer and a feedforward neural network layer, wherein the self-attention layer is used to capture the dependencies between different positions in the sequence without being restricted by a fixed position, and uses a multi-head self-attention mechanism to calculate the long-distance dependencies between the multi-branch features output by step S3, and introduces relative position encoding to combine input embedding and position information; the feedforward neural network is composed of two linear transformations and a nonlinear activation function, wherein the first linear transformation is embedded in the nonlinear activation function, and the second linear transformation is used to adjust the vector to make it consistent with the input vector dimension, thereby providing the model with richer nonlinear features to enhance the model's ability to capture the complex features of the input information;
[0024] The decoder is composed of a self-attention layer and a feed-forward neural network layer, which takes the output of the encoder as input and generates output sequence features;
[0025] The output layer uses a fully connected layer to map and integrate the output sequence features obtained by the decoder.
[0026] The feature fusion model is composed of feature splicing, deep convolution and feature fusion and processing modules, specifically:
[0027] Feature splicing: Based on the Concat module, the branch features obtained by Transformer are spliced;
[0028] Deep convolution: Use deep convolution to independently process each branch feature obtained based on Transformer to preserve and enhance local spatial information;
[0029] Feature fusion and processing: Realize the fusion of features obtained by feature splicing and deep convolution, and assign weights to the two parts during the fusion process.
[0030] A load data classification device in a data-driven multi-resolution situation, comprising:
[0031] Dataset construction module: obtains multi-point historical electricity consumption data information and load category information divided by time step within a load cycle of preset time length, and pre-processes the load data to obtain a labeled load dataset;
[0032] Load data matrix construction module: Considering the differences in power consumption characteristics of different types of loads, the load data of each day is processed at different time resolutions to construct load data matrices respectively;
[0033] Local feature extraction module: For load data matrices at different resolutions, a multi-branch feature extraction model is constructed by using a convolutional neural network to capture the short-term dependencies between load data matrices, thereby obtaining local features of the load data;
[0034] Multi-branch load data feature extraction module: for the local features of the multi-branch load data obtained in step S3, a Transformer-based long-distance dependency capture model is used to capture the dependencies between various positions in the input sequence through a self-attention mechanism, and long-distance dependencies are modeled. Relative position encoding is added to help the model understand the relative distance and order relationship between different elements, thereby obtaining multi-branch load data features;
[0035] Fusion module: construct a feature fusion model based on deep convolution to achieve deep fusion of the multi-branch load data features obtained in step S4 to obtain fusion features;
[0036] Classification module: Classification is performed based on the fusion features obtained in step S5, the probability of each load belonging to a category is output, and the load category is obtained according to the maximum probability.
[0037] An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described above when executing the program.
[0038] A computer-readable storage medium stores a computer program, which implements the method described above when executed by a processor.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] 1) In view of the preprocessing problem of load data, the present invention provides a multi-resolution-based data processing method, that is, firstly, the load data of 96 scales per day is processed according to 3 hours, 6 hours, and 12 hours to form three resolution level features of the load data of one day. This method can effectively provide a load data set with richer resolution for the deep learning model, and can also greatly improve the efficiency of deep learning.
[0041] 2) In order to solve the problem of feature extraction and fusion of load data, the present invention provides a multi-branch load feature extraction method, which divides the load data into three time scales: minutes, hours and days, and then designs a feature extraction branch model for each time scale. Through the combination of CNN and Transformer, this model can capture the short-distance and long-distance dependencies between load data features, and then realize the mining of load data features from both local and global perspectives. It is particularly important to point out that in the present invention, the absolute position encoding of Transformer is improved to relative position encoding to help the model understand the relative distance and order relationship between different elements, obtain a richer and more comprehensive feature representation, and enhance the expressiveness and predictive ability of the model.
[0042] 3) In feature fusion and classification, deep convolution is used to achieve the fusion of load data features at three resolutions: minute, hour, and day, providing a richer perspective from global to local for subsequent load classification. In view of the classification problem of load data, the present invention provides a classification method based on Softmax. Based on the features of the acquired load data after fusion, this method can not only classify the load, but also give the probability corresponding to the classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flow chart of the method of the present invention;
[0044] Figure 2 A schematic diagram of a load data classification process in a data-driven multi-resolution scenario according to an embodiment of the present invention;
[0045] Figure 3 A schematic diagram of a relative position encoding attention mechanism according to an embodiment of the present invention;
[0046] Figure 4 is a schematic diagram of a feature fusion module according to an embodiment of the present invention;
[0047] Figure 5is a learning curve according to an embodiment of the present invention;
[0048] Figure 6 is a loss function curve according to an embodiment of the present invention;
[0049] Figure 7 is a confusion matrix according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0051] Example 1
[0052] This embodiment provides a load data classification method based on data-driven multi-resolution conditions, such as Figure 1 As shown, the following steps are included:
[0053] Step S1, obtain the historical electricity consumption data information and load category information of 96 points per day with a load cycle of 1 year, and perform preprocessing such as outlier detection and correction, missing value filling and normalization on the load data to obtain a labeled load data set.
[0054] In this embodiment, the acquired power consumption data information includes timestamp, voltage, current, power and other information.
[0055] Step S2, considering the differences in power consumption characteristics of different types of loads, the load data of each day are processed at different time resolutions to construct load data matrices respectively.
[0056] The power consumption characteristics of different loads are often diverse. The daily load data of different users are processed in 3-hour, 6-hour and 12-hour cycles. Specifically, the peak value, valley value, peak-valley difference, average value and variance of the data contained in each cycle are calculated to obtain three sets of different load data feature matrices for different users every day. Specifically, take the 96-point load power data of a user for one day as an example.
[0057] The load data statistics table with a resolution of 3 hours is as follows:
[0058]
[0059] The load data statistics table with a resolution of 6 hours is as follows:
[0060]
[0061] The load data statistics table with a resolution of 12 hours is as follows:
[0062]
[0063] After deleting the first row and first column of the above table, we can get the daily power feature matrix of the user-side load at different resolutions. This processing method can clearly present the characteristics of the load data in a specific time period of each day, including the periodicity and trend of the user's daily power consumption behavior.
[0064] Step S3, for load data matrices at different resolutions, a multi-branch feature extraction model is constructed by using convolutional neural networks (CNN) to capture the short-term dependencies between load data matrices, thereby obtaining local features of the load data.
[0065] like Figure 2 As shown in Figure 1, the multi-branch feature extraction model consists of a convolutional layer, a normalization layer, an activation function, and a maximum pooling layer. Specifically:
[0066] 1) Convolutional layer: By sliding a set of learnable convolution kernels on the load data feature matrix, local feature extraction of input data is realized. The convolutional layer realizes the preliminary extraction of load data features under three branches: minute, hour, and day by setting the size, stride, and padding parameters of the convolution kernel;
[0067] Y minute =Conv(X, W minute )+b minute
[0068] Y hour =Conv(X, W hour )+b hour
[0069] Y day =Conv(X, W hour )+b day
[0070] Among them, X represents the input data, W represents the weight matrix at different resolutions, b represents the bias at different resolutions, and Y represents the convolutional layer output.
[0071] 2) Normalization layer: Normalize the features output by the convolutional layer to solve the problem of internal covariate shift, accelerate the CNN training process and improve the generalization ability of the model;
[0072] 3) Activation function: Use Gaussian Error Linear Unit (GELU) as the activation function to perform nonlinear transformation on the input data; this activation function can enhance the model's ability to capture complex features and relationships by simulating the cumulative distribution function of random variables in Gaussian distribution;
[0073]
[0074] 4) Maximum pooling layer: The maximum pooling layer is used to extract the maximum value of the convolutional layer features, reduce the spatial dimension of the convolutional features, and reduce overfitting.
[0075] Step S4, for the local features of the multi-branch load data obtained in step S3, use the Transformer-based long-distance dependency capture model to capture the dependencies between each position in the input sequence through the self-attention mechanism, model the long-distance dependencies, and add relative position encoding to help the model understand the relative distance and order relationship between different elements, so as to obtain a richer and more comprehensive feature representation, enhance the expressiveness and predictive ability of the model, and thus obtain the multi-branch load data features.
[0076] like Figure 3 As shown, the Transformer in the present invention is also multi-branched, and it can further extract features based on the load data features under the three branches of minute, hour and day obtained in step S3 to obtain long-distance load data features under the three branches of day, month and quarter. The model consists of an encoder, a decoder and an output layer. Specifically:
[0077] 1) Encoder: This part is composed of a cascade of self-attention layer and feedforward neural network layer.
[0078] 11) The self-attention layer is used to capture the dependencies between different positions in the sequence without being restricted by fixed positions. The calculation formula of the self-attention mechanism is
[0079]
[0080] Where Q, K and V represent query, key and value matrices respectively, d k Represents the channel dimension.
[0081] In the present invention, a multi-head attention mechanism is used to calculate the long-distance dependency between the multi-branch features output in step S3, and the calculation formula is:
[0082] MultiHead(Q,K,V)=Concat(Head 1 ,Head 2 ,Head 3 )W
[0083] where W is the parameter matrix and
[0084] Head i=Attention(QW i Q ,KW i K ,VW i V ).
[0085] 12) Feed forward neural network: This part consists of two linear transformations and a nonlinear activation function. The first linear transformation is embedded in the nonlinear activation function, and the second linear transformation is used to adjust the vector to make it consistent with the input vector dimension, thereby providing the model with richer nonlinear features to enhance the model's ability to capture the complex features of the input information. The calculation formula is:
[0086] FFN(x)=max(0,xW 1 +b 1 )W 2 +b 2
[0087] Where W i and b i are the weight matrix and bias vector of the i-th hidden layer, max(0,xW 1 +b 1 ) is the GELU activation function, x represents the input of the feedforward neural network, and FFN represents the feedforward neural network.
[0088] 2) Decoder: The decoder has a similar structure to the encoder, and is also composed of a self-attention layer and a feedforward neural network layer. It takes the encoder output as input and generates output sequence features.
[0089] 3) Output layer: A fully connected layer is used to map and integrate the output sequence features obtained by the decoder.
[0090] Step S5, constructing a feature fusion model based on deep convolution (DwConv) to achieve deep fusion of the multi-branch load data features obtained in step S4 to obtain fused features.
[0091] That is, a convolution kernel is applied to each branch feature obtained based on the Transformer to achieve more efficient and fine-grained feature representation. Figure 4 As shown, the DwConv feature fusion model in the present invention is mainly composed of feature splicing, deep convolution and feature fusion and processing modules, specifically:
[0092] 1) Feature splicing: Based on the Concat module, the branch features obtained by Transformer are spliced to facilitate the subsequent processing of features using DwConv. The calculation formula is:
[0093] Y Concat =Concat(Y 1 ,Y 2 ,Y 3 )
[0094] where Y 1 ,Y 2 ,Y 3 represent the day, month and quarter features obtained in step S4, respectively. Concat(·) represents the concatenation module. Concat Represents the features after splicing.
[0095] 2) Deep convolution: Use deep convolution to independently process each branch feature obtained based on Transformer to retain and enhance local spatial information. The calculation formula for this step is:
[0096] Y DwConv =DwConv(Y Concat )
[0097] where DwConv(·) represents depthwise convolution.
[0098] 3) Feature fusion and processing: Realize the fusion of features obtained by feature concatenation and deep convolution, and assign weights to the two parts during the fusion process, namely:
[0099] Y Merge =(Y Concat +Y DwConv )W
[0100] where Y Merge represents the fused features, and W represents the trainable weights of the linear projection.
[0101] Step S6, based on the fusion features obtained in step S5, Softmax is used for classification, the probability of each load belonging to a category is output, and the load category is obtained according to the maximum probability.
[0102] like Figure 5 and Figure 6 The learning curve and loss function curve of the present invention in an embodiment are respectively shown, and it can be found that the method adopted by the present invention can achieve convergence quickly. Figure 7 This is a confusion matrix according to an embodiment of the present invention. It can be found that the prediction accuracy of the present invention is relatively high.
[0103] Example 2
[0104] This embodiment provides a load data classification device in a data-driven multi-resolution situation, including:
[0105] Dataset construction module: obtains multi-point historical electricity consumption data information and load category information divided by time step within a load cycle of preset time length, and pre-processes the load data to obtain a labeled load dataset;
[0106] Load data matrix construction module: Considering the differences in power consumption characteristics of different types of loads, the load data of each day is processed at different time resolutions to construct load data matrices respectively;
[0107] Local feature extraction module: For load data matrices at different resolutions, a multi-branch feature extraction model is constructed by using a convolutional neural network to capture the short-term dependencies between load data matrices, thereby obtaining local features of the load data;
[0108] Multi-branch load data feature extraction module: for the local features of the multi-branch load data obtained in step S3, a Transformer-based long-distance dependency capture model is used to capture the dependencies between various positions in the input sequence through a self-attention mechanism, and long-distance dependencies are modeled. Relative position encoding is added to help the model understand the relative distance and order relationship between different elements, thereby obtaining multi-branch load data features;
[0109] Fusion module: construct a feature fusion model based on deep convolution to achieve deep fusion of the multi-branch load data features obtained in step S4 to obtain fusion features;
[0110] Classification module: Classification is performed based on the fusion features obtained in step S5, the probability of each load belonging to a category is output, and the load category is obtained according to the maximum probability.
[0111] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0112] Example 3
[0113] This embodiment provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the program, the method described in the above embodiment 1 is implemented.
[0114] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0115] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.
[0116] The processing unit performs the various methods and processes described above, such as methods S1 to S6. For example, in some embodiments, methods S1 to S6 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of methods S1 to S6 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S6 in any other appropriate manner (e.g., by means of firmware).
[0117] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0118] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0119] Example 4
[0120] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in the above embodiment 1 is implemented.
[0121] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A load data classification method based on data-driven multi-resolution scenario, characterized in that: The following steps are involved: Step S1, obtaining multi-point historical electricity consumption data information and load category information divided according to time steps within a load cycle of a preset time length, and preprocessing the load data to obtain a labeled load data set; Step S2, considering the differences in power consumption characteristics of different types of loads, the load data of each day is processed at different time resolutions to construct load data matrices respectively; Step S3, for load data matrices at different resolutions, a multi-branch feature extraction model is constructed by using a convolutional neural network to capture short-term dependencies between load data matrices, thereby obtaining local features of the load data; Step S4, for the local features of the multi-branch load data obtained in step S3, a Transformer-based long-distance dependency capture model is used to capture the dependencies between various positions in the input sequence through a self-attention mechanism, model the long-distance dependencies, and add relative position encoding to help the model understand the relative distance and order relationship between different elements, thereby obtaining multi-branch load data features; Step S5, constructing a feature fusion model based on deep convolution to achieve deep fusion of the multi-branch load data features obtained in step S4 to obtain fusion features; Step S6, classifying based on the fusion features obtained in step S5, outputting the probability of each load belonging to a category, and obtaining the load category according to the maximum probability.
2. The load data classification method based on data-driven multi-resolution situation according to claim 1 is characterized in that: The preprocessing includes outlier detection and correction, missing value filling and normalization processing.
3. The method for classifying load data in a data-driven multi-resolution situation according to claim 1, characterized in that: The step S2 specifically includes: calculating the statistical data of the load data at different resolutions, and constructing a load data matrix under a multi-resolution situation according to the statistical data of each time period at different resolutions, wherein the statistical data includes peak and valley values, average values and variance.
4. The method for classifying load data in a data-driven multi-resolution situation according to claim 3 is characterized in that: Each row of the load data matrix represents the load power data information of a certain time period, and each column represents the serial number value, power peak value, power valley value, power peak-valley difference, average power and variance in order, wherein the serial number value is a sequence value determined according to the order of the time periods.
5. The method for classifying load data in a data-driven multi-resolution situation according to claim 1, characterized in that: The multi-branch feature extraction model is composed of a convolution layer, a normalization layer, an activation function and a maximum pooling layer. Specifically: The convolution layer realizes local feature extraction of input data by sliding a set of learnable convolution kernels on the load data feature matrix, wherein the convolution layer realizes preliminary extraction of load data features under three branches of minute, hour and day by setting the size, stride and padding parameters of the convolution kernel; The normalization layer normalizes the features output by the convolutional layer to solve the problem of internal covariate shift; Use Gaussian error linear unit as activation function to perform nonlinear transformation on input data; The maximum pooling layer is used to extract the maximum value of the convolutional layer features, reduce the spatial dimension of the convolutional features, and reduce overfitting.
6. The method for classifying load data in a data-driven multi-resolution situation according to claim 1, characterized in that: The Transformer-based long-distance dependency capture model further extracts features based on the load data features under the three branches of minute, hour and day obtained in step S3 to obtain long-distance load data features under the three branches of day, month and quarter. The model consists of an encoder, a decoder and an output layer. Specifically: The encoder is composed of a cascade of a self-attention layer and a feedforward neural network layer, wherein the self-attention layer is used to capture the dependencies between different positions in the sequence without being restricted by a fixed position, and uses a multi-head self-attention mechanism to calculate the long-distance dependencies between the multi-branch features output by step S3, and introduces relative position encoding to combine input embedding and position information; the feedforward neural network is composed of two linear transformations and a nonlinear activation function, wherein the first linear transformation is embedded in the nonlinear activation function, and the second linear transformation is used to adjust the vector to make it consistent with the input vector dimension, thereby providing the model with richer nonlinear features to enhance the model's ability to capture the complex features of the input information; The decoder is composed of a self-attention layer and a feed-forward neural network layer, which takes the output of the encoder as input and generates output sequence features; The output layer uses a fully connected layer to map and integrate the output sequence features obtained by the decoder.
7. The method for classifying load data in a data-driven multi-resolution situation according to claim 1, characterized in that: The feature fusion model is composed of feature splicing, deep convolution and feature fusion and processing modules, specifically: Feature splicing: Based on the Concat module, the branch features obtained by Transformer are spliced; Deep convolution: Use deep convolution to independently process each branch feature obtained based on Transformer to preserve and enhance local spatial information; Feature fusion and processing: Realize the fusion of features obtained by feature splicing and deep convolution, and assign weights to the two parts during the fusion process.
8. A load data classification device based on data-driven multi-resolution situation, characterized in that: include: Dataset construction module: obtains multi-point historical electricity consumption data information and load category information divided by time step within a load cycle of preset time length, and pre-processes the load data to obtain a labeled load dataset; Load data matrix construction module: Considering the differences in power consumption characteristics of different types of loads, the load data of each day is processed at different time resolutions to construct load data matrices respectively; Local feature extraction module: For load data matrices at different resolutions, a multi-branch feature extraction model is constructed by using a convolutional neural network to capture the short-term dependencies between load data matrices, thereby obtaining local features of the load data; Multi-branch load data feature extraction module: for the local features of the multi-branch load data obtained in step S3, a Transformer-based long-distance dependency capture model is used to capture the dependencies between various positions in the input sequence through a self-attention mechanism, and long-distance dependencies are modeled. Relative position encoding is added to help the model understand the relative distance and order relationship between different elements, thereby obtaining multi-branch load data features; Fusion module: construct a feature fusion model based on deep convolution to achieve deep fusion of the multi-branch load data features obtained in step S4 to obtain fusion features; Classification module: Classification is performed based on the fusion features obtained in step S5, the probability of each load belonging to a category is output, and the load category is obtained according to the maximum probability.
9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Multi-scale power load prediction method and system
CN120354984A