Non-intrusive detection method and system for illegal residents in three small places based on Internet of Things

By analyzing the electricity consumption data of the three small places and identifying and warning of illegal residents, the problems of frequent fire accidents and illegal residents supervision in the three small places have been solved, and efficient fire safety management has been achieved.

CN119071669APending Publication Date: 2024-12-03GUANGZHOU YUANZHENG INTELLIGENCE TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411070485.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

Fire accidents occur frequently in three small places, offline inspections and treatment are not effective, and the phenomenon of "resurrecting" of illegal residents is serious, making it difficult to achieve full-time and full-coverage monitoring.

Method used

Using non-invasive illegal residence detection method based on the Internet of Things, the illegal residence situation is identified by collecting and analyzing the electricity consumption data in three small places, including data screening and abnormal distortion, identifying the air conditioner opening status and electrical appliances during night power consumption periods For start and stop events, the warning platform records and issues warning information.

Benefits of technology

It has achieved accurate identification and early warning of illegal residence in three small places, avoided the law enforcement difficulties of offline household-by-household investigation, saved the cost of law enforcement manpower, improved the efficiency of fire safety management, and effectively curbed the occurrence of fire safety accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071669A_ABST
    Figure CN119071669A_ABST
Patent Text Reader

Abstract

The invention provides a non-intrusive detection method and system for illegal residents in three small places based on the Internet of Things. The method comprises the following steps: S1, data acquisition: acquiring power consumption data of a target merchant through a full electric quantity collector; s2, screening out distortion abnormal data: carrying out abnormal feature detection on the collected power utilization data, and screening out the distortion abnormal data in the power utilization data; the distortion abnormal data comprises abnormal mutation data, abnormal missing data, abnormal zero value data and abnormal accumulated mutation data; and S3, illegal resident condition identification: according to the collected power consumption data, detecting an air conditioner starting state and an electric appliance starting and stopping event of the target merchant in the night power consumption period so as to identify the illegal resident condition of the target merchant. According to the invention, by detecting, collecting and analyzing the power consumption data of the commercial tenants in the three small places, accurate identification of illegal residence conditions of the commercial tenants in the three small places is realized; fire safety accidents can be effectively restrained, and the method has great significance in fire safety management of three small places.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of fire safety management, and in particular to a non-intrusive method and system for detecting illegal occupancy in three small places based on the Internet of Things. Background Art

[0002] The "three small places" are a general term for small stalls, small workshops, and small entertainment venues. These places have narrow spaces and are prone to fire accidents and deaths. If there are people living in the "three small places" illegally, once a fire occurs, especially a fire in the middle of the night or early morning, it is very easy to make it difficult for people to escape. Therefore, the "three small places" have always been the focus of fire safety inspections.

[0003] In recent years, fire rescue brigades in many regions have joined hands with relevant departments to carry out large-scale inspections and rectifications of "three small places", but the overall effect of offline inspections and governance is not good, and the phenomenon of "rebound" of illegal residents is serious, and the volume has always been difficult to reduce. Faced with a huge base, it is difficult to achieve full-time and full-coverage monitoring by manpower alone. Therefore, it is necessary to combine scientific and technological means and smart products to achieve effective supervision of illegal residents in "three small places". Summary of the invention

[0004] The purpose of the present invention is to provide a non-invasive method and system for detecting illegal occupancy in three small places based on the Internet of Things, in view of the defects in the prior art. By collecting and analyzing the electricity consumption data of the three small places, effective detection and early warning of illegal occupancy in the three small places can be achieved.

[0005] To achieve the above object, the present invention adopts the following technical solutions:

[0006] A non-intrusive method for detecting illegal occupancy in three small places based on the Internet of Things, comprising the following steps:

[0007] S1. Data collection: Collect the electricity consumption data of target merchants through the full electricity collector;

[0008] S2. Screening out distorted abnormal data: performing abnormal feature detection on the collected power consumption data to screen out distorted abnormal data; the distorted abnormal data includes abnormal mutation data, abnormal missing data, abnormal zero value data and abnormal cumulative mutation data;

[0009] S3. Identification of illegal occupancy: Based on the collected electricity consumption data, the target merchants’ air conditioner start-up status and electrical appliance start-stop events during the nighttime electricity consumption period are detected to identify illegal occupancy of the target merchants;

[0010] Wherein, the S3 specifically includes the following steps:

[0011] S31. Determine the nighttime electricity consumption period of the target merchant based on the historical electricity consumption data of the target merchant;

[0012] S32. For each day when illegal occupancy identification is required, based on the local temperature and humidity one hour before the start of the nighttime electricity usage period of the target merchant, predict whether the target merchant has the possibility of turning on the air conditioner on that day;

[0013] S33, if it is predicted in S32 that there is a possibility of turning on the air conditioner on that day, further detecting whether the target merchant has turned on the air conditioner according to the average power change of the target merchant during the night time period; if the air conditioner is turned on, determining that there is illegal occupancy in the target merchant on that day;

[0014] S34. If it is predicted in S32 that there is no possibility of turning on the air conditioner on that day, further detect whether there is an electrical appliance start-stop event in the target merchant based on the sudden change of the total power signal during the nighttime electricity consumption period; if there is an electrical appliance start-stop event, it is determined that there is illegal occupancy in the target merchant on that day.

[0015] Furthermore, the S31 specifically includes the following steps:

[0016] S311, extracting power data of n power consumption reference days from the historical power consumption data of the target merchant; wherein the power consumption reference days are non-summer days or summer days when the target merchant does not turn on the air conditioner;

[0017] S312, using a K-means algorithm to perform iterative cluster analysis on the power data of each electricity consumption reference day, and dividing the power data of each electricity consumption reference day into two categories, wherein the larger category is marked as daytime power data, and the smaller category is marked as nighttime power data;

[0018] S313, for each electricity consumption reference day, the two dividing time points of the daytime power data and the nighttime power data are recorded as the nighttime power consumption start time t1 and the nighttime power consumption end time t2 of the day respectively;

[0019] S314, divide a day into several time periods with a cycle of 30 minutes. For each electricity consumption reference day, record the time period of its nighttime electricity consumption start time t1 as t1', and record the time period of its nighttime electricity consumption end time t2 as t2'; thereby obtain the nighttime electricity consumption start time sequence T1'={t1'1, t1'2, ..., t1' n}, and the night electricity end time series T2' = {t2'1, t2'2, ..., t2' n};

[0020] S315 , finding the time period T1 with the highest frequency of occurrence from T1′, finding the time period T2 with the highest frequency of occurrence from T2′, and recording the time period between T1 and T2 as the nighttime electricity consumption period of the target merchant.

[0021] Further, in S32, the method for predicting whether the target merchant has the possibility of turning on the air conditioner on that day is:

[0022] S321. Select several sample merchants from the location of the target merchant, where the sample merchants are merchants that are confirmed to have uninterrupted residents through investigation; determine the nighttime electricity consumption period of each sample merchant according to the method in S31;

[0023] S322. For each sample merchant, select several sampling days respectively; for each sampling day, generate a sample data {(x, y)}; where x is the local temperature and humidity one hour before the start of the nighttime electricity consumption period of the sample merchant, and y is the air conditioner on status mark of the sample merchant during the nighttime electricity consumption period; for all sampling days of all sample merchants, a total of N sample data {(x i ,y i )}, i = 1, 2, ..., N, making the N pieces of sample data into a first sample set;

[0024] S323, establishing an air-conditioning start prediction model based on a support vector machine algorithm, taking the local temperature and humidity one hour before the start of the nighttime electricity consumption period of the sample merchant as input, taking the air-conditioning start status mark of the sample merchant during the nighttime electricity consumption period as output, and using the first sample set to train the air-conditioning start prediction model;

[0025] S324. Input the local temperature and humidity one hour before the start of the nighttime electricity consumption period of the target merchant into the trained air-conditioning start prediction model, and confirm whether the target merchant has the possibility of turning on the air-conditioning on that day based on the output result.

[0026] Furthermore, in S322, the air conditioner on status mark of the sample merchant during the night power consumption period is obtained by manual experience judgment based on the temperature and humidity of the day and the average power of the sample merchant during the night power consumption period; when it is judged that the air conditioner is on, it is marked as y=1, and when it is judged that the air conditioner is not on, it is marked as y=-1.

[0027] Furthermore, in S33, the method for detecting whether the target merchant has an air conditioner turned on is:

[0028] S331. Select several sample merchants from the location of the target merchant, where the sample merchants are merchants that are confirmed to have uninterrupted residents through investigation; determine the nighttime electricity consumption period of each sample merchant according to the method in S31;

[0029] S332. For each sample merchant, generate sample data according to the following method:

[0030] Collect the multi-day electricity consumption data of sample merchants on non-summer days, and calculate the multi-day total nighttime average power P1 of the sample merchants during the nighttime electricity consumption period on non-summer days;

[0031] Select several sampling days, and for each sampling day, calculate the single-day night average power P2 of the sample merchant during the night electricity consumption period;

[0032] For each sampling day of the sample merchant, the power difference feature (d1, d2) is calculated respectively, where d1 = P2-P1, d2 = P2 / P1;

[0033] Through on-site investigation, the air conditioner on-state of the sample merchant during the nighttime electricity consumption period on each sampling day is marked; for the sampling day when the air conditioner on-state can be determined, labeled sample data ((d1, d2), y) is generated, where y is the air conditioner on-state mark, the air conditioner on-state mark is y = 1, and the air conditioner off-state mark is y = -1; for the sampling day when it is impossible to determine whether the air conditioner is on, unlabeled sample data (d1, d2) is generated;

[0034] S333, a total of N labeled sample data {[(d1, d2) i ,y i ]}, i = 1, 2, ..., N, aggregated to form the second sample set; a total of M unlabeled sample data {(d1, d2) of all sample merchants i}, i = N + 1, N + 2, ..., N + M, aggregated to form a third sample set;

[0035] S334, establishing an air conditioner on detection model based on a semi-supervised support vector machine algorithm, taking the power difference feature (d1, d2) as input, taking the air conditioner on state mark y of the sample merchant during the night power consumption period as output, and using the second sample set and the third sample set to train the air conditioner on detection model;

[0036] S334. Input the power difference feature (d1, d2) of the target merchant on that day into the trained air conditioner on detection model, and confirm whether the target merchant has air conditioner on that day based on the output result.

[0037] Furthermore, in S34, the method for detecting whether there is an electrical appliance start-stop event in the target merchant is:

[0038] S341, obtaining the active power sequence of the target merchant during the nighttime electricity consumption period;

[0039] S342, taking a sliding window for the active power sequence of the target merchant during the nighttime electricity consumption period;

[0040] S343, for each sliding window, a judgment is made according to the following dual constraint expression, and when the following two constraint conditions are met at the same time, it is determined that an electrical appliance start-stop event has occurred in the sliding window;

[0041]

[0042] In the formula, S 2 is the variance of all elements in the sliding window, P i is the element in the sliding window, M Y is the average value of all elements in the sliding window, N is the number of elements in the sliding window, ΔP is the power change value between two adjacent elements in the sliding window, σ is the set first threshold coefficient, and θ is the set second threshold.

[0043] Furthermore, it also includes S4, early warning of illegal living conditions: when illegal living conditions are identified, the early warning platform records them and issues early warning information.

[0044] A non-intrusive three-small-place illegal occupancy detection system based on the Internet of Things is used to implement the above-mentioned non-intrusive three-small-place illegal occupancy detection method based on the Internet of Things, including: a full power collector connected to the power circuit of each merchant, and a data screening module, an illegal occupancy identification module and an early warning management module set on a cloud platform;

[0045] The full electricity collector is used to collect electricity consumption data of target merchants and transmit it to the cloud platform;

[0046] The data screening module is used to detect abnormal characteristics of the power consumption data collected by the full power collector and filter out distorted and abnormal data;

[0047] The illegal occupancy identification module is used to detect the air conditioner start-up status and electrical appliance start-stop events of the target merchant during the night electricity consumption period based on the electricity consumption data, so as to identify the illegal occupancy of the target merchant;

[0048] The early warning management module is used to record the recognition results of the illegal resident recognition module and issue early warning information.

[0049] The present invention provides a non-invasive method and system for detecting illegal occupancy in three small places based on the Internet of Things. Relying on existing information technologies such as big data, the Internet of Things, and artificial intelligence, and adopting the Internet of Things intelligent mining and analysis model, the method detects, collects, and analyzes the electricity consumption data of merchants in the three small places, thereby realizing accurate identification of illegal occupancy in merchants in the three small places.

[0050] The present invention provides an effective scientific and technological means for the supervision of illegal residents in the three small places. It can realize non-invasive detection of illegal residents in merchants by simply analyzing the electricity consumption data collected based on the Internet of Things, avoiding the law enforcement dilemma caused by offline door-to-door investigation, saving law enforcement manpower costs; it is helpful to strengthen the fire safety management of the three small places and improve the efficiency of offline law enforcement inspections by fire departments. The present invention can effectively curb the occurrence of fire safety accidents and is of great significance to the fire safety management of the three small places. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is a flow chart of a non-invasive method for detecting illegal occupancy in three small places based on the Internet of Things provided in Example 1 of the present invention.

[0052] Figure 2 This is a flow chart of a method for identifying illegal occupancy in step S3 in the first embodiment of the present invention.

[0053] Figure 3 This is a structural block diagram of a non-intrusive three-small-place illegal occupancy detection system based on the Internet of Things provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0054] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0055] Embodiment 1

[0056] like Figure 1 As shown, an embodiment of the present invention provides a non-intrusive method for detecting illegal occupancy in three small places based on the Internet of Things, comprising the following steps:

[0057] S1. Data collection: The electricity consumption data of the target merchants are collected through a full electricity collector, and the electricity consumption data includes the current, voltage, power, temperature, residual current and electricity consumption of the power circuit; the collected electricity consumption data is transmitted to the cloud platform via wireless communication or a combination of wired and wireless communication.

[0058] S2. Screening out distorted and abnormal data: performing abnormal feature detection on the collected power consumption data and screening out distorted and abnormal data;

[0059] S3. Identification of illegal occupancy: Based on the collected electricity consumption data, the target merchants’ air conditioner startup status and electrical appliance start-stop events during the nighttime electricity consumption period are detected to identify illegal occupancy of the target merchants.

[0060] S4. Warning of illegal living conditions: When illegal living conditions are identified, the warning platform will record them and issue a warning message.

[0061] In S2, the distorted abnormal data includes abnormal mutation data, abnormal missing data, abnormal zero value data and abnormal cumulative mutation data. The original electricity consumption data has gone through multiple links such as collection, transmission, and storage. When there are problems such as equipment failure or communication interruption, the data may not be able to present the real electricity consumption status of the merchant. Such data is distorted abnormal data. By classifying and feature detecting the distorted abnormal data, and then identifying and screening the distorted abnormal data, the decomposition interference of the distorted abnormal data on the non-distorted abnormal data can be reduced.

[0062] In S3, the basic principle of the present invention for identifying illegal residents is as follows: most of the three small places merchants use only refrigerators and other often-open electrical appliances at night during non-summer periods. The nighttime electricity consumption has the characteristics of low power and scattered electricity consumption behavior, which is in sharp contrast to the situation of large power consumption and concentrated electricity consumption behavior during the day. The three small places merchants with residents will choose to turn on the air conditioner when the temperature is high at night during the summer, resulting in the nighttime power being much higher than the nighttime power during the non-summer period. Therefore, the average power of the nighttime electricity consumption period during the summer can be compared with the average power of the nighttime electricity consumption period during the non-summer period to determine whether the merchant has the behavior of turning on the air conditioner, and use it as a basis for judging whether the three small places merchants have illegal residents during the summer. During the non-summer period, when there is illegal living in the three small places merchants at night, there will always be some behaviors of artificially using electrical equipment, which will cause the power consumption to jump. The power jump situation is identified by the event detection algorithm, and it can be determined whether the start and stop of the electrical equipment is caused by human operation, which is used as a basis for judging whether the three small places merchants have illegal living during the non-summer period.

[0063] Based on the above principle, in S3, the embodiment of the present invention first determines whether the merchant has the possibility of turning on the air conditioner based on the night temperature and humidity of the day. If the temperature and humidity meet the air conditioner turning-on conditions, the illegal occupancy is further confirmed by detecting the air conditioner turning-on behavior. If not, the illegal occupancy is further confirmed by detecting the start-stop event of the electrical appliance.

[0064] Specifically, S3 includes the following steps:

[0065] S31. Determine the nighttime electricity consumption period of the target merchant based on the historical electricity consumption data of the target merchant;

[0066] S32. For each day when illegal occupancy identification is required, based on the local temperature and humidity one hour before the start of the nighttime electricity usage period of the target merchant, predict whether the target merchant has the possibility of turning on the air conditioner on that day;

[0067] S33, if it is predicted in S32 that there is a possibility of turning on the air conditioner on that day, further detecting whether the target merchant has turned on the air conditioner according to the average power change of the target merchant during the night time period; if the air conditioner is turned on, determining that there is illegal occupancy in the target merchant on that day;

[0068] S34. If it is predicted in S32 that there is no possibility of turning on the air conditioner on that day, further detect whether there is an electrical appliance start-stop event in the target merchant based on the sudden change of the total power signal during the nighttime electricity consumption period; if there is an electrical appliance start-stop event, it is determined that there is illegal occupancy in the target merchant on that day.

[0069] Furthermore, the S31 specifically includes the following steps:

[0070] S311, extracting power data of n power consumption reference days from the historical power consumption data of the target merchant; wherein the power consumption reference days are non-summer days or summer days when the target merchant does not turn on the air conditioner;

[0071] S312, using a K-means algorithm to perform iterative cluster analysis on the power data of each electricity consumption reference day, and dividing the power data of each electricity consumption reference day into two categories, wherein the larger category is marked as daytime power data, and the smaller category is marked as nighttime power data;

[0072] S313, for each electricity consumption reference day, the two dividing time points of the daytime power data and the nighttime power data are recorded as the nighttime power consumption start time t1 and the nighttime power consumption end time t2 of the day respectively;

[0073] S314, divide a day into several time periods with a cycle of 30 minutes. For each electricity consumption reference day, record the time period of its nighttime electricity consumption start time t1 as t1', and record the time period of its nighttime electricity consumption end time t2 as t2'; thereby obtain the nighttime electricity consumption start time sequence T1'={t1'1, t1'2, ..., t1' n}, and the night electricity end time series T2' = {t2'1, t2'2, ..., t2' n};

[0074] S315 , finding the time period T1 with the highest frequency of occurrence from T1′, finding the time period T2 with the highest frequency of occurrence from T2′, and recording the time period between T1 and T2 as the nighttime electricity consumption period of the target merchant.

[0075] Further, in S32, the method for predicting whether the target merchant has the possibility of turning on the air conditioner on that day is:

[0076] S321. Select several sample merchants from the location of the target merchant, where the sample merchants are merchants that are confirmed to have uninterrupted residents through investigation; determine the nighttime electricity consumption period of each sample merchant according to the method in S31;

[0077] S322. For each sample merchant, select several sampling days respectively; for each sampling day, generate a sample data {(x, y)}; where x is the local temperature and humidity one hour before the start of the nighttime electricity consumption period of the sample merchant, and y is the air conditioner on status mark of the sample merchant during the nighttime electricity consumption period; for all sampling days of all sample merchants, a total of N sample data {(x i ,y i )}, i = 1, 2, ..., N, making the N pieces of sample data into a first sample set;

[0078] Among them, the air conditioner on status mark of the sample merchants during the night electricity consumption period is obtained by manual experience judgment based on the temperature and humidity of the day and the average power of the sample merchants during the night electricity consumption period; when the air conditioner is judged to be on, it is marked as y=1, and when the air conditioner is judged not to be on, it is marked as y=-1. In addition, the air conditioner on status of the sample merchants can also be confirmed by on-site surveys, which can improve the accuracy of the sample, but it increases the difficulty and workload of obtaining sample data.

[0079] S323, establishing an air-conditioning start prediction model based on a support vector machine algorithm, taking the local temperature and humidity one hour before the start of the nighttime electricity consumption period of the sample merchant as input, taking the air-conditioning start status mark of the sample merchant during the nighttime electricity consumption period as output, and using the first sample set to train the air-conditioning start prediction model;

[0080] S324. Input the local temperature and humidity one hour before the start of the nighttime electricity consumption period of the target merchant into the trained air-conditioning start prediction model, and confirm whether the target merchant has the possibility of turning on the air-conditioning on that day based on the output result.

[0081] Support vector machine is a binary classification model, its purpose is to find a plane to segment samples. The discriminant model of support vector machine is:

[0082] f(X)=sign(ω T X+b) (1)

[0083] In the formula, X is the input feature data, ω is the weight vector, and ω T is the transpose of the weight vector, and b is the bias term.

[0084] Assume that the optimal interface of the sample is ω Tx+b=0, the goal of the support vector machine is to find its optimal solution. The problem can be finally transformed into a constrained convex quadratic programming problem of formula (2):

[0085]

[0086] In the formula, ξ i =1-y i (ω T x i +b) is the loss function; C is the penalty parameter. The larger the C, the greater the penalty for wrong classification, and the smaller the C, the smaller the penalty for wrong classification. According to the convex optimization theory, the constrained problem of formula (2) can be transformed into the unconstrained problem of formula (3) with the help of Lagrange multipliers:

[0087]

[0088] Where β and μ are Lagrange multipliers.

[0089] Furthermore, according to the Lagrange duality principle, equation (3) can be transformed into its dual problem:

[0090]

[0091] By solving equation (4), we can find the minimum value of the optimization function for ω, B, ξ. Let: Thus, the relationship between ω, B, ξ and β, μ is obtained, as shown in formula (5).

[0092]

[0093] Substituting into the Lagrangian function, we can get:

[0094]

[0095] The problem finally turns into:

[0096]

[0097] In this embodiment, the first sample set used to train the air conditioner start prediction model is:

[0098]

[0099] in, is the characteristic data set, that is, the local temperature and humidity one hour before the nighttime electricity consumption period of the sample merchant begins; y i ∈{-1,1} is the category label, which is the mark of the air conditioner on status of the sample merchant during the night electricity consumption period.

[0100] Based on the above process, the expression of the air conditioner start prediction model based on the support vector machine algorithm in the embodiment of the present invention is:

[0101]

[0102] Where: I1(ω1,b1) is the objective function of the air conditioning start prediction model; C1 is the penalty factor of the first sample set; ξ 1I is the loss function corresponding to the sample.

[0103] After inputting the temperature and humidity data into the trained air conditioner start prediction model, if the output result of the model is 1, it is determined that the target merchant has the possibility of turning on the air conditioner on that day, and the target merchant's air conditioner turn-on behavior can be further detected to determine whether there is illegal occupancy. Since turning on the air conditioner will correspondingly increase the power at night, the embodiment of the present invention proposes an air conditioner turn-on detection model based on this, which is used to detect the air conditioner turn-on behavior according to the abnormal change of the average power at night, and then identify the illegal occupancy of the target merchant.

[0104] Specifically, in S33, the method for detecting whether the target merchant has an air conditioner turned on is:

[0105] S331. Select several sample merchants from the location of the target merchant, where the sample merchants are merchants that are confirmed to have uninterrupted residents through investigation; determine the nighttime electricity consumption period of each sample merchant according to the method in S31;

[0106] S332. For each sample merchant, generate sample data according to the following method:

[0107] Collect the multi-day electricity consumption data of sample merchants on non-summer days (such as February to March), and calculate the multi-day total nighttime average power P1 of the sample merchants during the nighttime electricity consumption period on non-summer days;

[0108] Select several sampling days (regardless of whether they are summer months or not), and for each sampling day, calculate the single-day night average power P2 of the sample merchant during the night electricity consumption period;

[0109] For each sampling day of the sample merchant, the power difference feature (D1, d2) is calculated respectively, where d1 = p2-P1, d2 = p2 / P1;

[0110] Through on-site investigation, the air conditioner on-state of the sample merchant during the nighttime electricity consumption period on each sampling day is marked; for the sampling day when the air conditioner on-state can be determined, labeled sample data ((d1, d2), y) is generated, where y is the air conditioner on-state mark, the air conditioner on-state mark is y = 1, and the air conditioner off-state mark is y = -1; for the sampling day when it is impossible to determine whether the air conditioner is on, unlabeled sample data (d1, d2) is generated;

[0111] S333, a total of N labeled sample data {[(d1, d2) i ,y i ]}, i = 1, 2, ..., N, aggregated to form the second sample set; a total of M unlabeled sample data {(d1, d2) of all sample merchants i}, i = N + 1, N + 2, ..., N + M, aggregated to form a third sample set;

[0112] S334, establishing an air conditioner on detection model based on a semi-supervised support vector machine algorithm, taking the power difference feature (d1, d2) as input, taking the air conditioner on state mark y of the sample merchant during the night power consumption period as output, and using the second sample set and the third sample set to train the air conditioner on detection model;

[0113] S334. Input the power difference feature (d1, d2) of the target merchant on that day into the trained air conditioner on detection model, and confirm whether the target merchant has air conditioner on that day based on the output result.

[0114] The training set of the air conditioner opening detection model based on the semi-supervised support vector machine algorithm consists of labeled samples and unlabeled samples, both of which meet the assumption of independent and identical distribution; in this embodiment, the labeled sample set is the second sample set:

[0115]

[0116] The unlabeled sample set is the third sample set:

[0117] Unlab={(d1,d2) N+1 ,(d1,d2) N+2 ,...,(d1,d2) N+M},(d1,d2) i ∈R2 p ;

[0118] in, is the characteristic data set, i.e., the difference and ratio between the single-day night average power P2 of the sample merchant on the sampling day and the multi-day night total average power P1 of the sample merchant on non-summer days; y i ∈{-1,1} is the category label, which is the mark of the air conditioner on status of the sample merchant during the night electricity consumption period.

[0119] The expression of the air conditioner start detection model based on the semi-supervised support vector machine algorithm in the embodiment of the present invention is:

[0120]

[0121] Where: I2(ω2,b2,YUL ) is the objective function of the air conditioner on detection model; Y UL =(y N+1 ,y N+2 ,...,y N+M ) is the label vector of the third sample set; C2, C2 * are the penalty factors for the second and third sample sets respectively; They are the loss functions corresponding to the second sample set and the third sample set respectively.

[0122] Furthermore, after inputting the temperature and humidity data into the trained air conditioning start prediction model, if the output result of the model is -1, it is determined that the target merchant may not have turned on the air conditioner on that day, and the start and stop events of the target merchant's appliances can be further detected to determine whether there is a violation of the rules. Since the electrical appliances will cause a jump in power consumption when they are turned on and off, the start and stop events of the electrical appliances can be detected by the sudden change of the total power signal. In this embodiment, by taking a sliding window for the active power sequence of the load, and calculating the variance value of the power sequence in the sliding window and the change in the power value before and after the electrical appliance is started and stopped, it is determined whether an electrical appliance start and stop event has occurred.

[0123] Specifically, in S34, the method for detecting whether there is an electrical appliance start-stop event in the target merchant is:

[0124] S341, obtaining the active power sequence of the target merchant during the nighttime electricity consumption period;

[0125] S342, taking a sliding window for the active power sequence of the target merchant during the nighttime electricity consumption period;

[0126] S343, for each sliding window, a judgment is made according to the following dual constraint expression, and when the following two constraint conditions are met at the same time, it is determined that an electrical appliance start-stop event has occurred in the sliding window;

[0127]

[0128] In the formula, S 2 is the variance of all elements in the sliding window, P i is the element in the sliding window, M Y is the average value of all elements in the sliding window, N is the number of elements in the sliding window, ΔP is the power change value between two adjacent elements in the sliding window, σ is the coefficient of the set first threshold, and θ is the set second threshold.

[0129] Specifically, we first take a sliding window with a variable window size for the active power sequence of the target merchant during the nighttime electricity consumption period; considering that the running time of each start and stop event of each appliance is different, the selection of the sliding window size needs to be different according to the different appliance loads. 2 As one of the constraints for judging whether the switch state of the appliance changes. 2 The value is greater than the first threshold σM Y , it indicates that an electrical appliance start-stop event is very likely to have occurred in this sliding window. In addition, in order to avoid misjudgment caused by a single constraint, another constraint is designed that the power change value ΔP of two adjacent elements in the active power sequence Y in the sliding window must be greater than the set second threshold θ. By calculating the power change value ΔP of two adjacent elements, the specific location (time point) of the electrical appliance start-stop event can also be determined.

[0130] Embodiment 2

[0131] On the basis of the first embodiment, the embodiment of the present invention provides a non-intrusive three-small-place illegal occupancy detection system based on the Internet of Things, which includes a full power collector connected to the power circuit of each merchant, and a data screening module, an illegal occupancy identification module and an early warning management module arranged on a cloud platform;

[0132] The full electricity collector is used to collect electricity consumption data of target merchants and transmit it to the cloud platform;

[0133] The data screening module is used to detect abnormal characteristics of the power consumption data collected by the full power collector and filter out distorted and abnormal data;

[0134] The illegal occupancy identification module is used to detect the air conditioner start-up status and electrical appliance start-stop events of the target merchant during the night power consumption period according to the power consumption data, so as to identify the illegal occupancy of the target merchant; wherein, the illegal occupancy identification method adopted in this module is specifically described in step S3 of the first embodiment, and will not be repeated here;

[0135] The early warning management module is used to record the recognition results of the illegal resident recognition module and issue early warning information.

[0136] Furthermore, the early warning management module specifically includes a result statistics submodule, a risk assessment submodule and an alarm verification submodule; the three submodules are progressive, realizing the visualization of the analysis results and risk assessment results of illegal occupancy in the three small places and the implementation of the alarm response mechanism.

[0137] The result statistics submodule is used to record the identification results of illegal residents of all target merchants, and to perform statistics, summary and display;

[0138] Specifically, the result statistics submodule displays the results of the identification of illegal residents for all target merchants in the form of a monthly calendar, and marks the illegal residents detected every day; on the calendar, the dates when illegal residents are identified are displayed in red, and the dates when illegal residents are not identified are displayed in green. At the same time, the results of the identification of illegal residents for all target merchants in the detection area are also displayed in the form of a statistical table, and the number of merchants with illegal residents detected every day and the number of illegal residents for three consecutive days and their detailed lists are statistically output and summarized. The result statistics submodule updates and displays the number of merchants with illegal residents on that day, the number of merchants with illegal residents for three consecutive days, the number of merchants to be checked, and the number of merchants to be rectified at 7 am every day, and can export the weekly warning report of illegal residents for the current month and previous months at any time, so that managers can report, archive and process the results of illegal residents.

[0139] The risk assessment submodule is used to conduct a dynamic risk assessment on each merchant and each venue area based on the statistical results of illegal residents in each merchant, combined with other merchant information that has been counted, such as business type, merchant area, historical records and other factors.

[0140] Specifically, the risk assessment submodule sets the risk level of merchants with illegal residents on the same day to Level IV, the risk level of merchants with illegal residents for three consecutive days to Level III, and the risk level of merchants with illegal residents for seven consecutive days to Level II; merchants with Level II risk will be forced to rectify. If rectification is not implemented and illegal residents still exist, the risk level will be upgraded to Level I. When the number of merchants with illegal residents in the venue area accounts for 10% to 30% of the total number of merchants on the same day, the risk level of the venue area is set to Level III; when the number of merchants with illegal residents in the venue area accounts for 30% to 50% of the total number of merchants on the same day, the risk level of the venue area is upgraded to Level II; when the number of merchants with illegal residents in the venue area accounts for more than 50% of the total number of merchants on the same day, the risk level of the venue area is upgraded to Level I.

[0141] The alarm verification submodule is used to send warning information to management personnel based on the identified illegal occupancy situation for verification by the management personnel.

[0142] Specifically, the alarm verification submodule can issue alarms and SMS notifications for the identified illegal occupancy; the alarm interface every morning will display the merchants with illegal occupancy identified the previous night and the corresponding risk level, and notify the relevant management personnel via SMS to download the weekly illegal occupancy merchant verification form. After the regional administrator conducts on-site inspection and verification, the results will be filled in the illegal occupancy merchant verification form and uploaded. The illegal occupancy identification module can use the data in the illegal occupancy merchant verification form as a sample to improve the calibration and optimization of the air conditioning start prediction model and the air conditioning start detection model, so as to continuously improve the accuracy of merchant illegal occupancy identification.

[0143] The present invention provides a non-invasive method and system for detecting illegal occupancy in three small places based on the Internet of Things. Relying on existing information technologies such as big data, the Internet of Things, and artificial intelligence, and adopting an Internet of Things intelligent mining and analysis model, the method and system detect, collect, and analyze the electricity consumption data of merchants in the three small places, thereby achieving accurate identification and judgment of illegal occupancy in merchants in the three small places.

[0144] The present invention provides an effective scientific and technological means for the supervision of illegal residents in the three small places. It can realize non-invasive detection of illegal residents in merchants by simply analyzing the electricity consumption data collected based on the Internet of Things, avoiding the law enforcement dilemma caused by offline door-to-door investigation, saving law enforcement manpower costs; it is helpful to strengthen the fire safety management of the three small places and improve the efficiency of offline law enforcement inspections by fire departments. The present invention can effectively curb the occurrence of fire safety accidents and is of great significance to the fire safety management of the three small places.

[0145] Furthermore, the present invention also conducts risk assessment on potential safety hazards caused by illegal occupancy through an early warning management module, formulates an alarm response mechanism for illegal occupancy to verify the identification results of illegal occupancy, so as to manage and rectify the shops; it realizes the full-time and visual detection, assessment and early warning of illegal occupancy in the three small places.

[0146] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A non-intrusive method for detecting illegal occupancy in three small places based on the Internet of Things. It is characterized in that The following steps are involved: S1. Data collection: Collect the electricity consumption data of target merchants through the full electricity collector; S2. Screening out distorted abnormal data: performing abnormal feature detection on the collected power consumption data to screen out distorted abnormal data; the distorted abnormal data includes abnormal mutation data, abnormal missing data, abnormal zero value data and abnormal cumulative mutation data; S3. Identification of illegal occupancy: Based on the collected electricity consumption data, the target merchants’ air conditioner start-up status and electrical appliance start-stop events during the nighttime electricity consumption period are detected to identify illegal occupancy of the target merchants; Wherein, the S3 specifically includes the following steps: S31. Determine the nighttime electricity consumption period of the target merchant based on the historical electricity consumption data of the target merchant; S32. For each day when illegal occupancy identification is required, based on the local temperature and humidity one hour before the start of the nighttime electricity usage period of the target merchant, predict whether the target merchant has the possibility of turning on the air conditioner on that day; S33, if it is predicted in S32 that there is a possibility of turning on the air conditioner on that day, further detecting whether the target merchant has turned on the air conditioner according to the average power change of the target merchant during the night time period; if the air conditioner is turned on, determining that there is illegal occupancy in the target merchant on that day; S34. If it is predicted in S32 that there is no possibility of turning on the air conditioner on that day, further detect whether there is an electrical appliance start-stop event in the target merchant based on the sudden change of the total power signal during the nighttime electricity consumption period; if there is an electrical appliance start-stop event, it is determined that there is illegal occupancy in the target merchant on that day.

2. According to the non-intrusive three-small-place illegal occupancy detection method based on the Internet of Things in claim 1, It is characterized in that The S31 specifically includes the following steps: S311, extracting power data of n power consumption reference days from the historical power consumption data of the target merchant; wherein the power consumption reference days are non-summer days or summer days when the target merchant does not turn on the air conditioner; S312, using a K-means algorithm to perform iterative cluster analysis on the power data of each electricity consumption reference day, and dividing the power data of each electricity consumption reference day into two categories, wherein the larger category is marked as daytime power data, and the smaller category is marked as nighttime power data; S313, for each electricity consumption reference day, the two boundary time points of the daytime power data and the nighttime power data are recorded as the nighttime power consumption start time t1 and the nighttime power consumption end time t2 of the day respectively; S314, divide a day into several time periods with a cycle of 30 minutes. For each electricity consumption reference day, record the time period where the nighttime electricity consumption start time t1 is located as t1', and record the time period where the nighttime electricity consumption end time t2 is located as t2'; thereby obtain the nighttime electricity consumption start time sequence T1'={t1' 1 ,t1' 2 ,...,t1' n }, and the night electricity consumption end time sequence T2' = {t2' 1 ,t2' 2 ,...,t2' n }; S315 , finding the time period T1 with the highest frequency of occurrence from T1′, finding the time period T2 with the highest frequency of occurrence from T2′, and recording the time period between T1 and T2 as the nighttime electricity consumption period of the target merchant.

3. According to the non-intrusive three-small-place illegal occupancy detection method based on the Internet of Things in claim 2, It is characterized in that In S32, the method for predicting whether the target merchant has the possibility of turning on the air conditioner on that day is: S321. Select several sample merchants from the location of the target merchant, where the sample merchants are merchants that are confirmed to have uninterrupted residents through investigation; determine the nighttime electricity consumption period of each sample merchant according to the method in S31; S322. For each sample merchant, select several sampling days respectively; for each sampling day, generate a sample data {(x, y)}; where x is the local temperature and humidity one hour before the start of the nighttime electricity consumption period of the sample merchant, and y is the air conditioner on status mark of the sample merchant during the nighttime electricity consumption period; for all sampling days of all sample merchants, a total of N sample data {(x i ,y i )}, i = 1, 2, ..., N, making the N pieces of sample data into a first sample set; S323, establishing an air-conditioning start prediction model based on a support vector machine algorithm, taking the local temperature and humidity one hour before the start of the nighttime electricity consumption period of the sample merchant as input, taking the air-conditioning start status mark of the sample merchant during the nighttime electricity consumption period as output, and using the first sample set to train the air-conditioning start prediction model; S324. Input the local temperature and humidity one hour before the start of the nighttime electricity consumption period of the target merchant into the trained air-conditioning start prediction model, and confirm whether the target merchant has the possibility of turning on the air-conditioning on that day based on the output result.

4. According to the non-intrusive three-small-place illegal occupancy detection method based on the Internet of Things in claim 3, It is characterized in that In S322, the air conditioner on status mark of the sample merchant during the night power consumption period is obtained by manual experience judgment based on the temperature and humidity of the day and the average power of the sample merchant during the night power consumption period; when it is judged that the air conditioner is on, it is marked as y=1, and when it is judged that the air conditioner is not on, it is marked as y=-1.

5. According to the non-intrusive method for detecting illegal occupancy in three small places based on the Internet of Things in claim 3, It is characterized in that In S33, the method for detecting whether the target merchant has an air conditioner turned on is: S331. Select several sample merchants from the location of the target merchant, where the sample merchants are merchants that are confirmed to have uninterrupted residents through investigation; determine the nighttime electricity consumption period of each sample merchant according to the method in S31; S332. For each sample merchant, generate sample data according to the following method: Collect the multi-day electricity consumption data of sample merchants on non-summer days, and calculate the multi-day total nighttime average power P of the sample merchants during the nighttime electricity consumption period on non-summer days. 1 ; Select several sampling days, and for each sampling day, calculate the average nighttime power P of the sample merchant during the nighttime electricity consumption period. 2 ; For each sampling day of the sample merchant, the power difference feature (d 1 ,d 2 ), where d 1 =P 2 -P 1 , d 2 =P 2 / P 1 ; Through on-site investigation, the air conditioner on-state of the sample merchant during the nighttime electricity consumption period on each sampling day is marked; for the sampling day when the air conditioner on-state can be determined, labeled sample data (d 1 ,d 2 ), y), where y is the air conditioner on status mark, the air conditioner on mark is y = 1, the air conditioner off mark is y = -1; for the sampling day when it is not possible to determine whether the air conditioner is on, unlabeled sample data (d 1 ,d 2 ); S333, a total of N labeled sample data of all sample merchants {[(d 1 ,d 2 ) i ,y i ]}, i = 1, 2, ..., N, and aggregate to form the second sample set; a total of M unlabeled sample data {(d 1 ,d 2 ) i }, i = N + 1, N + 2, ..., N + M, aggregated to form a third sample set; S334, establish an air conditioner opening detection model based on semi-supervised support vector machine algorithm, and use power difference feature (d 1 ,d 2 ) as input, and the air conditioner on state mark y of the sample merchant during the night electricity consumption period as output, and the air conditioner on detection model is trained using the second sample set and the third sample set; S334: The power difference feature (d 1 ,d 2 ) is input into the trained air-conditioning on detection model, and the output result is used to confirm whether the target merchant has air-conditioning on that day.

6. According to the non-intrusive method for detecting illegal occupancy in three small places based on the Internet of Things in claim 5, It is characterized in that In S34, the method for detecting whether there is an electrical appliance start-stop event in the target merchant is: S341, obtaining the active power sequence of the target merchant during the nighttime electricity consumption period; S342, taking a sliding window for the active power sequence of the target merchant during the nighttime electricity consumption period; S343, for each sliding window, a judgment is made according to the following dual constraint expression, and when the following two constraint conditions are met at the same time, it is determined that an electrical appliance start-stop event has occurred in the sliding window; In the formula, S 2 is the variance of all elements in the sliding window, P i is the element in the sliding window, M Y is the average value of all elements in the sliding window, N is the number of elements in the sliding window, ΔP is the power change value between two adjacent elements in the sliding window, σ is the set first threshold coefficient, and θ is the set second threshold.

7. According to the non-intrusive method for detecting illegal occupancy in three small places based on the Internet of Things in claim 1, It is characterized in that It also includes S4, early warning of illegal living conditions: when illegal living conditions are identified, the early warning platform will record them and issue an early warning message.

8. A non-intrusive three-small-place illegal occupancy detection system based on the Internet of Things, used to implement the non-intrusive three-small-place illegal occupancy detection method based on the Internet of Things as described in any one of claims 1 to 7, It is characterized in that include: A full power collector connected to the power circuit of each business, as well as a data screening module, illegal resident identification module and early warning management module set up on the cloud platform; The full electricity collector is used to collect electricity consumption data of target merchants and transmit it to the cloud platform; The data screening module is used to detect abnormal characteristics of the power consumption data collected by the full power collector and filter out distorted and abnormal data; The illegal occupancy identification module is used to detect the air conditioner start-up status and electrical appliance start-stop events of the target merchant during the night power consumption period based on the electricity consumption data, so as to identify the illegal occupancy of the target merchant; The early warning management module is used to record the recognition results of the illegal resident recognition module and issue early warning information.