Campus canteen electricity larceny detection method and system based on water and electricity consumption correlation
By collecting and cleaning electricity and water consumption data from school canteens, and utilizing linear fitting and dual threshold detection, the problems of time-consuming, labor-intensive, and high false positive rates of traditional electricity theft detection methods have been solved, achieving efficient and accurate detection of electricity theft in school canteens.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN UNIV OF SCI & TECH
- Filing Date
- 2026-03-05
- Publication Date
- 2026-05-29
AI Technical Summary
Traditional methods for detecting electricity theft in school cafeterias are time-consuming and labor-intensive, have a high rate of false positives, and are difficult to detect well-concealed methods of electricity theft, especially lacking verification of the correlation with water consumption.
By collecting monthly electricity and water consumption data from the canteen, cleaning the data, calculating the electricity consumption per unit of water, predicting the residual electricity consumption using a linear fitting formula, and combining this with dual electricity theft detection thresholds, accurate identification of electricity theft can be achieved.
It improves the accuracy and efficiency of electricity theft detection, reduces the false positive rate, and is suitable for school canteens with high frequency of similar incidents.
Smart Images

Figure CN122109609A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of abnormal electricity usage detection technology, and more specifically to a method and system for detecting electricity theft in school canteens based on the correlation between water and electricity consumption. Background Technology
[0002] As a centralized dining facility, the school cafeteria uses electrical equipment such as refrigerators, steamers, induction cookers, and air conditioners. The operation of these devices is closely related to the daily operational intensity of the cafeteria. Since the cafeteria's water consumption (such as for washing vegetables, dishes, and steam generation) is also directly related to the operational intensity, there is a strong positive correlation between electricity consumption and water consumption under normal circumstances.
[0003] Traditional methods for detecting electricity theft mainly include on-site meter wiring detection and individual power data analysis. Meter baseline detection requires personnel to visit the metering site, which is time-consuming, labor-intensive, costly, and inefficient. Individual power data analysis (e.g., detecting abnormal fluctuations in current or voltage, or sudden drops in power consumption) is easily affected by seasonality, summer / winter breaks, equipment maintenance, and operational fluctuations, resulting in a high false positive rate. For more concealed methods of electricity theft (such as bypassing meter wiring), single power data analysis is insufficient. Furthermore, the lack of correlation verification with other operational data makes it difficult to form a reliable chain of evidence. Summary of the Invention
[0004] In view of the above problems, the present invention is proposed to provide a method and system for detecting electricity theft in school canteens based on the correlation between electricity and water consumption, which overcomes or at least partially solves the above problems. By analyzing the relationship between electricity consumption and water consumption, the method can accurately identify electricity theft, reduce the false judgment rate, and improve detection efficiency.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] In a first aspect, embodiments of the present invention provide a method for detecting electricity theft in a school cafeteria based on the correlation between water and electricity consumption, comprising the following steps: S1. Collect monthly electricity consumption data and monthly water consumption data of the canteen during normal operation; S2. Based on the monthly electricity consumption data and monthly water consumption data, calculate the electricity consumption per unit of water consumption, and perform data cleaning on the electricity consumption per unit of water consumption to remove outliers. S3. Calculate the first electricity theft judgment threshold using the electricity consumption data per unit of water after cleaning; S4. For the monthly data to be predicted, a diagnosis is performed based on the first electricity theft judgment threshold to obtain the first electricity theft result; S5. Perform linear fitting on the normal electricity consumption data and normal water consumption data to obtain the predictive relationship between electricity consumption and water consumption. S6. Based on the prediction formula, calculate the residual between the actual monthly electricity consumption and the predicted electricity consumption, and calculate the second electricity theft judgment threshold based on the residual. S7. Based on the second electricity theft judgment threshold, a diagnosis is made for the monthly data to be predicted to obtain a second electricity theft result; S8. Combining the first electricity theft result and the second electricity theft result, output the final electricity theft judgment result.
[0007] In one embodiment, the electricity consumption per unit of water volume is calculated by the quotient of monthly electricity consumption and monthly water consumption.
[0008] In one embodiment, the data cleaning employs the interquartile range method, specifically including: calculating the lower quartile of the unit water consumption and electricity consumption data. Q 1 and upper quartiles Q 3, and interquartile range (IQR); below the boundary L 1= Q 1-1.5 × IQR and upper bound L u = Q The range is 3 + 1.5 × IQR. Data that is less than the lower bound or greater than the upper bound is identified as outliers and deleted. In one embodiment, the first electricity theft detection threshold V 1 equals the average of the electricity consumption per unit of water used after cleaning, minus its standard deviation. σ The difference between 1 and 1.5 times.
[0009] In one embodiment, in step S4, if the electricity consumption per unit of water consumption in the monthly data to be predicted is less than or equal to the first electricity theft detection threshold... V If 1, then the first result of electricity theft is "electricity theft"; otherwise, it is "normal".
[0010] In one embodiment, the prediction relation is a linear equation. E p = a W n + b ,in E p Indicates the predicted electricity consumption. W n This represents the water consumption, and a and b are coefficients obtained through linear fitting. In one embodiment, the second electricity theft detection threshold V 2 equals normal monthly electricity consumption E n Compared with predicted electricity consumption Ep Standard deviation of residuals σ 1.5 times 2. In one embodiment, in step S7, the water consumption of the month to be predicted is substituted into the prediction formula to calculate the predicted electricity consumption. E p If the actual electricity consumption E a and E p The difference is greater than or equal to the second electricity theft detection threshold. V 2. If the result is "electricity theft", then the second result is "electricity theft"; otherwise, it is "normal". In one embodiment, in step S8, the output rule for the final electricity theft judgment result is as follows: if both the first electricity theft result and the second electricity theft result are "normal", then "normal" is output; if both are "electricity theft", then "electricity theft" is output; otherwise, "suspected electricity theft" is output. Secondly, embodiments of the present invention also provide a campus canteen electricity theft detection system based on the correlation between water and electricity consumption, comprising a microprocessor and a memory interconnected thereto, wherein the microprocessor is programmed or configured to perform the steps of campus canteen electricity theft detection based on the correlation between water and electricity consumption as described in any one of the first aspects.
[0011] As can be seen from the above technical solution, compared with the prior art, the present invention has the following technical advantages: This method collects monthly normal electricity and water consumption data from school canteens, cleans the data, and uses the deviation in electricity consumption per unit of water consumption and the fitting results of electricity consumption and water consumption for dual judgment to achieve electricity theft detection in school canteens. It features simple method, low cost, high accuracy and detection efficiency, and is particularly suitable for electricity theft detection in specific places such as school canteens. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0013] Figure 1 A flowchart of a campus canteen electricity theft detection method based on the correlation of water and electricity consumption provided in an embodiment of the present invention.
[0014] Figure 2 This is a diagram showing the distribution of electricity consumption per unit of water volume in an embodiment of the present invention and its comparison with the electricity theft threshold.
[0015] Figure 3This is a graph showing the linear fitting results of normal monthly electricity and water consumption in an embodiment of the present invention.
[0016] Figure 4 This is a comparison chart of the monthly electricity consumption prediction results and their residuals with the second electricity theft threshold in an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] This invention discloses a method for detecting electricity theft in school canteens based on the correlation between water and electricity consumption, referring to... Figure 1 As shown, it includes the following steps: S1. Collect monthly electricity consumption data and monthly water consumption data of the canteen during normal operation; S2. Based on the monthly electricity consumption data and monthly water consumption data, calculate the electricity consumption per unit of water consumption, and perform data cleaning on the electricity consumption per unit of water consumption to remove outliers. S3. Calculate the first electricity theft judgment threshold using the electricity consumption data per unit of water after cleaning; S4. For the monthly data to be predicted, a diagnosis is performed based on the first electricity theft judgment threshold to obtain the first electricity theft result; S5. Perform linear fitting on the normal electricity consumption data and normal water consumption data to obtain the predictive relationship between electricity consumption and water consumption. S6. Based on the prediction formula, calculate the residual between the actual monthly electricity consumption and the predicted electricity consumption, and calculate the second electricity theft judgment threshold based on the residual. S7. Based on the second electricity theft judgment threshold, a diagnosis is made for the monthly data to be predicted to obtain a second electricity theft result; S8. Combining the first electricity theft result and the second electricity theft result, output the final electricity theft judgment result.
[0019] The method of this invention is simple, requires only existing water and electricity data, and is low in cost; it accurately identifies electricity theft by correlating water and electricity data and using dual thresholds, making it particularly suitable for places with strong regularity, such as school canteens; it has high detection efficiency and can be deployed on a large scale.
[0020] The following is a detailed explanation of each of the above steps: 1) Collect monthly normal electricity and water consumption data for the canteen; 2) Calculate the electricity consumption per unit of water consumption, perform data cleaning, and delete outlier values in the electricity consumption per unit of water consumption data; 3) Calculate the first threshold for judging electricity theft using the cleaned unit water consumption data; 4) Based on the first electricity theft judgment threshold, diagnose the monthly data to be predicted and obtain the first electricity theft result; 5) Perform linear fitting on the normal electricity and water consumption data to derive the predicted relationship between normal electricity and water consumption; 6) Calculate the residual between the actual monthly electricity consumption and the predicted electricity consumption, and propose a second electricity theft judgment threshold based on the electricity consumption residual; 7) Based on the second electricity theft judgment threshold, diagnose the monthly data to be predicted and obtain the second electricity theft result; 8) Determine whether electricity theft occurred by combining the first and second results of electricity theft.
[0021] In this embodiment, the normal monthly water and electricity data of a certain canteen from January 2022 to September 2023 are shown in Table 1. The electricity consumption per unit of water volume is obtained by calculating the quotient of the monthly electricity consumption and the monthly water consumption.
[0022] Table 1: Normal Monthly Water and Electricity Data for a Certain Canteen from January 2022 to September 2023
[0023] To reduce the impact of outlier data on the detection results, this embodiment uses the interquartile range (IQR) method for data cleaning. The IQR for electricity consumption per unit water volume in Table 1 is calculated as follows: Q 3- Q 1 = 9.5483, lower quartile Q 1 = 23.2665, upper quartile Q 3 = 32.8148. The following quartiles... Q The difference between 1 and 1.5 times the interquartile range (IQR) is the lower bound. L l = Q 1 - 1.5 × IQR = 8.944, the above quartiles Q The sum of 3 and 1.5 times the interquartile range (IQR) is the upper bound. L u = Q 3 + 1.5 × IQR = 47.1372. Electricity consumption per unit of water consumption below the lower limit or above the upper limit is considered an outlier. In July 2022, the electricity consumption per unit of water consumption was 49.38, which is greater than the upper limit (47.1372), and was therefore identified as an outlier and deleted. The electricity consumption per unit of water consumption after cleaning is shown in Table 2.
[0024] Table 2: Normal monthly water and electricity data after cleaning
[0025] Among them, the first electricity theft detection threshold V 1 equals the average value of the unit water consumption and electricity consumption data after data cleaning, plus 1.5 times its standard deviation. σ The difference is 1. In this embodiment, the average power consumption per unit of water after cleaning is 28.4426, and the standard deviation is 1. σ 1 is 6.5276, the first threshold for detecting electricity theft. V 1 = 18.6512.
[0026] In this embodiment, the water and electricity data of the canteen from October 2023 to June 2025 are data to be predicted, as shown in Table 3. Among them, the data from October 2023 to March 2025 includes verified electricity theft data. The specific calculation involves calculating the electricity consumption per unit of water and comparing it with the first electricity theft judgment threshold. V Comparing 1=18.6512, the first electricity theft result is obtained. If the electricity consumption per unit of water consumption in the month to be tested is less than or equal to the first electricity theft judgment threshold... V If the threshold is 1, the judgment result is "electricity theft"; otherwise, it is judged as "normal". The distribution of electricity consumption per unit of water and its comparison with the first electricity theft judgment threshold are shown below. Figure 2 As shown.
[0027] Table 3: Monthly hydropower data to be predicted and results of the first electricity theft incident.
[0028] A single method has a certain possibility of misjudgment. To improve the accuracy of diagnostic results, in this embodiment, based on the data in Table 1, a linear fit is performed on the normal monthly electricity and water consumption, as follows: Figure 3 As shown. Predicted electricity consumption. E p Compared with normal water consumption W n Satisfying linear fitting relationship E p = a W n + b ,in, a and b represents the fitting coefficient. In this embodiment, E p =17.5961 W n +5147.3.
[0029] use E p =17.5961 W n Formula +5147.3 is used to calculate the predicted electricity consumption. E p Compared with the normal monthly electricity consumption in Table 2 E n The residuals between the data are used as the basis for calculating the standard deviation of the residuals. σ 2 = 2846.4. That is: the water consumption in normal months in Table 2. W n Substitute the values to obtain the predicted electricity consumption. E p Then, the actual electricity consumption. E n Compared with the predicted value E p Subtract the values to obtain the residuals, and then calculate the standard deviation based on the residuals. σ 2. Second threshold for detecting electricity theft V 2 equals normal monthly electricity consumption E n Compared with predicted electricity consumption E p Standard deviation of residuals σ Calculate the second threshold for detecting electricity theft by multiplying 2 by 1.5. V 2 = 4269.7.
[0030] Following the same method, in step 7), the water consumption data for the month to be tested in Table 3 will be... W a Substitute into the linear fitting equation E p =17.5961 W n +5147.3 Calculate the predicted electricity consumption. If the predicted electricity consumption... E p Actual electricity consumption of the month to be measured E a The difference between them is greater than or equal to the second electricity theft detection threshold. V If the threshold is 2, the result is "electricity theft"; otherwise, it is "normal". A comparison of the monthly electricity consumption forecast results and their residuals with the electricity theft threshold 2 is provided. Figure 4 As shown. According to Figure 4 The results of the second electricity theft are shown in Table 4.
[0031] Table 4: Monthly Electricity Consumption Data Forecast Results and Second Electricity Theft Results
[0032] The first and second results of electricity theft are compared to determine whether electricity theft has occurred. If both the first and second results are "normal", the final result is "normal". If both the first and second results are "electricity theft", the final result is "electricity theft". Otherwise, the final result is "suspected electricity theft".
[0033] In this embodiment, based on the first and second electricity theft results, the period from October 2023 to March 2025 was diagnosed as electricity theft, and the period from April 2025 to June 2025 was diagnosed as normal. The diagnostic results are consistent with the actual situation.
[0034] In summary, the method described in this embodiment collects monthly normal electricity and water consumption data from the canteen, incorporates data cleaning, and utilizes the deviation between electricity consumption per unit of water consumption and the fitting results of electricity consumption and water consumption for dual judgment, thereby realizing the detection of electricity theft in school canteens. It features a simple method, low cost, high accuracy and detection efficiency, and is particularly suitable for electricity theft detection in specific locations such as school canteens.
[0035] Based on the same inventive concept, this invention also provides a campus canteen electricity theft detection system based on the correlation between water and electricity consumption. Since the principle of solving the problem by these systems is similar to the aforementioned campus canteen electricity theft detection method based on the correlation between water and electricity consumption, the implementation of this system can refer to the implementation of the aforementioned method, and the repeated parts will not be described again.
[0036] A campus canteen electricity theft detection system based on the correlation between water and electricity consumption includes a microprocessor and a memory interconnected, the microprocessor being programmed or configured to execute the steps of the campus canteen electricity theft detection method based on the correlation between water and electricity consumption.
[0037] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0038] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting electricity theft in school canteens based on the correlation between water and electricity consumption, characterized in that, Includes the following steps: S1. Collect monthly electricity consumption data and monthly water consumption data of the canteen during normal operation; S2. Based on the monthly electricity consumption data and monthly water consumption data, calculate the electricity consumption per unit of water consumption, and perform data cleaning on the electricity consumption per unit of water consumption to remove outliers. S3. Calculate the first electricity theft judgment threshold using the electricity consumption data per unit of water after cleaning; S4. For the monthly data to be predicted, a diagnosis is performed based on the first electricity theft judgment threshold to obtain the first electricity theft result; S5. Perform linear fitting on the normal electricity consumption data and normal water consumption data to obtain the predictive relationship between electricity consumption and water consumption. S6. Based on the prediction formula, calculate the residual between the actual monthly electricity consumption and the predicted electricity consumption, and calculate the second electricity theft judgment threshold based on the residual. S7. Based on the second electricity theft judgment threshold, a diagnosis is made for the monthly data to be predicted to obtain a second electricity theft result; S8. Combining the first electricity theft result and the second electricity theft result, output the final electricity theft judgment result.
2. The method for detecting electricity theft in a school cafeteria according to claim 1, characterized in that, The electricity consumption per unit of water volume is calculated by the quotient of monthly electricity consumption and monthly water consumption.
3. The method for detecting electricity theft in a school cafeteria according to claim 1, characterized in that, The data cleaning method employs the interquartile range method, specifically including: calculating the lower quartile of the unit water consumption and electricity consumption data. Q 1 and upper quartiles Q 3, and interquartile range (IQR); below the boundary L 1= Q 1-1.5 × IQR and upper bound L u = Q The range is 3 + 1.5 × IQR. Data that is less than the lower bound or greater than the upper bound is identified as outliers and deleted.
4. The method for detecting electricity theft in a school cafeteria according to claim 1, characterized in that, First electricity theft detection threshold V 1 equals the average of the electricity consumption per unit of water used after cleaning, minus its standard deviation. σ The difference between 1 and 1.5 times.
5. The method for detecting electricity theft in a school cafeteria according to claim 1, characterized in that, In step S4, if the electricity consumption per unit of water in the monthly data to be predicted is less than or equal to the first electricity theft judgment threshold... V If 1, then the first result of electricity theft is "electricity theft"; otherwise, it is "normal".
6. The method for detecting electricity theft in a school cafeteria according to claim 1, characterized in that, The prediction relationship is a linear equation. E p = a W n + b ,in E p Indicates the predicted electricity consumption. W n This represents the water consumption, and a and b are coefficients obtained through linear fitting.
7. The method for detecting electricity theft in a school cafeteria according to claim 1, characterized in that, Second electricity theft detection threshold V 2 equals normal monthly electricity consumption E n Compared with predicted electricity consumption E p Standard deviation of residuals σ 1.5 times 2.
8. The method for detecting electricity theft in a school cafeteria according to claim 6, characterized in that, In step S7, the water consumption of the month to be predicted is substituted into the prediction formula to calculate the predicted electricity consumption. E p If the actual electricity consumption E a and E p The difference is greater than or equal to the second electricity theft detection threshold. V 2. If the result is "electricity theft", then the second result is "electricity theft"; otherwise, it is "normal".
9. The method for detecting electricity theft in a school cafeteria according to claim 1, characterized in that, In step S8, the output rule for the final electricity theft judgment result is as follows: if both the first electricity theft result and the second electricity theft result are "normal", then output "normal"; if both are "electricity theft", then output "electricity theft"; otherwise output "suspected electricity theft".
10. A campus canteen electricity theft detection system based on the correlation between water and electricity consumption, comprising a microprocessor and a memory interconnected, characterized in that, The microprocessor is programmed or configured to perform the steps of the campus canteen electricity theft detection based on the correlation between water and electricity consumption as described in any one of claims 1 to 9.