User abnormal electricity consumption identification method and system based on spatio-temporal joint modeling
Through the introduction of time and space combined modeling methods in the traditional abnormal electricity detection method, combined with multiple variable time series correlation learning models and time and space diagram neural network models, the traditional method is solved in capturing the power consumption of different time standards and space dimensions. The lack of behavioral characteristics has achieved more efficient and accurate user electricity abnormal detection.
Patent Information
- Application Number
- CN202411361278.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-28
AI Technical Summary
Traditional abnormal electricity detection methods are difficult to effectively capture the user's electricity usage behavior characteristics under different time scales, and ignore the electricity usage characteristics in the spatial dimension, resulting in insufficient accuracy in identifying abnormalities.
The method based on time and space -based combined modeling is adopted, and the multi -variable time series related learning model, the space -time diagram neural network model and abnormal diagnostic module are coupled to build an abnormal detection coupling model. This model extracts the characteristic information of and fuses the electrical data on the two dimensions of time and space to identify abnormal electricity.
It improves the accuracy and efficiency of user electricity abnormal detection, can effectively capture the electrical behavior characteristics of different time scale and space dimension, and realize early recognition and diagnosis of user abnormal electricity.
Smart Images

Figure CN119377836A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power monitoring, and in particular relates to a method and system for identifying abnormal power consumption by users. Background Art
[0002] With the rapid development and widespread application of smart grid technology, the collection of user power data has become more frequent and comprehensive, which provides rich data resources for in-depth analysis of user power consumption behavior. At the same time, user power consumption behavior is highly complex and diverse, and the power consumption patterns of different users in different time periods may vary greatly. Traditional anomaly detection methods often rely on fixed time windows for analysis, which makes it difficult to effectively capture the characteristics of user power consumption behavior at different time scales.
[0003] In addition, in actual power systems, abnormal power consumption events often do not occur in isolation, but may be clustered in specific areas or time periods; existing methods often ignore power consumption characteristics in the spatial dimension, resulting in insufficient accuracy in identifying anomalies. Summary of the invention
[0004] The present invention provides a method and system for identifying abnormal electricity consumption of users based on spatiotemporal joint modeling, which can assist monitoring personnel in timely discovering abnormal electricity consumption problems, thereby effectively ensuring the safety and stability of the power system.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is: A first aspect of the present invention provides a method for identifying abnormal power consumption of users based on spatiotemporal joint modeling, comprising: Obtaining electricity consumption monitoring data of users in the monitoring area, and inputting the electricity consumption monitoring data into a preset electricity consumption anomaly detection coupling model to obtain abnormal electricity consumption diagnosis results; The construction process of the power consumption anomaly detection coupling model includes: A multivariate time series correlation learning model, a spatiotemporal graph neural network model and an anomaly diagnosis module are coupled to obtain an anomaly detection coupling model for power consumption; the spatiotemporal graph neural network model includes a spatial graph convolution layer, a temporal convolution layer and a prediction head; Obtaining electricity storage data from an electricity information database; preprocessing the electricity storage data and adding real electricity labels to obtain an electricity training data set; The power consumption anomaly detection coupling model is trained using the power consumption training data set to obtain a trained power consumption anomaly detection coupling model.
[0006] Furthermore, the electricity consumption monitoring data includes low-voltage user records, daily electricity consumption, voltage and current data.
[0007] Furthermore, the power consumption anomaly detection coupling model is trained using the power consumption training data set to obtain a trained power consumption anomaly detection coupling model, and the training process includes: A multivariate time series correlation learning model is used to extract the dependency relationship between the power consumption training data to obtain an adjacent matrix; Extracting the temporal correlation features between the power consumption training data in the time dimension through the time convolution layer; inputting the temporal correlation features and the adjacent matrix into the spatial graph convolution layer, performing information transfer in the spatial dimension to obtain the temporal and spatial correlation features of the power consumption training data; outputting the temporal and spatial correlation features to the prediction head to obtain the variable prediction features; The variable prediction features are input into the abnormal diagnosis module to obtain the abnormal power consumption training results; the training loss value is calculated based on the abnormal power consumption training results and the real power consumption label; the parameters of the power consumption anomaly detection coupling model are optimized according to the training loss value, and the training process of the power consumption anomaly detection coupling model is iterated repeatedly until the training loss value converges to obtain the trained power consumption anomaly detection coupling model.
[0008] Furthermore, the process of preprocessing the electricity storage data includes: Find the missing electricity storage data according to the time series, and use the interpolation method to supplement the missing electricity storage data. The expression formula is: ; in, Represented as the i-th electricity storage data, Represents a missing value; It is represented as the supplementary value of the i-th electricity storage data; Correct the abnormal values in the power storage data, and the expression formula is: ; In the formula, Represented as a collection of electricity storage data; The average value of the data set is stored for electricity usage; The standard deviation of the data set stored for electricity usage; It is represented as the correction value of the i-th electricity storage data; The power storage data is normalized and the expression formula is: ; in, is the minimum value in the electricity storage data set, is the maximum value in the electricity storage data set; Represented as the normalized value of the i-th power storage data.
[0009] Furthermore, a multivariate time series correlation learning model is used to extract the dependency relationship between the power consumption training data to obtain an adjacent matrix, and the process includes: The power consumption nodes are constructed according to the number of power users in the time series, and the power consumption training data is embedded into the power consumption nodes to construct the embedding matrix; the adjacent matrix is obtained based on the adjacent embedding matrix calculation, and the expression formula is: ; In the formula, , Extract the feature matrix for the power consumption node; , is the embedding matrix; , is the training parameter matrix; A is the adjacent matrix; is a nonlinear activation function; is the hyperbolic tangent activation function; , They are the feature extraction matrices and feature extraction matrix The transposed matrix of is the nonlinear activation saturation rate.
[0010] Furthermore, the temporal correlation features between the power consumption training data are extracted in the time dimension through the time convolution layer, and the process includes: ; In the formula, Represented as a temporal convolutional layer function; Represented as a filter convolution function; Represented as a gated convolution function; Represented as a linear mapping feature of the electricity usage training data set; Represented as the output features of the temporal convolutional layer function; is the weight matrix of the temporal convolutional layer function; is the weight matrix of the filter convolution function; is the weight matrix of the gated convolution function; is the serial number of the temporal convolution layer and the spatial graph convolution layer in the spatiotemporal graph neural network model; L represents the number of temporal convolution layers and spatial graph convolution layers in the empty graph neural network model; Expressed as element-wise omnidirectional product; The expression formulas of the filtering convolution function and the gated convolution function are: ; In the formula, Represented as dilated convolution, is the hyperbolic tangent activation function It is represented as a logical activation function, n is the filter width, ; The size of the filter convolution function is The convolution kernel, The size of the filter convolution function is The bias term, is the size of the gated convolution function The convolution kernel, is the size of the gated convolution function The bias term.
[0011] Furthermore, the temporal correlation features and the adjacent matrix are input into the spatial graph convolution layer, and information is transferred in the spatial dimension to obtain the temporal and spatial correlation features of the electrical training data. The process includes: ; ; In the formula, Represented as a spatial graph convolutional layer, is expressed as a truncation function, Expressed as the Laplace operator; Expressed as the gating factor, For the The feature selection length of the temporal convolution layer; K is the total propagation depth of the spatial graph convolution layer; k is the propagation depth of the spatial graph convolution layer; Represented as a normalized adjacency matrix; is the input feature of the spatial graph convolution layer, is the propagation feature of the spatial graph convolutional layer; is the output feature of the spatial graph convolution layer.
[0012] Furthermore, the variable prediction features are input into the abnormal diagnosis module to obtain abnormal power consumption training results, and the process includes: The prediction error is calculated based on the variable prediction characteristics and electricity consumption training data. The expression formula is: ; ; In the formula, is the electricity consumption training data at the tth moment; Predicted features of the variables at time t; Training data for electricity usage The absolute value of the prediction error; is the electricity consumption training data at time t The normalized value of the prediction error; and They are expressed as the median and interquartile range of each prediction error; Summarize the prediction errors to obtain the multivariate normalized error , the normalized key error is obtained through PCA principal component analysis , the expression formula is: ; In the formula, It is expressed as the average validation error, L is the principal component dimension, is the orthogonal eigenvector associated with the maximum eigenvalue of the current timestamp; P represents the multivariate normalized error The composition characteristics of Indicates retaining the component features P of the first L dimensions; It means retaining the orthogonal feature vector U of the first L dimensions; t represents the current timestamp; Normalized critical error After denoising, the final anomaly score of the current timestamp can be expressed as: ; In the formula, B(t) is the final anomaly score.
[0013] A second aspect of the present invention provides a user abnormal power consumption identification system based on spatiotemporal joint modeling, comprising: The monitoring unit is used to obtain the power consumption monitoring data of users in the monitoring area, and input the power consumption monitoring data into a preset power consumption anomaly detection coupling model to obtain abnormal power consumption diagnosis results; A model coupling unit, used for coupling a multivariate time series correlation learning model, a spatiotemporal graph neural network model and an anomaly diagnosis module to obtain an anomaly detection coupling model for power consumption; the spatiotemporal graph neural network model includes a spatial graph convolution layer, a temporal convolution layer and a prediction head; An acquisition unit is used to obtain electricity storage data from an electricity information database; pre-process the electricity storage data and add real electricity labels to obtain an electricity training data set; The model training unit trains the power consumption anomaly detection coupling model using the power consumption training data set to obtain the trained power consumption anomaly detection coupling model.
[0014] Furthermore, the model training unit trains the power consumption anomaly detection coupling model using the power consumption training data set to obtain a trained power consumption anomaly detection coupling model, and the training process includes: A multivariate time series correlation learning model is used to extract the dependency relationship between the power consumption training data to obtain an adjacent matrix; Extracting the temporal correlation features between the power consumption training data in the time dimension through the time convolution layer; inputting the temporal correlation features and the adjacent matrix into the spatial graph convolution layer, performing information transfer in the spatial dimension to obtain the temporal and spatial correlation features of the power consumption training data; outputting the temporal and spatial correlation features to the prediction head to obtain the variable prediction features; The variable prediction features are input into the abnormal diagnosis module to obtain the abnormal power consumption training results; the training loss value is calculated based on the abnormal power consumption training results and the real power consumption label; the parameters of the power consumption anomaly detection coupling model are optimized according to the training loss value, and the training process of the power consumption anomaly detection coupling model is iterated repeatedly until the training loss value converges to obtain the trained power consumption anomaly detection coupling model.
[0015] The third aspect of the present invention provides an electronic device, comprising a storage medium and a processor; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the user's abnormal electricity usage identification method described in the first aspect.
[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention inputs electricity consumption monitoring data into a preset electricity consumption anomaly detection coupling model to obtain abnormal electricity consumption diagnosis results; the electricity consumption anomaly detection coupling model includes a multivariate time series correlation learning model, a spatiotemporal graph neural network model and an abnormal diagnosis module; the multivariate time series correlation learning model is used to automatically infer the potential correlation between various user electricity consumption time series, thereby improving recognition efficiency; the spatiotemporal graph neural network model extracts and fuses the characteristic information of user electricity consumption data in two dimensions, time and space, respectively, encodes rich spatial information from the complex pairwise dependencies between different variables, and makes the prediction results more accurate; the abnormal score of abnormal characteristic data is predicted by the abnormal diagnosis module, thereby achieving effective user electricity consumption anomaly detection and diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flow chart of a method for identifying abnormal electricity consumption of a user provided in Example 1 of the present invention; Figure 2 It is a logic diagram of the method for identifying abnormal electricity usage by users provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0018] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0019] Example 1
[0020] like Figure 1 to Figure 2 As shown, this implementation provides a method for identifying abnormal power consumption of users based on spatiotemporal joint modeling, including: The process of building a coupling model for power consumption anomaly detection includes: A multivariate time series correlation learning model, a spatiotemporal graph neural network model and an anomaly diagnosis module are coupled to obtain an anomaly detection coupling model for power consumption; the spatiotemporal graph neural network model includes a spatial graph convolution layer, a temporal convolution layer and a prediction head; The electricity storage data is obtained from the electricity information database; the process of preprocessing the electricity storage data includes: Find the missing electricity storage data according to the time series, and use the interpolation method to supplement the missing electricity storage data. The expression formula is: ; in, Represented as the i-th electricity storage data, Represents a missing value; It is represented as the supplementary value of the i-th electricity storage data; Correct the abnormal values in the power storage data, and the expression formula is: ; In the formula, Represented as a collection of electricity storage data; The average value of the data set is stored for electricity usage; The standard deviation of the data set stored for electricity usage; It is represented as the correction value of the i-th electricity storage data; The power storage data is normalized and the expression formula is: ; in, is the minimum value in the electricity storage data set, is the maximum value in the electricity storage data set; Represented as the normalized value of the i-th power storage data.
[0021] After preprocessing the electricity storage data, add the real electricity label to obtain the electricity training data set; use the electricity training data set to train the power anomaly detection coupling model to obtain the trained power anomaly detection coupling model, and the training process includes: (1) A multivariate time series correlation learning model is used to extract the dependency relationship between the power consumption training data to obtain an adjacent matrix, the process comprising: The power consumption nodes are constructed according to the number of power users in the time series, and the power consumption training data is embedded into the power consumption nodes to construct the embedding matrix; the adjacent matrix is obtained based on the adjacent embedding matrix calculation, and the expression formula is: ; In the formula, , Extract the feature matrix for the power consumption node; , is the embedding matrix; , is the training parameter matrix; A is the adjacent matrix; is a nonlinear activation function; is the hyperbolic tangent activation function; , They are the feature extraction matrices and feature extraction matrix The transposed matrix of is the nonlinear activation saturation rate.
[0022] In order to reduce the computational cost and optimization difficulty, only the nodes with the greatest correlation to each user node are retained. s neighboring nodes, so that the sparsity of A depends only on the hyperparameter s The specific process can be expressed by the formula: ; In the formula, It is represented by the first s index values with the largest weight associated with user node m; Represented as an index function that returns the maximum value; It is represented by setting the adjacency matrix elements corresponding to the index of the mth user node that do not belong to the first s nearest neighbor nodes to 0; Represented as the corresponding input vector of the mth user node in the neighbor matrix A.
[0023] (2) extracting the temporal correlation features between the power consumption training data in the time dimension through the time convolution layer, the process includes: ; In the formula, Represented as a temporal convolutional layer function; Represented as a filter convolution function; Represented as a gated convolution function; Represented as a linear mapping feature of the electricity usage training data set; Represented as the output features of the temporal convolutional layer function; is the weight matrix of the temporal convolutional layer function; is the weight matrix of the filter convolution function; is the weight matrix of the gated convolution function; is the serial number of the temporal convolution layer and the spatial graph convolution layer in the spatiotemporal graph neural network model; L represents the number of temporal convolution layers and spatial graph convolution layers in the empty graph neural network model; Expressed as element-wise omnidirectional product; The expression formulas of the filtering convolution function and the gated convolution function are: ; In the formula, Represented as dilated convolution, is the hyperbolic tangent activation function It is represented as a logical activation function, n is the filter width, ; is the size of the filter convolution function The convolution kernel, is the size of the filter convolution function The bias term, is the size of the gated convolution function The convolution kernel, is the size of the gated convolution function The bias term.
[0024] The temporal correlation features and the adjacent matrix are input into the spatial graph convolution layer, and information is transferred in the spatial dimension to obtain the temporal and spatial correlation features of the electrical training data. The process includes: ; ; In the formula, Represented as a spatial graph convolutional layer, is expressed as a truncation function, Expressed as the Laplace operator; Expressed as the gating factor, For the The feature selection length of the temporal convolution layer; K is the total propagation depth of the spatial graph convolution layer; k is the propagation depth of the spatial graph convolution layer; Represented as a normalized adjacency matrix; is the input feature of the spatial graph convolution layer, is the propagation feature of the spatial graph convolutional layer; is the output feature of the spatial graph convolution layer.
[0025] The spatiotemporal correlation features are output to the prediction head to obtain variable prediction features.
[0026] (3) Inputting the variable prediction features into the abnormal diagnosis module to obtain abnormal power consumption training results, the process includes: The prediction error is calculated based on the variable prediction characteristics and electricity consumption training data. The expression formula is: ; ; In the formula, is the electricity consumption training data at the tth moment; Predicted features for the variables at time t; Training data for electricity usage The absolute value of the prediction error; is the electricity consumption training data at time t The normalized value of the prediction error; and They are expressed as the median and interquartile range of each prediction error; Summarize the prediction errors to obtain the multivariate normalized error , the normalized key error is obtained through PCA principal component analysis , the expression formula is: ; In the formula, It is expressed as the average validation error, L is the principal component dimension, is the orthogonal eigenvector associated with the maximum eigenvalue of the current timestamp; P represents the multivariate normalized error The composition characteristics of Indicates that the component features P of the first L dimensions are retained; It means retaining the orthogonal feature vector U of the first L dimensions; t represents the current timestamp; Normalized critical error After denoising, the final anomaly score of the current timestamp can be expressed as: ; In the formula, B(t) is the final anomaly score, which is the abnormal power consumption training result.
[0027] The training loss value is calculated based on the abnormal power consumption training results and the actual power consumption labels; the parameters of the power consumption anomaly detection coupling model are optimized based on the training loss value, and the training process of the power consumption anomaly detection coupling model is iterated repeatedly until the training loss value converges to obtain the trained power consumption anomaly detection coupling model.
[0028] The electricity consumption monitoring data of users in the monitoring area is obtained, and the electricity consumption monitoring data is input into a preset electricity consumption anomaly detection coupling model to obtain abnormal electricity consumption diagnosis results; the electricity consumption monitoring data includes low-voltage user records, daily electricity consumption, voltage and current data; through the complementarity of information in data of different dimensions, the accuracy of abnormal electricity user detection is improved.
[0029] The multivariate time series correlation learning model of this embodiment is used to automatically infer the potential correlation between various user electricity consumption time series, thereby improving the recognition efficiency; the spatiotemporal graph neural network model extracts and fuses the characteristic information of user electricity consumption data in the two dimensions of time and space, respectively, and encodes rich spatial information from the complex pairwise dependencies between different variables, making the prediction results more accurate; the abnormal score of abnormal feature data is predicted by the abnormal diagnosis module, thereby achieving effective detection and diagnosis of user electricity consumption anomalies.
[0030] Example 2 This embodiment provides a user abnormal power usage identification system based on spatiotemporal joint modeling. The user abnormal power usage identification system is used to execute the user abnormal power usage identification method described in Example 1. The user abnormal power usage identification system includes: The monitoring unit is used to obtain the power consumption monitoring data of users in the monitoring area, and input the power consumption monitoring data into a preset power consumption anomaly detection coupling model to obtain abnormal power consumption diagnosis results; A model coupling unit, used for coupling a multivariate time series correlation learning model, a spatiotemporal graph neural network model and an anomaly diagnosis module to obtain an anomaly detection coupling model for power consumption; the spatiotemporal graph neural network model includes a spatial graph convolution layer, a temporal convolution layer and a prediction head; An acquisition unit is used to obtain electricity storage data from an electricity information database; pre-process the electricity storage data and add real electricity labels to obtain an electricity training data set; The model training unit trains the power consumption anomaly detection coupling model using the power consumption training data set to obtain the trained power consumption anomaly detection coupling model.
[0031] The model training unit trains the power consumption anomaly detection coupling model using the power consumption training data set to obtain a trained power consumption anomaly detection coupling model, and the training process includes: A multivariate time series correlation learning model is used to extract the dependency relationship between the power consumption training data to obtain an adjacent matrix; Extracting the temporal correlation features between the power consumption training data in the time dimension through the time convolution layer; inputting the temporal correlation features and the adjacent matrix into the spatial graph convolution layer, performing information transfer in the spatial dimension to obtain the temporal and spatial correlation features of the power consumption training data; outputting the temporal and spatial correlation features to the prediction head to obtain the variable prediction features; The variable prediction features are input into the abnormal diagnosis module to obtain the abnormal power consumption training results; the training loss value is calculated based on the abnormal power consumption training results and the real power consumption label; the parameters of the power consumption anomaly detection coupling model are optimized according to the training loss value, and the training process of the power consumption anomaly detection coupling model is iterated repeatedly until the training loss value converges to obtain the trained power consumption anomaly detection coupling model.
[0032] Example 3 This embodiment provides an electronic device, including a storage medium and a processor; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the user's abnormal electricity usage identification method described in Example 1.
[0033] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, etc.) containing computer-usable program code. M , optical storage, etc.).
[0034] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0035] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0036] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0037] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for identifying abnormal power consumption of users based on spatiotemporal joint modeling, characterized in that: include: Obtaining electricity consumption monitoring data of users in the monitoring area, and inputting the electricity consumption monitoring data into a preset electricity consumption anomaly detection coupling model to obtain abnormal electricity consumption diagnosis results; The construction process of the power consumption anomaly detection coupling model includes: A multivariate time series correlation learning model, a spatiotemporal graph neural network model and an anomaly diagnosis module are coupled to obtain an anomaly detection coupling model for power consumption; the spatiotemporal graph neural network model includes a spatial graph convolution layer, a temporal convolution layer and a prediction head; Obtaining electricity storage data from an electricity information database; preprocessing the electricity storage data and adding real electricity labels to obtain an electricity training data set; The power consumption anomaly detection coupling model is trained using the power consumption training data set to obtain a trained power consumption anomaly detection coupling model.
2. The method for identifying abnormal electricity consumption of a user according to claim 1, characterized in that: include: The power consumption anomaly detection coupling model is trained using the power consumption training data set to obtain a trained power consumption anomaly detection coupling model. The training process includes: A multivariate time series correlation learning model is used to extract the dependency relationship between the power consumption training data to obtain an adjacent matrix; Extracting the temporal correlation features between the power consumption training data in the time dimension through the time convolution layer; inputting the temporal correlation features and the adjacent matrix into the spatial graph convolution layer, performing information transfer in the spatial dimension to obtain the temporal and spatial correlation features of the power consumption training data; outputting the temporal and spatial correlation features to the prediction head to obtain the variable prediction features; The variable prediction features are input into the abnormal diagnosis module to obtain the abnormal power consumption training results; the training loss value is calculated based on the abnormal power consumption training results and the real power consumption label; the parameters of the power consumption anomaly detection coupling model are optimized according to the training loss value, and the training process of the power consumption anomaly detection coupling model is iterated repeatedly until the training loss value converges to obtain the trained power consumption anomaly detection coupling model.
3. The method for identifying abnormal electricity consumption of a user according to claim 2, characterized in that: include: The process of preprocessing electricity storage data includes: Find the missing electricity storage data according to the time series, and use the interpolation method to supplement the missing electricity storage data. The expression formula is: ; in, Represented as the i-th electricity storage data, Represents a missing value; It is represented as the supplementary value of the i-th electricity storage data; Correct the abnormal values in the power storage data, and the expression formula is: ; In the formula, Represented as a collection of electricity storage data; The average value of the data set is stored for electricity usage; The standard deviation of the data set stored for electricity usage; It is represented as the correction value of the i-th electricity storage data; The power storage data is normalized and the expression formula is: ; in, is the minimum value in the electricity storage data set, is the maximum value in the electricity storage data set; Represented as the normalized value of the i-th power storage data.
4. The method for identifying abnormal electricity consumption of a user according to claim 2, characterized in that: include: A multivariate time series correlation learning model is used to extract the dependency relationship between the power consumption training data to obtain an adjacent matrix, and the process includes: The power consumption nodes are constructed according to the number of power users in the time series, and the power consumption training data is embedded into the power consumption nodes to construct the embedding matrix; the adjacent matrix is obtained based on the adjacent embedding matrix calculation, and the expression formula is: ; In the formula, , Extract the feature matrix for the power consumption node; , is the embedding matrix; , is the training parameter matrix; A is the adjacent matrix; is a nonlinear activation function; is the hyperbolic tangent activation function; , They are the feature extraction matrices and feature extraction matrix The transposed matrix of is the nonlinear activation saturation rate.
5. The method for identifying abnormal electricity consumption of a user according to claim 2, characterized in that: The temporal correlation features between the power consumption training data are extracted in the time dimension through the time convolution layer, and the process includes: ; In the formula, Represented as a temporal convolutional layer function; Represented as a filter convolution function; Represented as a gated convolution function; Represented as a linear mapping feature of the electricity usage training data set; Represented as the output features of the temporal convolutional layer function; is the weight matrix of the temporal convolutional layer function; is the weight matrix of the filter convolution function; is the weight matrix of the gated convolution function; is the serial number of the temporal convolution layer and the spatial graph convolution layer in the spatiotemporal graph neural network model; L represents the number of temporal convolution layers and spatial graph convolution layers in the empty graph neural network model; Expressed as element-wise omnidirectional product; The expression formulas of the filtering convolution function and the gated convolution function are: ; In the formula, Represented as dilated convolution, is the hyperbolic tangent activation function It is represented as a logical activation function, n is the filter width, ; The size of the filter convolution function is The convolution kernel, The size of the filter convolution function is The bias term, is the size of the gated convolution function The convolution kernel, is the size of the gated convolution function The bias term.
6. The method for identifying abnormal electricity consumption of a user according to claim 5, characterized in that: The temporal correlation features and the adjacent matrix are input into the spatial graph convolution layer, and information is transferred in the spatial dimension to obtain the temporal and spatial correlation features of the electrical training data. The process includes: ; ; In the formula, Represented as a spatial graph convolutional layer, is expressed as a truncation function, Expressed as the Laplace operator; Expressed as the gating factor, For the The feature selection length of the temporal convolution layer; K is the total propagation depth of the spatial graph convolution layer; k is the propagation depth of the spatial graph convolution layer; Represented as a normalized adjacency matrix; is the input feature of the spatial graph convolution layer, is the propagation feature of the spatial graph convolutional layer; is the output feature of the spatial graph convolution layer.
7. The method for identifying abnormal electricity consumption of a user according to claim 2, characterized in that: The variable prediction features are input into the abnormal diagnosis module to obtain abnormal power consumption training results. The process includes: The prediction error is calculated based on the variable prediction characteristics and electricity consumption training data. The expression formula is: ; ; In the formula, is the electricity consumption training data at the tth moment; Predicted features of the variables at time t; Training data for electricity usage The absolute value of the prediction error; is the electricity consumption training data at time t The normalized value of the prediction error; and They are expressed as the median and interquartile range of each prediction error; Summarize the prediction errors to obtain the multivariate normalized error , the normalized key error is obtained through PCA principal component analysis , the expression formula is: ; In the formula, It is expressed as the average validation error, L is the principal component dimension, is the orthogonal eigenvector associated with the maximum eigenvalue of the current timestamp; P represents the multivariate normalized error The composition characteristics of Indicates retaining the component features P of the first L dimensions; It means retaining the orthogonal feature vector U of the first L dimensions; t represents the current timestamp; Normalized critical error After denoising, the final anomaly score of the current timestamp can be expressed as: ; In the formula, B(t) is the final anomaly score.
8. A user abnormal electricity consumption identification system based on spatiotemporal joint modeling, characterized in that: include: The monitoring unit is used to obtain the power consumption monitoring data of users in the monitoring area, and input the power consumption monitoring data into a preset power consumption anomaly detection coupling model to obtain abnormal power consumption diagnosis results; A model coupling unit, used for coupling a multivariate time series correlation learning model, a spatiotemporal graph neural network model and an anomaly diagnosis module to obtain an anomaly detection coupling model for power consumption; the spatiotemporal graph neural network model includes a spatial graph convolution layer, a temporal convolution layer and a prediction head; An acquisition unit is used to obtain electricity storage data from an electricity information database; pre-process the electricity storage data and add real electricity labels to obtain an electricity training data set; The model training unit trains the power consumption anomaly detection coupling model using the power consumption training data set to obtain the trained power consumption anomaly detection coupling model.
9. The user abnormal electricity usage identification system according to claim 8, characterized in that: The model training unit trains the power consumption anomaly detection coupling model using the power consumption training data set to obtain a trained power consumption anomaly detection coupling model, and the training process includes: A multivariate time series correlation learning model is used to extract the dependency relationship between the power consumption training data to obtain an adjacent matrix; Extracting the temporal correlation features between the power consumption training data in the time dimension through the time convolution layer; inputting the temporal correlation features and the adjacent matrix into the spatial graph convolution layer, performing information transfer in the spatial dimension to obtain the temporal and spatial correlation features of the power consumption training data; outputting the temporal and spatial correlation features to the prediction head to obtain the variable prediction features; The variable prediction features are input into the abnormal diagnosis module to obtain the abnormal power consumption training results; the training loss value is calculated based on the abnormal power consumption training results and the real power consumption label; the parameters of the power consumption anomaly detection coupling model are optimized according to the training loss value, and the training process of the power consumption anomaly detection coupling model is iterated repeatedly until the training loss value converges to obtain the trained power consumption anomaly detection coupling model.
10. An electronic device comprising a storage medium and a processor; the storage medium is used to store instructions; characterized in that: The processor is used to operate according to the instructions to execute the method for identifying abnormal electricity usage by a user as described in any one of claims 1 to claim 7.
Citation Information
Cited By
GNN-based charging pile electricity utilization abnormal behavior identification method and system
CN119848750A
GNN-based Charging Pile Abnormal Power Consumption Behavior Recognition Method and System
CN119848750B
Action anomaly detection method and system, terminal and storage medium
CN120279601A
Method for identifying abnormal power consumption behavior of charging pile based on deep learning
CN120654098A
A deep learning-based charging pile abnormal electricity use behavior identification method
CN120654098B