Student apartment electricity utilization safety detection method
By calculating the similarity of students' electricity use behavior and combining positioning information and power thresholds, the electricity safety of student apartments is monitored in real time, and the problems of insufficient monitoring of electricity use behavior in the existing technology are solved, accurate monitoring of students' electricity use behavior and timely identification of abnormal electricity use are achieved, and the safety and management efficiency of dormitory electricity use are improved.
Patent Information
- Application Number
- CN202510685235.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-07-01
AI Technical Summary
The existing student apartment electricity safety detection methods have significant flaws in the accuracy of monitoring electricity usage behavior and identity identification, and cannot effectively distinguish between normal electricity use of students and foreign visitors from stealing electricity, and it is difficult to detect electricity theft behavior in a timely manner, which increases safety hazards.
By calculating the similarity of students' electricity consumption behavior, combining positioning information and power thresholds, we can monitor the safety of dormitory electricity consumption in real time, implement individual deviation electricity use alarm strategies and external personnel's risk identification strategies to improve the safety and response speed of dormitory management.
It realizes accurate monitoring of students' electricity use behavior, can timely identify abnormal electricity use behavior, improve the safety and management efficiency of dormitory electricity use, and reduce false alarms and missed reports.
Smart Images

Figure CN120235459A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electricity safety detection in student apartments, and specifically provides a method for detecting electricity safety in student apartments. Background Art
[0002] The electricity safety detection method for student apartments can timely detect abnormal electricity consumption behaviors, such as electricity theft or electrical appliance failures, by monitoring the electricity consumption situation in the dormitory in real time. By analyzing the electricity consumption data of students and combining power thresholds and electricity consumption behavior analysis, it can effectively judge whether the electricity consumption behaviors among students are consistent and whether there are external personnel using electricity.
[0003] There are multiple significant defects in the existing technology for electricity safety detection in student apartments, mainly reflected in two aspects: the monitoring accuracy of electricity consumption behaviors and identity recognition. First of all, most traditional electricity consumption monitoring systems rely on the monitoring of total electricity power and lack in-depth analysis of electricity consumption behaviors. Even if electricity consumption abnormalities are found, the system often cannot distinguish whether it is normal electricity consumption by students or electricity theft by external visitors. At the same time, electricity theft behaviors are difficult to detect in a timely manner, increasing safety hazards. The consistency of students' electricity consumption behaviors is ignored. For the judgment of the consistency of electricity consumption behaviors, traditional systems usually cannot dynamically analyze students' electricity consumption patterns and cannot identify deviations in students' electricity consumption behaviors, thus missing potential abnormal electricity consumption. Even if there are electricity consumption fluctuations, traditional methods usually cannot give accurate alarms in a timely manner. Especially during low-power periods, the system often fails to distinguish between normal electricity consumption and irregular electricity consumption, prone to false alarms or missed alarms. Generally speaking, the existing technology fails to make full use of the differences in individual students' electricity consumption behaviors and lacks an identity verification mechanism, resulting in insufficient accuracy of monitoring and alarming and increasing the risk of electricity safety.
[0004] The present invention proposes a method for detecting electricity safety in student apartments. By calculating the similarity of electricity consumption behaviors and combining location information and electricity power thresholds, it can monitor the electricity safety in the dormitory in real time and improve the safety and response speed of dormitory management through an alarm mechanism. Summary of the Invention
[0005] The present invention provides a method for detecting electricity safety in student apartments to help solve the problems mentioned in the above background art.
[0006] The present invention provides the following technical solution: A method for detecting electricity safety in student apartments, comprising: Setting relevant characteristic indicators for any two students; The relevant characteristic indicators include course overlap degree, dormitory similarity, and spatial contact duration; Executing an intimacy score function modeling strategy to calculate the intimacy score of any two students; Setting an intimacy score threshold; When the intimacy score is greater than or equal to the intimacy score threshold, the two students are considered relevant; For any dormitory in the apartment: Obtain all the electrical devices in the dormitory, and connect each electrical device to the circuit separately to measure the actual power of each electrical device; Set the sampling interval; Execute the electricity consumption behavior monitoring strategy, and establish the electricity consumption behavior of each student in units of the sampling interval; Set the similarity threshold; Calculate the similarity of the electricity consumption behaviors of two relevant students. If the similarity is greater than the similarity threshold, it is determined that the electricity consumption behaviors of the two students are the same; Execute the individual deviation electricity consumption warning strategy, detect whether there is an electricity consumption deviation for the two students with the same electricity consumption behavior, and give an alarm according to the detection result; Obtain the electricity consumption behaviors of all students in the dormitory; Execute the electricity theft risk identification strategy for outsiders, identify the behavior of outsiders entering the dormitory to steal electricity, and give an alarm; Execute the outsider visitor identification strategy, identify the behavior of outsider visitors entering the dormitory to consume electricity, and give an alarm.
[0007] Preferably, the execution of the intimacy score function modeling strategy to calculate the intimacy score of any two students includes: Record any two students as Student One and Student Two respectively; Denote the set of courses selected by Student One as ; Denote the set of courses selected by Student Two as ; Calculate the course overlap degree of Student One and Student Two , , where is the intersection of the set and the set , is the union of the set and the set ; Set the dormitory similarity function , where when Student One and Student Two are in the same dormitory, ; When Student One and Student Two are on the same floor: Obtain the straight-line distance between the dormitories where Student One and Student Two are located ; Set the dormitory distance threshold , as the maximum dormitory distance for students to have intimacy; Calculate the similarity function ; When student one and student two are not on the same floor, ; Preferably, when implementing the intimacy score function modeling strategy, calculating the intimacy score between any two students includes: Obtaining the straight-line distance between student one and student two at each moment in the positioning record, denoted as the positioning distance; Setting a positioning distance threshold as the maximum positioning distance for students to have intimacy Comparing the positioning distance with the positioning distance threshold; Obtaining all positioning distances less than the positioning distance threshold, denoted as the intimate distance; Obtaining the duration corresponding to each intimate distance, calculating the sum, and denoting the result as the spatial contact duration ; Calculating the intimacy score , , where is the weight coefficient, and ; Comparing the intimacy score between student one and student two with the intimacy score threshold; If the intimacy score is greater than or equal to the intimacy score threshold, it is determined that student one and student two are relevant.
[0008] Preferably, when implementing the electricity consumption behavior monitoring strategy, establishing the electricity consumption behavior of each student in units of sampling intervals includes: Setting a switch state function , when the electrical device k is turned on, ; When the electrical device k is turned off, ; Dividing a day evenly according to the sampling interval, for any one sampling interval; For any one student, obtaining the total electricity consumption power of the student within the sampling interval; Calculating the product of the actual power of each electrical device and the switch state function, and summing up all the product results, denoting the result as the simulated total power; Calculating the difference between the total electricity consumption power and the simulated total power, and denoting the absolute value of the difference as the objective function; By setting the values of the switch state functions of each electrical device, calculating the minimum value of the objective function; Denoting the switch state function corresponding to each electrical device when the objective function is at the minimum value as the electricity consumption behavior of the student.
[0009] Preferably, when implementing the individual deviation electricity consumption warning strategy, detecting whether there is an electricity consumption deviation between two students with consistent electricity consumption behaviors, and giving an alarm according to the detection result, including: For any sampling interval, obtain the electricity consumption behavior of Student 1 during the sampling interval; Obtain the electricity consumption behavior of Student 2 during the sampling interval; Calculate the cosine similarity of the electricity consumption behaviors of Student 1 and Student 2 during the sampling interval; Obtain the cosine similarities of all sampling intervals, calculate the mean value, and record the result as the similarity of the electricity consumption behaviors of Student 1 and Student 2; Compare the similarity with the similarity threshold. If the similarity is greater than the similarity threshold, it is determined that the electricity consumption behaviors of Student 1 and Student 2 are consistent; For any student, form a set of all students whose electricity consumption behaviors are consistent with that of the student; Set a high-power threshold; Record the sampling intervals in which the total electricity consumption power of all students in the set is less than the high-power threshold as marked intervals; When it is detected that a student in the set consumes electricity during the marked interval and there is only one student consuming electricity, record this student as the marked student.
[0010] Preferably, the execution individual deviates from the electricity consumption warning strategy, detects whether there is electricity consumption deviation between two students with consistent electricity consumption behaviors, and issues a warning according to the detection result, and further includes: Obtain the electricity consumption power of the marked student during the marked interval, compare the electricity consumption power with the high-power threshold. If the electricity consumption power is greater than or equal to the high-power threshold, record the marked interval as a dangerous interval; Set a dangerous interval quantity threshold; Count the number of dangerous intervals, and compare the number with the dangerous interval quantity threshold; If the number is greater than or equal to the dangerous interval quantity threshold, it is determined that the marked student has dangerous electricity consumption behavior, and prompt the apartment administrator of the marked student's dangerous electricity consumption behavior.
[0011] Preferably, the execution of the electricity theft risk identification strategy for outsiders, identify the behavior of outsiders entering the dormitory to steal electricity, and issue a warning, including: Compare the actual power of each electrical device with the high-power threshold; If the actual power is less than the high-power threshold, record this electrical device as a low-power device; If the actual power is greater than or equal to the high-power threshold, record this electrical device as a high-power device Record the sampling intervals when the student only uses low-power devices as the first intervals; Count the first intervals of all students in the dormitory, and record the first intervals at the same sampling interval as the second intervals; Obtain the location of each student in the dormitory during the second interval, and judge whether the student is in the dormitory; When all students are not in the dormitory and high-power devices are detected in the second interval; It is determined that an outsider has entered the dormitory to steal electricity, and the apartment administrator is prompted of the behavior of the outsider entering the dormitory to steal electricity.
[0012] Preferably, the implementation of the foreign visitor identification strategy to identify the behavior of foreign visitors entering the dormitory to use electricity and give an alarm includes: For any sampling interval; Obtain the electricity consumption power of each student in the sampling interval, calculate the mean value, and use the result as the average electricity consumption power of the sampling interval; Statistically record the real-time electricity consumption power of the dormitory in the sampling interval; Obtain the total number of students in the dormitory; Calculate the real-time electricity consumption power - the average electricity consumption power Total number of students in the dormitory, and record the result as the difference power; Compare the magnitude relationship between the difference power and the average electricity consumption power; If the difference power Average electricity consumption power, then record the sampling interval as the third interval; Set the threshold for the number of visitors identified; Statistically record the number of third intervals in a day, and compare the number with the threshold for the number of visitors identified; If the number is greater than the threshold for the number of visitors identified, it is determined that foreign visitors have entered the dormitory to use electricity, and the apartment administrator is prompted that foreign visitors have entered the dormitory to use electricity.
[0013] The present invention has the following beneficial effects: 1. The detection method for the electricity safety of the student apartment evaluates the intimacy by calculating the intersection and union of the courses selected by two students. The dormitory similarity not only considers whether students live in the same dormitory, but also considers physical location factors such as floor distance and straight-line distance, and can comprehensively evaluate the social relationship and spatial contact mode of students. The intimacy score is used to further measure the degree of closeness between students. The intimacy score also optimizes the monitoring of student activities through location records and distance thresholds, combined with the actual contact behavior of students, which is helpful for the implementation of apartment management strategies.
[0014] 2. The detection method for the electricity safety of the student apartment accurately estimates the total electricity consumption power of each student within a certain sampling interval by setting the relationship between the switch state function of the device and the actual power. By minimizing the objective function to adjust the switch state of each device, it can accurately calculate the behavior pattern of students during electricity consumption. Taking the electricity consumption power as the key variable and optimizing the parameters of the model can not only achieve precise monitoring of students' electricity consumption behavior, but also adjust and optimize the operation strategy of the electricity-consuming devices in real time by simulating the difference between the total power and the actual power, ensuring that the system reaches the best performance. The calculated electricity consumption behavior provides data support for the subsequent identification of irregular and abnormal electricity consumption behaviors, and provides a strong basis for ensuring the safety of students through electricity consumption behavior monitoring.
[0015] 3. The detection method for the electricity safety of the student apartment measures the electricity consumption consistency among students by calculating the cosine similarity of students' electricity consumption behaviors, divides students into groups with consistent electricity consumption behaviors, and detects the behavioral similarity among students based on the similarity analysis of electricity consumption behaviors. By means of high power thresholds, marked students, and dangerous intervals, etc., it can effectively identify abnormal electricity consumption behaviors. For example, when an outsider uses a high-power device, it can judge the electricity consumption behavior of students and non-dormitory personnel during low-power periods, ensuring that the system can accurately identify and locate abnormal electricity consumption patterns, improving the electricity safety and management efficiency of the dormitory.
[0016] 4. The detection method for the electricity safety of the student apartment realizes the intelligent monitoring of the electricity consumption behavior of outsiders by analyzing the difference between the real-time electricity consumption power and the average electricity consumption power in the dormitory and combining the visitor identification quantity threshold. It has high accuracy, can effectively avoid misjudgment, and can timely detect the electricity consumption behavior of non-dormitory students, and then take anti-electricity-theft measures, such as sending an alarm to the apartment administrator. Through this mechanism, the school can effectively monitor the electricity consumption situation in the dormitory, timely discover unknown power sources, and prevent electricity theft and other potential safety hazards.
[0017] 5. The detection method for the electricity safety of the student apartment can detect the electricity consumption behavior of outsiders, especially the abnormal use of high-power devices, during low-power periods by comparing low-power devices and high-power devices in the dormitory and combining the positioning information of whether the students are in the dormitory. By comprehensively judging using device power, student positioning information, and electricity consumption behavior consistency, it can identify electricity theft behaviors, exclude the electricity consumption of dormitory students, and improve the accuracy of identification. It provides strong data support for the intelligent management of the dormitory. By monitoring students' electricity-consuming devices, it can identify high-power abnormal electricity consumption, ensure the electricity safety of the dormitory, and at the same time avoid resource waste and power abuse caused by outsiders. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic flow diagram of the method of the present invention. Detailed implementation manners
[0019] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0020] Embodiment 1. Refer to Figure 1 , a detection method for the electricity safety of student apartments, including: Set relevant characteristic indicators for any two students; The relevant characteristic indicators include course overlap degree, dormitory similarity, and space contact duration; Execute the intimacy score function modeling strategy to calculate the intimacy score of any two students; Set the intimacy score threshold; When the intimacy score is greater than or equal to the intimacy score threshold, it is determined that the two students are relevant; For any dormitory in the apartment: Obtain all the electrical devices in the dormitory, and measure the actual power of each electrical device by connecting each electrical device to the circuit separately; Set the sampling interval; Execute the electricity consumption behavior monitoring strategy to establish the electricity consumption behavior of each student in units of the sampling interval; Set the similarity threshold; Calculate the similarity of the electricity consumption behaviors of two relevant students. If the similarity is greater than the similarity threshold, it is determined that the electricity consumption behaviors of the two students are consistent; Execute the individual deviation electricity consumption warning strategy to detect whether there is an electricity consumption deviation for two students with consistent electricity consumption behaviors, and give an alarm according to the detection result; Obtain the electricity consumption behaviors of all the students in the dormitory; Execute the electricity theft risk identification strategy for outsiders to identify the behavior of outsiders entering the dormitory to steal electricity and give an alarm; Execute the outsider visitor identification strategy to identify the behavior of outsider visitors entering the dormitory to consume electricity and give an alarm.
[0021] The execution of the intimacy score function modeling strategy to calculate the intimacy score of any two students includes: Denote any two students as Student One and Student Two respectively; Denote the set of courses selected by Student One as ; Denote the set of courses selected by Student Two as ; Calculate the course overlap between Student One and Student Two , , where is the intersection of set and set ; is the union of set and set ; Set the dormitory similarity function , where when Student One and Student Two are in the same dormitory, ; When Student One and Student Two are on the same floor: Obtain the straight-line distance between the dormitories where Student One and Student Two are located ; Set the dormitory distance threshold , as the maximum dormitory distance for students to have intimacy; Calculate the similarity function ; When Student One and Student Two are not on the same floor, ; The above-mentioned implementation of the intimacy scoring function modeling strategy calculates the intimacy score of any two students, including: Obtain the straight-line distance between Student One and Student Two at each moment in the positioning record, denoted as the positioning distance; In this embodiment, the source of positioning data: A wireless positioning system (such as Wi-Fi, Bluetooth, or ultra-wideband UWB) can be deployed in the student apartment, and combined with the real-time location data of students' mobile phones or campus cards.
[0022] Straight-line distance calculation: The system obtains the position information of Student One and Student Two at each moment, denoted as (x1, y1) and (x2, y2).
[0023] Calculate the straight-line distance between the two people:
[0024] Data storage and processing: Record the distance data of each pair of students at each moment into the database for subsequent calculation of the spatial contact duration in the intimacy score.
[0025] Set the positioning distance threshold as the maximum positioning distance for students to have intimacy Compare the positioning distance with the positioning distance threshold; Obtain all positioning distances less than the positioning distance threshold, denoted as the intimate distance; Obtain the duration corresponding to each intimate distance, calculate the sum, and the result is denoted as the spatial contact duration ; Calculate the intimacy score , , where is the weight coefficient, and ; Compare the intimacy scores of Student One and Student Two with the intimacy score threshold; If the intimacy score is greater than or equal to the intimacy score threshold, it is determined that Student One and Student Two are related.
[0026] By comprehensively analyzing the course overlap and dormitory similarity of students, the similarity between students can be comprehensively evaluated. The course overlap reflects the academic similarity among students, while the dormitory similarity takes into account the physical spatial location of students and the possibility of interaction, including factors such as dormitory floor and straight-line distance. Through this multi-dimensional analysis, the system can not only evaluate the social connections between students, but also further quantify this relationship through the intimacy score. It can more accurately reflect the interaction patterns of students, such as which students may have more social interactions or contacts. In addition, the intimacy score introduces location records and time dimensions, and further optimizes the monitoring of student behavior through actual physical contact behaviors, with high practicality and flexibility.
[0027] In the student apartment, the social relationships between students often affect their electricity consumption behaviors. By calculating the intimacy scores of any two students (including course overlap, dormitory similarity, and spatial contact duration), the social relevance between students can be determined, so as to identify whether their electricity consumption patterns in the dormitory may be affected by each other.
[0028] Connection: The intimacy score is a prerequisite for monitoring whether the electricity consumption behavior of students is normal. By identifying pairs of intimate students (such as roommates or classmates who often come into contact), the system can regard their electricity consumption behaviors as a set of mutually influential ones. If there are significant deviations in the electricity consumption patterns of these students (such as one person suddenly consuming electricity at a high power while the other remains unchanged), there may be abnormal behaviors (such as illegal electricity consumption or power theft).
[0029] Function: The intimacy score helps the system automatically distinguish pairs of students with strong relevance, thereby reducing misjudgments (such as the electricity consumption fluctuations of non-related students being wrongly considered abnormal). This can also effectively reduce false alarms.
[0030] Execute the electricity consumption behavior monitoring strategy, and establish the electricity consumption behavior of each student in units of sampling intervals, including: Set the switch state function , when the electrical device k is turned on, ; When the electrical device k is turned off, ; Divide a day evenly according to the sampling interval. For any sampling interval; For any student, obtain the total power consumption of the student within the sampling interval; Calculate the product of the actual power of each electrical device and the switch state function, and sum up all the products. The result is recorded as the simulated total power; Calculate the difference between the total power consumption and the simulated total power, and record the absolute value of the difference as the objective function; By setting the values of the switch state functions of each electrical device, calculate the minimum value of the objective function; Record the switch state function corresponding to each electrical device when the objective function is at its minimum as the electricity consumption behavior of the student.
[0031] In this embodiment, intelligent sockets are used for monitoring: All electrical devices in the dormitory are connected to the circuit through intelligent sockets. Each intelligent socket has the following functions: Monitor the device power in real time and determine whether the device is in the on state.
[0032] Upload the real-time status (on / off) of the device to the monitoring system.
[0033] Power threshold judgment: The system sets a power threshold for each device (e.g., 0W for the off state and greater than 0W for the on state).
[0034] By performing real-time sampling of the device power (e.g., once per minute), determine its switch state: Power > threshold: Switch state is 1 (on).
[0035] Power ≤ threshold: Switch state is 0 (off).
[0036] Dynamic data storage: The switch state of each device of each student within each sampling interval will be recorded for subsequent analysis.
[0037] Dynamic adjustment mechanism: The system does not directly control the switch state of the device, but dynamically identifies and corrects the device state through the following methods: According to the actual power of each device and the preset switch state function, calculate the expected power of the device (in the on state).
[0038] Compare the actual total power and the expected total power. If the difference is large, it indicates that the current switch state may be inaccurate.
[0039] Adopt the objective function optimization strategy and make the total power difference minimum through multiple calculations (e.g., simulating the change of the switch state of each device one by one).
[0040] When the objective function reaches the minimum value, determine the optimal switching states of each device.
[0041] By using the relationship between the switching state function and the actual power, an optimization model is constructed to analyze the electricity consumption behavior of students. By dynamically adjusting the switching states of each electrical device, the electricity consumption power of each student during a specific time period is accurately calculated. Intelligently optimizing the electricity consumption behavior can not only accurately evaluate the electricity consumption habits of students, but also optimize the switching strategy of devices by minimizing the objective function. By simulating the difference between the total power and the actual power, the electricity consumption management becomes more refined, avoiding resource waste. In addition, the real-time and accuracy of this solution make it not only applicable to energy efficiency evaluation, but also able to provide data support for the subsequent identification of irregular electricity consumption behaviors, improving the electricity consumption safety and resource utilization rate in the dormitory.
[0042] The execution entity deviates from the electricity consumption warning strategy, detects whether there is an electricity consumption deviation between two students with consistent electricity consumption behaviors, and issues a warning according to the detection result, including: For any sampling interval, obtain the electricity consumption behavior of Student 1 during the sampling interval; Obtain the electricity consumption behavior of Student 2 during the sampling interval; Calculate the cosine similarity of the electricity consumption behaviors of Student 1 and Student 2 during the sampling interval; In this embodiment, the cosine similarity is a prior art; Obtain the cosine similarities of all sampling intervals, calculate the mean value, and record the result as the similarity of the electricity consumption behaviors of Student 1 and Student 2; Compare the similarity with the similarity threshold. If the similarity is greater than the similarity threshold, it is determined that the electricity consumption behaviors of Student 1 and Student 2 are consistent; For any student, jointly form a set of all students whose electricity consumption behaviors are consistent with that of the student; Set a high power threshold; Record the sampling intervals in which the total electricity consumption power of all students in the set is less than the high power threshold as marked intervals; When it is detected that a student in the set consumes electricity during the marked interval and there is only one student consuming electricity, mark this student as the marked student.
[0043] By calculating the cosine similarity of students' electricity consumption behaviors, the electricity consumption consistency among students is effectively measured and used for student grouping and behavior analysis. By calculating the similarity of students' electricity consumption behaviors at each sampling interval, student groups with similar electricity consumption habits are identified and classified. The behavior consistency among students is judged through a similarity threshold to identify potential abnormal electricity consumption behaviors, especially in the use of high-power devices. In addition, through the identification of high-power devices and the monitoring of dangerous intervals, potential safety hazards can be detected in a timely manner, such as the use of high-power devices by non-dormitory personnel or abnormal electricity consumption behaviors. Monitor students' electricity consumption behaviors to ensure the safety and stability of dormitory electricity consumption.
[0044] The executing entity deviates from the electricity consumption warning strategy, detects whether there is an electricity consumption deviation between two students with consistent electricity consumption behaviors, and issues a warning according to the detection result. It also includes: Obtain the electricity consumption power of the marked student during the marked interval, compare the electricity consumption power with the high-power threshold. If the electricity consumption power is greater than or equal to the high-power threshold, mark the marked interval as a dangerous interval; Set the threshold for the number of dangerous intervals; Count the number of dangerous intervals and compare the number with the threshold for the number of dangerous intervals; If the number is greater than or equal to the threshold for the number of dangerous intervals, it is determined that the marked student has dangerous electricity consumption behavior, and the apartment administrator is prompted of the marked student's dangerous electricity consumption behavior.
[0045] In this embodiment, it is assumed that the number of sampling intervals within a day is 24; The marked interval indicates that students will not use high-power devices during the sampling interval. For example, at 2:00 - 3:00 in the morning, all students are asleep; Suppose the electricity consumption behaviors of Student One and Student Two are consistent during a certain period, and the cosine similarity is greater than the set threshold. Therefore, their electricity consumption behaviors are considered consistent. At this time, if the electricity consumption power of Student One during the marked interval is 350W, and the high-power threshold is set at 300W, then the electricity consumption power of Student One during this period exceeds the high-power threshold, so this interval is marked as a dangerous interval.
[0046] The system counts that there are 5 dangerous intervals, from 00:00 in the early morning to 5:00 in the early morning, and the electricity consumption power of Student One exceeds the high-power threshold (for example, 350W is greater than the set 300W).
[0047] If the set threshold for the number of dangerous intervals is 3, then because there are 5 dangerous intervals, the system will determine that the electricity consumption behavior of Student One is abnormal and will issue a warning to the administrator to remind of the dangerous electricity consumption behavior.
[0048] Execute the risk identification strategy for electricity theft by outsiders, identify the behavior of outsiders entering the dormitory to steal electricity, and give an alarm, including: Compare the actual power of each electrical device with the high power threshold; If the actual power is less than the high power threshold, mark the electrical device as a low power device; If the actual power is greater than or equal to the high power threshold, mark the electrical device as a high power device Record the sampling interval when students only use low power devices as the first interval; Count the first intervals of all students in the dormitory, and record the first intervals within the same sampling interval as the second interval; Obtain the location of each student in the dormitory during the second interval and determine whether the student is in the dormitory; When all students are not in the dormitory and high power devices are detected during the second interval; It is determined that an outsider has entered the dormitory to steal electricity, and the apartment administrator is prompted of the behavior of the outsider entering the dormitory to steal electricity.
[0049] In this embodiment, assume that within a certain sampling interval of the dormitory, students only use low power devices (such as mobile phone chargers, table lamps, etc.), and the power of these devices is less than the high power threshold (the set threshold is 300 watts). At this time, this sampling interval will be recorded as the first interval.
[0050] Then, the system will detect the second interval and count the electricity consumption behaviors of all students in the dormitory during this interval. If all students use low power devices and the positioning system shows that they are not in the dormitory at this time, the system will further determine whether high power devices are being used. If high power devices (such as electric heaters, electric water heaters, etc.) are detected in the dormitory at this time, the system will rule out the possibility of electricity consumption by the dormitory students, because the students are not in the dormitory, so the use of high power devices is likely to be operated by outsiders.
[0051] The outsiders here will not be students related to the students in the dormitory, because related students not being in the dormitory is also considered relevant, that is, there will be no acquaintance using high power devices in the dormitory during the second interval; and it is default that outsiders steal electricity by using high power devices.
[0052] By comparing low-power devices with high-power devices in the dormitory and combining location information to identify the electricity consumption behavior of outsiders. Precisely check abnormal power sources, and exclude the electricity consumption behavior of dormitory students through student location information and monitoring during low-power periods, so as to ensure that only the electricity consumption of outsiders is monitored. Effectively identify electricity theft behavior, especially when there are no students in the dormitory but high-power devices are found to be in use, an automatic alarm can be triggered. This not only enhances the power monitoring of external personnel, but also improves the monitoring accuracy through the use of high-power devices and the exclusion of low-power devices, thus better ensuring the electricity safety of the dormitory, preventing the occurrence of electricity theft incidents, and protecting the property safety of students and the efficiency of dormitory management.
[0053] Execute the strategy for identifying foreign visitors, identify the electricity consumption behavior of foreign visitors entering the dormitory, and give an alarm, including: For any sampling interval; Obtain the electricity consumption power of each student during the sampling interval, calculate the average value, and use the result as the average electricity consumption power of this sampling interval; Statistically calculate the real-time electricity consumption power of the dormitory during the sampling interval; Obtain the total number of students in the dormitory; Calculate the real-time electricity consumption power - average electricity consumption power Divided by the total number of students in the dormitory, and record the result as the difference power; Compare the magnitude relationship between the difference power and the average electricity consumption power; If the difference power Is greater than the average electricity consumption power, then record the sampling interval as the third interval; Set the threshold for the number of identified visitors; Statistically calculate the number of the third intervals in a day, and compare the number with the threshold for the number of identified visitors; If the number is greater than the threshold for the number of identified visitors, it is determined that foreign visitors have entered the dormitory to consume electricity, and prompt the apartment administrator that foreign visitors have entered the dormitory to consume electricity.
[0054] In this embodiment, there are 5 students in the dormitory. During the sampling interval from 19:00 to 20:00, the electricity consumption powers are as follows: Student A: 150W, Student B: 160W, Student C: 120W, Student D: 140W, Student E: 130W. Calculate the average electricity consumption power as 140W. Statistically calculate that during the sampling interval from 19:00 to 20:00, the real-time electricity consumption power is 900W, 900W - (140W × 5) = 200W, which is greater than the average electricity consumption power of 140W. Record the sampling interval from 19:00 to 20:00 as the third interval, and the number of the third intervals is 4. The threshold for the number of identified visitors is 3. It is considered that foreign visitors have entered the dormitory to consume electricity, and prompt the apartment administrator that foreign visitors have entered the dormitory to consume electricity.
[0055] Identifying the electricity consumption behavior of external visitors in the dormitory through the difference between the real-time electricity consumption power and the average electricity consumption power can issue an alarm in a timely manner in case of abnormal electricity consumption. Monitor the electricity consumption situation in the dormitory in real time, and judge whether there are external personnel through the differential power. Through the real-time data of the sampling interval, combined with the threshold of the number of visitors identified, it is possible to identify abnormal electricity consumption fluctuations in the dormitory in a timely manner, and notify the administrator for handling through the alarm system. Effectively distinguish the electricity consumption of students and external visitors, and reduce the probability of false alarms and missed alarms.
[0056] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device.
[0057] The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A detection method for the electrical safety of student apartments, characterized in that, Including: Set relevant characteristic indicators for any two students; The relevant characteristic indicators include course overlap, dormitory similarity, and spatial contact duration; Execute the intimacy scoring function modeling strategy to calculate the intimacy score of any two students; Set the intimacy score threshold; When the intimacy score is greater than or equal to the intimacy score threshold, it is determined that the two students are relevant; For any dormitory in the apartment: Obtain all the electrical equipment in the dormitory, and connect each electrical equipment to the circuit separately to measure the actual power of each electrical equipment; Set the sampling interval; Execute the electricity consumption behavior monitoring strategy to establish the electricity consumption behavior of each student in units of the sampling interval; Set the similarity threshold; Calculate the similarity of the electricity consumption behaviors of two relevant students. If the similarity is greater than the similarity threshold, it is determined that the electricity consumption behaviors of the two students are the same; Execute the individual deviation electricity consumption warning strategy to detect whether there is an electricity consumption deviation in the two students with the same electricity consumption behavior, and give an alarm according to the detection result; Obtain the electricity consumption behaviors of all students in the dormitory; Execute the electricity theft risk identification strategy for outsiders to identify the behavior of outsiders entering the dormitory to steal electricity and give an alarm; Execute the outsider visitor identification strategy to identify the behavior of outsider visitors entering the dormitory to use electricity and give an alarm.
2. The detection method for the electrical safety of student apartments according to claim 1, wherein The execution of the intimacy scoring function modeling strategy to calculate the intimacy score of any two students includes: Record any two students as Student One and Student Two respectively; Denote the set of courses selected by a student as ; Denote the set of courses selected by Student Two as ; Calculate the course overlap between Student One and Student Two , , where is the intersection of set and set , is the union of set and set . Set the dormitory similarity function , where when student one and student two are in the same dormitory, ; When Student One and Student Two are on the same floor: Get the straight-line distance between the dormitories where Student One and Student Two are located ; Set the dormitory distance threshold , which is the maximum dormitory distance for students with intimacy; Calculation similarity function ; When student one and student two are not on the same floor, .
3. The detection method for the electrical safety of student apartments according to claim 2, characterized in that, The execution of the intimacy scoring function modeling strategy to calculate the intimacy score of any two students includes: Obtain the straight-line distance at each moment of Student One and Student Two in the positioning record, and record it as the positioning distance; Set the positioning distance threshold as the maximum positioning distance for students to have intimacy Compare the positioning distance with the positioning distance threshold; Obtain all the positioning distances less than the positioning distance threshold and record them as the intimate distance; Obtain the duration corresponding to each intimate distance, calculate the sum, and record the result as the spatial contact duration ; Calculate the intimacy score , , where is the weight coefficient, and ; Compare the intimacy score of Student One and Student Two with the intimacy score threshold; If the intimacy score is greater than or equal to the intimacy score threshold, it is determined that Student One and Student Two are relevant.
4. The detection method for the electrical safety of student apartments according to claim 1, wherein The execution of the electricity consumption behavior monitoring strategy to establish the electricity consumption behavior of each student in units of the sampling interval includes: Function for setting switch state When the electrical device k is turned on, ; When the electrical device k is turned off, ; Divide a day evenly according to the sampling interval, for any sampling interval; For any student, obtain the total electricity consumption power of the student within the sampling interval; Calculate the product of the actual power of each electrical equipment and the switch state function, and sum up all the product results, and record the result as the simulated total power; Calculate the difference between the total electricity consumption power and the simulated total power, and record the absolute value of the difference as the objective function; By setting the values of the switch state functions of each electrical equipment, calculate the minimum value of the objective function; Record the switch state function corresponding to each electrical equipment when the objective function is the minimum value as the electricity consumption behavior of the student.
5. The detection method for the electrical safety of student apartments according to claim 1, characterized in that, The execution of the individual deviation electricity consumption warning strategy to detect whether there is an electricity consumption deviation in the two students with the same electricity consumption behavior, and give an alarm according to the detection result includes: For any sampling interval, obtain the electricity consumption behavior of Student One within the sampling interval; Obtain the electricity consumption behavior of Student Two within the sampling interval; Calculate the cosine similarity of the electricity consumption behaviors of Student One and Student Two at the sampling interval; Obtain the cosine similarities of all sampling intervals, calculate the mean value, and record the result as the similarity of the electricity consumption behaviors of Student One and Student Two; Compare the similarity with the similarity threshold. If the similarity is greater than the similarity threshold, it is determined that the electricity consumption behaviors of Student One and Student Two are consistent; For any student, form a set consisting of all students whose electricity consumption behaviors are consistent with that of the student; Set a high-power threshold; Record the sampling intervals in which the total electricity consumption power of all students in the set is less than the high-power threshold as marked intervals; When it is detected that a student in the set consumes electricity during the marked interval and there is only one student consuming electricity, record this student as the marked student.
6. The detection method for the electrical safety of student apartments according to claim 5, characterized in that, The execution individual deviates from the electricity consumption warning strategy, detects whether there is electricity consumption deviation between two students with consistent electricity consumption behaviors, and issues a warning according to the detection result, and further includes: Obtain the electricity consumption power of the marked student during the marked interval, compare the electricity consumption power with the high-power threshold. If the electricity consumption power is greater than or equal to the high-power threshold, record the marked interval as a dangerous interval; Set a dangerous interval quantity threshold; Count the number of dangerous intervals, and compare the number with the dangerous interval quantity threshold; If the number is greater than or equal to the dangerous interval quantity threshold, it is determined that the marked student has dangerous electricity consumption behavior, and prompt the apartment administrator of the dangerous electricity consumption behavior of the marked student.
7. The detection method for the electrical safety of student apartments according to claim 1, characterized in that, The execution of the strategy for identifying the risk of electricity theft by outsiders, identifying the behavior of outsiders entering the dormitory to steal electricity, and issuing a warning, includes: Compare the actual power of each electrical device with the high-power threshold; If the actual power is less than the high-power threshold, record this electrical device as a low-power device; If the actual power is greater than or equal to the high-power threshold, record this electrical device as a high-power device Record the sampling intervals when the student only uses low-power devices as the first intervals; Count the first intervals of all students in the dormitory, and record the first intervals at the same sampling interval as the second intervals; Obtain the location of each student in the dormitory during the second interval, and judge whether the student is in the dormitory; When all students are not in the dormitory and high-power devices are detected during the second interval; It is determined that an outsider has entered the dormitory to steal electricity, and prompt the apartment administrator of the behavior of the outsider entering the dormitory to steal electricity.
8. The detection method for the electrical safety of student apartments according to claim 1, characterized in that The execution of the strategy for identifying foreign visitors, identifying the behavior of foreign visitors entering the dormitory to consume electricity, and issuing a warning, includes: For any sampling interval; Obtain the electricity consumption power of each student during the sampling interval, calculate the mean value, and use the result as the average electricity consumption power of this sampling interval; Count the real-time electricity consumption power of the dormitory during the sampling interval; Obtain the total number of students in the dormitory; Calculate the real-time power consumption - average power consumption The total number of students in the dormitory, and the result is recorded as the differential power; Compare the magnitude relationship between the difference power and the average electricity consumption power; If the difference power is less than the average power consumption, the sampling interval is recorded as the third interval; Set a visitor identification quantity threshold; Count the number of the third intervals in a day, and compare the number with the visitor identification quantity threshold; If the number is greater than the visitor identification quantity threshold, it is determined that a foreign visitor has entered the dormitory to consume electricity, and prompt the apartment administrator of the behavior of the foreign visitor entering the dormitory to consume electricity.
Citation Information
Patent Citations
Campus dormitory management platform
CN105511374A
Electricity stealing identification method based on curve similarity and ensemble learning algorithm
CN113033598A
Intelligent strategy quality inspection method and platform based on real-time ASR voice stream
CN119005213A
Safety monitoring system and method based on electric power acquisition terminal
CN119180508A
Method for analyzing abnormal behavior of user based on log and flow data
CN119484003A