A method for identifying unauthorized overnight occupancy in small venues based on electricity incident detection.

CN118585934BActive Publication Date: 2026-09-01SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410695904.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2026-09-01
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

[0004]本发明的主要目的在于解决三小场所用户用电模式复杂,夜间用电行为难以获取的问题,提供一种基于用电事件检测的三小场所用户夜间违规住人识别方法,该方法通过采用基于变动窗口的BIC事件检测方法对用户夜间用电时段内的事件进行检测;然后提取事件的稳态差异特征,并利用Mean-Shift方法对用电事件进行分类;从事件发生时刻及持续时间两个方面对事件簇的时间特征进行描述,根据事件簇的时间特征识别用户夜间违规住人;提出的三小场所用户夜间违规住人识别方法表现出较好的效果

Benefits of technology

[0066](1)本发明通过基于粗粒度(15min)和细粒度(5s)两种时间粒度的负荷数据开展数据清洗工作,先对粗粒度数据进行预处理,再进行细粒度的二次处理,可以很好地降低数据清洗的工作量,确保了后续分析的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585934B_ABST
    Figure CN118585934B_ABST
Patent Text Reader

Abstract

This invention discloses a method for identifying unauthorized nighttime occupancy in small venues based on electricity event detection. The method includes: acquiring load data and performing repair, segmentation, and extraction of electricity usage periods; detecting electricity events using an improved BIC event detection method based on a variable window; extracting steady-state load difference features of electricity events and classifying nighttime electricity events based on the mean-shift clustering method; describing the temporal features of each electricity event cluster to determine the user's nighttime occupancy electricity usage behavior. This invention cleans the data using both coarse and fine temporal granularities, reducing workload and ensuring the accuracy of subsequent analysis. Furthermore, this invention improves the flexibility and accuracy of electricity event detection by dynamically adjusting the window for electricity usage time detection. Finally, classification using the mean-shift method describes the temporal features from both the event occurrence time and the duration of the event, effectively solving the problem of difficulty in identifying unauthorized nighttime occupancy electricity usage behavior.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of electricity safety, specifically relating to a method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection. Background Technology

[0002] Small businesses, including small stalls, workshops, and entertainment venues, are characterized by heavy loads, haphazard wiring, improper use of electrical appliances, and weak fire safety infrastructure, making them highly susceptible to electrical fires. However, the sheer number of these establishments makes on-site inspections labor-intensive and ineffective. Some regions are piloting the installation of intelligent infrared sensing devices to detect unauthorized occupancy by detecting infrared radiation emitted by the human body. However, due to privacy concerns, infrared monitoring has not yet been widely adopted.

[0003] The electricity load data of users in small businesses ("three small" establishments) contains rich information on electricity consumption behavior. This paper aims to identify illegal nighttime occupancy in these establishments based on electricity consumption pattern mining and electricity event detection. However, due to the diversity of business nature and purpose of these establishments, as well as the randomness of nighttime electricity consumption behavior, user electricity consumption patterns are extremely complex, making nighttime user electricity consumption behavior difficult to capture. Therefore, in-depth mining of user electricity consumption patterns and analysis of nighttime electricity consumption behavior through nighttime electricity event detection are prerequisites for accurate identification of illegal occupancy. Summary of the Invention

[0004] The main objective of this invention is to address the problem of complex electricity consumption patterns and difficulty in obtaining nighttime electricity consumption behavior data for users in small businesses. This invention provides a method for identifying unauthorized nighttime occupancy in small businesses based on electricity event detection. This method employs a BIC event detection method based on a variable window to detect events during the user's nighttime electricity consumption period. Then, it extracts the steady-state difference features of the events and classifies the electricity events using the Mean-Shift method. The temporal characteristics of event clusters are described from two aspects: the time of event occurrence and the duration. Based on the temporal characteristics of the event clusters, the method identifies unauthorized nighttime occupancy by users. The proposed method for identifying unauthorized nighttime occupancy in small businesses demonstrates good performance.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] One aspect of the present invention provides a method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection, comprising the following steps:

[0007] Acquire load data from users in small venues and repair distorted data;

[0008] Divide users into nighttime electricity consumption periods and extract load data for those periods.

[0009] An improved BIC event detection method based on variable windows is used to detect electricity consumption events in load data during nighttime electricity consumption periods.

[0010] Extract the steady-state load difference characteristics of electricity consumption events;

[0011] The mean-shift clustering method is used to classify nighttime electricity consumption events based on the steady-state load difference characteristics of the events.

[0012] The system describes the temporal characteristics of various electricity consumption event clusters, including the time of occurrence and duration of the events. Based on the temporal characteristics of each electricity consumption event cluster, it determines the nighttime occupancy and electricity consumption behavior of users, enabling the identification of illegal nighttime occupancy by users in small venues.

[0013] As a preferred technical solution, the method for repairing distorted data specifically includes:

[0014] The original load data is down-frequencyd to coarse-grained. Then, three types of distorted data—continuous invariant anomalies, missing anomalies, and mutation anomalies—are identified and repaired. Based on the coarse-grained load data cleaning, mutation anomaly data cleaning is performed on the fine-grained load data before down-frequencying to reduce the amount of data cleaning.

[0015] The method for identifying missing and continuously unchanged abnormal data is as follows: extract the user's daily load data. For single-day data, if the number of consecutively missing and continuously unchanged data is greater than 20, delete the entire day's load data; otherwise, delete the continuously unchanged data points and process them as missing data.

[0016] The method for identifying mutational anomalous data is as follows: the absolute median method is used to identify mutational anomalous data, then the mutational anomalous data points are deleted and processed as missing data.

[0017] The method for repairing missing data is as follows: Identify the adjacent known data points containing the missing data points, and then calculate a cubic spline interpolation polynomial based on these data points to estimate the missing data points and obtain their approximate values. The cubic spline interpolation polynomial is:

[0018] ;

[0019] in, These are the coefficients of the interpolation polynomial, obtained by solving for the interpolation conditions.

[0020] As a preferred technical solution, the division of users' nighttime electricity consumption periods specifically includes:

[0021] By surveying the business hours of users in small venues, we determined the users' non-business hours and used these non-business hours as the users' nighttime electricity consumption periods.

[0022] As a preferred technical solution, the improved BIC event detection method based on a variable window is as follows:

[0023] Set the initial window size to ;

[0024] Event detection is performed on the data within the window using a BIC-based event detection method;

[0025] If an event is detected, the window size is restored to its original size, starting from the current position. Repeat the detection process;

[0026] If no event is detected, increase the window size. Determine if the maximum window size has been reached. ;

[0027] If the window reaches its maximum size, slide backward. and reset the window size to Repeat the detection process;

[0028] If the maximum window size is not reached, the detection process is repeated for the current window.

[0029] As a preferred technical solution, the BIC-based event detection method specifically comprises:

[0030] Two models are defined: a sequence probability model with no event point and a sequence probability model with an event point. It is assumed that the event point occurs at the i-th point of the sequence, and both models follow a normal distribution. , , ,in, and For the mathematical expectation and variance of the model, and The point where the event occurs in the model Previously, including points The expected value and variance of the sequence, and For the model From the The expected value and difference up to the last point in the sequence;

[0031] expect The calculation formula is ;

[0032] variance The calculation formula is: ;

[0033] Two models and The maximum likelihood ratio is defined as ,in, Representation Model Total number of data points Representation Model forward The number of data points. Representation Model middle The number of data points after the first point;

[0034] BIC is defined as ;

[0035] Define the conditions for the occurrence of an event as follows: ,in, A threshold set by an individual; when Greater than the threshold At that time, it was considered that the sequence model An event occurred in the middle;

[0036] Ultimately, the turning point is .

[0037] As a preferred technical solution, the extraction of steady-state load difference characteristics of electricity consumption events specifically includes:

[0038] Calculate the difference in active power between the next time step and the current time step of the electricity consumption event. Difference between reactive power and reactive power As a steady-state difference characteristic of electricity consumption events.

[0039] As a preferred technical solution, the mean-shift clustering method specifically includes the following steps:

[0040] S1. Randomly select a data point as the initial cluster center;

[0041] S2. For each cluster center, calculate the weighted average position of its surrounding data points, and use this as the new center position for the next iteration. The calculation formula is as follows:

[0042]

[0043] in, It is the new central location. This is the current central location. It's a data point. It is a kernel function;

[0044] S3. Update the position of the data points, moving them towards the mean shift vector until convergence. The update formula is:

[0045]

[0046] S4. Repeat steps S2 and S3 until the convergence condition is met or the predetermined number of iterations is reached, at which point the iteration stops.

[0047] As a preferred technical solution, the timing characteristics of the electricity consumption event are described by the occurrence time of the positive event in the electricity consumption event cluster;

[0048] The duration feature of the electricity consumption event is described by matching positive and negative events in the electricity consumption event cluster and based on the time interval between the positive and negative events;

[0049] The method for matching positive and negative events in the electricity consumption event cluster includes the following steps:

[0050] Sort all positive and negative events according to their occurrence time to ensure they are on a single time series;

[0051] Starting from the beginning of the time series, go through the positive and negative events one by one;

[0052] For each positive event, find the negative event that is closest in time to it, and use it as a pair;

[0053] When a match is found, it is marked as a successful match and removed from the time series to prevent duplicate matches;

[0054] If a positive or negative event cannot find a match, it is marked as mismatched and removed from the time series.

[0055] Continue iterating through the remaining positive and negative events until all electricity consumption events are matched or marked as unmatchable.

[0056] As a preferred technical solution, the method for determining the user's nighttime occupancy and electricity usage behavior is as follows:

[0057] If there are clusters of events where the timing of the events is unevenly distributed during nighttime electricity use or where the duration of the events is irregular, then it is considered that there is nighttime resident electricity use.

[0058] Another aspect of the present invention provides a system for identifying illegal overnight occupancy of users in small venues based on electricity event detection, which is applied to the above-mentioned method for identifying illegal overnight occupancy of users in small venues based on electricity event detection. The system includes a load data acquisition and processing module, a load data division and extraction module, an electricity event detection module, an electricity event feature extraction module, an electricity event classification module, and an electricity behavior recognition module.

[0059] The load data acquisition and processing module is used to acquire load data of users in small venues and repair distorted data;

[0060] The load data division and extraction module is used to divide users' nighttime electricity consumption periods and extract load data for users' nighttime electricity consumption periods;

[0061] The electricity event detection module uses an improved BIC event detection method based on a variable window to detect electricity events from load data during nighttime electricity consumption periods.

[0062] The electricity consumption event feature extraction module is used to extract the steady-state load difference features of electricity consumption events;

[0063] The electricity consumption event classification module classifies nighttime electricity consumption events based on the mean-shift clustering method according to the steady-state load difference characteristics of the electricity consumption events;

[0064] The electricity consumption behavior identification module is used to describe the time characteristics of various electricity consumption event clusters, including the description of the time of occurrence and the duration of the electricity consumption event; based on the time characteristics of each electricity consumption event cluster, it determines the user's nighttime occupancy electricity consumption behavior, thereby realizing the identification of users illegally occupancy at night in small venues.

[0065] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0066] (1) This invention carries out data cleaning work based on two time granularities of load data: coarse granularity (15 min) and fine granularity (5 s). First, the coarse granular data is preprocessed, and then the fine granular data is processed again. This can greatly reduce the workload of data cleaning and ensure the accuracy of subsequent analysis.

[0067] (2) The present invention detects nighttime electricity consumption events by using a BIC event detection method based on a variable window. By dynamically adjusting the size of the window, the flexibility and accuracy of event detection are improved.

[0068] (3) This invention classifies electricity events using the Mean-Shift method, describes the temporal characteristics of event clusters from the perspectives of the time of event occurrence and the duration of events, and identifies users who illegally occupy electricity at night based on the temporal characteristics of event clusters, thus effectively solving the problem of difficulty in identifying illegal electricity use behavior at night. Attached Figure Description

[0069] Figure 1 This is a flowchart of a method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection, according to an embodiment of the present invention.

[0070] Figure 2 This is a framework diagram of the improved BIC event detection method based on a changing window according to an embodiment of the present invention;

[0071] Figure 3 This is the event clustering result of a user in an embodiment of the present invention;

[0072] Figure 4 This is a description of the event occurrence time characteristics of a user's event cluster in an embodiment of the present invention;

[0073] Figure 5 This is a description of the event duration characteristics of a user's event cluster in an embodiment of the present invention.

[0074] Figure 6 This is a schematic diagram of the structure of the nighttime unauthorized occupancy identification system for small venues based on electricity event detection, according to an embodiment of the present invention.

[0075] Figure 7 This is a schematic diagram of the structure of the storage medium according to an embodiment of the present invention. Detailed Implementation

[0076] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0077] Example

[0078] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0079] like Figure 1 As shown, this embodiment provides a method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection, including the following steps:

[0080] S1. Obtain load data of users in small venues and perform data preprocessing.

[0081] S11. Identification of missing and continuously invariant outliers based on coarse-grained (15-minute) data:

[0082] Extract daily load data from users. For single-day data, if the number of consecutively missing or continuously unchanged data points is greater than 20, delete the entire day's load data; otherwise, delete continuously unchanged data points and process them as missing data.

[0083] S12. Method for identifying mutational anomalies based on coarse-grained (15-minute) data:

[0084] First, calculate each data point. Compared with the median in the dataset absolute deviation Sort all absolute deviations in ascending order and take the median as the absolute median difference of the dataset. The formula is After identifying mutation anomalies, delete the abnormal data points and repair them according to the missing data.

[0085] S13. Repairing missing data based on coarse-grained (15-minute) data:

[0086] By identifying adjacent known data points containing the missing data points and calculating a cubic spline interpolation polynomial based on these data points, the missing data points can be estimated, yielding an approximate value. The cubic spline interpolation polynomial is:

[0087] ;

[0088] in, These are the coefficients of the interpolation polynomial, obtained by solving for the interpolation conditions.

[0089] S14. Cleaning of anomalous data based on fine-grained (5s) load data:

[0090] Based on the cleaning of coarse-grained (15min) load data, the absolute median difference method was also used to identify abrupt changes in fine-grained (5s) load data, and cubic splines were used to repair missing values.

[0091] S2. Divide users' nighttime electricity consumption periods and extract load data for those periods:

[0092] By surveying the business hours of users in small venues, we determined the users' non-business hours and used these non-business hours as the users' nighttime electricity consumption periods.

[0093] S3. An improved BIC event detection method based on a variable window is used to detect electricity consumption events in user nighttime load data, such as... Figure 2 As shown, the specific steps are as follows:

[0094] S31. Set the initial window size to... ;

[0095] S32. Perform event detection on the data within the window using a BIC-based event detection method;

[0096] Furthermore, the BIC-based event detection method specifically includes:

[0097] Two models are defined: a sequence probability model with no event point and a sequence probability model with an event point. It is assumed that the event point occurs at the i-th point of the sequence, and both models follow a normal distribution. , , ,in, and For the mathematical expectation and variance of the model, and The point where the event occurs in the model Previously, including points The expected value and variance of the sequence, and For the model From the The expected value and difference up to the last point in the sequence;

[0098] expect The calculation formula is: ;

[0099] variance The calculation formula is: ;

[0100] Two models and The maximum likelihood ratio is defined as ,in, Representation Model Total number of data points Representation Model forward The number of data points. Representation Model middle The number of data points after the first point;

[0101] BIC is defined as ;

[0102] Define the conditions for the occurrence of an event as follows: ,in, A threshold set by an individual; when Greater than the threshold At that time, it was considered that the sequence model An event occurred in the middle;

[0103] Ultimately, the turning point is .

[0104] S33. If an event is detected, the window size is restored to its original size, starting from the current position. Repeat the detection process;

[0105] S34. If no event is detected, increase the window size. Determine if the maximum window size has been reached. ;

[0106] S35. If the window reaches its maximum size, slide backward. and reset the window size to Repeat the detection process;

[0107] S36. If the maximum window size is not reached, repeat the detection process for the current window.

[0108] This embodiment employs an improved BIC event detection method based on a variable window. By dynamically adjusting the window size, it offers better flexibility and accuracy compared to BIC-based event detection methods.

[0109] S4. Extract steady-state difference features of events:

[0110] Calculate the difference in active power between the next time step and the current time step of the electricity consumption event. Difference between reactive power and reactive power As a steady-state difference characteristic of electricity consumption events.

[0111] S5. Based on the mean-shift clustering method, nighttime electricity consumption events are classified according to the steady-state load difference characteristics. The specific steps are as follows:

[0112] S51. Randomly select a data point as the initial cluster center;

[0113] S52. For each cluster center, calculate the weighted average position of its surrounding data points, and use this as the new center position for the next iteration. The calculation formula is as follows:

[0114]

[0115] in, It is the new central location. This is the current central location. It's a data point. It is a kernel function;

[0116] S53. Update the position of the data points, moving them towards the mean shift vector until convergence. The update formula is:

[0117]

[0118] S54. Repeat steps S52 and S53 until the convergence condition is met or the predetermined number of iterations is reached, at which point the iteration stops.

[0119] S6. Describe the time characteristics of various electricity consumption event clusters by the occurrence time of positive events in the electricity consumption event clusters, including the description of the occurrence time and duration of the electricity consumption events.

[0120] By matching positive and negative events within a cluster of electricity consumption events, the duration of time is described based on the time interval between the positive and negative events. The specific steps for matching positive and negative events are as follows:

[0121] S61. Sort all positive and negative events according to their occurrence time to ensure they are on the same time series.

[0122] S62. Starting from the beginning of the time series, go through the positive and negative events one by one.

[0123] S63. For each positive event, find the negative event that is closest to its time and use it as a pair.

[0124] S64. When finding a match, mark it as a successful match and remove it from the time series to prevent duplicate matches.

[0125] S65. If a positive or negative event cannot be matched, mark it as unmatched and remove it from the time series.

[0126] S66. Continue iterating through the remaining positive and negative events until all electricity events are matched or marked as unmatchable.

[0127] S7. Based on the temporal characteristics of each electricity consumption event cluster, determine the user's nighttime occupancy electricity consumption behavior and identify unauthorized nighttime occupancy. Specifically:

[0128] If there are clusters of events where the timing of the events is unevenly distributed during nighttime electricity use or where the duration of the events is irregular, then it is considered that there is nighttime resident electricity use.

[0129] Results analysis:

[0130] The clustering results of the nighttime unauthorized occupancy identification method for users in small venues based on electricity event detection established in this embodiment are as follows: Figure 3 As shown in the figure, the user's nighttime electricity consumption events are divided into two categories. The occurrence time and duration of these two event clusters are described as follows: Figure 4 , Figure 5As shown. For category 0, the events occur evenly throughout each hour of the nighttime period, with durations ranging from 2 to 5 minutes. Their operational pattern is relatively fixed, suggesting that these events are caused by appliances that are normally on at night, such as refrigerators, and do not represent the user's occupancy and electricity usage. For category 1, the events occur only in the early and late nighttime periods, with durations varying between 10 and 31 minutes, exhibiting significant variability and randomness. This suggests that these events are caused by appliances used while the user is living in the house, representing the user's occupancy and electricity usage. Therefore, it can be concluded that the user was illegally occupying the house at night. An on-site investigation confirmed that the user was indeed living in the house during this time period.

[0131] This invention provides guidance for identifying unauthorized overnight occupancy by users in small businesses through an electricity incident detection method.

[0132] like Figure 6 As shown, in another embodiment of this application, a system for identifying illegal overnight occupancy of users in small venues based on electricity event detection is provided. The system includes a load data acquisition and processing module, a load data division and extraction module, an electricity event detection module, an electricity event feature extraction module, an electricity event classification module, and an electricity behavior recognition module.

[0133] The load data acquisition and processing module is used to acquire load data of users in small venues and repair distorted data;

[0134] The load data division and extraction module is used to divide users' nighttime electricity consumption periods and extract load data for users' nighttime electricity consumption periods;

[0135] The electricity event detection module uses an improved BIC event detection method based on a variable window to detect electricity events from load data during nighttime electricity consumption periods.

[0136] The electricity consumption event feature extraction module is used to extract the steady-state load difference features of electricity consumption events;

[0137] The electricity consumption event classification module classifies nighttime electricity consumption events based on the mean-shift clustering method according to the steady-state load difference characteristics of the electricity consumption events;

[0138] The electricity consumption behavior identification module is used to describe the time characteristics of various electricity consumption event clusters, including the description of the time of occurrence and the duration of the electricity consumption event; based on the time characteristics of each electricity consumption event cluster, it determines the user's nighttime occupancy electricity consumption behavior, thereby realizing the identification of users illegally occupancy at night in small venues.

[0139] It should be noted that the system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure can be divided into different functional modules to complete all or part of the functions described above. This system is applied to the method for identifying illegal nighttime occupancy of users in small venues based on electricity event detection in the above embodiments.

[0140] like Figure 7 As shown, in another embodiment of this application, a storage medium is also provided, storing a program that, when executed by a processor, implements a method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection, specifically:

[0141] Acquire load data from users in small venues and repair distorted data;

[0142] Divide users into nighttime electricity consumption periods and extract load data for those periods.

[0143] An improved BIC event detection method based on variable windows is used to detect electricity consumption events in load data during nighttime electricity consumption periods.

[0144] Extract the steady-state load difference characteristics of electricity consumption events;

[0145] The mean-shift clustering method is used to classify nighttime electricity consumption events based on the steady-state load difference characteristics of the events.

[0146] The system describes the temporal characteristics of various electricity consumption event clusters, including the time of occurrence and duration of the events. Based on the temporal characteristics of each electricity consumption event cluster, it determines the nighttime occupancy and electricity consumption behavior of users, enabling the identification of illegal nighttime occupancy by users in small venues.

[0147] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0148] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A method for identifying unauthorized overnight occupancy in small businesses based on electricity incident detection, characterized in that, Includes the following steps: Acquire load data from users in small venues and repair distorted data; Divide users into nighttime electricity consumption periods and extract load data for those periods. An improved BIC event detection method based on a variable window is used to detect electricity consumption events in load data during nighttime electricity consumption periods. The improved BIC event detection method based on a variable window is as follows: Set the initial window size to ; Event detection is performed on the data within the window using a BIC-based event detection method; If an event is detected, the window size is restored to its original size, starting from the current position. Repeat the detection process; If no event is detected, increase the window size. Determine if the maximum window size has been reached. ; If the window reaches its maximum size, slide backward. and reset the window size to Repeat the detection process; If the maximum window size is not reached, the detection process is repeated for the current window. Extract the steady-state load difference characteristics of electricity consumption events; The mean-shift clustering method is used to classify nighttime electricity consumption events based on the steady-state load difference characteristics of the events. The system describes the temporal characteristics of various electricity consumption event clusters, including the time of occurrence and duration of the events. Based on the temporal characteristics of each electricity consumption event cluster, it determines the nighttime occupancy and electricity consumption behavior of users, enabling the identification of illegal nighttime occupancy by users in small venues. The timing characteristics of electricity consumption events are described by the occurrence time of positive events in the electricity consumption event cluster; The duration feature of the electricity consumption event is described by matching positive and negative events in the electricity consumption event cluster and based on the time interval between the positive and negative events; The method for matching positive and negative events in the electricity consumption event cluster includes the following steps: Sort all positive and negative events according to their occurrence time to ensure they are on a single time series; Starting from the beginning of the time series, go through the positive and negative events one by one; For each positive event, find the negative event that is closest in time to it, and use it as a pair; When a match is found, it is marked as a successful match and removed from the time series to prevent duplicate matches; If a positive or negative event cannot find a match, it is marked as mismatched and removed from the time series. Continue iterating through the remaining positive and negative events until all electricity consumption events are matched or marked as unmatchable.

2. The method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection according to claim 1, characterized in that, The specific steps for repairing distorted data are as follows: The original load data is down-frequencyd to coarse-grained. Then, three types of distorted data—continuous invariant anomalies, missing anomalies, and mutation anomalies—are identified and repaired. Based on the coarse-grained load data cleaning, mutation anomaly data cleaning is performed on the fine-grained load data before down-frequencying to reduce the amount of data cleaning. The method for identifying missing and continuously unchanged abnormal data is as follows: extract the user's daily load data. For single-day data, if the number of consecutively missing and continuously unchanged data is greater than 20, delete the entire day's load data; otherwise, delete the continuously unchanged data points and process them as missing data. The method for identifying mutational anomalous data is as follows: the absolute median method is used to identify mutational anomalous data, then the mutational anomalous data points are deleted and processed as missing data. The method for repairing missing data is as follows: Identify the adjacent known data points containing the missing data points, and then calculate a cubic spline interpolation polynomial based on these data points to estimate the missing data points and obtain their approximate values. The cubic spline interpolation polynomial is: ; in, These are the coefficients of the interpolation polynomial, obtained by solving for the interpolation conditions.

3. The method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection according to claim 1, characterized in that, The division of users' nighttime electricity consumption periods is specifically as follows: By surveying the business hours of users in small venues, we determined the users' non-business hours and used these non-business hours as the users' nighttime electricity consumption periods.

4. The method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection according to claim 1, characterized in that, The BIC-based event detection method is as follows: Two models are defined: a sequence probability model with no event point and a sequence probability model with an event point. It is assumed that the event point occurs at the i-th point of the sequence, and both models follow a normal distribution. , , ,in, and For the mathematical expectation and variance of the model, and The point where the event occurs in the model Previously, including points The expected value and variance of the sequence, and For the model From the The expected value and difference up to the last point in the sequence; expect The calculation formula is: ; variance The calculation formula is: ; Two models and The maximum likelihood ratio is defined as ,in, Representation Model Total number of data points Representation Model forward The number of data points. Representation Model middle The number of data points after the first point; BIC is defined as ; Define the conditions for the occurrence of an event as follows: ,in, A threshold set by an individual; when Greater than the threshold At that time, it was considered that the sequence model An event occurred in the middle; Ultimately, the turning point is .

5. The method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection according to claim 1, characterized in that, The extraction of steady-state load difference characteristics from electricity consumption events specifically includes: Calculate the difference in active power between the next time step and the current time step of the electricity consumption event. Difference between reactive power and reactive power As a steady-state difference characteristic of electricity consumption events.

6. The method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection according to claim 1, characterized in that, The mean-shift clustering method specifically includes the following steps: S1. Randomly select a data point as the initial cluster center; S2. For each cluster center, calculate the weighted average position of its surrounding data points, and use this as the new center position for the next iteration. The calculation formula is as follows: ; in, It is the new central location. This is the current central location. It's a data point. It is a kernel function; S3. Update the position of the data points, moving them towards the mean shift vector until convergence. The update formula is: ; S4. Repeat steps S2 and S3 until the convergence condition is met or the predetermined number of iterations is reached, then stop the iteration.

7. The method for identifying unauthorized overnight occupancy of users in small venues based on electricity event detection according to claim 1, characterized in that, The method for determining a user's nighttime electricity usage behavior is as follows: If there are clusters of events where the timing of the events is unevenly distributed during nighttime electricity use or where the duration of the events is irregular, then it is considered that there is nighttime resident electricity use.

8. A system for identifying unauthorized overnight occupancy in small businesses based on electricity incident detection, characterized in that: The method for identifying illegal nighttime occupancy of users in small venues based on electricity event detection, as described in any one of claims 1-7, includes a load data acquisition and processing module, a load data division and extraction module, an electricity event detection module, an electricity event feature extraction module, an electricity event classification module, and an electricity behavior recognition module; The load data acquisition and processing module is used to acquire load data of users in small venues and repair distorted data; The load data division and extraction module is used to divide users' nighttime electricity consumption periods and extract load data for users' nighttime electricity consumption periods; The electricity event detection module uses an improved BIC event detection method based on a variable window to detect electricity events from load data during nighttime electricity consumption periods. The electricity consumption event feature extraction module is used to extract the steady-state load difference features of electricity consumption events; The electricity consumption event classification module classifies nighttime electricity consumption events based on the mean-shift clustering method according to the steady-state load difference characteristics of the electricity consumption events; The electricity consumption behavior identification module is used to describe the time characteristics of various electricity consumption event clusters, including the description of the time of occurrence and the duration of the electricity consumption event; based on the time characteristics of each electricity consumption event cluster, it determines the user's nighttime occupancy electricity consumption behavior, thereby realizing the identification of users illegally occupancy at night in small venues.

Citation Information

Patent Citations

  • Shop night living person identification method based on electricity consumption mode analysis

    CN115935204A

  • Method and device for monitoring illegal residents in three small places, electronic equipment and storage medium

    CN116433439A