Power inspection method and device based on data analysis and storage medium
By constructing a multi-dimensional electricity consumption matrix and using sliding windows of different scales, combined with a neural network model to detect abnormal electricity consumption, the problem of accurately detecting abnormal electricity consumption by users in existing technologies has been solved, thus achieving efficient power inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 国家电网有限公司客户服务中心
- Filing Date
- 2023-09-13
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies are insufficient to accurately detect abnormal electricity usage behavior of users in a short period of time, especially those minor abnormal electricity usage behaviors that occur within a few hours or over several consecutive days, and they fail to effectively combine environmental information for electricity auditing.
By constructing a multidimensional electricity consumption matrix and using sliding windows of different scales to slide on the matrix, electricity consumption data features are extracted. A neural network model is then used to detect electricity consumption anomalies, and combined with environmental information, accurate electricity audits are conducted.
It enables rapid detection of various forms of abnormal electricity use, improves the accuracy and efficiency of power inspections, and can promptly detect users' illegal electricity use behavior.
Smart Images

Figure CN117251781B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information technology, and in particular to a data analysis-based method, apparatus, and storage medium for power inspection. Background Technology
[0002] Electricity inspection refers to the collective supervision by electricity regulatory agencies over violations of relevant laws and regulations by power generation companies, transmission companies, power supply companies, power dispatching and trading institutions, and electricity users. In order to effectively supervise electricity users, it is essential to be able to promptly and accurately detect abnormalities in their electricity consumption behavior.
[0003] Existing technologies have proposed technical solutions for analyzing users' electricity consumption data.
[0004] For example, CN116227543A discloses a method, detection device, electronic device, and electronic equipment for detecting abnormal electricity consumption. The method includes: acquiring electricity consumption data and corresponding environmental information; generating an electricity consumption data sequence based on the electricity consumption data and the corresponding environmental information; inputting the electricity consumption data sequence into an LSTM-SVR neural network model to perform regression analysis on the electricity consumption data sequence using the LSTM-SVR neural network model, and obtaining the output result of the LSTM-SVR neural network model to obtain a predicted electricity consumption; acquiring the actual electricity consumption at the current moment; calculating the L2 norm between the predicted electricity consumption and the actual electricity consumption; and marking the actual electricity consumption as the first abnormal electricity consumption data if the L2 norm value is greater than a preset threshold, so as to determine the cause of the abnormal electricity consumption based on the first abnormal electricity consumption data. This application solves the problem of time-consuming and labor-intensive methods for detecting abnormal electricity consumption in the prior art.
[0005] CN116069815A discloses a method, apparatus, device, and storage medium for identifying abnormal electricity users. The method includes: acquiring the current month's electricity consumption and historical electricity consumption from the user's total electricity meter; determining a preset filtering rule corresponding to the user based on the user type, wherein the user type includes public transformer residential users and / or dedicated transformer residential users; and identifying abnormal electricity users based on the preset filtering rule, according to the current month's electricity consumption and the historical electricity consumption. This method can improve the efficiency of identifying abnormal electricity users while reducing the cost of manual verification.
[0006] However, in reality, users' violations of electricity usage take many forms. Some users' abnormal electricity usage can occur within a few hours. Furthermore, some users' abnormal usage may occur continuously for several days, but because the abnormalities are subtle each day, they are difficult to detect and require observation over a longer period. Moreover, users' electricity usage behavior must be consistent with environmental information (such as temperature and humidity), and this environmental information changes constantly throughout the 24 hours of a day. Current technology, by neglecting this aspect, can easily lead to inaccurate identification of users' abnormal electricity usage behavior, thus making electricity audits difficult.
[0007] The existing technologies have the aforementioned technical problems, and no effective solutions have yet been proposed. Summary of the Invention
[0008] The embodiments of this application provide a data analysis-based power inspection method, apparatus, and storage medium to at least solve the technical problems in the prior art that require continuous observation of abnormal situations over a long period of time and cannot accurately determine users' abnormal electricity consumption behavior, thus leading to difficulties in power inspection.
[0009] According to one aspect of the embodiments of this application, a power inspection method based on data analysis is provided, comprising: acquiring historical electricity consumption information and historical environmental information of users; generating a multi-dimensional electricity consumption matrix corresponding to users based on the historical electricity consumption information and historical environmental information, according to multiple time periods divided into a whole day, wherein each matrix channel of the multi-dimensional electricity consumption matrix corresponds to a different time period, and each column of each matrix channel corresponds to electricity consumption information and environmental information corresponding to different dates and corresponding time periods; sliding multiple pre-set sliding windows of different scales on the multi-dimensional electricity consumption matrix in chronological order, and extracting features from the data defined by each sliding window position to generate electricity consumption data features corresponding to each sliding window position; determining the abnormal position of the sliding window where there is an electricity consumption anomaly based on the electricity consumption data features; and determining the electricity consumption anomaly information corresponding to the abnormal position of the sliding window based on the electricity consumption data features corresponding to the abnormal position of the sliding window.
[0010] According to another aspect of the embodiments of this application, a storage medium is also provided, the storage medium including a stored program, wherein, when the program is executed, the method described in any one of the above methods is executed by a processor.
[0011] According to another aspect of the embodiments of this application, a power inspection device based on data analysis is also provided, comprising: an information acquisition module for acquiring historical electricity consumption information and historical environmental information of users; a matrix generation module for generating a multi-dimensional electricity consumption matrix corresponding to users based on the historical electricity consumption information and historical environmental information, according to multiple time periods divided into a whole day, wherein each matrix channel of the multi-dimensional electricity consumption matrix corresponds to a different time period, and each column of each matrix channel corresponds to electricity consumption information and environmental information corresponding to different dates and corresponding time periods; a feature generation module for sliding multiple pre-set sliding windows of different scales in chronological order on the multi-dimensional electricity consumption matrix, and extracting features from the data defined by each sliding window position to generate electricity consumption data features corresponding to each sliding window position; a position determination module for determining the abnormal position of the sliding window where there is an electricity consumption anomaly based on the electricity consumption data features; and an information determination module for determining the electricity consumption anomaly information corresponding to the abnormal position of the sliding window based on the electricity consumption data features corresponding to the abnormal position of the sliding window.
[0012] According to another aspect of the embodiments of this application, a power inspection device based on data analysis is also provided, including: a processor; and a memory connected to the processor, used to provide the processor with instructions for processing the following steps: acquiring historical electricity consumption information and historical environmental information of a user; generating a multi-dimensional electricity consumption matrix corresponding to the user based on the historical electricity consumption information and historical environmental information, according to multiple time periods divided into a whole day, wherein each matrix channel of the multi-dimensional electricity consumption matrix corresponds to a different time period, and each column of each matrix channel corresponds to electricity consumption information and environmental information corresponding to different dates and corresponding time periods; sliding multiple pre-set sliding windows of different scales on the multi-dimensional electricity consumption matrix in chronological order, and extracting features from the data defined by each sliding window position to generate electricity consumption data features corresponding to each sliding window position; determining the abnormal position of the sliding window where there is an electricity consumption abnormality based on the electricity consumption data features; and determining the electricity consumption abnormality information corresponding to the abnormal position of the sliding window based on the electricity consumption data features corresponding to the abnormal position of the sliding window.
[0013] In this embodiment, a multi-dimensional electricity consumption matrix is constructed by dividing a day into multiple time periods and placing electricity consumption and environmental information corresponding to the same time period in the same matrix channel. This ensures that the same matrix channel contains electricity consumption and environmental information for the same time period on different dates, while different matrix channels contain electricity consumption and environmental information for different time periods. This approach increases the similarity of electricity consumption and environmental information within the same matrix channel, making it easier to accurately detect dates or periods with abnormal electricity consumption through feature extraction and data analysis. Furthermore, this technical solution utilizes sliding windows of different scales to slide across the multi-dimensional electricity consumption matrix. Feature extraction is performed based on the data defined by the sliding windows at each sliding position to generate electricity consumption data features corresponding to the sliding windows at each sliding position. Then, based on these electricity consumption data features, the abnormal position of the sliding window with abnormal electricity consumption is determined, and the corresponding electricity consumption anomaly information is identified. Therefore, the method in this embodiment can detect electricity consumption anomalies using sliding windows of different scales, thereby enabling the detection of different forms of electricity consumption anomalies. This solves the problems existing in the current technology and enables accurate power inspection. Attached Figure Description
[0014] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0015] Figure 1 This is a hardware structure block diagram of a computing device used to implement the method described in Embodiment 1 of this application;
[0016] Figure 2 This is a flowchart illustrating the power inspection method based on data analysis according to the first aspect of Embodiment 1 of this application;
[0017] Figure 3A This is a schematic diagram of the power consumption multidimensional matrix M according to the first aspect of Embodiment 1 of this application;
[0018] Figure 3B This is a simplified diagram of the power consumption multidimensional matrix M according to the first aspect of Embodiment 1 of this application;
[0019] Figure 4A This is a schematic diagram of a sliding window of scale L sliding in a power multidimensional matrix according to the first aspect of Embodiment 1 of this application;
[0020] Figure 4B This is another schematic diagram of a sliding window with a scale of L sliding in an electrical multidimensional matrix according to the first aspect of Embodiment 1 of this application;
[0021] Figure 4C This is yet another schematic diagram of a sliding window with a scale of L sliding in a multidimensional electrical matrix according to the first aspect of Embodiment 1 of this application;
[0022] Figure 5 This is a schematic diagram of the power consumption vector contained in a sliding window of scale L at position P according to the first aspect of Embodiment 1 of this application;
[0023] Figure 6 This is a schematic diagram of the electricity consumption data feature FLP as described in the first aspect of Embodiment 1 of this application;
[0024] Figure 7 This is a schematic diagram of a first detection model based on a neural network according to the first aspect of Embodiment 1 of this application;
[0025] Figure 8 This is a schematic diagram of a second detection model based on a neural network according to the first aspect of Embodiment 1 of this application;
[0026] Figure 9 This is a schematic diagram of a data analysis-based power inspection device according to Embodiment 2 of this application; and
[0027] Figure 10 This is a schematic diagram of a data analysis-based power inspection device according to Embodiment 3 of this application. Detailed Implementation
[0028] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] Example 1
[0031] According to this embodiment, a method embodiment of a power inspection method based on data analysis is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.
[0032] The method embodiments provided in this example can be executed on mobile terminals, computer terminals, servers, or similar computing devices. Figure 1 A hardware block diagram of a computing device for implementing a data analysis-based power inspection method is shown. Figure 1 As shown, a computing device may include one or more processors (processors may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), memory for storing data, transmission devices for communication functions, and input / output interfaces. The memory, transmission devices, and input / output interfaces are connected to the processor via a bus. In addition, it may also include a display, keyboard, and cursor control device connected to the input / output interfaces. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, a computing device may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0033] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits can be implemented wholly or partially as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits can be a single, independent processing module, or wholly or partially integrated into any other element in the computing device. As involved in the embodiments of this application, the data processing circuit serves as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0034] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the data analysis-based power inspection method in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the data analysis-based power inspection method of the aforementioned application. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the computing device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0035] The transmission device is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the computing device's communications provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0036] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows users to interact with the user interface of the computing device.
[0037] It should be noted here that, in some optional embodiments, the above... Figure 1 The computing device shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computing devices.
[0038] Under the aforementioned operating environment, according to the first aspect of this embodiment, a data analysis-based power inspection method is provided, which consists of... Figure 1 The computing device shown is implemented. Figure 2 A flowchart illustrating the method is shown below. (Refer to...) Figure 2 As shown, the method includes:
[0039] S202: Obtain the user's historical electricity consumption information and historical environmental information;
[0040] S204: Based on historical electricity consumption information and historical environmental information, generate a multi-dimensional electricity consumption matrix corresponding to the user according to multiple time periods divided into a whole day. Each matrix of the multi-dimensional electricity consumption matrix corresponds to a different time period, and each column of each matrix corresponds to the electricity consumption information and environmental information corresponding to different dates and corresponding time periods.
[0041] S206: Using multiple pre-set sliding windows of different scales, slide them on the electricity consumption multidimensional matrix in chronological order, and extract features from the data defined by each sliding window position to generate electricity consumption data features corresponding to each sliding window position.
[0042] S208: Based on the characteristics of electricity consumption data, determine the abnormal location of the sliding window where abnormal electricity consumption exists; and
[0043] S210: Determine the abnormal power consumption information corresponding to the abnormal position of the sliding window based on the power consumption data characteristics corresponding to the abnormal position of the sliding window.
[0044] Specifically, to monitor abnormal electricity consumption by users, the computing device can, for example, acquire the user's historical electricity consumption information. Specifically, the computing device can acquire the user's electricity consumption information within a predetermined period (e.g., the past year). This electricity consumption information could be, for example, the user's electricity consumption per hour. Furthermore, to ensure the accuracy of the monitoring results, the electricity consumption information could be, for example, the user's electricity consumption information for each date within the predetermined period. In addition, the computing device also acquires historical environmental information related to the user. This historical environmental information could be, for example, the user's environmental information within the predetermined period. For example, it could be temperature, humidity, illuminance, etc., related to the user per hour. And as described above, the computing device acquires electricity consumption information corresponding to the date (S202).
[0045] Therefore, electricity consumption information and environmental information corresponding to each hour can be obtained, and an electricity consumption vector related to the user can be constructed based on the electricity consumption information and environmental information:
[0046] V = [E1, E2, E3, ..., E m-1 ,I] T =[v1,v2,v3,...,vm ] T .
[0047] Where E1~E m-1 These represent different environmental parameters, such as temperature, humidity, and illuminance. I represents the user's electricity consumption. Furthermore, these parameters have already undergone preprocessing, such as normalization, to facilitate further feature extraction.
[0048] For ease of subsequent calculations, each power consumption vector V is defined as [v1, v2, v3, ..., v m ] T , where v1~v m-1 They are respectively equal to E1 to E m-1 And I = v m The value of m is related to the number of environmental parameters selected, which will not be elaborated here.
[0049] Furthermore, to more accurately monitor users' abnormal electricity consumption, the day can be divided into the following different time periods in advance:
[0050] Time slot 1: 23:00 (the previous day) to 6:00;
[0051] Time slot 2: 6:00–9:00;
[0052] Time slot 3: 9:00–11:00;
[0053] Time slot 4: 11:00–14:00;
[0054] Time slot 5: 14:00–18:00;
[0055] Time slot 6: 18:00~23:00.
[0056] Therefore, for each date, the computing device can determine six different electricity consumption vectors V, which characterize the environmental information and electricity consumption at different times corresponding to the same period. The criterion for dividing the different time periods is to reflect the approximation of electricity consumption during the same time period across different dates as much as possible. For example, for different dates, the electricity consumption from 11:00 PM to 6:00 AM the next day has a certain approximation, the electricity consumption from 6:00 AM to 9:00 AM has a certain approximation, and so on, the electricity consumption from 6:00 PM to 11:00 PM has a certain approximation. In addition, those skilled in the art can also divide the time periods according to actual circumstances, which will not be elaborated here.
[0057] Furthermore, for multiple different dates within the aforementioned predetermined period (e.g., n dates), and the different time periods divided for each date, the electricity consumption multidimensional matrix M = [M1, M2, ..., M6] corresponding to the user can be determined based on the above definition of the electricity consumption vector V. T (S204)
[0058] Where M i (i = 1 to 6) represent the matrix channels corresponding to different time periods, where
[0059] M i =[V i,1 V i,2 V i,3 ,...,V i,n ], where the electric vector V i,j This is used to represent the electricity consumption vector for the i-th time period on the j-th date, where j = 1 to n. And where:
[0060] V i,j =[v i,j,1 ,v i,j,2 ,v i,j,3 ,...,v i,j,m ] T , where v i,j,k Corresponding to the electric vector V i,j The k-th element (k = 1 to m). Where v i,j,1 ~v i,j,m-1 E1 to E1 corresponding to the i-th time period of the j-th date m-1 And v i,j,1 I corresponds to the i-th time period of the j-th date.
[0061] in, Figure 3A A schematic diagram of the electricity consumption multidimensional matrix M is shown. Figure 3B A simplified diagram of the electricity consumption multidimensional matrix M is shown.
[0062] Then, the computing device slides multiple pre-set sliding windows of different scales on the electricity consumption multidimensional matrix in chronological order, and extracts features from the data defined by each sliding window step to generate electricity consumption data features corresponding to each sliding window step (S206).
[0063] Specifically, according to this embodiment, multiple sliding windows of different scales can be set, such as 5, 10, 15, 20, ..., 100, etc. Each scale represents the number of days included in the sliding window. For example, scale 5 means the sliding window contains 5 days. Scale 10 means the sliding window contains 10 days. And so on, with scale 100 meaning the sliding window contains 100 days.
[0064] Furthermore, Figures 4A to 4C A schematic diagram is shown of a sliding window of scale L (L can be any scale set in this embodiment) sliding within a multidimensional power consumption matrix. Figures 4A to 4C The example given is L=5, but it also applies to other values of L.
[0065] refer to Figure 4A As shown, the sliding window first includes the power consumption vectors corresponding to each matrix channel M1 to M6 from day 1 to day L in the first step. For example, the power consumption vector V of matrix channel M1... 11 ~V 15 (i.e. V) 1L The power consumption vector V of matrix channel M2 2,1 ~V 2,5 (i.e. V) 2,L Similarly, the power consumption vector V of matrix channel M6... 6,1 ~V 6,5 (i.e. V) 6,L Therefore, the computing device can perform feature extraction based on the above data, thereby generating electricity consumption data features corresponding to the sliding window in this step.
[0066] Then, refer to Figure 4B As shown, the sliding window slides across the electricity consumption multidimensional matrix, thus the second step includes the electricity consumption vectors corresponding to each matrix channel M1 to M6 from day 2 to day L+1. For example, the electricity consumption vector V of matrix channel M1... 1,2 ~V 1,6 (i.e. V) 1,L+1 The power consumption vector V of matrix channel M2 2,1 ~V 2,6 (i.e. V) 2,L+1 Similarly, the power consumption vector V of matrix channel M6... 6,1 ~V 6,6 (i.e. V) 6,L+1 Therefore, the computing device can perform feature extraction based on the above data, thereby generating electricity consumption data features corresponding to the sliding window in this step.
[0067] And so on, for reference Figure 4C As shown, the sliding window slides across the electricity consumption multidimensional matrix until the last day of the predetermined period (i.e., day n). Thus, this sliding window step includes the electricity consumption vectors corresponding to each matrix channel M1 to M6 from day (n-L+1) to day n. For example, the electricity consumption vector V of matrix channel M1... 1,n-4 (i.e. V) 1,n-L+1 )~V 1,n The power consumption vector V of matrix channel M2 2,n-4 (i.e. V) 2,n-L+1 )~V 2,n Similarly, the power consumption vector V of matrix channel M6 6,n-4(i.e. V) 6,n-L+1 )~V 6,n Therefore, the computing device can perform feature extraction based on the above data, thereby generating electricity consumption data features corresponding to the sliding window in this step.
[0068] Therefore, refer to Figures 4A to 4C The computing device uses sliding windows of different scales L to slide on the electricity consumption multidimensional matrix M, thereby obtaining the electricity consumption multidimensional data M defined by each scale L in each sliding step, and generating corresponding electricity consumption data features based on the defined data.
[0069] The calculation device then obtains the electricity consumption data characteristics corresponding to the data defined by sliding windows of different scales L at different positions (S206). The generation of electricity consumption data characteristics will be explained in detail below.
[0070] Then, the computing device inputs the electricity consumption data features corresponding to different positions of sliding windows at different scales L into a pre-set first classification model. Based on the classification operation of the first classification model, it determines whether there is an electricity consumption anomaly in the electricity consumption data (i.e., each electricity consumption vector) corresponding to that position of the sliding window. If an electricity consumption anomaly exists, the corresponding position of the sliding window at that scale is determined as the anomaly position, indicating that the electricity consumption data defined by the sliding window at that position is abnormal (S208). The first classification model will be described in detail below.
[0071] Then, the computing device inputs the power consumption data features corresponding to the abnormal position of the sliding window into a pre-set second classification model, thereby determining the power consumption anomaly information corresponding to the abnormal position of the sliding window, wherein the power consumption anomaly information is used to indicate what type of power consumption anomaly the anomaly may be (S210). The second classification model will be described in detail below.
[0072] As described in the background section, in reality, users' violations of electricity usage take many forms. Some users' abnormal electricity usage can occur within a few hours. Furthermore, some users' abnormal electricity usage may occur continuously for several days; however, because the abnormalities are subtle each day, they are difficult to detect and require observation over a longer period. Moreover, users' electricity usage behavior must be consistent with environmental information (such as temperature and humidity), and this environmental information changes constantly throughout the 24 hours of a day. Existing technologies, by neglecting this aspect, are prone to inaccurately identifying users' abnormal electricity usage behavior, thus leading to difficulties in electricity auditing.
[0073] Therefore, according to this embodiment, by dividing a whole day into multiple time periods, the electricity consumption information and environmental information corresponding to the same time period are set in the same matrix channel, thereby constructing an electricity consumption multi-dimensional matrix. This ensures that the same matrix channel contains electricity consumption information and environmental information for the same time period on different dates, while different matrix channels contain electricity consumption information and environmental information for different time periods. This approach makes the electricity consumption information and environmental information within the same matrix channel more similar, thus facilitating the accurate detection of dates or periods with abnormal electricity consumption through feature extraction and data analysis. Furthermore, this technical solution utilizes sliding windows of different scales to slide on the electricity consumption multi-dimensional matrix, and performs feature extraction based on the data defined by the sliding windows of different scales at each sliding position to generate electricity consumption data features corresponding to the sliding windows of different scales at each sliding position. Then, based on these electricity consumption data features, the abnormal position of the sliding window where electricity consumption is abnormal is determined, and the electricity consumption abnormality information corresponding to the abnormal sliding window position is determined. Therefore, the method of this embodiment can detect electricity consumption abnormalities using sliding windows of different scales, thereby detecting different forms of electricity consumption abnormalities. This solves the problems existing in the current technology and enables accurate power inspection.
[0074] Optionally, the operation of extracting features from the data defined by the sliding window at each sliding window position to generate electricity consumption data features corresponding to each sliding window position includes: calculating the correlation value between the electricity consumption vectors of each matrix channel in the sliding window; calculating the weight value between the electricity consumption vectors of each matrix channel based on the correlation value; determining the corresponding feature vector based on the electricity consumption vector and the corresponding weight value; determining the feature matrix corresponding to the matrix channel based on the feature vector; and fusing multiple feature matrices to generate electricity consumption data features.
[0075] in, Figure 5 A schematic diagram is shown of the power consumption vector contained in a sliding window of scale L at position P. Here, L can be any scale as described above, and position P can be any sliding position as described above. The following is in conjunction with... Figure 5 This describes the feature extraction process performed on the data within the sliding window.
[0076] refer to Figure 5 As shown, the sliding window contains: the power consumption vector VP in matrix channel M1. 1,1 ~VP 1,L The power consumption vector VP in matrix channel M2 2,1 ~VP 2,L The power consumption vector VP in matrix channel M3 3,1 ~VP 3,L The power consumption vector VP in matrix channel M4 4,1 ~VP 4,LThe power consumption vector VP in matrix channel M5 5,1 ~VP 5,L The power consumption vector VP in matrix channel M6 6,1 ~VP 6,L .
[0077] Among them, the power vector VP 1,1 ~VP 1,L This represents the first to Lth power consumption vectors of the sliding window at position P with scale L for matrix channel M1. Power consumption vector VP 2,1 ~VP 2,L This represents the first to Lth power consumption vectors of the sliding window at position P with scale L for matrix channel M2. Power consumption vector VP 3,1 ~VP 3,L This represents the first to the Lth power consumption vectors of the sliding window at position P with scale L for matrix channel M3. Power consumption vector VP 4,1 ~VP 4,L This represents the first to the Lth power consumption vectors of the sliding window at position P with scale L for matrix channel M4. Power consumption vector VP 5,1 ~VP 5,L This represents the first to Lth power consumption vectors of the sliding window at position P with scale L for matrix channel M5. Power consumption vector VP 6,1 ~VP 6,L This represents the first to the Lth power consumption vectors of the sliding window located at position P with scale L for matrix channel M6.
[0078] Among them VP i,x =[vp i,x,1 ,vp i,x,2 ,...,vp i,x,m ], where vp i,x,m (i = 1 to 6, x = 1 to L, k = 1 to m) represents matrix channel M. i It is the k-th element of the x-th power consumption vector located at position P in a sliding window with scale L. Its definition is referenced from v1 to v2. m This will not be elaborated upon here.
[0079] The power consumption vector VP in matrix M1 1,1 ~VP 1,L Taking this as an example, first select the power consumption vector VP. 1,1 Calculate the power consumption vector VP respectively. 1,1 With each power consumption vector VP 1,1 ~VP 1,L Correlation value R between 1,1,1 ~R 1,1,L :
[0080]
[0081] Where x = 1 to L, k = 1 to m.
[0082] Thus, the power consumption vector VP of matrix channel M1 can be obtained. 1,1 With each power consumption vector VP of matrix channel M1 1,x The correlation value R between them 1,1,1 ~R 1,1,L .
[0083] Then, the computing device uses the sigmoid function, based on the power consumption vector VP. 1,1 With each power consumption vector VP 1,1 ~VP 1,L Correlation value R between 1,1,1 ~R 1,1,L Calculate each power consumption vector VP 1,1 ~VP 1,L Relative to the power consumption vector VP 1,1 weight value w 1,1,1 ~w 1,1,L The computing device then calculates the value of VP according to the following formula. 1,1 Corresponding eigenvector VF 1,1 :
[0084]
[0085] Similarly, for VP 1,1 ~VP 1,L any vector VP in 1,y (y=1~L), calculate the power consumption vector VP according to the following formula. 1,y With each power consumption vector VP 1,1 ~VP 1,L Correlation value R between 1,y,1 ~R 1,y,L :
[0086]
[0087] Then, the computing device uses the sigmoid function, based on the power consumption vector VP. 1,y With each power consumption vector VP 1,1 ~VP 1,L Correlation value R between 1,y,1 ~R 1,y,L Calculate each power consumption vector VP 1,1 ~VP 1,L Relative to the power consumption vector VP 1,y weight value w 1,y,1 ~w 1,y,L The computing device then calculates the value of VP according to the following formula. 1,y Corresponding eigenvector VF 1,y :
[0088]
[0089] In this way, the power consumption vector VP is determined. 1,1 ~VP 1,L The corresponding feature vector VF 1,1 ~VF 1,L Therefore, VF 1,1 ~VF 1,L The matrix channel M1 and the feature matrix FLP1 corresponding to the sliding window are formed.
[0090] Using the same method, the computing device can determine the feature matrix FLP2 corresponding to the sliding window of matrix channel M2, the feature matrix FLP3 corresponding to the sliding window of matrix channel M3, the feature matrix FLP4 corresponding to the sliding window of matrix channel M4, the feature matrix FLP5 corresponding to the sliding window of matrix channel M5, and the feature matrix FLP6 corresponding to the sliding window of matrix channel M6.
[0091] Then, the computing device fuses (concats) the feature matrices FLP1 to FLP6 to ultimately determine the electricity consumption data feature FLP corresponding to the sliding window at the sliding position P of scale L. (Reference) Figure 6 As shown, the electricity consumption data feature FLP is feature data in matrix form.
[0092] Therefore, using the above methods, feature data in matrix form can be generated for sliding windows of different scales L at different sliding positions P. Further details will not be elaborated here.
[0093] Therefore, this technical solution integrates the feature data of different days within a sliding window, and then extracts the features of each day. By taking into account the correlation of daily electricity consumption when extracting features, it is possible to more accurately determine the electricity consumption situation.
[0094] Optionally, the operation of determining the abnormal position of the sliding window where there is an abnormal power consumption based on the power consumption data characteristics includes: inputting the power consumption data characteristics into a preset first detection model, wherein the first detection model is used to detect whether there is an abnormal power consumption in the data defined in the sliding window corresponding to the power consumption data characteristics; determining the probability that there is an abnormal power consumption in the data defined in the sliding window corresponding to the power consumption data characteristics and the probability that there is no abnormal power consumption through the first detection model; and determining the position of the data where the probability of the sliding window having an abnormal power consumption is greater than or equal to the probability that there is no abnormal power consumption.
[0095] Specifically, Figure 7 A schematic diagram of the first detection model based on a neural network is shown. (Reference) Figure 7As shown, the computing device inputs the matrix-form electricity consumption data features (FLP) into a first detection model based on a neural network. (Reference) Figure 7 As shown, the first detection model includes a neural network and a softmax classifier. The output layer of the neural network has two neurons, which output the integral values indicating the presence and absence of power consumption anomalies within the sliding window corresponding to the scale and sliding position of the power consumption data feature FLP. The softmax classifier interacts with the output layer and outputs the probabilities wp1 and wp2 of the presence and absence of power consumption anomalies within the sliding window corresponding to the scale and sliding position of the power consumption data feature FLP, based on the integral values output by the output layer. That is, the first detection model can be, for example, a binary classification model based on a neural network, detecting the presence or absence of power consumption anomalies for each sliding window.
[0096] For example, the computing device inputs the electricity consumption data feature FLP into the input layer of the neural network of the first detection model. Then, the output layer of the neural network outputs the integral values of the data defined by the sliding window of the scale and sliding position corresponding to the electricity consumption data feature FLP, indicating whether electricity consumption anomalies exist and whether they do not. Next, a softmax classifier outputs the probabilities wp1 and wp2 of the data defined by the sliding window of the scale and sliding position corresponding to the electricity consumption data feature FLP, based on the output integral values. The sum of the probabilities wp1 and wp2 of the electricity consumption anomaly is 1.
[0097] If the probability wp1 of the data defined by the sliding window being an abnormal power consumption is greater than or equal to the probability wp2 of not being an abnormal power consumption, then the computing device determines that the data defined by the sliding window is an abnormal power consumption. The computing device then determines the position of the power consumption data feature FLP corresponding to the sliding window with the abnormal power consumption, and records the power consumption data feature FLP as feature data FLP'.
[0098] If the probability wp1 of the data defined by the sliding window being an abnormal power consumption is less than the probability wp2 of the data not being an abnormal power consumption, then the computing device determines that the data defined by the sliding window is not an abnormal power consumption.
[0099] Therefore, this technical solution uses the first detection model to determine whether there is any power consumption abnormality in the data defined by each sliding window, thereby quickly filtering out sliding windows with power consumption abnormalities.
[0100] Optionally, the operation of determining the power consumption anomaly information corresponding to the abnormal position of the sliding window based on the power consumption data characteristics corresponding to the abnormal position of the sliding window includes: inputting the power consumption data characteristics corresponding to the abnormal position of the sliding window into a preset second detection model, wherein the second detection model is used to determine the type of power consumption anomaly; determining the type of power consumption anomaly of the power consumption data characteristics corresponding to the abnormal position of the sliding window through the second detection model; and using the type of power consumption anomaly of the power consumption data characteristics corresponding to the abnormal position of the sliding window as the power consumption anomaly information.
[0101] Specifically, Figure 8 A schematic diagram of a second detection model based on a neural network is shown. (Reference) Figure 8 As shown, the second detection model includes a neural network and a softmax classifier. The output layer of the neural network has multiple neurons, each outputting an integral value for a different type of power outage. The softmax classifier interacts with the output layer and outputs probability values ga1, ga2, ..., ga1 for each type of power outage based on the integral values output by the output layer. b The second detection model could be, for example, a neural network-based multi-classification model used to determine the type of power consumption anomaly by using a sliding window to identify such anomalies.
[0102] For example, the computing device inputs the feature data FLP' of abnormal power consumption into the input layer of the neural network of the second detection model. Then, the output layer of the neural network outputs the integral value of each type of abnormal power consumption. Finally, a softmax classifier outputs the probability values ga1, ga2, ..., ga1 of each type of abnormal power consumption based on the integral values output by the output layer. b The probabilities of each type of abnormal electricity consumption are ga1, ga2, ..., ga1. b The sum of is 1. Where b ≥ 2.
[0103] Furthermore, the computing device assigns probabilities ga1, ga2, ..., ga1 to each type of power consumption anomaly. b The type of electrical anomaly with the highest probability value is selected as the type of electrical anomaly corresponding to the feature data FLP'. The computing device then uses the type of electrical anomaly corresponding to the feature data FLP' as the electrical anomaly information. The types of electrical anomalies can include: short circuit, undervoltage, undercurrent, phase shift, etc.
[0104] Therefore, this technical solution can quickly and accurately determine the type of power consumption abnormality for all sliding windows with power consumption abnormalities through the second detection model, and thus handle the abnormality in a targeted manner according to the type of power consumption abnormality.
[0105] In addition, refer to Figure 1As shown, according to a second aspect of this embodiment, a storage medium is provided. The storage medium includes a stored program, wherein, when the program is executed, a processor performs any of the methods described above.
[0106] Therefore, according to this embodiment, by dividing a whole day into multiple time periods, the electricity consumption information and environmental information corresponding to the same time period are set in the same matrix channel, thereby constructing an electricity consumption multi-dimensional matrix. This ensures that the same matrix channel contains electricity consumption and environmental information for the same time period on different dates, while different matrix channels contain electricity consumption and environmental information for different time periods. This approach makes the electricity consumption and environmental information within the same matrix channel more similar, thus facilitating the accurate detection of dates or periods with abnormal electricity consumption through feature extraction and data analysis. Furthermore, this technical solution utilizes sliding windows of different scales to slide across the electricity consumption multi-dimensional matrix, and performs feature extraction based on the data defined by the sliding windows at each sliding position to generate electricity consumption data features corresponding to the sliding windows at each sliding position. Then, based on these electricity consumption data features, the abnormal position of the sliding window where electricity consumption is abnormal is determined, and the electricity consumption abnormality information corresponding to the abnormal sliding window position is identified. Therefore, the method of this embodiment can detect electricity consumption abnormalities using sliding windows of different scales, thereby detecting different forms of electricity consumption abnormalities. This solves the problems existing in the current technology and enables accurate power inspection.
[0107] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0109] Example 2
[0110] Figure 9 A data analysis-based power inspection device 900 according to this embodiment is shown, which corresponds to the method described according to the first aspect of Embodiment 1. (See reference...) Figure 9 As shown, the device 900 includes: an information acquisition module 910 for acquiring the user's historical electricity consumption information and historical environmental information; a matrix generation module 920 for generating a multi-dimensional electricity consumption matrix corresponding to the user based on the historical electricity consumption information and historical environmental information, according to multiple time periods divided into a whole day, wherein each matrix channel of the multi-dimensional electricity consumption matrix corresponds to a different time period, and each column of each matrix channel corresponds to the electricity consumption information and environmental information corresponding to different dates and corresponding time periods; a feature generation module 930 for sliding multiple pre-set sliding windows of different scales in chronological order on the multi-dimensional electricity consumption matrix, and extracting features from the data defined by each sliding window position to generate electricity consumption data features corresponding to each sliding window position; a position determination module 940 for determining the abnormal position of the sliding window where there is an electricity consumption anomaly based on the electricity consumption data features; and an information determination module 950 for determining the electricity consumption anomaly information corresponding to the abnormal position of the sliding window based on the electricity consumption data features corresponding to the abnormal position of the sliding window.
[0111] Optionally, the feature generation module 930 includes: a first calculation submodule for calculating the correlation value between the power consumption vectors of each matrix channel in the sliding window; a second calculation submodule for calculating the weight value between the power consumption vectors of each matrix channel based on the correlation value; a vector determination submodule for determining the corresponding feature vector based on the power consumption vector and the corresponding weight value; a matrix determination submodule for determining the feature matrix corresponding to the matrix channel based on the feature vector; and a feature generation submodule for fusing multiple feature matrices to generate power consumption data features.
[0112] Optionally, the location determination module 940 includes: a first input submodule, used to input electricity consumption data features into a preset first detection model, wherein the first detection model is used to detect whether there is an electricity consumption anomaly in the data defined in the sliding window corresponding to the electricity consumption data features; a probability determination submodule, used to determine, through the first detection model, the probability that there is an electricity consumption anomaly in the data defined in the sliding window corresponding to the electricity consumption data features and the probability that there is no electricity consumption anomaly; and a location determination submodule, used to determine the location of the data in the sliding window whose probability of having an electricity consumption anomaly is greater than or equal to the probability that there is no electricity consumption anomaly.
[0113] Optionally, the information determination module 950 includes: a second input submodule, used to input the power consumption data features corresponding to the abnormal position of the sliding window into a preset second detection model, wherein the second detection model is used to determine the type of power consumption abnormality; a type determination submodule, used to determine the type of power consumption abnormality of the power consumption data features corresponding to the abnormal position of the sliding window through the second detection model; and an information determination submodule, used to use the type of power consumption abnormality of the power consumption data features corresponding to the abnormal position of the sliding window as power consumption abnormality information.
[0114] Therefore, according to this embodiment, by dividing a whole day into multiple time periods, the electricity consumption information and environmental information corresponding to the same time period are set in the same matrix channel, thereby constructing an electricity consumption multi-dimensional matrix. This ensures that the same matrix channel contains electricity consumption and environmental information for the same time period on different dates, while different matrix channels contain electricity consumption and environmental information for different time periods. This approach makes the electricity consumption and environmental information within the same matrix channel more similar, thus facilitating the accurate detection of dates or periods with abnormal electricity consumption through feature extraction and data analysis. Furthermore, this technical solution utilizes sliding windows of different scales to slide across the electricity consumption multi-dimensional matrix, and performs feature extraction based on the data defined by the sliding windows at each sliding position to generate electricity consumption data features corresponding to the sliding windows at each sliding position. Then, based on these electricity consumption data features, the abnormal position of the sliding window where electricity consumption is abnormal is determined, and the electricity consumption abnormality information corresponding to the abnormal sliding window position is identified. Therefore, the method of this embodiment can detect electricity consumption abnormalities using sliding windows of different scales, thereby detecting different forms of electricity consumption abnormalities. This solves the problems existing in the current technology and enables accurate power inspection.
[0115] Example 3
[0116] Figure 10 A data analysis-based power inspection device 1000 according to this embodiment is shown, which corresponds to the method described according to the first aspect of Embodiment 1. Reference Figure 10As shown, the device 1000 includes: a processor 1010; and a memory 1020 connected to the processor 1010, used to provide the processor 1010 with instructions to process the following steps: acquiring the user's historical electricity consumption information and historical environmental information; generating a multi-dimensional electricity consumption matrix corresponding to the user based on the historical electricity consumption information and historical environmental information, according to multiple time periods divided into a whole day, wherein each matrix channel of the multi-dimensional electricity consumption matrix corresponds to a different time period, and each column of each matrix channel corresponds to the electricity consumption information and environmental information corresponding to different dates and corresponding time periods; sliding multiple pre-set sliding windows of different scales on the multi-dimensional electricity consumption matrix in chronological order, and extracting features from the data defined by each sliding window position to generate electricity consumption data features corresponding to each sliding window position; determining the abnormal position of the sliding window where there is an electricity consumption anomaly based on the electricity consumption data features; and determining the electricity consumption anomaly information corresponding to the abnormal position of the sliding window based on the electricity consumption data features corresponding to the abnormal position of the sliding window.
[0117] Optionally, the operation of extracting features from the data defined by the sliding window at each sliding window position to generate electricity consumption data features corresponding to each sliding window position includes: calculating the correlation value between the electricity consumption vectors of each matrix channel in the sliding window; calculating the weight value between the electricity consumption vectors of each matrix channel based on the correlation value; determining the corresponding feature vector based on the electricity consumption vector and the corresponding weight value; determining the feature matrix corresponding to the matrix channel based on the feature vector; and fusing multiple feature matrices to generate electricity consumption data features.
[0118] Optionally, the operation of determining the abnormal position of the sliding window where there is an abnormal power consumption based on the power consumption data characteristics includes: inputting the power consumption data characteristics into a preset first detection model, wherein the first detection model is used to detect whether there is an abnormal power consumption in the data defined in the sliding window corresponding to the power consumption data characteristics; determining the probability that there is an abnormal power consumption in the data defined in the sliding window corresponding to the power consumption data characteristics and the probability that there is no abnormal power consumption through the first detection model; and determining the position of the data where the probability of the sliding window having an abnormal power consumption is greater than or equal to the probability that there is no abnormal power consumption.
[0119] Optionally, the operation of determining the power consumption anomaly information corresponding to the abnormal position of the sliding window based on the power consumption data characteristics corresponding to the abnormal position of the sliding window includes: inputting the power consumption data characteristics corresponding to the abnormal position of the sliding window into a preset second detection model, wherein the second detection model is used to determine the type of power consumption anomaly; determining the type of power consumption anomaly of the power consumption data characteristics corresponding to the abnormal position of the sliding window through the second detection model; and using the type of power consumption anomaly of the power consumption data characteristics corresponding to the abnormal position of the sliding window as the power consumption anomaly information.
[0120] Therefore, according to this embodiment, by dividing a whole day into multiple time periods, the electricity consumption information and environmental information corresponding to the same time period are set in the same matrix channel, thereby constructing an electricity consumption multi-dimensional matrix. This ensures that the same matrix channel contains electricity consumption and environmental information for the same time period on different dates, while different matrix channels contain electricity consumption and environmental information for different time periods. This approach makes the electricity consumption and environmental information within the same matrix channel more similar, thus facilitating the accurate detection of dates or periods with abnormal electricity consumption through feature extraction and data analysis. Furthermore, this technical solution utilizes sliding windows of different scales to slide across the electricity consumption multi-dimensional matrix, and performs feature extraction based on the data defined by the sliding windows at each sliding position to generate electricity consumption data features corresponding to the sliding windows at each sliding position. Then, based on these electricity consumption data features, the abnormal position of the sliding window where electricity consumption is abnormal is determined, and the electricity consumption abnormality information corresponding to the abnormal sliding window position is identified. Therefore, the method of this embodiment can detect electricity consumption abnormalities using sliding windows of different scales, thereby detecting different forms of electricity consumption abnormalities. This solves the problems existing in the current technology and enables accurate power inspection.
[0121] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0122] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0123] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0124] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0125] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0126] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0127] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A data analysis-based method for electricity inspection, characterized in that, include: Obtain users' historical electricity consumption information and historical environmental information; Based on the historical electricity consumption information and the historical environmental information, a multi-dimensional electricity consumption matrix corresponding to the user is generated according to multiple time periods dividing a whole day, wherein each matrix channel M of the multi-dimensional electricity consumption matrix... i Corresponding to different time periods, and each column of each matrix channel corresponding to different dates and corresponding time periods, M i =[V i,1 V i,2 V i,3 , ... , V i,n ], where the electric vector V i,j This is used to represent the electricity consumption vector for the i-th time period on the j-th date, where j = 1 to n. V Represented as [E1, E2, E3, ..., E m-1 , I] T E1~E m-1 These represent different environmental parameters, and I represents the user's electricity consumption. Multiple pre-set sliding windows of different scales are slid across the electricity consumption multidimensional matrix in chronological order, and features are extracted from the data defined by each sliding window position to generate electricity consumption data features corresponding to each sliding window position. Based on the characteristics of the electricity consumption data, determine the abnormal position of the sliding window where there is abnormal electricity consumption; as well as Based on the electricity consumption data characteristics corresponding to the abnormal position of the sliding window, the abnormal electricity consumption information corresponding to the abnormal position of the sliding window is determined. The operation of extracting features from the data defined by the sliding window at each sliding window position to generate electricity consumption data characteristics corresponding to each sliding window position includes: Calculate the correlation value between the power consumption vectors of each matrix channel in the sliding window, wherein the correlation value is the correlation value between the power consumption vectors in the same matrix channel; Calculate the weight values between the power consumption vectors of each matrix channel based on the relevant values; Based on the electricity consumption vector and the corresponding weight values, the corresponding feature vector is determined; Determine the feature matrix corresponding to the matrix channel based on the feature vector; and Multiple feature matrices are fused to generate the electricity consumption data features.
2. The method according to claim 1, characterized in that, The operation of determining the abnormal position of the sliding window where abnormal electricity consumption exists based on the characteristics of the electricity consumption data includes: The electricity consumption data features are input into a preset first detection model, wherein the first detection model is used to detect whether there is an electricity consumption abnormality in the data defined in the sliding window corresponding to the electricity consumption data features. The first detection model determines the probability of abnormal electricity consumption and the probability of no abnormal electricity consumption within the data defined by the sliding window corresponding to the electricity consumption data characteristics; and The location of the data where the probability of the sliding window having an abnormal power consumption is greater than or equal to the probability of not having an abnormal power consumption.
3. The method according to claim 1, characterized in that, The operation of determining the abnormal power consumption information corresponding to the abnormal position of the sliding window based on the power consumption data characteristics includes: The power consumption data features corresponding to the abnormal position of the sliding window are input into a preset second detection model, wherein the second detection model is used to determine the type of power consumption abnormality. The second detection model determines the type of power consumption anomaly in the power consumption data characteristics corresponding to the abnormal position of the sliding window; and The type of power consumption anomaly corresponding to the abnormal position of the sliding window is used as the power consumption anomaly information.
4. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, the method described in any one of claims 1 to 3 is performed by a processor.
5. A power inspection device based on data analysis, characterized in that, include: The information acquisition module is used to acquire users' historical electricity consumption information and historical environmental information; The matrix generation module is used to generate a multi-dimensional electricity consumption matrix corresponding to the user, based on the historical electricity consumption information and the historical environmental information, according to multiple time periods divided into a whole day. The multi-dimensional electricity consumption matrix contains various matrix channels M. i Corresponding to different time periods, and each column of each matrix channel corresponding to different dates and corresponding time periods, M i =[V i,1 V i,2 V i,3 , ... , V i,n ], where the electric vector V i,j This is used to represent the electricity consumption vector for the i-th time period on the j-th date, where j = 1 to n. V Represented as [E1, E2, E3, ..., E m-1 , I] T E1~E m-1 These represent different environmental parameters, and I represents the user's electricity consumption. The feature generation module is used to slide multiple pre-set sliding windows of different scales on the electricity consumption multidimensional matrix in chronological order, and to extract features from the data defined by each sliding window position to generate electricity consumption data features corresponding to each sliding window position. The location determination module is used to determine the abnormal location of the sliding window where there is an abnormal power consumption based on the characteristics of the power consumption data. as well as The information determination module is used to determine the abnormal power consumption information corresponding to the abnormal position of the sliding window based on the power consumption data characteristics corresponding to the abnormal position of the sliding window. The operation of extracting features from the data defined by the sliding window at each sliding window position to generate power consumption data characteristics corresponding to each sliding window position includes: The first calculation submodule is used to calculate the correlation value between the power consumption vectors of each matrix channel in the sliding window, wherein the correlation value is the correlation value between the power consumption vectors in the same matrix channel; The second calculation submodule is used to calculate the weight values between the power consumption vectors of each matrix channel based on the relevant values; The vector determination submodule is used to determine the corresponding feature vector based on the electricity consumption vector and the corresponding weight value; The matrix determination submodule is used to determine the feature matrix corresponding to the matrix channel based on the feature vector; and The feature generation submodule is used to fuse multiple feature matrices to generate the electricity consumption data features.
6. The apparatus according to claim 5, characterized in that, The operation of determining the abnormal position of the sliding window where abnormal electricity consumption exists based on the characteristics of the electricity consumption data includes: The first input submodule is used to input the electricity consumption data features into a preset first detection model, wherein the first detection model is used to detect whether there is an electricity consumption abnormality in the data defined in the sliding window corresponding to the electricity consumption data features. The probability determination submodule is used to determine, through the first detection model, the probability that the data defined by the sliding window corresponding to the electricity consumption data characteristics has an electricity consumption anomaly and the probability that it does not have an electricity consumption anomaly; and The location determination submodule is used to determine the location of data where the probability of the sliding window having an abnormal power consumption is greater than or equal to the probability of not having an abnormal power consumption.
7. The apparatus according to claim 6, characterized in that, The operation of determining the abnormal power consumption information corresponding to the abnormal position of the sliding window based on the power consumption data characteristics includes: The second input submodule is used to input the power consumption data features corresponding to the abnormal position of the sliding window into a preset second detection model, wherein the second detection model is used to determine the type of power consumption abnormality. The type determination submodule is used to determine the type of power consumption anomaly corresponding to the power consumption data feature at the abnormal position of the sliding window using the second detection model; and The information determination submodule is used to determine the type of power consumption anomaly in the power consumption data characteristics corresponding to the abnormal position of the sliding window as power consumption anomaly information.
8. A power inspection device based on data analysis, characterized in that, include: processor; as well as A memory, connected to the processor, for providing the processor with instructions to perform the following processing steps: Obtain users' historical electricity consumption information and historical environmental information; Based on the historical electricity consumption information and the historical environmental information, a multi-dimensional electricity consumption matrix corresponding to the user is generated according to multiple time periods dividing a whole day, wherein each matrix channel M of the multi-dimensional electricity consumption matrix... i Corresponding to different time periods, and each column of each matrix channel corresponding to different dates and corresponding time periods, M i =[V i,1 V i,2 V i,3 , ... , V i,n ], where the electric vector V i,j This is used to represent the electricity consumption vector for the i-th time period on the j-th date, where j = 1 to n. V Represented as [E1, E2, E3, ..., E m-1 , I] T E1~E m-1 These represent different environmental parameters, and I represents the user's electricity consumption. Multiple pre-set sliding windows of different scales are slid across the electricity consumption multidimensional matrix in chronological order, and features are extracted from the data defined by each sliding window position to generate electricity consumption data features corresponding to each sliding window position. Based on the characteristics of the electricity consumption data, determine the abnormal position of the sliding window where there is abnormal electricity consumption; as well as Based on the electricity consumption data characteristics corresponding to the abnormal position of the sliding window, the abnormal electricity consumption information corresponding to the abnormal position of the sliding window is determined. The operation of extracting features from the data defined by the sliding window at each sliding window position to generate electricity consumption data characteristics corresponding to each sliding window position includes: Calculate the correlation value between the power consumption vectors of each matrix channel in the sliding window, wherein the correlation value is the correlation value between the power consumption vectors in the same matrix channel; Calculate the weight values between the power consumption vectors of each matrix channel based on the relevant values; Based on the electricity consumption vector and the corresponding weight values, the corresponding feature vector is determined; The feature matrix corresponding to the matrix channel is determined based on the feature vector; and multiple feature matrices are fused to generate the electricity consumption data feature.
Citation Information
Patent Citations
Abnormal power consumption detection method and device and storage medium
CN112633412A
Intelligent extension socket and working method thereof
CN114118765A
Abnormality detection device and abnormality detection method
CN116134458A