Electricity consumption abnormity identification method, device, equipment, medium and product

Through STL decomposition and Bayesian optimization algorithm, the linear fit of electricity consumption and influencing factors is solved, and the problem that the existing technology cannot accurately identify electricity consumption abnormalities is achieved, and the internal laws of electricity consumption and the accurate identification of abnormal electricity consumption is achieved.

CN119848489APending Publication Date: 2025-04-18NORTH CHINA ELECTRIC POWER UNIV +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510322925.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art cannot accurately reflect the internal laws of electricity consumption, resulting in the inability to accurately identify abnormalities in electricity consumption.

Method used

By collecting quarterly data on electricity consumption and influencing factors, the trend terms of electricity consumption and influencing factors are extracted by STL decomposition method, the time series of power consumption intensity is calculated, and the Bayesian optimization algorithm is used to determine the optimal number of segments and breakpoint sets, and segmented linear fit is performed to identify abnormal electricity consumption data.

Benefits of technology

It realizes an accurate reflection of the internal laws of electricity consumption and can accurately identify abnormal electricity consumption data in the research area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848489A_ABST
    Figure CN119848489A_ABST
Patent Text Reader

Abstract

The invention discloses a power consumption abnormity identification method, device and equipment, a medium and a product, and relates to the field of electric quantity analysis. The method comprises the steps of obtaining an electricity consumption time sequence and an influence factor time sequence; respectively extracting trend terms in the electricity consumption time sequence and the influence factor time sequence by adopting an STL decomposition method; calculating a power consumption intensity time sequence according to the power consumption trend term and the influence factor trend term; taking the power consumption trend term and the power consumption intensity time sequence as a to-be-tested power consumption time sequence; determining an optimal segment number and an optimal breakpoint set during linear fitting of the to-be-tested power utilization time sequence by using a Bayesian optimization algorithm and taking the minimum linear fitting error of the to-be-tested power utilization time sequence as an optimization target, and performing piecewise linear fitting on the to-be-tested power utilization time sequence to obtain a power utilization time sequence piecewise fitting image; and identifying abnormal power consumption data in the research area from the power consumption time sequence segmented fitting image. According to the invention, abnormal power consumption can be accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power analysis, and in particular to a method, device, equipment, medium and product for identifying abnormal power consumption. Background Art

[0002] The relationship between electricity consumption and influencing factors is complex. The relationship between the two is not linear, but has significant dynamic characteristics. At present, methods such as time series decomposition and causal analysis have been tried to process electricity consumption and influencing factors to identify abnormal electricity consumption. However, the existing methods cannot accurately reflect the internal laws of electricity consumption, resulting in the inability to accurately identify abnormal electricity consumption. Summary of the invention

[0003] The purpose of this application is to provide a method, device, equipment, medium and product for identifying abnormal electricity usage, which can accurately identify abnormal electricity usage.

[0004] To achieve the above objectives, this application provides the following solutions.

[0005] In the first aspect, the present application provides a method for identifying abnormal power consumption, including: collecting quarterly data of power consumption and influencing factors in the study area over the years, obtaining power consumption time series and influencing factor time series; using STL (Seasonal and Trend decomposition using Loess, based on Loess smoothed time series) decomposition method, respectively extract the power consumption trend item in the power consumption time series and the influencing factor trend item in the influencing factor time series; calculate the power consumption intensity time series according to the power consumption trend item and the influencing factor trend item; use the power consumption trend item and the power consumption intensity time series as the power consumption time series to be tested; use the Bayesian optimization algorithm, take the minimum linear fitting error of the power consumption time series to be tested as the optimization goal, determine the optimal number of segments and the optimal breakpoint set when linearly fitting the power consumption time series to be tested; according to the optimal number of segments and the optimal breakpoint set when linearly fitting the power consumption time series to be tested, perform piecewise linear fitting on the power consumption time series to be tested, and obtain a piecewise fitting image of the power consumption time series; identify abnormal power consumption data in the study area from the piecewise fitting image of the power consumption time series; the abnormal power consumption data includes abnormal power consumption and abnormal power consumption intensity.

[0006] Optionally, the decomposition model used by the STL decomposition method is: ;in, It is the time series of electricity consumption or the time series of influencing factors. The value of the moment, yes Trend items at the moment, yes The seasonal component of the moment, yes The residual component at time .

[0007] Optionally, the calculation formula of the power consumption intensity time series is: ;in, is the power consumption intensity, is the electricity consumption trend item, is the impact factor trend term.

[0008] Optionally, the linear fitting error is calculated as follows: ;in, is the linear fitting error, It is the first The actual value of the sampling point, It is the first The fitted value of the sampling points, is the number of sampling points in the power usage time series to be tested.

[0009] Optionally, a piecewise linear fitting is performed on the power consumption time sequence to be tested, and the obtained fitting straight line equation is: ;in, It is the first The fitted value of the sampling points, It is the first The time of the sampling point, , is the number of sampling points in the power consumption sequence to be tested, is the optimal number of segments, is the optimal breakpoint set, , , , and The first optimal breakpoint, the second optimal breakpoint, the third optimal breakpoint, The optimal breakpoint and The optimal breakpoint, , and The slopes of the first segment of the fitted straight line, the second segment of the fitted straight line, and the The slope of the fitted line.

[0010] Optionally, the STL decomposition method is used to respectively extract the electricity consumption trend item in the electricity consumption time series and the influencing factor trend item in the influencing factor time series, and then it also includes: using the Bayesian optimization algorithm, taking the minimum linear fitting error of the influencing factor trend item as the optimization goal, and determining the optimal number of segments and the optimal breakpoint set when the influencing factor trend item is linearly fitted; according to the optimal number of segments and the optimal breakpoint set when the influencing factor trend item is linearly fitted, the influencing factor trend item is piecewise linearly fitted to obtain an influencing factor piecewise fitting image.

[0011] In a second aspect, the present application provides a device for identifying abnormal power consumption, including: a collection module, a decomposition module, a calculation module, a definition module, an optimization module, a piecewise linear fitting module and an abnormality identification module.

[0012] The collection module is used to collect the quarterly data of electricity consumption and influencing factors in the study area over the years, and obtain the electricity consumption time series and the influencing factor time series; the decomposition module is used to use the STL decomposition method to extract the electricity consumption trend item in the electricity consumption time series and the influencing factor trend item in the influencing factor time series respectively; the calculation module is used to calculate the power consumption intensity time series according to the electricity consumption trend item and the influencing factor trend item; the definition module is used to use the electricity consumption trend item and the power consumption intensity time series as the electricity consumption time series to be tested; the optimization module is used to use the Bayesian A Yes optimization algorithm takes minimizing the linear fitting error of the power consumption time series to be tested as the optimization goal, and determines the optimal number of segments and the optimal set of breakpoints during the linear fitting of the power consumption time series to be tested; a piecewise linear fitting module is used to perform piecewise linear fitting on the power consumption time series to be tested according to the optimal number of segments and the optimal set of breakpoints during the linear fitting of the power consumption time series to be tested, and obtain a piecewise fitting image of the power consumption time series; an abnormality recognition module is used to identify abnormal power consumption data in the study area from the piecewise fitting image of the power consumption time series; the abnormal power consumption data includes abnormal power consumption and abnormal power consumption intensity.

[0013] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described methods for identifying abnormal power consumption.

[0014] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for identifying abnormal power consumption.

[0015] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for identifying abnormal electricity consumption.

[0016] According to the specific embodiments provided in this application, this application has the following technical effects.

[0017] The present application provides a method, device, equipment, medium and product for identifying abnormal power consumption, decomposes the power consumption time series and the influencing factor time series, obtains the power consumption trend item and the influencing factor trend item, and then uses the Bayesian optimization algorithm to determine the optimal number of segments and the optimal breakpoint set for the power consumption trend item and the power consumption intensity time series during linear fitting, and performs piecewise linear fitting on the power consumption trend item and the power consumption intensity time series according to the optimal number of segments and the optimal breakpoint set. The present application performs data segmentation based on the trend item of the time series decomposition, and the segmentation result can accurately reflect the inherent law of power consumption, so that abnormal power consumption can be accurately identified in the segmentation result. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 This is a diagram of the application environment of a method for identifying abnormal power consumption in one embodiment of the present application.

[0020] Figure 2 A flowchart of a method for identifying abnormal power consumption is provided in one embodiment of the present application.

[0021] Figure 3 A more detailed flowchart of a method for identifying abnormal power consumption is provided in one embodiment of the present application.

[0022] Figure 4 A schematic diagram of the STL decomposition process of a certain area's electricity consumption time series provided in another embodiment of the present application.

[0023] Figure 5 A schematic diagram of the STL decomposition process of a quarterly GDP (Gross Domestic Product) time series of a certain region provided in another embodiment of the present application.

[0024] Figure 6 A schematic diagram of the visual fitting results of the electricity consumption trend item in a certain area provided in another embodiment of the present application.

[0025] Figure 7 A schematic diagram of the visual fitting results of the quarterly GDP trend item of a certain region provided in another embodiment of the present application.

[0026] Figure 8 A schematic diagram of the visualization fitting results of the time series of electricity consumption intensity in a certain area provided in one embodiment of the present application.

[0027] Fig. 9 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in 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.

[0029] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0030] The power consumption anomaly identification method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the quarterly data of quarterly electricity consumption and influencing factors in the study area over the years to the server 104. After the server 104 receives the quarterly data of quarterly electricity consumption and influencing factors in the study area over the years, for the quarterly data of quarterly electricity consumption and influencing factors in the study area over the years, the server 104 obtains the electricity consumption time series and the influencing factor time series; uses the STL decomposition method to respectively extract the electricity consumption trend item in the electricity consumption time series and the influencing factor trend item in the influencing factor time series; calculates the electricity consumption intensity time series based on the electricity consumption trend item and the influencing factor trend item; The power consumption trend item and the power consumption intensity time series are both used as the power consumption time series to be tested; using the Bayesian optimization algorithm, taking the minimum linear fitting error of the power consumption time series to be tested as the optimization goal, determine the optimal number of segments and the optimal breakpoint set when the power consumption time series to be tested is linearly fitted; according to the optimal number of segments and the optimal breakpoint set when the power consumption time series to be tested is linearly fitted, the power consumption time series to be tested is piecewise linearly fitted to obtain a piecewise fitting image of the power consumption time series; from the piecewise fitting image of the power consumption time series, abnormal power consumption data in the study area are identified; the abnormal power consumption data includes abnormal power consumption and abnormal power consumption intensity. The server 104 can feed back the obtained abnormal power consumption data to the terminal 102. In addition, in some embodiments, the power consumption anomaly identification method can also be implemented independently by the server 104 or the terminal 102. For example, the terminal 102 can directly identify power consumption anomalies based on the quarterly data of quarterly power consumption and influencing factors in the study area over the years, or the server 104 can obtain the quarterly data of quarterly power consumption and influencing factors in the study area over the years from the data storage system, and identify power consumption anomalies based on the quarterly data of quarterly power consumption and influencing factors in the study area over the years.

[0031] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0032] In an exemplary embodiment, Figure 2As shown, a method for identifying abnormal power consumption is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used for explanation, and the steps include the following steps 201 to 207.

[0033] Step 201: Collect the quarterly data of electricity consumption and influencing factors in the study area over the years to obtain the electricity consumption time series and the influencing factor time series.

[0034] Step 202: using the STL decomposition method to extract the power consumption trend item in the power consumption time series and the influencing factor trend item in the influencing factor time series respectively.

[0035] Step 203: Calculate the power consumption intensity time series according to the power consumption trend item and the influencing factor trend item.

[0036] Step 204: both the power consumption trend item and the power consumption intensity time series are used as the power consumption time series to be tested.

[0037] Step 205: using a Bayesian optimization algorithm, taking the minimization of the linear fitting error of the power consumption time series to be tested as the optimization goal, to determine the optimal number of segments and the optimal breakpoint set for linear fitting of the power consumption time series to be tested.

[0038] Step 206: performing piecewise linear fitting on the power consumption time series to be tested according to the optimal number of segments and the optimal breakpoint set during linear fitting of the power consumption time series to be tested, and obtaining a piecewise fitting image of the power consumption time series.

[0039] Step 207: Identify abnormal power consumption data in the study area from the power consumption time series segmented fitting image; the abnormal power consumption data includes abnormal power consumption and abnormal power consumption intensity.

[0040] By implementing the above steps 201 to 207 and performing data segmentation based on the trend items of the time series decomposition, the segmentation results can accurately reflect the inherent rules of electricity consumption, so that abnormal electricity consumption can be accurately identified in the segmentation results.

[0041] In another exemplary embodiment of the present application, the decomposition model used by the STL decomposition method is as follows: .

[0042] in, It is the time series of electricity consumption or the time series of influencing factors. The value of the moment, yes The Trend item at a certain moment indicates the long-term trend of the data. yes The seasonal component of the moment represents periodic fluctuations with a fixed period length. yes The residual component at the moment represents the random fluctuation or noise part.

[0043] STL is the abbreviation of seasonal-trend decomposition using LOESS (Locally Weighted Scatterplot Smoothing), in which LOESS is used to locally smooth the above time series data to extract the trend component. The local fitting of LOESS can enable STL to adapt to nonlinear and complex trend transformations. The specific steps are as follows.

[0044] 1. De-cycle.

[0045] In order to extract the trend term, we first need to remove the seasonal component, and then use cyclic subsequence smoothing to split the time series into subsequences according to the period. Each subsequence is smoothed independently to obtain a preliminary seasonal estimate. as follows: .

[0046] The following is the series after removing seasonality Perform LOESS smoothing to obtain the trend component.

[0047] 2. Choose the window size (smoothing parameter).

[0048] The window size q is one of the key parameters for trend smoothing and controls the number of points in the local window. Choose an appropriate window size based on the length and periodicity of the time series.

[0049] 3. Weighted local regression.

[0050] Use LOESS to perform locally weighted regression at each moment and fit the following model.

[0051] .

[0052] in, is the local intercept, representing the trend value of the target point; is the local slope, used to capture trend changes; is the first The moment of each sampling point; yes The error term at the moment represents the deviation between the actual value and the fitted value. , To estimate, the weights are given by the following cubic weight function Decide.

[0053] .

[0054] in, Indicates the parameters, , is the window width.

[0055] 4. Generate trend estimates.

[0056] For each moment, the fitted trend value is: This process is repeated for each moment, and finally the trend component of the entire series is obtained.

[0057] 5. Update and iterate.

[0058] The trend term is optimized repeatedly until convergence.

[0059] In another exemplary embodiment of the present application, the trend components of the power consumption time series and the influencing factor time series are extracted, and the power consumption intensity is calculated as the basis for subsequent analysis. The calculation formula of the power consumption intensity time series is as follows: .

[0060] in, is the power consumption intensity, is the electricity consumption trend item, is the impact factor trend term.

[0061] In another exemplary embodiment of the present application, the Bayesian optimization algorithm in the above step 205 automatically searches for the optimal combination of the number of segments and the breakpoint position. The Bayesian optimization algorithm can gradually narrow the search space and find the optimal solution by constructing a proxy model of the objective function under the condition of a limited number of function evaluations. When using the Bayesian optimization algorithm, the linear fitting error of the power consumption time series to be tested can be measured by the residual sum of squares, and the linear fitting error is as follows: .

[0062] in, is the linear fitting error, It is the first The actual value of the sampling point, It is the first The fitted value of the sampling points, is the number of sampling points in the power usage time series to be tested.

[0063] The specific steps of the Bayesian optimization algorithm are as follows.

[0064] (1) Establish an initial proxy model.

[0065] Use Gaussian Process (GP) to model the objective function , the mean of the proxy objective function and uncertainty .

[0066] .

[0067] in, represents a Gaussian process, Indicates a parameter.

[0068] (2) Select the acquisition function.

[0069] The acquisition function is defined according to the proxy model to select the next evaluation point. This application adopts the expected improvement, and the formula is as follows: .

[0070] in, represents the expected improvement function, is the current optimal target value, and E represents the expected value.

[0071] (3) Iterative optimization.

[0072] Under the guidance of the acquisition function, select new parameter combinations , for the objective function The evaluation is performed and the proxy model is updated. The process is repeated until the termination condition is reached.

[0073] Exemplarily, taking the time series of power consumption intensity as an example, the specific process of the above step 205 can be found in steps 301 to 303.

[0074] Step 301: Input the time series of power consumption intensity, independent variable (The first sampling point time), dependent variable (The first The actual value of the sampling points). , is the number of sampling points in the power usage time series to be tested.

[0075] Step 302: Define an objective function to minimize the fitting error. and a set of breakpoint locations , the linear fitting error is ,in , , is the time series of electricity consumption intensity. It is the first The fitted value of the sampling points, It is the first The actual value of each sampling point Using Linear Models Fitting, For the The fitted value of the segment, and For the The slope and intercept of the segment. , , , and The first breakpoint, the second breakpoint, the third breakpoint, Breakpoints and breakpoints.

[0076] The number of segments determines the complexity of the model. The more segments there are, the better the model can capture the local characteristics of the data. The breakpoint position set determines the segmentation points and affects the fitting accuracy of the model.

[0077] Step 303: Select the optimal number of segments using Bayesian optimization and the optimal breakpoint set .

[0078] In another exemplary embodiment of the present application, a piecewise linear fitting is performed on the power usage time sequence to be measured, and the obtained fitting straight line equation is as follows: .

[0079] in, It is the first The fitted value of the sampling points, It is the first The time of the sampling point, , is the number of sampling points in the power consumption sequence to be tested, is the optimal number of segments, is the optimal breakpoint set, , , , and The first optimal breakpoint, the second optimal breakpoint, the third optimal breakpoint, The optimal breakpoint and The optimal breakpoint, , and The slopes of the first segment of the fitted straight line, the second segment of the fitted straight line, and the The slope of the segment fitting line, , , …, It can be used as the intercept of the first segment of the fitted straight line, the intercept of the second segment of the fitted straight line, and so on. The intercept of the segment fitted line.

[0080] In another exemplary embodiment of the present application, the overall goodness of fit is calculated based on the result of the piecewise linear fitting. .

[0081] .

[0082] in, Yes all The mean of .

[0083] In another exemplary embodiment of the present application, after performing piecewise linear fitting on the power usage time series to be tested, a piecewise fitting image of the power usage time series is obtained, and the fitting result is visualized.

[0084] In another exemplary embodiment of the present application, the impact factor may be GDP.

[0085] In another exemplary embodiment of the present application, after the above step 202, the method may further include the following steps 401 to 402.

[0086] Step 401: using the Bayesian optimization algorithm, taking the minimization of the linear fitting error of the influencing factor trend term as the optimization goal, to determine the optimal number of segments and the optimal breakpoint set for the linear fitting of the influencing factor trend term.

[0087] Step 402: According to the optimal number of segments and the optimal breakpoint set during the linear fitting of the impact factor trend item, the impact factor trend item is subjected to piecewise linear fitting to obtain an impact factor piecewise fitting image.

[0088] The detailed process of this application method is as follows Figure 3 As shown: Start → Get original time series → LOESS local weighted smoothing → Update iteration → Linear piecewise fitting → Establish initial proxy model → Select acquisition function → Bayesian iterative optimization → Output decomposition results → End. Among them, LOESS local weighted smoothing and update iteration constitute STL decomposition, establishing initial proxy model, selecting acquisition function and Bayesian iterative optimization constitute Bayesian optimization, and linear piecewise fitting and Bayesian optimization constitute automatic piecewise linear fitting.

[0089] This application is based on objective electricity consumption data and economic data, calculates trend item data and electricity consumption intensity, and constructs an automatic segmented fitting model. Based on this, the feature extraction and stage division of the time series are realized. This method uses objective data to make the results more accurate and objective. Among them, the specific content of feature extraction is: first, extract long-term trend features through STL decomposition to obtain core trend data reflecting influencing factors and electricity consumption development direction; second, the calculated electricity consumption intensity is the key feature of energy utilization efficiency; third, the phased change characteristics extracted from each time series based on automatic segmented fitting.

[0090] The method of this application also has the following applications: on the one hand, the segmented data can reveal the trends and characteristics of different time stages, which helps to build a more accurate prediction model; on the other hand, by fitting the segmented trends, abnormal changes in certain stages (such as a sudden increase or decrease in electricity consumption, abnormal fluctuations in electricity consumption intensity, etc.) can be quickly discovered, which helps to discover potential risks early and provide assistance for power system risk management. In addition, the automatic segmented fitting method described in this application can also be migrated to other time series analysis fields (such as financial data, meteorological data, etc.), further enriching cross-domain algorithm research and development.

[0091] Taking a certain region as an example, the steps for automatic segmentation fitting and feature extraction of quarterly electricity consumption and quarterly GDP data from 2010 to 2021 are as follows: ① Determine the original data to be analyzed, specifically: quarterly electricity consumption and quarterly GDP data of a certain region. The data range used in this application is 2010-2021. ② The STL decomposition process of electricity consumption time series is as follows Figure 4 As shown, the STL decomposition process of the quarterly GDP time series is as follows Figure 5 As shown. Use STL decomposition to obtain the electricity consumption trend item and quarterly GDP trend item of a certain region from 2010 to 2021. ③ Calculate the electricity consumption intensity. Through the data obtained by the above decomposition, the quarterly electricity consumption intensity of a certain region from 2010 to 2021 is calculated. The data of quarterly electricity consumption trend item, quarterly GDP trend item and electricity consumption intensity from January 2010 to April 2015 are shown in Table 1, and the data of quarterly electricity consumption trend item, quarterly GDP trend item and electricity consumption intensity from January 2016 to April 2021 are shown in Table 2.

[0092] Table 1 Data from January 2010 to April 2015

[0093] Table 2 Data from January 2016 to April 2021

[0094] ④According to the piecewise linear fitting and Bayesian optimization algorithm, automatic piecewise fitting of the above three groups of time series is realized.

[0095] (1) Electricity consumption trend item.

[0096] The optimal number of segments is 7, and the optimal breakpoint set is The visual fitting results are as follows: Figure 6 As shown, the fitting results are as follows: .

[0097] in, is the time of the electricity consumption trend item, It is the actual value of electricity consumption in the electricity consumption trend item.

[0098] (2) Quarterly GDP trend item.

[0099] The optimal number of segments is 5, and the optimal breakpoint set is The visual fitting results are as follows: Figure 7 As shown, the fitting results are as follows: .

[0100] in, is the time of the quarterly GDP trend term when the optimal number of segments is 5, It is the actual value of quarterly GDP in the quarterly GDP trend item when the optimal number of segments is 5.

[0101] (3) Time series of electricity consumption intensity.

[0102] The optimal number of segments is 6, and the optimal breakpoint set is The visual fitting results are as follows: Figure 8 As shown, the fitting results are as follows: .

[0103] in, is the time of the quarterly GDP trend term when the optimal number of segments is 6, It is the actual value of quarterly GDP in the quarterly GDP trend item when the optimal number of segments is 6.

[0104] Figure 6 , Figure 7 and Figure 8 The time series nodes represented by the horizontal axis are 48 nodes formed from the first quarter of 2010 to the fourth quarter of 2021, with 1 node for each quarter.

[0105] ⑤ According to the results of piecewise linear fitting, calculate the overall goodness of fit .

[0106] The calculation shows that the goodness of fit of the piecewise linear fitting of quarterly electricity consumption in a certain region from 2010 to 2021 is 0.99906; the goodness of fit of the piecewise linear fitting of quarterly GDP is 0.99919; and the goodness of fit of electricity consumption intensity data is 0.99933.

[0107] In summary, this application fully considers the shortcomings of the existing technology, combines time series decomposition, statistical analysis and optimization technology, and constructs a more automated and accurate method for analyzing the dynamic relationship between electricity consumption and economic growth.

[0108] Based on the same inventive concept, the embodiment of the present application also provides a power usage anomaly identification device for implementing the power usage anomaly identification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more power usage anomaly identification device embodiments provided below can refer to the limitations of the power usage anomaly identification method above, and will not be repeated here.

[0109] In an exemplary embodiment, a device for identifying abnormal power consumption is provided, comprising: a collection module, a decomposition module, a calculation module, a definition module, an optimization module, a piecewise linear fitting module and an abnormality identification module.

[0110] The collection module is used to collect the quarterly data of electricity consumption and influencing factors in the study area over the years, and obtain the electricity consumption time series and the influencing factor time series; the decomposition module is used to use the STL decomposition method to extract the electricity consumption trend item in the electricity consumption time series and the influencing factor trend item in the influencing factor time series respectively; the calculation module is used to calculate the power consumption intensity time series according to the electricity consumption trend item and the influencing factor trend item; the definition module is used to use the electricity consumption trend item and the power consumption intensity time series as the electricity consumption time series to be tested; the optimization module is used to use the Bayesian A Yes optimization algorithm takes minimizing the linear fitting error of the power consumption time series to be tested as the optimization goal, and determines the optimal number of segments and the optimal set of breakpoints during the linear fitting of the power consumption time series to be tested; a piecewise linear fitting module is used to perform piecewise linear fitting on the power consumption time series to be tested according to the optimal number of segments and the optimal set of breakpoints during the linear fitting of the power consumption time series to be tested, and obtain a piecewise fitting image of the power consumption time series; an abnormality recognition module is used to identify abnormal power consumption data in the study area from the piecewise fitting image of the power consumption time series; the abnormal power consumption data includes abnormal power consumption and abnormal power consumption intensity.

[0111] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store abnormal power consumption data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for identifying abnormal power consumption is implemented.

[0112] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0113] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0114] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0116] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0117] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0119] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for identifying abnormal power consumption, characterized in that: The power consumption anomaly identification method comprises: Collect the quarterly data of electricity consumption and influencing factors in the study area over the years to obtain the time series of electricity consumption and influencing factors; The STL decomposition method is used to extract the power consumption trend item in the power consumption time series and the influence factor trend item in the influence factor time series respectively; Calculating a time series of power consumption intensity according to the power consumption trend item and the influencing factor trend item; The power consumption trend item and the power consumption intensity time series are both used as the power consumption time series to be tested; Using a Bayesian optimization algorithm, taking the minimum linear fitting error of the power consumption time series to be tested as the optimization goal, determining the optimal number of segments and the optimal breakpoint set when linearly fitting the power consumption time series to be tested; According to the optimal number of segments and the optimal breakpoint set during the linear fitting of the power consumption time series to be tested, the power consumption time series to be tested is subjected to piecewise linear fitting to obtain a piecewise fitting image of the power consumption time series; Abnormal electricity consumption data in the study area is identified from the electricity consumption time series segmented fitting image; the abnormal electricity consumption data includes abnormal electricity consumption and abnormal electricity consumption intensity.

2. The method for identifying abnormal power consumption according to claim 1, characterized in that: The decomposition model used by the STL decomposition method is: ; in, It is the time series of electricity consumption or the time series of influencing factors. The value of the moment, yes Trend items at the moment, yes The seasonal component of the moment, yes The residual component at time .

3. The method for identifying abnormal power consumption according to claim 1, characterized in that: The calculation formula of the power consumption intensity time series is: ; in, is the power consumption intensity, is the electricity consumption trend item, is the impact factor trend term.

4. The method for identifying abnormal power consumption according to claim 1, characterized in that: The calculation formula of the linear fitting error is: ; in, is the linear fitting error, It is the first The actual value of the sampling point, It is the first The fitted value of the sampling points, is the number of sampling points in the power usage time series to be tested.

5. The method for identifying abnormal power consumption according to claim 1, characterized in that: The piecewise linear fitting is performed on the power consumption time sequence to be tested, and the fitting straight line equation obtained is: ; in, It is the first The fitted value of the sampling points, It is the first The time of the sampling point, , is the number of sampling points in the power consumption sequence to be tested, is the optimal number of segments, is the optimal breakpoint set, , , , and The first optimal breakpoint, the second optimal breakpoint, the third optimal breakpoint, The optimal breakpoint and The optimal breakpoint, , and The slopes of the first segment of the fitted straight line, the second segment of the fitted straight line, and the The slope of the fitted line.

6. The method for identifying abnormal power consumption according to claim 1, characterized in that: The STL decomposition method is used to extract the power consumption trend item in the power consumption time series and the influencing factor trend item in the influencing factor time series, and then it also includes: Using the Bayesian optimization algorithm, taking the minimization of the linear fitting error of the influencing factor trend term as the optimization goal, determining the optimal number of segments and the optimal breakpoint set when the influencing factor trend term is linearly fitted; According to the optimal number of segments and the optimal breakpoint set during the linear fitting of the impact factor trend item, the impact factor trend item is subjected to piecewise linear fitting to obtain an impact factor piecewise fitting image.

7. A device for identifying abnormal power consumption, characterized in that: The power consumption abnormality identification device comprises: The collection module is used to collect the quarterly data of electricity consumption and influencing factors in the study area over the years, and obtain the time series of electricity consumption and the time series of influencing factors; A decomposition module is used to extract the power consumption trend item in the power consumption time series and the influence factor trend item in the influence factor time series respectively by using the STL decomposition method; A calculation module, used for calculating a time series of power consumption intensity according to the power consumption trend item and the influencing factor trend item; A definition module, used to use the power consumption trend item and the power consumption intensity time series as the power consumption time series to be tested; An optimization module, used to use a Bayesian optimization algorithm to minimize the linear fitting error of the power time series to be tested as an optimization goal, and determine the optimal number of segments and the optimal breakpoint set during the linear fitting of the power time series to be tested; A piecewise linear fitting module is used to perform piecewise linear fitting on the power time series to be tested according to the optimal number of segments and the optimal breakpoint set during the linear fitting of the power time series to be tested, so as to obtain a piecewise fitting image of the power time series; The abnormality identification module is used to identify abnormal electricity consumption data in the study area from the electricity consumption time series segmented fitting image; the abnormal electricity consumption data includes abnormal electricity consumption and abnormal electricity consumption intensity.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for identifying abnormal power consumption according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for identifying abnormal power consumption described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for identifying abnormal power consumption described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Meteorological index-based resident living electricity consumption forecasting method and equipment

    CN117522075A

  • Power grid equipment operation state prediction method based on machine learning

    CN118739296A

  • Acquisition reminding and life cycle abnormal data analysis method

    CN118940837A

  • Fault diagnosis method and system based on qualitative trend analysis and five-state bayesian network, and device and storage medium

    WO2023071220A1