GNN-based charging pile electricity utilization abnormal behavior identification method and system
Through the GNN-based method, the electricity graph for charging piles is constructed and high-dimensional features are extracted, and abnormal detection is performed in combination with the bidirectional long and short-term memory network. The problem of difficulty in identifying complex electricity usage patterns in the existing technology is solved, and the accurate identification and classification of the electricity usage behavior of charging piles is achieved, and the level of power management is improved.
Patent Information
- Application Number
- CN202510337823.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-03-21
Smart Images

Figure CN119848750A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of charging pile power consumption analysis, and in particular to a GNN-based charging pile power consumption abnormal behavior identification method and system. Background Art
[0002] With the popularity of electric vehicles, the use of residential charging piles is increasing, and the monitoring of charging pile power consumption has become an important part of power management. Existing technologies have difficulty in identifying complex power consumption patterns in terms of abnormal power consumption behavior. The ability to identify complex power consumption patterns is insufficient, and it is impossible to effectively distinguish between normal and abnormal power consumption behaviors, resulting in a waste of power resources and an increase in safety hazards.
[0003] Therefore, there is an urgent need for a method that can effectively identify abnormal power usage behavior of charging piles to address the shortcomings of existing technologies and improve the level of power management. Summary of the invention
[0004] The purpose of this application is to overcome the defects of the prior art and provide a method and system for identifying abnormal electricity consumption behavior of charging piles based on GNN.
[0005] In a first aspect, the present application provides a method for identifying abnormal electricity consumption behavior of a charging pile based on GNN, comprising the following steps: Obtain the user's charging pile historical electricity consumption data and user information; Constructing an electricity consumption diagram based on the historical electricity consumption data of the charging pile and user information; Using the trained GNN model to extract features from the electricity consumption graph to obtain high-dimensional features; Obtaining historical time series electricity consumption data based on the charging pile historical electricity consumption data or the electricity consumption graph; Combining the high-dimensional features with the historical time series electricity consumption data to form a first input sequence, and training and optimizing a bidirectional long short-term memory network based on the first input sequence; Obtain real-time power consumption data of users’ charging piles; Obtaining a second input sequence based on the real-time power consumption data of the charging pile; The second input sequence is input into the trained and optimized bidirectional long short-term memory network to perform abnormal detection on the user's charging pile electricity usage behavior to obtain the user's charging pile electricity usage abnormal behavior type.
[0006] Optionally, the acquired charging pile historical power consumption data includes charging pile historical power consumption data of multiple users, and the acquired user information includes multiple user information corresponding to the charging piles; and constructing a power consumption graph based on the charging pile historical power consumption data includes: Treat each user as a node; Obtaining similarities between adjacent users; Establish edges between adjacent users whose similarity is greater than a preset threshold to obtain an initial electricity usage graph; The features of each of the nodes in the initial electricity consumption graph are standardized, and the edges are thinned to obtain the electricity consumption graph.
[0007] Optionally, the formula for obtaining the similarity between adjacent users is as follows: in, is the power consumption of the first user’s charging pile at time t, is the power consumption of the charging pile of the second user adjacent to the first user at time t, and n is the total number of time periods.
[0008] Optionally, the using a trained GNN model to perform feature extraction on the electricity consumption graph to obtain high-dimensional features includes: Provide a trained GNN model; Based on the electricity consumption graph, the characteristics of each node are obtained; the characteristics of the node are input into the trained GNN model for feature aggregation to obtain high-dimensional features of all nodes.
[0009] Optionally, combining the high-dimensional features with the historical time series electricity consumption data to form a first input sequence, and training and optimizing a bidirectional long short-term memory network based on the first input sequence includes: Combining the high-dimensional features with the historical time series electricity consumption data of the user to form the first input sequence; Set label data; Construct an initial bidirectional long short-term memory network; Using the first input sequence to train the initial bidirectional long short-term memory network, and using a loss function to optimize the trained initial bidirectional long short-term memory network; Using an indicator evaluation model to evaluate the performance of the initial bidirectional long short-term memory network after training and optimization; The network parameters are adjusted according to the evaluation results to obtain a bidirectional long short-term memory network.
[0010] Optionally, before using the first input sequence to train the initial bidirectional long short-term memory network, it also includes constructing a data set, and the constructing of the data set includes: dividing the first input sequence into a training set, a test set and a validation set.
[0011] Optionally, constructing the initial bidirectional long short-term memory network includes: adding a Dropout layer after each layer of the basic bidirectional long short-term memory network.
[0012] Optionally, the step of inputting the second input sequence into the trained and optimized bidirectional long short-term memory network to perform abnormal detection on the charging pile electricity usage behavior of the user to obtain the abnormal charging pile electricity usage behavior type of the user includes: Inputting the second input sequence into the trained and optimized bidirectional long short-term memory network for anomaly detection to obtain a probability distribution value; The probability distribution value is compared with a preset threshold value to obtain the abnormal charging pile electricity usage behavior type of the user.
[0013] Optionally, the types of abnormal electricity usage behaviors of the user's charging pile include: no problem with the charging pile, multiple cars charging, the charging pile converted to household electricity, the charging pile converted to commercial electricity, and the charging pile suspected of stealing electricity.
[0014] In the second aspect, the present application also provides a GNN-based charging pile power consumption abnormal behavior recognition system, including: A data collection module is used to obtain the user's charging pile historical power consumption data, user information and the user's charging pile real-time power consumption data; A preprocessing module, used to construct an electricity consumption diagram based on the historical electricity consumption data of the charging pile and user information; A high-dimensional feature acquisition module, used for extracting features from the electricity consumption graph based on a GNN module to obtain high-dimensional features; A training module, configured to obtain the historical time series electricity consumption data of the user based on the historical electricity consumption data of the charging pile or the electricity consumption graph, combine the high-dimensional features with the historical time series electricity consumption data to form a first input sequence, and train and optimize the bidirectional long short-term memory network based on the first input sequence; The anomaly identification module is used to obtain a second input sequence based on the real-time power consumption data of the charging pile; the second input sequence is input into a trained and optimized bidirectional long short-term memory network to perform anomaly detection on the user's charging pile power consumption behavior to obtain the user's charging pile power consumption abnormal behavior type.
[0015] The present application provides a GNN-based charging pile power consumption abnormal behavior identification method and system, which constructs a power consumption graph through the historical power consumption data of the charging pile and user information, obtains high-dimensional features through the GNN model, trains and optimizes the bidirectional long short-term memory network to more comprehensively capture the temporal dependencies in the time series data, and inputs the second input sequence obtained based on the real-time power consumption data of the charging pile into the trained bidirectional long short-term memory network to perform abnormal detection on the user's charging pile power consumption behavior, thereby achieving effective identification and classification of the user's charging pile power consumption abnormal behavior type, being able to accurately identify abnormal behavior under complex power consumption patterns, and effectively distinguish between normal and abnormal power consumption situations, which helps to improve the level of power management, reduce the waste of power resources, reduce safety hazards, and ensure the stable operation of the power system.
[0016] In order to make the above features and advantages of the invention more obvious and easy to understand, embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is a flowchart of a method for identifying abnormal electricity consumption behavior of charging piles based on GNN provided in one embodiment of the present application.
[0019] Figure 2 This is a flowchart of step S50 in the GNN-based charging pile power consumption abnormal behavior identification method provided in one embodiment of the present application.
[0020] Figure 3 This is a schematic diagram of the structure of a GNN-based charging pile power consumption abnormal behavior identification system provided in another embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose and technical solution of the embodiment of the present application clearer, the technical solution of the embodiment of the present application will be clearly and completely described in conjunction with the drawings of the embodiment of the present application. Obviously, the described embodiment is a part of the embodiment of the present application, not all of the embodiments. Based on the described embodiment of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] In one embodiment, see Figure 1The present application provides a method for identifying abnormal electricity consumption behavior of a charging pile based on GNN (Graph Neural Network). The method for identifying abnormal electricity consumption behavior of a charging pile based on GNN may include the following steps: S10~S80.
[0023] S10: Obtain the user's charging pile historical power consumption data and user information.
[0024] S20: Constructing an electricity consumption graph based on the historical electricity consumption data of the charging pile and the user information.
[0025] S30: Use the pre-trained GNN model to extract features from the electricity consumption graph to obtain high-dimensional features.
[0026] S40: Obtaining historical time series power consumption data based on the historical power consumption data of the charging pile or the power consumption graph.
[0027] S50: combining the high-dimensional features with the historical time series electricity consumption data to form a first input sequence, and training and optimizing the bidirectional long short-term memory network based on the first input sequence.
[0028] S60: Obtain the real-time power consumption data of the user's charging pile.
[0029] S70: Obtain a second input sequence based on the real-time power consumption data of the charging pile.
[0030] S80: Input the second input sequence into the trained and optimized bidirectional long short-term memory network to perform abnormal detection on the user's charging pile power usage behavior to obtain the user's charging pile power usage abnormal behavior type.
[0031] In the GNN-based charging pile power consumption abnormal behavior identification method of the present application, the power consumption graph is constructed through the charging pile historical power consumption data and power consumption information; the GNN model is used to extract high-dimensional features and combined with historical time series data to train and optimize the bidirectional long short-term memory network; the second input sequence obtained based on the real-time power consumption data of the charging pile is input into the trained bidirectional long short-term memory model to detect abnormalities in the user's charging pile power consumption behavior. The method of the present application can deeply mine the power consumption data characteristics, accurately identify the abnormal power consumption behavior of the charging pile, effectively distinguish between normal and abnormal power consumption, and solve the problem of complex power consumption pattern identification; it can improve the level of power management, reduce the waste of power resources, reduce safety hazards, ensure the stable operation of the power system, enhance the power management department's ability to control the power consumption of charging piles, timely discover and handle abnormal situations, improve the safety and rationality of power consumption, adapt to the needs of refined development of power management, and help build an efficient and intelligent power management system.
[0032] In step S10, refer to Figure 1In step S10, the user's charging pile historical power consumption data and user information are obtained.
[0033] As an example, the user's charging pile historical electricity consumption data can be obtained from the power company's database, charging pile operation management platform, charging pile smart meter and other equipment.
[0034] As an example, the historical power consumption data of the user's charging pile may include 96-point load data, as well as power consumption data such as voltage, current, function, etc. Among them, the 96-point load data may reflect the power consumption and power consumption time per hour.
[0035] As an example, the abnormal type can be further analyzed based on the 96-point curve of electric energy indication. "96-point load" usually refers to the power load data corresponding to each time point in the power system, which divides a day (24 hours) into 96 time points. The load data is collected every 15 minutes, so 96 data points will be obtained in a day, which reflect the power load situation at different times of the day. The 96-point curve can show the changing rules and fluctuations of the power load in a day in more detail. For example, by analyzing the 96-point curve, you can find the peak and valley periods of power consumption in a day.
[0036] The user information of the user who installed the charging pile can be obtained by registering. Of course, in other examples, other methods of obtaining user information can also be used to obtain the user information corresponding to the charging pile; the user information may include: user ID, the number of other rechargeable means of transportation of the user, the type of other rechargeable means of transportation of the user and the real estate information of the user (used to indicate whether the user owns real estate and shops, such as renting a house, renting a shop, owning real estate, owning a shop, etc.).
[0037] As an example, assuming that electricity consumption data is collected for a month, the data table may include: user ID, electricity consumption time, electricity consumption, number of vehicles, and property information. Among them, the user ID is used to uniquely identify each user; the electricity consumption time can record the specific time of electricity consumption (such as 2023-10-01 19:00); the electricity consumption represents the electricity consumption within the time period (such as 5 kWh); the number of vehicles represents the number of other rechargeable vehicles owned by the user and his family. These data help to more comprehensively understand the user's electricity consumption behavior and help to discover potential abnormal changes in advance. They are the cornerstones for subsequent construction of graph structures, analysis of user electricity consumption behavior patterns, and training models.
[0038] In step S20, refer to Figure 1 In step S20, a power consumption diagram is constructed based on the historical power consumption data of the charging pile and the user information.
[0039] As an example, step S20 may include the following steps: S201 to S204.
[0040] S201: Take each user as a node.
[0041] S202: Obtain similarities between adjacent users.
[0042] S203: Establishing edges between adjacent users whose similarity is greater than a preset threshold to obtain an initial electricity usage graph.
[0043] S204: Standardize the features of each node in the initial electricity consumption graph and perform sparse processing on the edges to obtain the electricity consumption graph.
[0044] As an example, in step S201, each user can be regarded as a node in the power consumption graph, and the edges between nodes represent the similarities between users, for example, close geographical locations, similar power consumption patterns, etc. Each node may include the user information of the user and the historical power consumption data of the user's charging pile, for example, the historical power consumption data of the user's charging pile, the peak power consumption of the user's charging pile, and the user's real estate information, etc.; the historical power consumption data of the user's charging pile is the power consumption sequence in the past period of time; the peak power consumption is the maximum power consumption of the user's charging pile within a specific time; the real estate information is whether the user owns real estate and shops.
[0045] As an example, in step S202, the similarity between users can be calculated using methods such as Euclidean distance or cosine similarity. For example, for the power usage pattern of the charging pile of the first user A and the power usage pattern of the charging pile of the adjacent second user B, the similarity of power usage between the adjacent charging piles of the first user A and the second user B can be calculated using the following formula: in, is the power consumption of the charging pile of the first user A at time t, is the power consumption of the charging pile of the second user B at time t, and n is the total number of time periods.
[0046] As an example, in step S203, when the similarity between two nodes exceeds a preset threshold (for example, the threshold may be but is not limited to 0.8), an edge is established between the two nodes to form an initial electricity consumption graph.
[0047] As an example, in step S204, the features of each node in the initial power consumption graph may be standardized so that its mean is 0 and its variance is 1. The standardization formula may be expressed as follows: in, is the original feature, is the mean of the original features, is the standard deviation of the original feature, are the standardized features.
[0048] As an example, the edges can be sparsely processed to remove the edges with smaller weights among all the edges to reduce the computational complexity and retain the important connection relationships, and finally obtain the preprocessed electricity consumption diagram data.
[0049] In an example, assuming there are three users (first user A, second user B, third user C), the power usage data and user information of their charging piles are as follows: Among them, the first user A, the second user B and the third user C are three nodes respectively, then the power consumption sequence of the charging pile of the first user A is [5], and the power consumption sequence of the charging pile of the second user B is [4.5]. First, it can be calculated that the similarity between the two nodes A and B is 0.99, which is greater than the preset threshold (such as 0.8), so an edge is established between the two nodes A and B. From the historical power consumption data of the charging pile, the feature of the first user A can be obtained as [5, 3], that is, the historical power consumption of the charging pile and the number of vehicles of the first user A, the feature of the second user B is [4.5, 2], and the feature of the third user C is [6, 1]. The features are further standardized to obtain the standardized feature values. The standardized feature values of all users are combined with the sparse edges to obtain the power consumption graph of the preprocessed user power consumption data.
[0050] In step S30, refer to Figure 1 In step S30, the pre-trained GNN model is used to extract features from the electricity consumption graph to obtain high-dimensional features.
[0051] As an example, step S30 may include the following steps: S301~S302.
[0052] S301: Provide a trained GNN model.
[0053] S302: Based on the electricity consumption graph, the features of each node are obtained; the features of the nodes are input into the trained GNN model for feature aggregation to obtain high-dimensional features of all nodes.
[0054] As an example, in step S301, the training method of the GNN model is known to those skilled in the art and will not be described again here.
[0055] As an example, in step S302, based on the electricity consumption graph, the electricity consumption graph may include nodes and edges between nodes, and the weight of the edge represents the similarity between users; the features of each node may be obtained based on the electricity consumption graph. The feature vector of the user node is input into the trained GNN model for feature aggregation to obtain high-dimensional features of all nodes.
[0056] As an example, the feature vector of each user node may include information such as the user's charging pile historical power consumption, the user's property information, the user's charging pile power consumption peak, etc. For example, the feature vector of the first user A may be: Among them, 5 represents historical electricity consumption, 3 represents the number of vehicles, 1 represents real estate information (such as renting a house), and 0 represents peak electricity consumption.
[0057] As an example, the above feature vector is input into the GNN model via the input layer.
[0058] As an example, the information of neighbor nodes is aggregated through the graph convolution layer of the GNN model. Assume that Layer graph convolution, the output features of each layer can be obtained by the following formula: in, Is a node In the The feature representation of the layer, Neighbor node In the feature representation of the k-1th layer, Is a node The set of neighbor nodes of is the normalized coefficient of the edge, It is The weight matrix of the layer, It is The bias of the layer, is the activation function.
[0059] As an example, the activation function It may include Tanh (hyperbolic tangent function), ReLU (linear rectification function, also known as corrected linear unit), Leaky ReLU (corrected linear unit with leakage), PreLU (parametric linear rectification function), etc.
[0060] As an example, in each layer of graph convolution, the feature representation of the node is enhanced by aggregating the information of neighboring nodes. Through multi-layer feature aggregation, the features of the node will gradually contain more contextual information. For example, the features of the first user A after two layers of graph convolution can become: , which means that the features of the first user A have been integrated with the information of its neighboring nodes. After multiple layers of graph convolution, a high-dimensional feature representation of the node corresponding to each user can be obtained.
[0061] In another example, suppose there are three users (first user A, second user B, third user C), and the feature vector of first user A is , the feature vector of the second user B is , the feature vector of the third user C is In the first layer of graph convolution, assuming that the neighbors of the first user A are the second user B and the third user C, the aggregated features of the first user A can be expressed by the following formula: in, is the feature representation of node A (i.e. the node corresponding to the first user A) at layer 1, is the feature representation of node B (the node corresponding to the second user B) at layer 0, is the feature representation of node C (the node corresponding to the third user C) at layer 0, is the weight matrix of layer 1, is the bias of layer 1, is the activation function. In the second layer of graph convolution, the updated features are further aggregated, and the high-dimensional features of the first user A are finally obtained as follows: in, is the feature representation of node A at layer 2, Is a node u (It can be the node corresponding to the second customer B or the node corresponding to the third customer C) The feature representation at the first layer, is the weight matrix of layer 2, is the bias of layer 2, is the activation function, It is node A and node u The normalized coefficients of the edges can be referred to the above steps to obtain the high-dimensional features of all user nodes. Through multi-layer graph convolution, the information of nodes and edges in the graph is effectively utilized to extract more global dependency information, local information and high-dimensional features, which can more accurately reflect the characteristics of user electricity consumption behavior, make it easier to discover detailed features, facilitate subsequent refined classification, and provide powerful feature representation for classification.
[0062] In step S40, refer to Figure 1 In step S40, historical time series power consumption data is obtained based on the historical power consumption data or power consumption diagram of the charging pile.
[0063] In one example, the standardized electricity consumption graph can be converted into historical time series electricity consumption data using methods such as depth-first search (DFS), breadth-first search (BFS), degree-based sorting, eigenvector centrality sorting, Node2Vec, and DeepWalk.
[0064] In one example, the historical event sequence power consumption data may also be directly obtained based on the historical power consumption data of the charging pile.
[0065] In step S50, refer to Figure 1 In step S50, the high-dimensional features are combined with the historical time series electricity consumption data to form a first input sequence, and a bidirectional long short-term memory network is trained and optimized based on the first input sequence.
[0066] As an example, see Figure 2 , step S50 may include the following steps: S501~S506.
[0067] S501: Combine high-dimensional features with historical time series electricity consumption data to form a first input sequence.
[0068] S502: Setting label data.
[0069] S503: Construct an initial bidirectional long short-term memory network.
[0070] S504: Use the first input sequence to train an initial bidirectional long short-term memory network, and use a loss function to optimize the trained initial bidirectional long short-term memory network.
[0071] S505: Use the indicator evaluation model to evaluate the performance of the initial bidirectional long short-term memory network after training and optimization.
[0072] S506: Adjust network parameters according to the evaluation results to obtain a bidirectional long short-term memory network.
[0073] As an example, in step S501, it is assumed that the high-dimensional features output by the GNN model are , the historical time series electricity consumption data can be ,in Indicates at time The high-dimensional features output by the GNN model Combined with the historical time series electricity consumption data, the first input sequence can be formed .
[0074] As an example, in step S502, the tag data may be a mark of abnormal power consumption of the user's charging pile, which may include: abnormal power consumption, change in power consumption mode, etc. The tag data may correspond to the subsequent abnormal behavior type of the user's charging pile power consumption, and the tag data may be represented as .
[0075] As an example, in step S503, a basic bidirectional long short-term memory network is constructed, the input layer of the bidirectional long short-term memory network can receive the concatenated first input sequence, and the output layer maps the features to the label space of anomaly detection through a fully connected layer. The activation function of the output layer can be set to softmax, and the probability distribution of each category is output.
[0076] As an example, regularization techniques such as Dropout can be used to prevent overfitting and to improve the generalization ability of bidirectional long short-term memory networks.
[0077] As an example, a Dropout layer can be added after each layer of the basic bidirectional long short-term memory network, and the outputs of some neurons can be randomly discarded by setting an appropriate dropout rate (such as 0.5).
[0078] As an example, before step S504, a step of constructing a data set may also be included, and constructing a data set may include: dividing the first input sequence into a training set, a test set, and a validation set. The proportion of the training set, the test set, and the validation set in the constructed data may be set according to actual needs.
[0079] As an example, in step S504, the first input sequence ,The bidirectional long short term memory network is trained using the labeled training set, and the network parameters are optimized to improve the accuracy of anomaly recognition.,The structure of the bidirectional long short term memory network allows the network to consider both past and future,power consumption patterns, thereby more comprehensively capturing the temporal,dependencies in time series data.
[0080] As an example, during the training process, the cross entropy loss function can be used to evaluate the performance of the initial bidirectional long short-term memory network to optimize the initial bidirectional long short-term memory network. The formula of the loss function is as follows: in, is the sample size, is the number of categories, is the true label, The probability predicted by the initial bidirectional long short-term memory network.
[0081] As an example, the Adam optimizer can be used for parameter update to accelerate convergence and improve the stability of the model.
[0082] As an example, in step S505, the initial bidirectional long short-term memory network is evaluated on the test set using the indicator evaluation model, and based on the evaluation results, the network parameters are adjusted or retrained to improve the performance.
[0083] As an example, the indicator evaluation model can use accuracy, recall, F1-score, etc. The specific formula is as follows: in, For a real example, is a true negative example, For a false positive example, is a false negative example, It is the harmonic mean of accuracy and recall. Accuracy refers to the proportion of samples predicted by the network as core categories that actually belong to the core category; recall refers to the proportion of samples that actually belong to the core category that are correctly predicted by the network as core categories.
[0084] As an example, in step S506, according to the evaluation results, the network parameters are adjusted or retrained to improve the performance of the network. The best hyperparameter combination can also be selected through cross-validation to finally obtain the optimal bidirectional long short-term memory network.
[0085] As an example, you can use Early Stopping to monitor network performance on a validation set and stop training when performance stops improving to avoid overfitting.
[0086] In a specific example, suppose the high-dimensional features output by the GNN model of user A are , the historical time series electricity consumption data of user A’s charging pile is , the high-dimensional features output by the GNN model of user A are combined with the historical time series electricity consumption data to obtain the first input sequence , you can set the label data to , where 0 indicates normal and 1 indicates abnormal. Input into the basic bidirectional long short-term memory network for training, and use the cross entropy loss function for optimization. During the training process, monitor the performance of the bidirectional long short-term memory network on the validation set, calculate the accuracy, recall rate and F1-score to evaluate the effect of the network, and finally obtain a trained bidirectional long short-term memory network.
[0087] Through the above steps, the high-dimensional features extracted by the GNN model were successfully combined with the historical time series electricity consumption data, and the bidirectional long short-term memory network was trained and optimized, providing strong support for subsequent anomaly detection.
[0088] In step S60, refer to Figure 1 In step S60, real-time power consumption data of the user's charging pile is obtained.
[0089] As an example, the real-time power consumption data of a user's charging pile can be expressed as ,in Indicates at time The specific method for obtaining the real-time power consumption data of the user's charging pile can refer to the specific method for obtaining the user's historical charging pile charging and discharging data in step S10, which will not be repeated here.
[0090] In step S70, refer to Figure 1 In step S70, a second input sequence is obtained based on the real-time power consumption data of the charging pile.
[0091] As an example, the real-time power consumption data of the charging pile is combined with the high-dimensional features output by the previous GNN model to obtain the second input sequence. Assume that the high-dimensional features output by the GNN model are , then the new second input sequence It can be expressed as: in, Real-time power consumption data of charging piles.
[0092] In step S80, refer to Figure 1 In step S80, the second input sequence is input into the trained and optimized bidirectional long short-term memory network to perform abnormal detection on the user's charging pile power usage behavior to obtain the user's charging pile power usage abnormal behavior type.
[0093] As an example, the constructed new second input sequence Input into the trained bidirectional long short-term memory network to obtain the probability distribution value .
[0094] As an example, the probability distribution value is compared with the preset threshold value to obtain the abnormal behavior type of the user's charging pile electricity consumption; that is, after obtaining After that, the type of abnormality can be analyzed, the classification standard of abnormal behavior can be preset, and abnormal behavior can be automatically classified by comparing with the preset threshold. Abnormal behavior can include: no problem with the charging pile, multiple car charging problems, charging pile converted to household electricity, charging pile converted to commercial electricity, and charging pile suspected of stealing electricity.
[0095] As an example, the specific method of comparing the probability distribution value with the preset threshold value to obtain the abnormal behavior type of the user's charging pile electricity consumption is: When , it means that there is no problem with the charging pile, and the power consumption is normal or abnormal and can be ignored, which is within the normal range; when When , it means there is a problem of multiple vehicles charging. At this time, the power consumption exceeds the normal range, but the excess range is consistent with the charging law or characteristics of the vehicle. For example, from the rationality of data analysis, it can be considered that the data presentation at this time shows a multiple change or accumulation with the power consumption law of single vehicle charging; when When , it means that the charging pile is changed to daily life electricity. At this time, the electricity consumption exceeds the normal range, and the excess range does not conform to the vehicle charging law or characteristics, and the electricity consumption time conforms to the daily life electricity consumption law or characteristics, for example, the increase in electricity consumption occurs at night or on weekends; when When , it means that the charging pile is changed to commercial electricity. At this time, the electricity consumption exceeds the normal range, and the excess range does not conform to the vehicle charging law or characteristics, and the electricity consumption time conforms to the commercial electricity consumption law or characteristics, for example, the increase in electricity consumption occurs during the day; when When the battery is turned on, it means that the charging pile is stealing electricity. At this time, the electricity consumption exceeds the normal range, and the excess range does not conform to the vehicle charging rules or characteristics, and there is no obvious rule or characteristic of the electricity consumption time.
[0096] As an example, after obtaining the abnormal behavior type of the user's charging pile electricity consumption through the above method, the abnormal behavior type of the charging pile electricity consumption can be further verified in combination with on-site verification to ensure the accuracy of the judgment. For example, if the charging pile is changed to household electricity, on-site verification can find that such users privately transfer the charging pile to their own residential electricity; if the charging pile is changed to commercial electricity, on-site verification can find that such users privately connect the charging pile meter to the shop electricity; if the charging pile is suspected of stealing electricity, on-site verification can find that the outlet line after the meter is underground and the direction is unknown or the meter is privately used by the property; if there is no problem with the charging pile, the on-site inspection finds no abnormal electricity consumption behavior. The charging pile electricity consumption behavior of such users can be divided into two situations: one household installs multiple charging piles and one charging pile charges multiple cars. Among them, although the situation of one household installing multiple charging piles does not belong to abnormal electricity consumption behavior, it can be used to check suspected group rental houses. Although the situation of multiple cars charging at one charging pile does not belong to abnormal electricity consumption behavior, it can be used to check suspected group rental houses.
[0097] As an example, once abnormal behavior is detected, an early warning message can be automatically generated to notify relevant personnel for further investigation. The early warning message should include: user ID, type of abnormal charging pile power consumption detected, time of abnormality, and comparison between abnormal power consumption and normal power consumption. For example, if the power consumption of user A's charging pile suddenly increases to the level of daily life power consumption on a certain weekend, and the charging time is extended, the following early warning message will be generated: User ID: A; Abnormal type: Charging piles are converted to household electricity; Abnormal time: October 15, 2023; Abnormal power consumption: 50kWh; Normal power consumption: 20kWh.
[0098] In another specific example, suppose the high-dimensional features output by user A’s GNN model are , the real-time power consumption data of charging piles collected in real time is , combining high-dimensional features with real-time electricity consumption data of charging piles to form a new second input sequence ,Will Input into the trained bidirectional long short-term memory network for anomaly detection. Assume that the probability of the trained bidirectional long short-term memory network output is (0 means normal, 1 means abnormal), according to the preset threshold of 0.5, it is judged that the charging pile of user A has abnormal behavior at that time, and it is identified as "charging pile changed to daily electricity", and an early warning message is generated to notify relevant personnel to investigate. In this way, real-time monitoring and abnormal detection of user electricity usage behavior are realized, and potential abnormal electricity usage problems can be discovered and handled in time.
[0099] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0100] In the GNN-based charging pile power consumption abnormal behavior identification method of the present application, by obtaining the user's charging pile historical power consumption data and user information, a power consumption graph structure with users as nodes and based on the similarity of power consumption data as edges is constructed and preprocessed, laying the foundation for subsequent analysis; high-dimensional features are extracted from the preprocessed graph through the GNN model, and its multi-layer graph convolution operation can effectively capture the complex relationship between users and the power consumption pattern characteristics, enriching the global features; then the high-dimensional features are combined with the historical time series power consumption data, input into the bidirectional long short-term memory network training optimization, and obtain an accurate bidirectional long short-term memory network; obtain the real-time power consumption data of the charging pile as the data to be detected and input into the network, and output the probability distribution to determine whether the power consumption behavior of the charging pile is abnormal; finally, further analyze the abnormal type, automatically classify and generate early warning information. The present application method can accurately identify abnormal power consumption behavior of charging piles, effectively distinguish normal and abnormal power consumption behavior, avoid waste of power resources, improve the level of power management, timely discover and deal with safety hazards, ensure the stable operation of the power system, and meet the needs of power management departments for efficient monitoring and accurate management of charging pile power consumption behavior.
[0101] In another embodiment, see Figure 3 The present application also provides a charging pile power consumption abnormal behavior identification system based on GNN, which may include: a data collection module 10, a preprocessing module 20, a high-dimensional feature acquisition module 30, a training module 40 and an abnormality identification module 50. Among them, the data collection module 10 is used to obtain the user's charging pile historical power consumption data, user information and the user's charging pile real-time power consumption data; the preprocessing module 20 is used to construct a power consumption graph based on the charging pile historical power consumption data and user information; the high-dimensional feature acquisition module 30 is used to extract features from the power consumption graph based on the GNN module to obtain high-dimensional features; the training module 40 is used to obtain historical time series power consumption data based on the charging pile historical power consumption data or the power consumption graph, combine the high-dimensional features with the historical time series power consumption data to form a first input sequence, and train and optimize the bidirectional long short-term memory network based on the first input sequence; the abnormality identification module 50 is used to obtain a second input sequence based on the charging pile real-time power consumption data; the second input sequence is input into the trained and optimized bidirectional long short-term memory network to perform abnormal detection on the user's charging pile power consumption behavior to obtain the user's charging pile power consumption abnormal behavior type.
[0102] In the above-mentioned GNN-based charging pile power consumption abnormal behavior identification system, the user's charging pile historical power consumption data, user information and the user's charging pile real-time power consumption data are obtained through the data collection module 10; the power consumption graph is constructed and the graph data is processed through the preprocessing module 20, and the original power consumption data is converted into a graph format suitable for model processing; the high-dimensional feature acquisition module 30 obtains high-dimensional features and mines the potential patterns of the user's charging pile power consumption behavior; the training module 40 trains and optimizes the bidirectional long short-term memory network; the abnormal identification module 50 uses the bidirectional long short-term memory network to perform abnormal detection and obtain the type of abnormal power consumption behavior. The system of the present application realizes comprehensive and accurate identification of abnormal charging pile power consumption behavior, improves the accuracy of abnormal identification, effectively improves the level of power management, reduces resource waste and safety hazards, and ensures the stable operation of the power system.
[0103] 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 specification.
[0104] Although the present application has been disclosed as above with the embodiments, it is not intended to limit the present application. Any person with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be determined by the scope of the attached patent application.
Claims
1. A GNN-based method for identifying abnormal electricity consumption behavior of charging piles, characterized in that: The following steps are involved: Obtain the user's charging pile historical electricity consumption data and user information; Constructing an electricity consumption diagram based on the historical electricity consumption data of the charging pile and user information; Using the trained GNN model to extract features from the electricity consumption graph to obtain high-dimensional features; Obtaining historical time series electricity consumption data based on the charging pile historical electricity consumption data or the electricity consumption graph; Combining the high-dimensional features with the historical time series electricity consumption data to form a first input sequence, and training and optimizing a bidirectional long short-term memory network based on the first input sequence; Obtain real-time power consumption data of users’ charging piles; Obtaining a second input sequence based on the real-time power consumption data of the charging pile; The second input sequence is input into the trained and optimized bidirectional long short-term memory network to perform abnormal detection on the user's charging pile electricity usage behavior to obtain the user's charging pile electricity usage abnormal behavior type.
2. The GNN-based charging pile power consumption abnormal behavior identification method according to claim 1 is characterized in that: The acquired charging pile historical power consumption data includes the charging pile historical power consumption data of multiple users, and the acquired user information includes multiple user information corresponding to the charging piles; The constructing of the electricity consumption graph based on the historical electricity consumption data of the charging pile and the user information includes: Treat each user as a node; Obtaining similarities between adjacent users; Establish edges between adjacent users whose similarity is greater than a preset threshold to obtain an initial electricity usage graph; The features of each of the nodes in the initial electricity consumption graph are standardized, and the edges are thinned to obtain the electricity consumption graph.
3. The GNN-based charging pile power consumption abnormal behavior identification method according to claim 2 is characterized in that: The formula for obtaining the similarity between adjacent users is as follows: in, is the power consumption of the first user’s charging pile at time t, is the power consumption of the charging pile of the second user adjacent to the first user at time t, and n is the total number of time periods.
4. The GNN-based charging pile power consumption abnormal behavior identification method according to claim 1 is characterized in that: The method of using the trained GNN model to extract features from the electricity consumption graph to obtain high-dimensional features includes: Provide a trained GNN model; Based on the electricity consumption graph, the characteristics of each node are obtained; the characteristics of the node are input into the trained GNN model for feature aggregation to obtain high-dimensional features of all nodes.
5. The GNN-based charging pile power consumption abnormal behavior identification method according to claim 1 is characterized in that: The step of combining the high-dimensional features with the historical time series electricity consumption data to form a first input sequence, and training and optimizing a bidirectional long short-term memory network based on the first input sequence includes: Combining the high-dimensional features with the historical time series electricity consumption data to form the first input sequence; Set label data; Construct an initial bidirectional long short-term memory network; Using the first input sequence to train the initial bidirectional long short-term memory network, and using a loss function to optimize the trained initial bidirectional long short-term memory network; Using an indicator evaluation model to evaluate the performance of the initial bidirectional long short-term memory network after training and optimization; The network parameters are adjusted according to the evaluation results to obtain a bidirectional long short-term memory network.
6. The GNN-based charging pile power consumption abnormal behavior identification method according to claim 5 is characterized in that: Before using the first input sequence to train the initial bidirectional long short-term memory network, the method also includes constructing a data set, wherein the constructing the data set includes: dividing the first input sequence into a training set, a test set, and a validation set.
7. The GNN-based charging pile power consumption abnormal behavior identification method according to claim 5 is characterized in that: The constructing of the initial bidirectional long short-term memory network includes: adding a Dropout layer after each layer of the basic bidirectional long short-term memory network.
8. The GNN-based charging pile power consumption abnormal behavior identification method according to claim 1 is characterized in that: The step of inputting the second input sequence into the trained and optimized bidirectional long short-term memory network to perform abnormal detection on the charging pile electricity usage behavior of the user to obtain the abnormal charging pile electricity usage behavior type of the user includes: Inputting the second input sequence into the trained and optimized bidirectional long short-term memory network for anomaly detection to obtain a probability distribution value; The probability distribution value is compared with a preset threshold value to obtain the abnormal charging pile electricity usage behavior type of the user.
9. The GNN-based charging pile power consumption abnormal behavior identification method according to claim 1 is characterized in that: The types of abnormal electricity usage behaviors of users' charging piles include: no problems with the charging piles, multiple cars charging, charging piles converted to household electricity use, charging piles converted to commercial electricity use, and charging piles suspected of stealing electricity.
10. A GNN-based charging pile power consumption abnormal behavior recognition system, characterized in that: The GNN-based charging pile power consumption abnormal behavior recognition system includes: A data collection module is used to obtain the user's charging pile historical power consumption data, user information and the user's charging pile real-time power consumption data; A preprocessing module, used to construct an electricity consumption diagram based on the historical electricity consumption data of the charging pile and the user information; A high-dimensional feature acquisition module, used for extracting features from the electricity consumption graph based on a GNN module to obtain high-dimensional features; A training module, configured to obtain historical time series power consumption data based on the historical power consumption data of the charging pile or the power consumption graph, combine the high-dimensional features with the historical time series power consumption data to form a first input sequence, and train and optimize a bidirectional long short-term memory network based on the first input sequence; The anomaly identification module is used to obtain a second input sequence based on the real-time power consumption data of the charging pile; the second input sequence is input into a trained and optimized bidirectional long short-term memory network to perform anomaly detection on the user's charging pile power consumption behavior to obtain the user's charging pile power consumption abnormal behavior type.
Citation Information
Patent Citations
Electricity stealing type detection method and system based on multi-label co-occurrence network discrimination
CN116226748A
Charging pile fault diagnosis method, device, equipment and medium
CN116578873A
Battery anomaly detection method and system based on time sequence diagram neural network model
CN118584345A
User abnormal electricity consumption identification method and system based on spatio-temporal joint modeling
CN119377836A
Board damage classification system
US20220391628A1