Method for identifying abnormal power consumption of charging pile and related equipment

By identifying the time series and clustering algorithm of charging pile electricity use power, combined with statistical methods, the problem that existing systems cannot accurately identify default electricity use is solved, the accurate identification and processing of charging piles is achieved, and the efficiency of power resource utilization is improved .

CN119312239APending Publication Date: 2025-01-14STATE GRID ZHEJIANG ELECTRIC POWER CO MARKETING SERVICE CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411201046.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing charging pile management system cannot accurately identify default electricity use, and is prone to false alarms and missed reports, and cannot effectively manage the charging electricity use of electric vehicles.

Method used

By obtaining the time series of electricity power for charging piles, the differential method is used to identify the charging event and idle state, and the charging event is clustered using density-based clustering algorithm, combining Smirnov D test and standard score method or box graph method Identify abnormal electricity use to realize detection of default electricity use in charging events and idle states.

Benefits of technology

It realizes the accurate identification and processing of electricity use for charging piles, improves the safe and efficient use of power resources, reduces the false alarm and omission rate, provides a timely and effective default handling mechanism, and ensures the rational use of power resources. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312239A_ABST
    Figure CN119312239A_ABST
Patent Text Reader

Abstract

The invention provides a charging pile abnormal electricity utilization identification method and related equipment, and the method comprises the steps: carrying out the identification based on an obtained time sequence of the electricity utilization power of a charging pile, and obtaining a first charging event and a first idle state; performing clustering processing on the first charging event to obtain a clustering result; in response to the obtained second charging event, calculating a first distance between the second charging event and a clustering center in the clustering result, and identifying the second charging event according to the first distance; determining a normal distribution condition of the first idle state; and identifying the obtained second idle state according to the normal distribution condition. According to the embodiment of the invention, the charging events and the idle state are identified by adopting the difference method, the charging events of the charging piles are clustered, the electric power distribution rule of the idle state of the charging piles is statistically analyzed, and the abnormity is identified by adopting the standard score method or the box plot according to the result of whether the electric power data obeys the normal distribution or not. The false alarm rate and the missing report rate are effectively reduced, and the recognition accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power technology, and in particular to a method for identifying abnormal power consumption of a charging pile and related equipment. Background Art

[0002] With the popularity of electric vehicles, charging piles are important charging equipment, and their power management has become particularly important. At present, some charging pile management systems on the market can realize power statistics and simple abnormal alarm functions, but they cannot accurately identify the behavior of defaulting on power usage. These systems usually rely on preset power or power thresholds for judgment, which is prone to false alarms and missed alarms. Summary of the invention

[0003] In view of this, the purpose of this application is to propose a method for identifying abnormal power consumption of a charging pile and related equipment.

[0004] Based on the above purpose, the present application provides a method for identifying abnormal power consumption of a charging pile, comprising:

[0005] Based on the acquired time series of the electric power consumption of the charging pile, a first charging event and a first idle state are identified;

[0006] Performing clustering processing on the first charging events to obtain a clustering result;

[0007] In response to acquiring a second charging event, calculating a first distance between the second charging event and a cluster center in the clustering result, and identifying the second charging event according to the first distance;

[0008] Determining a normal distribution of the first idle state;

[0009] The acquired second idle state is identified according to the normal distribution.

[0010] In a possible implementation, the method further includes:

[0011] In response to the recognition result of the first charging event being abnormal, and / or the recognition result of the second idle state being abnormal, an early warning is triggered to prompt the user.

[0012] In a possible implementation, the identifying the first charging event and the first idle state based on the acquired time series of the electric power consumption of the charging pile includes:

[0013] Obtaining a difference sequence corresponding to the time series;

[0014] The difference sequence is traversed, and in response to a first difference value in the difference sequence being greater than a first threshold, a time corresponding to the first difference value is determined as a first moment;

[0015] Continue traversing the difference sequence, and in response to a second difference value in the difference sequence becoming a non-positive value, determine a time corresponding to the second difference value as a second moment;

[0016] identifying a time between the first moment and the second moment as the first charging event;

[0017] The time in the time sequence other than the first charging event is identified as the first idle state.

[0018] In a possible implementation manner, clustering the first charging events to obtain a clustering result includes:

[0019] constructing a first feature vector of the first charging event according to the charging start time, charging duration, and average charging power of the first charging event;

[0020] Traversing each of the first feature vectors to obtain the number of second feature vectors within a preset neighborhood radius of each of the first feature vectors;

[0021] The clustering result of the first charging event is determined according to the number of the second feature vectors.

[0022] In a possible implementation manner, determining the clustering result of the first charging event according to the number of the second feature vectors includes:

[0023] In response to the number of the second feature vector being less than a preset minimum number of neighbor points, marking the first charging event corresponding to the first feature vector as noise;

[0024] In response to the number of the second feature vectors being greater than or equal to a preset minimum number of neighbor points, marking the first charging event corresponding to the first feature vector as a core point;

[0025] The first charging event corresponding to the third feature vector within a preset neighborhood radius of the core point is added to the cluster corresponding to the first charging event corresponding to the first feature vector to obtain the clustering result of the first charging event.

[0026] In a possible implementation manner, determining a normal distribution of the first idle state includes:

[0027] The normal distribution of the first idle state is determined by using Smirnov's D test.

[0028] In a possible implementation manner, identifying the acquired second idle state according to the normal distribution includes:

[0029] In response to the normal distribution of the first idle state being a normal distribution, identifying the second idle state using a standard score method;

[0030] In response to the normal distribution of the first idle state being a non-normal distribution, the second idle state is identified using a box plot method.

[0031] Based on the same inventive concept, the embodiment of the present application also provides a device for identifying abnormal power consumption of a charging pile, comprising:

[0032] A first identification module is configured to identify a first charging event and a first idle state based on a time series of the acquired power consumption of the charging pile;

[0033] A clustering module, configured to perform clustering processing on the first charging events to obtain a clustering result;

[0034] a calculation module, configured to, in response to acquiring a second charging event, calculate a first distance between the second charging event and a cluster center in the clustering result, and identify the second charging event according to the first distance;

[0035] A determination module, configured to determine a normal distribution of the first idle state;

[0036] The second identification module is configured to identify the acquired second idle state according to the normal distribution.

[0037] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for identifying abnormal power consumption of a charging pile as described in any one of the above is implemented.

[0038] Based on the same inventive concept, an embodiment of the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute any of the above-mentioned methods for identifying abnormal power consumption of charging piles.

[0039] From the above, it can be seen that the method for identifying abnormal power consumption of a charging pile and related equipment provided in the present application identify a first charging event and a first idle state based on the acquired time series of the power consumption of the charging pile; cluster the first charging event to obtain a clustering result; in response to obtaining a second charging event, calculate a first distance between the second charging event and the cluster center in the clustering result, and identify the second charging event based on the first distance; determine the normal distribution of the first idle state; and identify the acquired second idle state based on the normal distribution. The embodiment of the present application firstly uses the differential method to identify charging events and idle states for the time series of charging pile power consumption; secondly, uses the density-based spatial clustering algorithm (DBSCAN) to cluster the charging events of the charging pile, and sets the discrimination logic to identify anomalies; at the same time, the power consumption distribution law of the idle state is statistically analyzed, and the Kolmogorov-Smirnov test is used to determine whether the power consumption data obeys the normal distribution, and the standard score (Z-score) method or box plot is used to identify anomalies based on the judgment result; finally, the default power consumption detection of the charging pile in the charging event and the idle state is integrated. When any state is judged as abnormal, the system will automatically trigger an early warning to prompt the auditor to further investigate and handle. The embodiment of the present application realizes the accurate identification and processing of the default power consumption behavior of the charging pile by adopting advanced machine learning algorithms and big data analysis technology, effectively improves the safe and efficient use of power resources, effectively reduces the false alarm and missed alarm rates, improves the recognition accuracy, and provides a timely and effective default handling mechanism to ensure the rational use of power resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 This is a flow chart of a method for identifying abnormal power consumption of a charging pile according to an embodiment of the present application;

[0042] Figure 2 A detailed flowchart of a method for identifying abnormal power consumption of a charging pile according to an embodiment of the present application;

[0043] Figure 3 This is a schematic diagram of the structure of a device for identifying abnormal power consumption of a charging pile according to an embodiment of the present application;

[0044] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0046] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0047] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0048] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0049] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0050] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0051] As mentioned in the background technology section, with the popularity of electric vehicles, charging piles are important charging equipment, and their power management has become particularly important. At present, some charging pile management systems on the market can realize power statistics and simple abnormal alarm functions, but cannot accurately identify the behavior of defaulting on power usage. These systems usually rely on preset power or power thresholds for judgment, which are prone to false alarms and missed alarms.

[0052] Based on the above considerations, an embodiment of the present application proposes a method for identifying abnormal power consumption of a charging pile, which identifies a first charging event and a first idle state based on a time series of the acquired power consumption of the charging pile; clusters the first charging event to obtain a clustering result; in response to obtaining a second charging event, calculates a first distance between the second charging event and a cluster center in the clustering result, and identifies the second charging event based on the first distance; determines the normal distribution of the first idle state; and identifies the acquired second idle state based on the normal distribution. The embodiment of the present application firstly uses the difference method to identify charging events and idle states for the time series of charging pile power consumption; secondly, uses a density-based clustering algorithm to cluster the charging events of the charging pile, and sets the discrimination logic to identify anomalies; at the same time, statistically analyzes the distribution law of power consumption in the idle state, uses the Smirnov D test to determine whether the power consumption data obeys the normal distribution, and uses the standard score method or box plot to identify anomalies based on the judgment result; finally, the detection of power consumption violations of the charging pile in charging events and idle states is integrated. When any state is judged to be abnormal, the system will automatically trigger an early warning to prompt the auditor to further investigate and handle. The embodiment of the present application uses advanced machine learning algorithms and big data analysis technology to accurately identify and handle charging pile power consumption violations, effectively improve the safe and efficient use of power resources, effectively reduce the false alarm and missed alarm rates, improve the recognition accuracy, and provide a timely and effective breach of contract handling mechanism to ensure the rational use of power resources.

[0053] The technical solutions of the embodiments of the present application are described in detail below through specific examples.

[0054] refer to Figure 1 The method for identifying abnormal power consumption of a charging pile in an embodiment of the present application comprises the following steps:

[0055] Step S101, based on the acquired time series of the electric power consumption of the charging pile, identifying a first charging event and a first idle state;

[0056] Step S102, clustering the first charging events to obtain clustering results;

[0057] Step S103, in response to acquiring a second charging event, calculating a first distance between the second charging event and a cluster center in the clustering result, and identifying the second charging event according to the first distance;

[0058] Step S104, determining a normal distribution of the first idle state;

[0059] Step S105: identifying the acquired second idle state according to the normal distribution.

[0060] refer to Figure 2 , is a detailed flow chart of the method for identifying abnormal power consumption of a charging pile according to an embodiment of the present application. Figure 2 As shown, the method for identifying abnormal power consumption of charging piles in the present application first has a stage of data preparation and analysis. After the data is cleaned accordingly, the differential method is used to identify charging events and idle states. For charging events, cluster analysis is performed on them, and then judgment logic is used to identify whether there are abnormal charging events. For idle states, the distribution law of idle power consumption is first counted, and then when there is newly acquired idle power consumption data, the abnormal data is identified based on the data distribution. Finally, whether abnormal data appears in the charging event or the idle state, the final warning result will be output.

[0061] With respect to step S101, before obtaining the time series of the electric power used by the charging pile, the data needs to be cleaned to ensure the accuracy and consistency of the data.

[0062] Specifically, a large amount of time series data on the normal power consumption of charging piles is collected, and the data is cleaned to remove noise, outliers and missing values ​​to ensure the accuracy and consistency of the data.

[0063] First, we need to clarify the concepts of noise, outliers, and missing values.

[0064] Noise: may appear as small fluctuations in the data or sudden, short-term anomalies.

[0065] Outliers: Values ​​that significantly deviate from the normal range, which may be caused by equipment failure, data transmission errors, etc.

[0066] Missing values: data not recorded at certain time points.

[0067] For noise, smoothing techniques (such as moving average, exponential smoothing, etc.) are used to reduce its impact.

[0068] If the noise is too large and cannot be removed by smoothing techniques, consider treating the data as outliers or missing values.

[0069] For outliers, deletion, replacement or interpolation methods are used to deal with them according to the specific circumstances.

[0070] Replace outliers using a statistic such as the mean, median, or mode.

[0071] You can also use linear interpolation to estimate outliers based on data from adjacent time points.

[0072] When dealing with missing values, you can use deletion, replacement or interpolation methods according to the specific situation.

[0073] If there are many missing values ​​or they are missing continuously, you need to consider recollecting or completing this part of the data.

[0074] In some cases, machine learning algorithms (such as K-nearest neighbors, decision trees, etc.) can be used to predict and fill in missing values.

[0075] In the subsequent cleaning process, the accuracy and consistency of the data are constantly verified to ensure that the cleaned data meets the requirements. Use visualization tools to check the distribution and trends of the data so that potential problems can be discovered and dealt with in a timely manner.

[0076] After the time series is cleaned, the first charging event and the first idle state are identified based on the acquired time series of the electric power consumption of the charging pile.

[0077] In some embodiments, the method of identifying a first charging event and a first idle state based on the acquired time series of the electric power used by the charging pile includes: obtaining a differential sequence corresponding to the time series; traversing the differential sequence, and in response to a first differential value in the differential sequence being greater than a first threshold, determining the time corresponding to the first differential value as the first moment; continuing to traverse the differential sequence, and in response to a second differential value in the differential sequence becoming a non-positive value, determining the time corresponding to the second differential value as the second moment; identifying the time between the first moment and the second moment as the first charging event; and identifying the time in the time series other than the first charging event as the first idle state.

[0078] Specifically, the difference method in mathematics, especially in the field of numerical methods of differential equations, is a method of approximating derivatives through finite differences to seek approximate solutions to differential equations. In the time series analysis of charging pile power consumption, the difference method can be used to identify charging events and idle states by calculating the power difference between adjacent time points. The following is a detailed step-by-step description:

[0079] Assume that we have a charging pile power time series P = {P1, P2..., P n}, where P trepresents the power value at time point t. Differential sequence ΔP = {ΔP2, ΔP3..., ΔP n} can be calculated by the following formula:

[0080] ΔP t =P t -P t-1 , where t=2,3,...,n

[0081] In order to identify charging events, a suitable threshold needs to be set. This threshold can be determined based on the characteristics of the charging pile and actual data. In one embodiment, when charging starts, the power will have an obvious rising process, and a certain power difference in this rising process can be selected as the threshold. For each charging pile, observe a short-term power consumption time series, determine several charging events based on experience, and take the average of the power difference in the charging rising process as the threshold.

[0082] Charging starts: Traverse the differential sequence, when the differential ΔP t When the value changes from a non-positive value (or a value close to zero) to a positive value exceeding the threshold, this moment t is marked as the charging start moment, which means that the charging pile starts to provide charging power to the device.

[0083] Charging continues: After charging begins, continue to traverse the differential sequence as long as the differential ΔP t As long as it remains positive or close to zero (taking into account power fluctuations), the charging process can be considered to be continuing.

[0084] Charging ends: when the differential ΔP t When the value changes from a positive value to a non-positive value (or a value close to zero and lasts for a period of time to ensure that it is not a short-term fluctuation), this moment t is marked as the end of charging. This means that the charging pile stops providing charging power to the device and the charging process ends.

[0085] To calculate the charging time, subtract the charging start time from the charging end time.

[0086] Calculate the average charging power, that is, the power during the charging time is averaged.

[0087] After the charging event is identified, the rest of the time is the idle state of the charging pile.

[0088] After the identification of the charging event and the idle state is completed, for step S102, the first charging event is clustered to obtain a clustering result. For step S103, in response to obtaining a second charging event, a first distance between the second charging event and the cluster center in the clustering result is calculated, and the second charging event is identified according to the first distance.

[0089] In some embodiments, the clustering processing of the first charging event to obtain a clustering result includes: constructing a first feature vector of the first charging event based on the charging start time, charging duration and average charging power of the first charging event; traversing each of the first feature vectors to obtain the number of second feature vectors of each first feature vector within a preset neighborhood radius; and determining the clustering result of the first charging event based on the number of the second feature vectors.

[0090] In some embodiments, determining the clustering result of the first charging event based on the number of the second feature vectors includes: in response to the number of the second feature vectors being less than a preset minimum number of neighbor points, marking the first charging event corresponding to the first feature vector as noise; in response to the number of the second feature vectors being greater than or equal to a preset minimum number of neighbor points, marking the first charging event corresponding to the first feature vector as a core point; adding the first charging event corresponding to the third feature vector within a preset neighborhood radius of the core point to the cluster corresponding to the first charging event corresponding to the first feature vector, to obtain the clustering result of the first charging event.

[0091] Specifically, for the charging pile power time series P, after identifying the charging event, the feature vector of a charging event is recorded as (charging start time, charging duration, average charging power), where the charging start time is processed, the date is removed, and only the time of the day is retained (for example, in hours or minutes). In order to eliminate the impact of different dimensions between different features, the feature vector is standardized or normalized.

[0092] When using the DBSCAN algorithm to cluster charging events of charging piles, we first set two key parameters: the neighborhood radius ε and the minimum number of neighbor points MinPts. Then, we start to traverse each charging event in the data set.

[0093] During the traversal, for each charging event that has not been visited, we check the number of other events in its ε neighborhood. If this number is less than MinPts, then we mark the event as noise, indicating that it does not belong to any cluster.

[0094] If the number of other events in the ε neighborhood reaches or exceeds MinPts, we mark the event as a core point and start a new cluster. Then, we recursively check all other unvisited events in the ε neighborhood of this core point. If they are also core points, we add them to the current cluster; if they are not core points, we treat them as boundary points and also add them to the current cluster.

[0095] This process continues until all charging events in the dataset have been traversed. After the traversal, each charging event is marked as noise or belonging to a specific cluster. Noise represents isolated or sparse points, while clusters represent a collection of events with similar charging patterns or user behaviors.

[0096] It should be noted that the effect of the DBSCAN algorithm depends largely on the choice of ε and MinPts. These two parameters need to be adjusted appropriately according to the characteristics and requirements of the actual data.

[0097] In a specific embodiment, the neighborhood radius ε is usually selected according to the k-distance curve method to select a suitable value, calculate the distance between each sample and all samples, select the distance of the kth nearest neighbor, sort the k nearest neighbor distances of each sample from large to small, and obtain the k-distance curve. The position of the obvious inflection point in the k-distance curve is a good parameter. According to experience, in general, MinPts≥dim+1, dim is the dimension of the data set. The characteristic vector of the charging event in the present invention is (charging start time, charging duration, average charging power), dim=3, so the value range of MinPts is set, such as [4,8], and the better parameters are determined by the parameter optimization method.

[0098] After clustering the charging events of the charging piles using the DBSCAN algorithm, these events were successfully divided into m main categories. Each cluster represents a specific charging mode of the user, and these modes show similarities in charging time periods and charging power requirements. The clustering results reveal the charging preferences and power demand characteristics of charging pile users in different time periods.

[0099] After DBSCAN clustering is completed, m "core" clusters are obtained, which represent the data patterns of m normal charging behaviors. For the real-time data newly generated by the charging pile, anomaly detection is required. First, calculate the distance from the new data point to all "core" cluster centers (or representative points). This distance can be calculated by simple Euclidean distance, or by weighted distance combined with feature weights according to the characteristics of the data and business needs.

[0100] Next, a threshold is set, which is determined based on the maximum distance from the data point in the "core" cluster to its cluster center. If the distance from the new data point to all the "core" cluster centers is greater than this threshold, then it can be preliminarily judged that the new data point is an outlier.

[0101] However, relying solely on distance to determine whether it is abnormal may not be comprehensive enough. Therefore, in another embodiment, the local density of the data point can also be considered. If the density around the new data point is much lower than the density in the "core" cluster, it can be considered abnormal even if it is close to a cluster center. In order to evaluate the local density, the number of points in the neighborhood of the new data point can be calculated and compared with the minimum local density of the "core" cluster. If it is lower than the minimum local density, the new data point is an abnormal point.

[0102] Combining the above two logics, we can more accurately determine whether a new data point is an outlier. This anomaly detection method takes into account both the distance from the data point to the cluster center and the local density of the area where the data point is located, thereby improving the accuracy and reliability of anomaly detection.

[0103] Furthermore, the idle state needs to be processed, and for step S104, the normal distribution of the first idle state is determined.

[0104] In some embodiments, determining the normal distribution of the first idle state includes: determining the normal distribution of the first idle state using a Smirnov D test.

[0105] Specifically, the identified idle power consumption data is statistically analyzed to calculate the mean, median, mode, standard deviation and other statistics to understand the basic characteristics and distribution of the data. The Kolmogorov-Smirnov method is used to test whether the power consumption data is close to a normal distribution.

[0106] The Kolmogorov-Smirnov test (KS test) is a non-parametric test method used to determine whether a data set comes from a specific theoretical distribution, especially a normal distribution. The following are the detailed steps for using the Kolmogorov-Smirnov test to determine whether the power consumption data follows a normal distribution:

[0107] First, two assumptions need to be made:

[0108] Null hypothesis (H0): Electric power consumption data follows a normal distribution.

[0109] Alternative hypothesis (H1): The power consumption data does not follow a normal distribution.

[0110] Then calculate the empirical cumulative distribution function (ECDF):

[0111] Sort the power consumption data from small to large.

[0112] Calculate the empirical cumulative distribution function value for each data point. For the i-th data point, its ECDF value is the number of data points less than or equal to the data point divided by the total number of data points.

[0113] Then calculate the theoretical cumulative distribution function (CDF):

[0114] Assuming that the power consumption data follows a normal distribution, the theoretical CDF value of the normal distribution is calculated based on the mean and standard deviation of the data.

[0115] Then calculate the Kolmogorov-Smirnov statistic (D):

[0116] For each data point, calculate the difference (in absolute value) between its ECDF value and the theoretical CDF value.

[0117] Find the maximum of these differences, which is the Kolmogorov-Smirnov statistic (D). The mathematical formula can be expressed as:

[0118]

[0119] Among them, F n (x) is the empirical cumulative distribution function, F(x) is the theoretical cumulative distribution function, It means taking the supremum for all x.

[0120] Finally, determine the critical value and judgment:

[0121] Find the critical value D of the Kolmogorov-Smirnov test based on the sample size and significance level (such as 0.05) crit This is usually done using a look-up table or statistical software.

[0122] If the calculated D value is greater than D crit , then the null hypothesis is rejected and it is believed that the power consumption data does not obey the normal distribution.

[0123] If the D value is less than or equal to D crit , then the null hypothesis cannot be rejected, and it is believed that the power consumption data may come from a normal distribution.

[0124] Further, with respect to step S105, the acquired second idle state is identified according to the normal distribution.

[0125] In some embodiments, the identifying the acquired second idle state according to the normal distribution includes: in response to the normal distribution of the first idle state being a normal distribution, identifying the second idle state using a standard score method; in response to the normal distribution of the first idle state being a non-normal distribution, identifying the second idle state using a box plot method.

[0126] For the real-time data newly generated by the charging pile, we need to perform anomaly detection. When the distribution of idle power data follows a normal distribution or is close to a normal distribution, the Z-score (standard score) method is used for outlier detection. The Z-score is the difference between the observed value and the mean divided by the standard deviation. Usually, we can set a threshold (such as |Z|>2 or |Z|>3). When the Z-score of an observed value exceeds this threshold, it is considered an outlier.

[0127] If the data does not meet the normal distribution, choose to use the box plot (IQR rule) for outlier detection and processing. IQR is the abbreviation of interquartile range, which represents the difference between the third quartile (Q3) and the first quartile (Q1). Outliers are usually defined as observations less than Q1-1.5*IQR or greater than Q3+1.5*IQR.

[0128] For the real-time data newly generated by the charging pile, in the idle state, if the power consumption for a continuous period of time (such as N consecutive observation values) is detected as abnormal, it is determined to be abnormal power consumption.

[0129] In some embodiments, the method further includes: in response to the recognition result of the first charging event being abnormal, and / or the recognition result of the second idle state being abnormal, triggering an early warning to prompt a user.

[0130] Specifically, the system will comprehensively detect the illegal electricity usage of the charging pile during charging events and in idle states. When any state is determined to be abnormal electricity usage, the system will automatically trigger an early warning, prompting auditors to further investigate and handle the matter.

[0131] It can be seen from the above embodiments that the method for identifying abnormal power consumption of charging piles described in the embodiment of the present application, based on the time series of the power consumption of the charging piles, identifies the first charging event and the first idle state; clusters the first charging event to obtain a clustering result; in response to obtaining the second charging event, calculates the first distance between the second charging event and the cluster center in the clustering result, and identifies the second charging event according to the first distance; determines the normal distribution of the first idle state; and identifies the acquired second idle state according to the normal distribution. In the embodiment of the present application, first, for the time series of the power consumption of the charging piles, the differential method is used to identify the charging events and the idle state; secondly, the density-based clustering algorithm is used to cluster the charging events of the charging piles, and the discrimination logic is set to identify the abnormalities; at the same time, the power consumption distribution law of the idle state is statistically analyzed, and the Smirnov D test is used to test whether the power consumption data obeys the normal distribution, and the standard score method or box plot is used to identify the abnormalities according to the judgment results; finally, the detection of the default power consumption of the charging piles in the charging event and the idle state is integrated. When any state is judged to be abnormal, the system will automatically trigger an early warning to prompt the auditor to further investigate and handle. The embodiments of the present application achieve accurate identification and processing of charging piles' breach of contract electricity usage by adopting advanced machine learning algorithms and big data analysis technologies, effectively improving the safe and efficient use of power resources, effectively reducing false alarm and missed alarm rates, improving identification accuracy, and providing a timely and effective breach of contract processing mechanism, thereby ensuring the rational use of power resources.

[0132] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0133] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0134] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a device for identifying abnormal power consumption of a charging pile.

[0135] refer to Figure 3The device for identifying abnormal power consumption of a charging pile comprises:

[0136] The first identification module 31 is configured to identify a first charging event and a first idle state based on a time series of the acquired power consumption of the charging pile;

[0137] A clustering module 32 is configured to perform clustering processing on the first charging event to obtain a clustering result;

[0138] a calculation module 33, configured to, in response to acquiring a second charging event, calculate a first distance between the second charging event and a cluster center in the clustering result, and identify the second charging event according to the first distance;

[0139] A determination module 34 is configured to determine a normal distribution of the first idle state;

[0140] The second identification module 35 is configured to identify the acquired second idle state according to the normal distribution.

[0141] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0142] The device of the above embodiment is used to implement the corresponding method for identifying abnormal power consumption of a charging pile in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0143] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for identifying abnormal power consumption of a charging pile as described in any of the above embodiments is implemented.

[0144] Figure 4 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0145] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0146] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0147] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0148] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0149] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0150] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0151] The electronic device of the above-mentioned embodiment is used to implement the corresponding method for identifying abnormal power consumption of a charging pile in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0152] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for identifying abnormal power consumption of a charging pile as described in any of the above embodiments.

[0153] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0154] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method for identifying abnormal power consumption of a charging pile as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0155] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0156] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0157] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0158] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A method for identifying abnormal power consumption of a charging pile, characterized in that: include: Based on the acquired time series of the electric power consumption of the charging pile, a first charging event and a first idle state are identified; Performing clustering processing on the first charging events to obtain a clustering result; In response to acquiring a second charging event, calculating a first distance between the second charging event and a cluster center in the clustering result, and identifying the second charging event according to the first distance; Determining a normal distribution of the first idle state; The acquired second idle state is identified according to the normal distribution.

2. The method according to claim 1, characterized in that The method further comprises: In response to the recognition result of the first charging event being abnormal, and / or the recognition result of the second idle state being abnormal, an early warning is triggered to prompt the user.

3. The method according to claim 1, characterized in that The step of identifying a first charging event and a first idle state based on the acquired time series of the electric power used by the charging pile includes: Obtaining a difference sequence corresponding to the time series; The difference sequence is traversed, and in response to a first difference value in the difference sequence being greater than a first threshold, a time corresponding to the first difference value is determined as a first moment; Continue traversing the difference sequence, and in response to a second difference value in the difference sequence becoming a non-positive value, determine a time corresponding to the second difference value as a second moment; identifying a time between the first moment and the second moment as the first charging event; The time in the time sequence other than the first charging event is identified as the first idle state.

4. The method according to claim 1, characterized in that The clustering process is performed on the first charging event to obtain a clustering result, including: constructing a first feature vector of the first charging event according to the charging start time, charging duration, and average charging power of the first charging event; Traversing each of the first feature vectors to obtain the number of second feature vectors within a preset neighborhood radius of each of the first feature vectors; The clustering result of the first charging event is determined according to the number of the second feature vectors.

5. The method according to claim 4, characterized in that The step of determining the clustering result of the first charging event according to the number of the second feature vectors includes: In response to the number of the second feature vector being less than a preset minimum number of neighbor points, marking the first charging event corresponding to the first feature vector as noise; In response to the number of the second feature vectors being greater than or equal to a preset minimum number of neighbor points, marking the first charging event corresponding to the first feature vector as a core point; The first charging event corresponding to the third feature vector within a preset neighborhood radius of the core point is added to the cluster corresponding to the first charging event corresponding to the first feature vector to obtain the clustering result of the first charging event.

6. The method according to claim 1, characterized in that The determining a normal distribution of the first idle state includes: The normal distribution of the first idle state is determined by using Smirnov's D test.

7. The method according to claim 1, characterized in that The identifying the acquired second idle state according to the normal distribution includes: In response to the normal distribution of the first idle state being a normal distribution, identifying the second idle state using a standard score method; In response to the normal distribution of the first idle state being a non-normal distribution, the second idle state is identified using a box plot method.

8. A device for identifying abnormal power consumption of a charging pile, characterized in that: include: A first identification module is configured to identify a first charging event and a first idle state based on a time series of the acquired power consumption of the charging pile; A clustering module, configured to perform clustering processing on the first charging events to obtain a clustering result; a calculation module, configured to, in response to acquiring a second charging event, calculate a first distance between the second charging event and a cluster center in the clustering result, and identify the second charging event according to the first distance; A determination module, configured to determine a normal distribution of the first idle state; The second identification module is configured to identify the acquired second idle state according to the normal distribution.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.