Non-intrusive load monitoring method and device based on graph neural network, computer equipment, readable storage medium and program product
Through the graph neural network-based method, the frequency domain and time frequency characteristics of the power grid time series data are extracted, the graph structure is generated and the graph convolution operation is carried out, which solves the problem of low load monitoring accuracy in the existing technology and achieves more efficient Load monitoring.
Patent Information
- Application Number
- CN202411341831.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-21
AI Technical Summary
Existing non-invasive load monitoring methods are carried out through pattern recognition, making it difficult to capture the complex relationships and dependencies in power load data, resulting in a decrease in monitoring accuracy.
Using a graph neural network-based method, the time series data of the power grid is obtained, the frequency domain and time frequency characteristics are extracted, and the graph structure is generated. The trained graph neural network is used to perform multi-layer graph convolution operations, and the load decomposition results are output for monitoring. .
Improve the accuracy of non-invasive load monitoring and can more effectively capture complex relationships and dependencies in grid load data.
Smart Images

Figure CN119494751A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric power technology, and in particular to a non-intrusive load monitoring method, device, computer equipment, computer-readable storage medium and computer program product based on graph neural network. Background Art
[0002] Non-Intrusive Load Monitoring (NILM) is a technology that identifies and monitors the power consumption of each electrical device by analyzing power consumption data. It has the advantages of low deployment cost and simple installation because it does not require the installation of separate sensors on each appliance. Currently, the method of non-invasive load monitoring of power load data is usually performed through pattern recognition. However, non-invasive load monitoring through pattern recognition is insufficient in capturing the complex relationships and dependencies in load data, resulting in reduced monitoring accuracy.
[0003] Therefore, the current non-intrusive load monitoring method for power load data has the defect of low monitoring accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a non-invasive load monitoring method, device, computer equipment, computer-readable storage medium and computer program product based on graph neural network that can improve monitoring accuracy in response to the above technical problems.
[0005] In a first aspect, the present application provides a non-intrusive load monitoring method based on a graph neural network, the method comprising:
[0006] Acquire time series data corresponding to the power grid to be monitored; the time series data includes each fused power data corresponding to each time point of the power grid within a preset time period; the fused power data is obtained by fusion of multiple types of power data;
[0007] Performing feature extraction on each of the fused power data in the time series data to obtain a first feature matrix and a second feature matrix; the first feature matrix represents the frequency domain features of the time series data, and the second feature matrix represents the frequency characteristics of the time series data that change with time;
[0008] Generate a graph structure according to each of the time points, each of the fused power data, the first characteristic matrix, and the second characteristic matrix;
[0009] The graph structure is input into a trained graph neural network, and the graph neural network performs multi-layer graph convolution operations based on the graph structure, outputs corresponding load decomposition results, and non-intrusive load monitoring of the power grid is performed based on the load decomposition results.
[0010] In one embodiment, the feature extraction of each of the fused power data corresponding to each of the time points in the time series data to obtain a first feature matrix and a second feature matrix includes:
[0011] Performing Fourier transform on each of the fused power data corresponding to each of the time points in the time series data to obtain a frequency domain feature matrix as the first feature matrix;
[0012] A time series signal corresponding to the time series data is obtained, and a short-time Fourier transform is performed on the time series signal to obtain a short-time Fourier transform feature matrix as the second feature matrix.
[0013] In one embodiment, generating a graph structure according to each of the time points, each of the fused power data, the first characteristic matrix, and the second characteristic matrix includes:
[0014] Determine, according to each load data to be monitored corresponding to each time point, a node set including each node corresponding to each time point;
[0015] Connecting the nodes at adjacent time points, determining an adjacency matrix according to the connected nodes, and determining an edge set according to the edges between the connected nodes;
[0016] Determine a node characteristic matrix according to each of the fused power data, the first characteristic matrix and the second characteristic matrix;
[0017] The graph structure is generated according to the node set, the edge set, the adjacency matrix and the node feature matrix.
[0018] In one embodiment, the graph structure is input into a trained graph neural network, and the graph neural network performs multi-layer graph convolution operations based on the graph structure to output corresponding load decomposition results, including:
[0019] Inputting the graph structure into a trained graph neural network, and having the graph neural network determine the time association relationship and the device association relationship corresponding to the power grid based on the graph structure;
[0020] According to the time association relationship and the device association relationship, a multi-layer graph convolution operation is performed on the node feature matrix to obtain an updated node feature matrix;
[0021] According to the updated node characteristic matrix, the corresponding load decomposition result is output.
[0022] In one embodiment, the method further comprises:
[0023] Obtain graph structure samples, load decomposition result samples, and graph neural networks to be trained;
[0024] Inputting the graph structure sample into the graph neural network to be trained, and the graph neural network performs multi-layer graph convolution operations based on the graph structure sample to output corresponding load decomposition prediction results;
[0025] The load decomposition prediction result and the load decomposition result sample are input into a preset loss function, and the model parameters of the graph neural network are updated by a stochastic gradient descent algorithm according to the output value of the preset loss function until the preset training end condition is met, thereby obtaining a trained graph neural network.
[0026] In one embodiment, the obtaining of time series data corresponding to the power grid to be monitored includes:
[0027] Acquire each active power data, each voltage data, each current data and each reactive power data corresponding to each time point of the power grid to be monitored within a preset time period;
[0028] Performing multimodal fusion processing on each of the active power data, each of the voltage data, each of the current data and each of the reactive power data to obtain each of the fused power data corresponding to each of the time points;
[0029] The time series data is obtained according to each of the fused power data.
[0030] In a second aspect, the present application provides a non-intrusive load monitoring device based on a graph neural network, the device comprising:
[0031] An acquisition module, used to acquire time series data corresponding to the power grid to be monitored; the time series data includes each fused power data corresponding to each time point of the power grid within a preset time period; the fused power data is obtained by fusion of multiple types of power data;
[0032] An extraction module, used for performing feature extraction on each of the fused power data corresponding to each of the time points in the time series data to obtain a first feature matrix and a second feature matrix; the first feature matrix represents the frequency domain features of the time series data, and the second feature matrix represents the frequency characteristics of the time series data changing with time;
[0033] A generating module, configured to generate a graph structure according to each of the time points, each of the fused power data, the first characteristic matrix and the second characteristic matrix;
[0034] A monitoring module is used to input the graph structure into a trained graph neural network, and the graph neural network performs multi-layer graph convolution operations based on the graph structure, outputs corresponding load decomposition results, and performs non-intrusive load monitoring on the power grid based on the load decomposition results.
[0035] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0036] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0037] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0038] The above-mentioned non-invasive load monitoring method, device, computer equipment, computer-readable storage medium and computer program product based on graph neural network obtains the time series data corresponding to the power grid to be monitored, extracts the first characteristic matrix and the second characteristic matrix corresponding to the time series data, generates a graph structure according to each time point, each fused power data, the first characteristic matrix and the second characteristic matrix, and performs multi-layer graph convolution operations based on the graph structure by the graph neural network, and performs load monitoring on the power grid based on the output load decomposition results. Compared with the traditional non-invasive load monitoring through pattern recognition, this solution integrates multiple power data from a time perspective, generates a graph structure using time points, fused power data and each extracted characteristic matrix, and performs load monitoring according to the load decomposition results output by the graph neural network based on the graph structure, thereby improving the accuracy of load monitoring of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 1 is a flow chart of a non-intrusive load monitoring method based on a graph neural network in one embodiment;
[0041] Figure 2 A schematic diagram of a flow chart of a non-intrusive load monitoring method based on a graph neural network in another embodiment;
[0042] Figure 3 Schematic diagram of monitoring results of an air compressor and a grate cooler in one embodiment.
[0043] Figure 4 is a structural block diagram of a non-intrusive load monitoring device based on a graph neural network in one embodiment;
[0044] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] In one embodiment, Figure 1 As shown, a non-intrusive load monitoring method based on a graph neural network is provided. This embodiment uses the method applied to a server as an example. It can be understood that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server, including the following steps S202 to S208. Among them:
[0047] Step S202, obtaining time series data corresponding to the power grid to be monitored; the time series data includes each fused power data corresponding to each time point of the power grid within a preset time period; the fused power data is obtained by fusion of multiple types of power data.
[0048] The power grid to be monitored may be a power grid that needs to be load monitored. The power grid includes a variety of power equipment, and each power equipment generates corresponding power data. The power data includes multiple types. In order to realize non-intrusive load monitoring of the power grid, the server can collect and obtain a variety of power data corresponding to the power grid to be monitored. The above power data can be collected and obtained in chronological order.
[0049] The server can then obtain the time series data corresponding to the power grid to be monitored. For example, the server can collect various types of power data in the power grid at various time points within a preset time period, and the server can also fuse the various power data at each time point to obtain the various fused power data corresponding to each time point.
[0050] In one embodiment, time series data corresponding to a power grid to be monitored is obtained, including: obtaining each active power data, each voltage data, each current data and each reactive power data corresponding to each time point of the power grid to be monitored within a preset time period; performing multimodal fusion processing on each active power data, each voltage data, each current data and each reactive power data to obtain each fused power data corresponding to each time point; and obtaining time series data based on each fused power data.
[0051] In this embodiment, the various types of power data in the above-mentioned power grid include but are not limited to active power data, voltage data, current data, and reactive power data. The server can realize the generation of fused power data through multimodal data fusion processing. Among them, the server can obtain the active power data, voltage data, current data, and reactive power data corresponding to each time point of the power grid to be monitored within the preset time point. The server can perform multimodal fusion processing on each active power data, voltage data, current data, and reactive power data corresponding to each time point, so as to obtain each fused power data corresponding to each time point, and the server obtains time series data according to each fused power data. For example, for each time point, the server performs multimodal fusion processing on the active power data, voltage data, current data, and reactive power data corresponding to the time point, and obtains the fused power data corresponding to the time point. The server combines the fused power data corresponding to each time point in chronological order to form the above-mentioned time series data.
[0052] Specifically, the server can collect various types of power data in the power grid. The server selects the actual load data set of the cement plant in the power grid system for research. The server can collect the original power data. The server needs to pre-process the original power data to obtain the above power data. For each type of power data, the pre-processing includes missing value processing, outlier processing, and normalization processing. For missing values, the server uses cubic spline interpolation to supplement to ensure the continuity and integrity of the data, which can be specifically expressed as:
[0053] ;in, represents the missing values of the power data supplemented by the cubic spline interpolation method, and f(x(t-1,x(t+1)) represents the average value of the data at adjacent time points.
[0054] The server can also process outliers on the raw power data. For example, the server applies statistical screening methods to detect and remove outliers to improve data quality and the stability of model training. The server can also perform data standardization, normalize all raw power data, and scale them to a uniform range to ensure the comparability of different features and the effectiveness of model training. Specifically, it can be expressed as:
[0055] ;in, represents the standardized data, x i represents the original power data, μ represents the mean of the data, and σ represents the standard deviation of the data.
[0056] Thus, after the server performs the above-mentioned preprocessing on the above-mentioned raw power data, the preprocessed power data can be obtained. The server can use multimodal data to enhance the performance and accuracy of the model and perform multimodal data fusion processing on the above-mentioned types of power data. Among them, the multimodal data includes but is not limited to active power data P, voltage data V, current data I and reactive power data Q. Among them, the server can fuse the above-mentioned power data at each time point to obtain the multimodal fused power data corresponding to each time point. Then the server can combine the fused power data corresponding to each time point to obtain the above-mentioned time series data, which can be specifically expressed as: X time =[P,V,I,Q]. time It represents time series data, which can also be called time domain feature matrix, including active power data P, voltage data V, current data I and reactive power data Q. Thus, the server can use the above time series data for load monitoring.
[0057] Step S204, extracting features from each fused power data in the time series data to obtain a first feature matrix and a second feature matrix; the first feature matrix represents the frequency domain features of the time series data, and the second feature matrix represents the frequency characteristics of the time series data that change with time.
[0058] After obtaining the above time series data, the server can perform feature extraction on it to participate in the generation of subsequent graph structures. The server can perform feature extraction on the time series data based on multiple algorithms. For example, the server can perform feature extraction on each fused power data in the time series data, including extracting a first feature matrix representing the frequency domain features of the time series data, and extracting a second feature matrix representing the frequency characteristics of the time series data changing over time.
[0059] Among them, the above-mentioned feature extraction process can be a kind of advanced feature engineering. The server extracts different feature matrices corresponding to the above-mentioned time series data from different angles, thereby realizing analysis and monitoring of power data from multiple angles.
[0060] Step S206, generating a graph structure according to each time point, each fused power data, the first characteristic matrix and the second characteristic matrix.
[0061] Among them, after the server obtains the above-mentioned time series data, it can determine the various time points and various fused power data of the sampling. After the server extracts the features of the time series data, it can obtain the above-mentioned first feature matrix and second feature matrix. The server can perform load monitoring on the above-mentioned power grid to be monitored by generating a graph structure. For example, the server can generate a graph structure based on various time points, various fused power data, the first feature matrix and the second feature matrix. Therefore, the server can construct a graph structure containing various time points, various fused power data, the first feature matrix and the second feature matrix, and perform non-invasive load monitoring on the power grid based on the graph structure, thereby improving the accuracy and stability of load monitoring.
[0062] Step S208: Input the graph structure into the trained graph neural network, and the graph neural network performs multi-layer graph convolution operations based on the graph structure, outputs the corresponding load decomposition results, and performs non-intrusive load monitoring on the power grid based on the load decomposition results.
[0063] Among them, after the server generates a graph structure using the above-mentioned various time points, various fused power data, the first characteristic matrix and the second characteristic matrix, the graph structure can be used to perform non-invasive load monitoring of the power grid. For example, the server can pre-train the graph neural network (Graph Neural Networks, GNN) to be trained to obtain a trained graph neural network. The server can use the above-mentioned graph neural network to perform load decomposition. Among them, load decomposition means that the server uses non-invasive load monitoring technology to analyze the various power data contained in the above-mentioned graph structure, and decomposes the independent load data of each electrical appliance or equipment, so that the server can use the load data to perform non-invasive load monitoring on each device in the power grid.
[0064] Among them, the server can input the above graph structure into a trained graph neural network, and the graph neural network can perform multi-layer graph convolution operations based on the graph structure to obtain corresponding load decomposition results. The graph neural network can output the above corresponding load decomposition results, so that the server can perform non-invasive load monitoring on the power grid according to the load decomposition results. Among them, the above graph neural network can include multiple types of network structures, and the server can perform multi-layer graph convolution operations on the above graph structure in a graph neural network containing multiple network structures; the above load decomposition results may include independent load data of each electrical appliance or equipment in the above power grid. Therefore, the server can use a graph neural network containing multiple network structures to decompose and monitor the load, capture the complex relationships and dependencies in the load data, and improve the accuracy and stability of load monitoring.
[0065] In the above-mentioned non-invasive load monitoring method based on graph neural network, by acquiring the time series data corresponding to the power grid to be monitored, extracting the first characteristic matrix and the second characteristic matrix corresponding to the time series data, generating a graph structure according to each time point, each fused power data, the first characteristic matrix and the second characteristic matrix, the graph neural network performs multi-layer graph convolution operations based on the graph structure, and performs non-invasive load monitoring of the power grid based on the output load decomposition results. Compared with the traditional non-invasive load monitoring through pattern recognition, this solution fuses multiple power data from a time perspective, generates a graph structure using time points, fused power data and each extracted characteristic matrix, and performs load monitoring according to the load decomposition results output by the graph neural network based on the graph structure, thereby improving the accuracy of load monitoring of the power grid.
[0066] In one embodiment, feature extraction is performed on each fused power data corresponding to each time point in the time series data to obtain a first feature matrix and a second feature matrix, including: performing Fourier transform on each fused power data corresponding to each time point in the time series data to obtain a frequency domain feature matrix as the first feature matrix; acquiring a time series signal corresponding to the time series data, performing short-time Fourier transform on the time series signal, and obtaining a short-time Fourier transform feature matrix as the second feature matrix.
[0067] In this embodiment, the server can perform feature extraction from multiple angles on the above-mentioned time series data, and then obtain the above-mentioned first feature matrix and second feature matrix. Among them, the feature extraction of the time series data performed by the server includes extraction based on frequency domain analysis and extraction based on frequency characteristic analysis. For example, for frequency domain analysis, the server can perform Fourier transform on each fused power data corresponding to each time point in the time series data to obtain a frequency domain feature matrix as the first feature matrix. For the analysis of frequency characteristics, the server can obtain the time series signal corresponding to the time series data, perform short-time Fourier transform (STFT) on the time series signal, and obtain a short-time Fourier transform feature matrix as the second feature matrix.
[0068] Specifically, the above process of extracting features of time series data can be a kind of advanced feature engineering. The server can extract frequency domain features and frequency-related features corresponding to the time series data. Among them, the server can extract the frequency domain features of the time series data of the non-intrusive load monitoring input data. By performing frequency domain analysis on the time series data, the server can extract the energy distribution of the signal at different frequencies, thereby capturing higher-dimensional features.
[0069] Among them, the frequency domain feature can be the first feature matrix mentioned above, which can be specifically expressed as: X freq =F(X time ). Among them, X freq represents the frequency domain characteristic matrix, also called the first characteristic matrix, F represents Fourier transform, X time Represents time series data.
[0070] The frequency-related feature may be the second feature matrix mentioned above, and specifically may be a short-time Fourier transform feature matrix. Among them, short-time Fourier transform is a method of representing a signal on a time-frequency plane, and by performing Fourier transform in a short time window, the frequency characteristics of non-intrusive load monitoring input data changing over time are captured. Then the short-time Fourier transform feature matrix mentioned above may be specifically expressed as:
[0071] X STFT =STFT{x[n]}=X(m,k)= Among them, X STFT represents the short-time Fourier transform characteristic matrix, also called the second characteristic matrix, x[n] is a time series signal, for example, it can be a time series signal formed by signaling the above time series data, ω[nm] is a window function, and X(m,k) is the short-time Fourier transform coefficient at the mth time window and the kth frequency. The above n, m, k and N are all natural numbers and are less than or equal to N.
[0072] Through this embodiment, the server can perform feature extraction from multiple angles based on time series data, and then the server can perform non-invasive load monitoring of each device in the power grid based on the extracted frequency domain feature matrix and Fourier transform feature matrix, thereby improving the accuracy of monitoring the power grid load.
[0073] In one embodiment, a graph structure is generated according to each time point, each fused power data, a first characteristic matrix and a second characteristic matrix, including: determining a node set including each node corresponding to each time point according to each load data to be monitored corresponding to each time point; connecting each node at adjacent time points, determining an adjacency matrix according to each connected node, and determining an edge set according to each edge between each connected node; determining a node characteristic matrix according to each fused power data, a first characteristic matrix and a second characteristic matrix; generating a graph structure according to the node set, the edge set, the adjacency matrix and the node characteristic matrix.
[0074] In this embodiment, the server can generate a graph structure using the above-mentioned various time points, various fused power data, the first characteristic matrix and the second characteristic matrix. Among them, the graph structure can be formed based on the load data, edge set, node characteristic matrix and adjacency matrix at each time point. The above-mentioned load data can be the load data to be obtained, and the load data at each time point can form each node, then each node has a corresponding edge, node characteristic matrix and adjacency matrix. The server can analyze the load data of each node using the edges, node characteristic matrix and adjacency matrix corresponding to each node; and the above-mentioned node characteristic matrix can include multiple types of characteristic matrices.
[0075] The server can determine the node set including each node corresponding to each time point according to each load data to be monitored corresponding to each time point, and each node can represent the load data at each time point. If each of the above nodes has a corresponding time point, the server can connect each node at adjacent time points and determine the adjacency matrix according to each connected node. The adjacency matrix represents the connection relationship between nodes.
[0076] The server can also determine an edge set based on the edges between the connected nodes. The edge set includes the connection relationship between adjacent time points. The server can determine the node feature matrix based on the fused power data, the first feature matrix and the second feature matrix. Thus, the server can generate a graph structure based on the node set, the edge set, the adjacency matrix and the node feature matrix.
[0077] Specifically, the server can define the nodes and edges in the graph structure so that the graph neural network is suitable for non-intrusive load monitoring tasks. For example, when the server defines the nodes, the load data at each time point can be regarded as a node in the graph. The node feature matrix includes the multimodal data, frequency domain features, and short-time Fourier transform features at the time point. The edge definition means connecting the nodes at adjacent time points according to the order of the time series data. Among them, the edge features include time difference and power change rate. After the server defines the above parameters, a complete load data graph structure can be constructed, including the nodes at all time points and their connection relationships.
[0078] The graph structure can be specifically expressed as: G=(V,E,X,A). V represents the node set, which represents the load data at each time point. E represents the edge set, which represents the connection relationship between adjacent time points. X represents the node feature matrix, with a dimension of N×F, where N is the number of nodes, F is the feature dimension, and N is a natural number. A represents the adjacency matrix, with a dimension of N×N, which represents the connection relationship between nodes.
[0079] Through this embodiment, the server can use various types of data and features to construct a graph structure, so that the server can use the graph structure to perform non-intrusive load monitoring on the power grid, thereby improving the accuracy of load monitoring.
[0080] In one embodiment, a graph structure is input into a trained graph neural network, and the graph neural network performs multi-layer graph convolution operations based on the graph structure to output corresponding load decomposition results, including: inputting a graph structure into a trained graph neural network, and the graph neural network determines the time correlation relationship and device correlation relationship corresponding to the power grid based on the graph structure; performing multi-layer graph convolution operations on the node feature matrix according to the time correlation relationship and the device correlation relationship to obtain an updated node feature matrix; and outputting the corresponding load decomposition result according to the updated node feature matrix.
[0081] In this embodiment, the server can use a graph structure and a trained graph neural network to perform load decomposition. The server can input the above-mentioned graph structure into the trained graph neural network, and the graph neural network can determine the time correlation relationship and device correlation relationship corresponding to the power grid based on the graph structure. The time correlation relationship represents the connection relationship between adjacent time points, and the device correlation relationship represents the relationship between different devices. The graph neural network can perform multi-layer graph convolution operations on the node feature matrix according to the time correlation relationship and the device correlation relationship to obtain an updated node feature matrix, and output the corresponding load decomposition result according to the updated node feature matrix. The graph neural network includes multiple layers, such as an input layer, a hidden layer, and an output layer. The server can perform multi-layer graph convolution operations on the node feature matrix in the graph neural network, thereby updating the node features layer by layer to obtain an updated node feature matrix.
[0082] Specifically, since the data input into the graph neural network includes multimodal data, the above-mentioned graph neural network can be obtained by combining multiple network structures. For example, the graph neural network can be a combination model of a graph convolutional network and a heterogeneous graph neural network. In the graph structure, different nodes and edges can represent different types of relationships. In load monitoring, the relationship types include time association relationships and device-to-device relationships. The server uses r to represent the relationship type, i.e., time association or device association. R is used to represent the relationship set, which contains all possible relationship types.
[0083] Then, in the input layer of the graph neural network, the graph neural network can input the node feature matrix containing time domain and frequency domain features in the graph structure into the graph neural network, and the initial state is H (0) . And input the node and edge features of the graph structure. Among them, the initial state can be specifically expressed as: H (0) =[X freq ,X time ,X STFT ]. Among them, H (0) represents the initial node feature matrix, X time is the time domain feature matrix, X freq is the frequency domain feature matrix, X STFT is the short-time Fourier transform feature matrix. In the hidden layer, the graph neural network updates the node features layer by layer through multi-layer graph convolution operations. The calculation of each layer can be specifically expressed as:
[0084] ; where r represents the relationship type, R represents the relationship set, represents the set of neighboring nodes of node i under relation r, c i,j is the normalization constant, W r is the weight matrix of relation r, σ represents the activation function, and the above i and j are natural numbers.
[0085] Therefore, the graph neural network can output in the output layer. For example, the graph neural network is transmitted through multiple hidden layers and outputs the final updated node feature matrix H in the output layer. (L) , as the final load decomposition result, can be specifically expressed as: = H (L) .in, represents the final load decomposition result, L represents the total number of hidden layers, and the final node feature matrix can include the load data corresponding to each device in the power grid at each time point.
[0086] Through this embodiment, the server can use a graph neural network including multiple network structures to perform load decomposition on the graph structure, and then obtain corresponding load decomposition results. The server uses the load decomposition results to perform non-invasive load monitoring, thereby improving the efficiency of non-invasive load monitoring.
[0087] In one embodiment, it also includes: obtaining graph structure samples, load decomposition result samples and a graph neural network to be trained; inputting the graph structure samples into the graph neural network to be trained, and the graph neural network performs multi-layer graph convolution operations based on the graph structure samples, and outputs corresponding load decomposition prediction results; inputting the load decomposition prediction results and the load decomposition result samples into a preset loss function, and updating the model parameters of the graph neural network through a stochastic gradient descent algorithm according to the output value of the preset loss function until the preset training end conditions are met, thereby obtaining a trained graph neural network.
[0088] In this embodiment, the server may pre-train the graph neural network to be trained, for example, using graph structure samples and load decomposition result samples for training. Among them, after obtaining the graph structure samples and the load decomposition result samples, the server may input the graph structure samples into the graph neural network to be trained. The graph neural network may perform multi-layer graph convolution operations based on the graph structure samples and multiple hidden layers to obtain updated node feature matrix prediction results, and then output corresponding load decomposition prediction results based on the node feature matrix prediction results. The above-mentioned load decomposition result samples may be the correct load decomposition results corresponding to the above-mentioned graph structure samples. The server may input the load decomposition prediction results and the load decomposition result samples into a preset loss function, and obtain the output value of the preset loss function. Based on the above-mentioned output value, the server updates the model parameters of the graph neural network through the stochastic gradient descent algorithm until the preset training end condition is met, and a trained graph neural network is obtained.
[0089] Specifically, when training the graph neural network, the server can obtain the preprocessed graph structure samples and their corresponding load decomposition result samples as training sets. After the server obtains the load decomposition prediction results through the graph neural network, it can input the preset loss function. Among them, the preset loss function can use the mean squared error (MSE) loss function to measure the difference between the model prediction results and the actual load data represented by the load decomposition samples. The preset loss function can be specifically expressed as:
[0090] ; Where L represents the loss function, N represents the total number of samples, Represents the load data predicted by the model, also known as the load decomposition prediction result, y i Represents real load data, also known as load decomposition result samples.
[0091] Among them, the preset training end condition may include that the above preset loss function converges within the preset number of training times, or the number of training times reaches the preset number of training times. The server can adjust the model parameters of the graph neural network based on the output value of the loss function. Among them, the server can use a variety of algorithms to adjust and update the model parameters, including but not limited to using stochastic gradient descent algorithm (SGD) or Adam optimizer to iteratively update the model parameters until the loss function converges. The model parameter update can be specifically expressed as: θ←θ-η▽ θ L. Among them, θ represents the model parameters, η represents the learning rate, ▽ θ L represents the gradient of the loss function with respect to the model parameters. In addition, the server can also perform hyperparameter tuning on the model. The server can use grid search or Bayesian optimization methods to tune the hyperparameters of the graph neural network, such as the learning rate, number of layers, number of hidden layer nodes, etc., to optimize the model performance. The tuning process can be specifically expressed as: argmin λ L val (λ). Where λ represents a hyperparameter, L val (λ) represents the loss function on the validation set.
[0092] Through this embodiment, the server can use graph structure samples, mean square error and multiple model parameter update and tuning algorithms to train the graph neural network, and then the server can use the trained graph neural network to perform non-invasive load monitoring on the power grid, thereby improving the accuracy of non-invasive load monitoring.
[0093] In an exemplary embodiment, Figure 2 As shown, Figure 2 It is a flow chart of a non-invasive load monitoring method based on a graph neural network in another embodiment. In this embodiment, the server can pre-process various raw power data in the power grid, including interpolation processing, outlier processing, and data standardization and normalization processing. The server performs multimodal data fusion based on the processed power data, wherein the server can collect various pre-processed power data including active power data, voltage data, current data, and reactive power data at each time point within a preset time period, and perform multimodal data fusion on various power data at each time point to obtain multimodal fused power data corresponding to each time point, and form the above-mentioned time series data based on the multimodal fused power data at each time point. Among them, the fused power data at each time point includes active power data, voltage data, current data, and reactive power data corresponding to each time point.
[0094] The server can also perform frequency domain features and short-time Fourier transform features corresponding to the time series data based on advanced feature engineering. The server uses each time point in the above time series data, each multi-modal fused power data, frequency domain feature matrix and short-time Fourier transform feature matrix to build a graph structure. Among them, the server can define nodes based on the load data at each time point, define edges based on the adjacent relationships at each time point, and build a graph structure based on the definitions of nodes and edges. The server can input the above graph structure into a trained graph neural network generated based on a graph convolutional network and a heterogeneous graph neural network.
[0095] Among them, the server can pre-train and tune the model of the graph neural network to be trained based on the graph structure samples, and then obtain the trained graph neural network. Therefore, in the graph neural network, the server performs multi-layer graph convolution operations on the node feature matrix in the input graph structure to obtain an updated node feature matrix, so that the graph neural network outputs the updated node feature matrix as the load decomposition result in the output layer. Therefore, the server can use the load decomposition result for non-intrusive load monitoring.
[0096] Among them, Figure 3 As shown, Figure 3 FIG. 1 is a schematic diagram of monitoring results of an air compressor and a grate cooler in an embodiment. The server can perform load monitoring on each power device in the cement plant according to the power data of each power device, and specifically can perform load monitoring on each power data of the cement plant in the power grid. Figure 3 As shown, the predicted data obtained by the server through load monitoring of the air compressor and the grate cooler in the cement plant are similar to the actual load data of the air compressor and the grate cooler, respectively, indicating that the load monitoring method provided in this embodiment is accurate.
[0097] Through the above embodiments, the server fuses various power data from a time perspective, generates a graph structure using time points, fused power data, and extracted feature matrices, and performs load monitoring based on the load decomposition results output by the graph neural network based on the graph structure, thereby improving the accuracy of load monitoring of the power grid. In addition, by constructing a graph structure of power load data containing multimodal data, frequency domain features, and short-time Fourier transform features, and using graph convolutional networks and heterogeneous graph neural networks for load decomposition and monitoring, it is also possible to capture complex relationships and dependencies in load data, thereby improving the accuracy and stability of load monitoring.
[0098] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0099] Based on the same inventive concept, the embodiment of the present application also provides a non-invasive load monitoring device based on a graph neural network for implementing the non-invasive load monitoring method based on a graph neural network involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the non-invasive load monitoring device based on a graph neural network provided below can refer to the limitations of the non-invasive load monitoring method based on a graph neural network above, and will not be repeated here.
[0100] In an exemplary embodiment, Figure 4 As shown, a non-intrusive load monitoring device based on a graph neural network is provided, comprising: an acquisition module 500, an extraction module 502, a generation module 504 and a monitoring module 506, wherein:
[0101] The acquisition module 500 is used to acquire the time series data corresponding to the power grid to be monitored; the time series data includes each fused power data corresponding to each time point of the power grid within a preset time period; the fused power data is obtained by fusion of multiple types of power data.
[0102] The extraction module 502 is used to extract features of each fused power data corresponding to each time point in the time series data to obtain a first feature matrix and a second feature matrix; the first feature matrix represents the frequency domain features of the time series data, and the second feature matrix represents the frequency characteristics of the time series data that change with time.
[0103] The generating module 504 is used to generate a graph structure according to each time point, each integrated power data, the first characteristic matrix and the second characteristic matrix.
[0104] The monitoring module 506 is used to input the graph structure into the trained graph neural network, and the graph neural network performs multi-layer graph convolution operations based on the graph structure, outputs the corresponding load decomposition results, and performs non-intrusive load monitoring on the power grid based on the load decomposition results.
[0105] In one embodiment, the extraction module 502 is used to perform Fourier transform on each fused power data corresponding to each time point in the time series data to obtain a frequency domain feature matrix as a first feature matrix; obtain a time series signal corresponding to the time series data, perform short-time Fourier transform on the time series signal, and obtain a short-time Fourier transform feature matrix as a second feature matrix.
[0106] In one embodiment, the above-mentioned generation module 504 is used to determine a node set including each node corresponding to each time point according to each load data to be monitored corresponding to each time point; connect each node at adjacent time points, determine an adjacency matrix according to each connected node, and determine an edge set according to each edge between each connected node; determine a node feature matrix according to each fused power data, a first feature matrix and a second feature matrix; generate a graph structure according to the node set, the edge set, the adjacency matrix and the node feature matrix.
[0107] In one embodiment, the above-mentioned monitoring module 506 is used to input the graph structure into a trained graph neural network, and the graph neural network determines the time correlation relationship and equipment correlation relationship corresponding to the power grid based on the graph structure; according to the time correlation relationship and the equipment correlation relationship, a multi-layer graph convolution operation is performed on the node feature matrix to obtain an updated node feature matrix; according to the updated node feature matrix, the corresponding load decomposition result is output.
[0108] In one embodiment, the above-mentioned device also includes: a training module, which is used to obtain graph structure samples, load decomposition result samples and a graph neural network to be trained; inputting the graph structure samples into the graph neural network to be trained, and the graph neural network performs multi-layer graph convolution operations based on the graph structure samples, and outputs the corresponding load decomposition prediction results; inputting the load decomposition prediction results and the load decomposition result samples into a preset loss function, and updating the model parameters of the graph neural network through a stochastic gradient descent algorithm according to the output value of the preset loss function until the preset training end conditions are met, thereby obtaining a trained graph neural network.
[0109] In one embodiment, the acquisition module 500 is used to obtain each active power data, each voltage data, each current data and each reactive power data corresponding to each time point of the power grid to be monitored within a preset time period; perform multimodal fusion processing on each active power data, each voltage data, each current data and each reactive power data to obtain each fused power data corresponding to each time point; and obtain time series data based on each fused power data.
[0110] Each module in the above-mentioned graph neural network-based non-intrusive load monitoring device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0111] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store various power data in the power grid. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a non-invasive load monitoring method based on a graph neural network is implemented.
[0112] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0113] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above-mentioned non-intrusive load monitoring method based on graph neural network when executing the computer program.
[0114] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned non-intrusive load monitoring method based on graph neural network is implemented.
[0115] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the above-mentioned non-intrusive load monitoring method based on graph neural network.
[0116] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0117] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0119] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A non-intrusive load monitoring method based on graph neural network, characterized in that: The method comprises: Acquire time series data corresponding to the power grid to be monitored; the time series data includes each fused power data corresponding to each time point of the power grid within a preset time period; the fused power data is obtained by fusion of multiple types of power data; Performing feature extraction on each of the fused power data in the time series data to obtain a first feature matrix and a second feature matrix; the first feature matrix represents the frequency domain features of the time series data, and the second feature matrix represents the frequency characteristics of the time series data that change with time; Generate a graph structure according to each of the time points, each of the fused power data, the first characteristic matrix, and the second characteristic matrix; The graph structure is input into a trained graph neural network, and the graph neural network performs multi-layer graph convolution operations based on the graph structure, outputs corresponding load decomposition results, and non-intrusive load monitoring of the power grid is performed based on the load decomposition results.
2. The method according to claim 1, characterized in that The feature extraction of each of the fused power data corresponding to each of the time points in the time series data to obtain a first feature matrix and a second feature matrix includes: Performing Fourier transform on each of the fused power data corresponding to each of the time points in the time series data to obtain a frequency domain feature matrix as the first feature matrix; A time series signal corresponding to the time series data is obtained, and a short-time Fourier transform is performed on the time series signal to obtain a short-time Fourier transform feature matrix as the second feature matrix.
3. The method according to claim 1, characterized in that The generating a graph structure according to each of the time points, each of the fused power data, the first characteristic matrix and the second characteristic matrix includes: Determine, according to each load data to be monitored corresponding to each time point, a node set including each node corresponding to each time point; Connecting the nodes at adjacent time points, determining an adjacency matrix according to the connected nodes, and determining an edge set according to the edges between the connected nodes; Determine a node characteristic matrix according to each of the fused power data, the first characteristic matrix and the second characteristic matrix; The graph structure is generated according to the node set, the edge set, the adjacency matrix and the node feature matrix.
4. The method according to claim 3, characterized in that The step of inputting the graph structure into a trained graph neural network, and having the graph neural network perform multi-layer graph convolution operations based on the graph structure and outputting corresponding load decomposition results includes: Inputting the graph structure into a trained graph neural network, and having the graph neural network determine the time association relationship and the device association relationship corresponding to the power grid based on the graph structure; According to the time association relationship and the device association relationship, a multi-layer graph convolution operation is performed on the node feature matrix to obtain an updated node feature matrix; According to the updated node characteristic matrix, the corresponding load decomposition result is output.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Obtain graph structure samples, load decomposition result samples, and graph neural networks to be trained; Inputting the graph structure sample into the graph neural network to be trained, and the graph neural network performs multi-layer graph convolution operations based on the graph structure sample to output corresponding load decomposition prediction results; The load decomposition prediction result and the load decomposition result sample are input into a preset loss function, and the model parameters of the graph neural network are updated by a stochastic gradient descent algorithm according to the output value of the preset loss function until the preset training end condition is met, thereby obtaining a trained graph neural network.
6. The method according to claim 1, characterized in that The obtaining of time series data corresponding to the power grid to be monitored includes: Acquire each active power data, each voltage data, each current data and each reactive power data corresponding to each time point of the power grid to be monitored within a preset time period; Performing multimodal fusion processing on each of the active power data, each of the voltage data, each of the current data and each of the reactive power data to obtain each of the fused power data corresponding to each of the time points; The time series data is obtained according to each of the fused power data.
7. A non-intrusive load monitoring device based on graph neural network, characterized in that: The device comprises: An acquisition module, used to acquire time series data corresponding to the power grid to be monitored; the time series data includes each fused power data corresponding to each time point of the power grid within a preset time period; the fused power data is obtained by fusion of multiple types of power data; An extraction module, used for performing feature extraction on each of the fused power data corresponding to each of the time points in the time series data to obtain a first feature matrix and a second feature matrix; the first feature matrix represents the frequency domain features of the time series data, and the second feature matrix represents the frequency characteristics of the time series data changing with time; A generating module, configured to generate a graph structure according to each of the time points, each of the fused power data, the first characteristic matrix and the second characteristic matrix; A monitoring module is used to input the graph structure into a trained graph neural network, and the graph neural network performs multi-layer graph convolution operations based on the graph structure, outputs corresponding load decomposition results, and performs non-intrusive load monitoring on the power grid based on the load decomposition results.
8. 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 according to any one of claims 1 to 6 are implemented.
9. 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 according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
NAND graph optimization method and device, computer equipment and readable storage medium
CN119720910A
Power grid alarm perception model training method and system based on information fusion
CN119988986A
Non-intrusive load monitoring analysis method, device, equipment and storage medium
CN120638652A