Electricity stealing behavior detection method, system and equipment based on granular ball fuzzy information entropy and medium
By constructing granular fuzzy information entropy methods, calculating global and local anomaly features, and dynamically adjusting the granularity contribution, the problem of insufficient multi-granularity information fusion in electricity theft detection is solved, and accurate detection and identification of electricity theft behavior is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-10
AI Technical Summary
Existing methods for detecting electricity theft are unable to effectively integrate multi-granular information from electricity consumption data, resulting in insufficient detection accuracy. Furthermore, traditional methods are not adaptable enough to handle high-dimensional heterogeneous electricity consumption data and cannot accurately identify electricity theft.
A method based on granular fuzzy information entropy is adopted. By constructing granular spheres of different granular sizes, the relative fuzzy entropy and local reachability density of the granular spheres are calculated. Combined with an adaptive threshold strategy, the granular spheres are merged to achieve weighted fusion of global anomalies and local anomalies, dynamically adjust the granularity contribution, and calculate the anomaly score of the electricity theft samples.
It significantly improves the accuracy and interpretability of electricity theft detection, enabling precise identification of electricity theft in complex scenarios, reducing missed detections, and improving the operational efficiency of the power system.
Smart Images

Figure CN121637340A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity theft detection technology, specifically to a method, system, device, and medium for electricity theft detection based on particle-sphere fuzzy information entropy. Background Technology
[0002] With the deepening of smart grid construction and the widespread application of power Internet of Things (IoT) technology, electricity consumption data is exhibiting significant characteristics of multimodality and high-dimensional heterogeneity. The concealment, technicality, and group nature of electricity theft are becoming increasingly prominent. Traditional detection methods based on manual inspections and simple statistics are no longer sufficient to address the complex and ever-changing non-technical loss issues. Accurate identification of electricity theft has become a key requirement for improving the operational efficiency of the power system and enhancing anti-theft governance capabilities.
[0003] Currently, various anomaly detection methods related to electricity theft have emerged in the industry, but they still have significant shortcomings in adapting to the characteristics of big data in the power sector and complex electricity theft scenarios: Statistical methods usually rely on data distribution assumptions or expert experience, which are poorly adapted to the ambiguity and uncertainty characteristics commonly found in electricity consumption data, making it difficult to capture complex patterns of electricity consumption behavior and resulting in limited generalization performance in real-world scenarios. Distance- or density-based methods are sensitive to local anomalies but perform poorly in detecting global anomalies and do not fully consider the multi-granularity hierarchical features of electricity consumption data, making it difficult to effectively distinguish anomaly patterns under different dimensions. Clustering methods require pre-setting key parameters such as the number of clusters, and parameter selection has a significant impact on the detection results. Furthermore, when processing high-dimensional heterogeneous electricity consumption data, clustering bias caused by feature redundancy is prone to occur, making it difficult to accurately locate niche anomaly samples such as electricity theft. Although deep learning methods can capture deep nonlinear relationships in data, they mostly rely on a large number of labeled samples for training, resulting in high labeling costs, and the models suffer from non-interpretability issues, making it difficult to meet the actual needs of the power industry for traceable and interpretable detection results.
[0004] While existing methods for calculating spheres have the advantage of handling uncertain data, most of them only focus on surface information such as the radius and center of the sphere, ignoring the internal structural features and information correlations of the sphere. They lack effective fusion of multi-granular information, resulting in insufficient adaptability to complex electricity theft scenarios. Summary of the Invention
[0005] The purpose of this invention is to provide a method, system, device and medium for detecting electricity theft based on granular fuzzy information entropy, which solves the problems of existing electricity theft detection methods that are difficult to effectively integrate multi-granular information of electricity consumption data and have insufficient detection accuracy, thereby achieving more effective detection of electricity theft.
[0006] This invention is achieved through the following technical solution:
[0007] In a first aspect, the first embodiment of the present invention provides a method for detecting electricity theft based on granular fuzzy information entropy, comprising the following steps: S1: Acquire multi-source data from the power system and normalize the multi-source data to obtain the processed dataset; S2: Construct spheres of different granular sizes based on the processed dataset, and use the center and radius information of each sphere to characterize the local features of the electricity consumption samples covered by the spheres; S3: Calculate the relative fuzzy entropy of each sphere to characterize the global anomaly of the sphere; S4: Similar particles are merged into merged particles using an adaptive threshold strategy. The local reachability distance is calculated based on the merged particles, and the degree of local anomaly of the electricity consumption sample within the merged particles is calculated based on the local reachability density difference. S5: By using a multi-granularity fusion strategy, the global anomaly level of the particles is combined with the local anomaly information of the electricity consumption samples to calculate the final anomaly score of electricity theft for each electricity consumption sample in a weighted manner. S6: Set an abnormal score threshold, and check whether the abnormal score of each data is greater than the threshold. If it is, it is determined to be electricity theft and an abnormal result is output. If not, it is determined to be normal electricity consumption data. Continue to traverse until all electricity consumption samples are judged.
[0008] Further, step S2: constructing spheres of different granular sizes based on the processed dataset, and using the center and radius information of each sphere to characterize the local features of the electricity consumption samples covered by the spheres, includes the following specific methods: S201: Initialize the processed dataset into a primitive sphere, which covers all the data in the dataset, and calculate the center and radius information of the sphere; S202: Perform the 2-Means clustering algorithm on the current particle to divide the current particle into the first sub-particle and the second sub-particle; S203: Calculate the distribution metrics of the current particle, the first sub-particle, and the second sub-particle respectively, and set the particle segmentation criteria; S204: Segment the spheres that meet the segmentation criteria using the 2-Means clustering algorithm. Repeat step S204 until all spheres no longer meet the segmentation criteria, and obtain the final set of spheres.
[0009] Further, step S3: calculating the relative fuzzy entropy of each particle specifically includes: S301: Calculate the fuzzy similarity between each particle; S302: Calculate the fuzzy information entropy based on spheres according to fuzzy similarity; S303: Calculate the fuzzy relative entropy of each particle based on the fuzzy information entropy of the particle.
[0010] Further, step S4: merging similar particles into a merged particle sphere using an adaptive threshold strategy, calculating the local reachability distance based on the merged particle sphere, and calculating the degree of local anomaly of the electricity consumption sample within the merged particle sphere based on the local reachability density difference, specifically includes the following methods: S401: Calculate the merging threshold of any two sub-spheres; S402: Merge sub-spheres that are greater than the merging threshold. Repeat step S402 until all sub-spheres no longer meet the merging conditions, and obtain a merged sphere set.
[0011] Furthermore, the specific method for step S4—merging similar particles into a merged particle sphere using an adaptive threshold strategy, calculating the local reachability distance based on the merged particle sphere, and calculating the degree of local anomaly of the electricity consumption sample within the merged particle sphere based on the local reachability density difference—also includes: S403: For any power consumption sample in any merged sphere, calculate the reachability distance between power consumption samples in the same merged sphere; S404: Calculate the local reachability density of each power consumption sample based on reachability distance.
[0012] Secondly, another embodiment of the present invention provides a power theft detection system based on granular fuzzy information entropy, used to implement the method described in the first embodiment above, the system comprising: The data acquisition module is used to acquire multi-source data from the power system as electricity consumption samples, and to normalize the multi-source data to obtain the processed dataset. The construction module is used to construct spheres of different granular sizes based on the processed dataset, and to characterize the local features of the electricity consumption samples covered by each sphere using the center and radius information of each sphere. The first calculation module is used to calculate the relative fuzzy entropy of each particle to characterize the global anomaly of the particle; The second calculation module is used to merge similar particles into merged particles using an adaptive threshold strategy, calculate the local reachability distance based on the merged particles, and calculate the degree of local anomaly of the sample within the merged particles based on the local reachability density difference. The third calculation module is used to calculate the final abnormal score of electricity theft for each sample by combining the global abnormality of the particles with the local abnormality information of the samples through a multi-granularity fusion strategy. The judgment module is used to set an abnormal score threshold, and judge whether the abnormal score of each data is greater than the threshold. If it is, it is judged as electricity theft and an abnormal result is output. If not, it is judged as normal electricity consumption data. The process continues until all electricity consumption samples are judged.
[0013] Furthermore, the construction module includes an initialization unit, a clustering unit, and a distribution metric calculation unit; The initialization unit is used to initialize the processed dataset into an original sphere, which covers all the data in the dataset, and calculates the center and radius information of the sphere. The clustering unit is used to perform a 2-Means clustering algorithm on the current particle to divide the current particle into a first sub-particle and a second sub-particle. The distribution metric calculation unit calculates the distribution metrics of the current particle, the first sub-particle, and the second sub-particle, and sets the particle segmentation criteria. The clustering unit is also used to split the spheres that meet the splitting criteria using the 2-Means clustering algorithm until all spheres no longer meet the splitting criteria, thus obtaining the final set of spheres.
[0014] Furthermore, the first calculation module includes a fuzzy similarity unit, a fuzzy information entropy unit, and a fuzzy relative entropy unit; The fuzzy similarity unit is used to calculate the fuzzy similarity between each particle; The fuzzy information entropy unit is used to calculate the fuzzy information entropy based on spheres according to fuzzy similarity; The fuzzy relative entropy unit is used to calculate the fuzzy relative entropy of each particle based on the fuzzy information entropy of the particle.
[0015] Thirdly, another embodiment of the present invention provides an electronic device comprising: a processor, an input device, an output device, and a memory, wherein the processor, the input device, the output device, and the memory are interconnected, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the method described in the first embodiment above.
[0016] Fourthly, another embodiment of the present invention provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method described in the first embodiment above.
[0017] Compared with the prior art, the present invention has the following advantages and beneficial effects: This invention provides a method, system, device, and medium for detecting electricity theft based on fuzzy information entropy of granular spheres. By weighted fusion of global anomaly degree and local anomaly features characterized by local outlier degree based on granular spheres, and by introducing granular sphere weights to dynamically adjust the contribution of granular spheres of different granularities, it achieves accurate capture of global patterns and local details of electricity theft behavior, significantly improving the accuracy of detection results. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 A flowchart of a method for detecting electricity theft based on granular fuzzy information entropy provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of a power theft detection system based on granular fuzzy information entropy, provided as another embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0020] like Figure 1 As shown, the first embodiment of the present invention provides a method for detecting electricity theft based on granular fuzzy information entropy, comprising the following steps: S1. Obtain multi-source data from the power system and perform normalization preprocessing on the multi-source data to obtain the processed dataset; S2. Construct spheres of different granularities based on the processed dataset, and use the center and radius information of each sphere to characterize the local features of the electricity consumption samples covered by the sphere, thereby realizing a multi-granularity hierarchical representation of the electricity consumption data. S3. Calculate the relative fuzzy entropy of each particle to characterize the global anomaly of the particle; S4. Similar particles are merged into merged particles using an adaptive threshold strategy. The local reachability distance is calculated based on the merged particles. The degree of local anomaly of the electricity consumption sample within the merged particles is calculated based on the local reachability density difference. S5. By using a multi-granularity fusion strategy, combining the global anomaly level of the sphere with the local anomaly information of the electricity consumption sample, the anomaly score of the final electricity theft of each electricity consumption sample is calculated in a weighted manner, so as to achieve a comprehensive representation of global and local anomaly features. S6. Set an abnormal score threshold and check whether the abnormal score of each data is greater than the threshold. If it is, it is determined to be electricity theft and an abnormal result is output. If not, it is considered normal electricity consumption data. Continue to traverse until all electricity consumption samples are judged.
[0021] In this embodiment, granular computing theory provides an effective tool for multi-granularity information fusion and can be directly applied to the analysis model of electricity theft data. In the specific application of granular computing, electricity consumption data is imported into an information system (or information table), where each row represents an electricity user (or electricity consumption sample), and each column represents a feature of the electricity consumption sample. The value of the feature can include numerical types (such as load, voltage, current, etc.). An information system is represented as follows: ,in, This represents the set of all electricity consumption samples. It represents the set of all features.
[0022] In this embodiment, firstly, spheres of different granular sizes are constructed. The center and radius information of each sphere are used to characterize the local characteristics of the electricity consumption samples covered by that sphere. The global anomaly characteristics of the spheres are characterized by fuzzy information entropy. Then, similar spheres are merged to form merged spheres using an adaptive threshold strategy. The local anomaly degree of the sample within the merged sphere is calculated based on the difference in local reachability density. Finally, the global anomaly degree of the sphere and the local deviation degree of the electricity consumption sample within the merged sphere are weighted to calculate the anomaly score of the electricity consumption sample. This method solves the problem that existing methods only mine anomaly information from a single granularity. This method does not require labeled data for model training and can effectively achieve unsupervised anomaly detection of electricity consumption data, thereby achieving the purpose of accurately identifying electricity theft and assisting in the investigation and detection of electricity theft.
[0023] The expression for normalization in step S1 is: , in, Samples after normalization , This represents the minimum value for each attribute in the electricity consumption data. This represents the maximum value for each attribute in the electricity consumption data.
[0024] In this embodiment, the normalization operation is used to adjust the range of data values to the real number interval between 0 and 1, thereby eliminating the impact of different units on the algorithm performance.
[0025] Specifically, step S2, constructing spheres of different granular sizes based on the processed dataset, and characterizing the local features of the electricity consumption samples covered by each sphere using the center and radius information of each sphere, includes: S201. Initialize the entire dataset as a primitive sphere. It covers all the data in the dataset.
[0026] S202, for the current particle Perform a 2-Means clustering algorithm to divide it into two sub-spheres. and Calculate the number of particles respectively , grains Japanese particles Distribution measure , which is the ratio of the number of samples contained in a sphere to the sum of the distances between these samples and the center, is defined by the formula: , in, Indicates granules Distribution measure, Indicates granules The covered One sample, For granules The number of samples covered For granules The center.
[0027] S203. Define the weighted distribution measure of particles, and its formula is: , in, , and They are granules and its seed pellets and Distribution measure, They are granules , and The number of samples covered.
[0028] Set the criteria for splitting the particle: if the distribution metric of the current particle is greater than the sum of the distribution metrics of the two sub-particles, the current particle will be allowed to be split into two sub-particles; otherwise, the current particle will not be split.
[0029] S204. The particles that meet the splitting criteria are split using the 2-Means clustering algorithm. Step S204 is repeated until all particles no longer meet the splitting criteria; the final set of particles is obtained. , This represents the total number of pellets.
[0030] The above steps, by constructing spheres of different granular sizes, achieve multi-scale and multi-level representation of electricity consumption data, overcoming the limitations of traditional methods that only focus on a single data dimension or fixed granularity. It can capture abnormal features simultaneously at both global and local levels, making it particularly suitable for complex scenarios such as covert and group-based electricity theft, thus improving the model's ability to identify multi-modal abnormal behaviors.
[0031] Step S3 specifically includes: S301. Calculate the fuzzy similarity between each particle: , in, Indicates granules Fuzzy similarity, Indicates the number of pellets generated. For granules distance, and They are granules The center and They are granules radius, For 2-norm operations, This is the Gaussian kernel parameter, and its setting range is... ; S302. Calculate the fuzzy information entropy based on particles and spheres using fuzzy similarity: , in, Refers to attribute set Based on the fuzzy information entropy of particles, and Both represent the number of pellets. For granules The granular-spherical fuzzy granular structure, Represented as The base number.
[0032] S303. Based on the fuzzy information entropy of the particles, calculate the fuzzy relative entropy of each particle: , in, For granules Fuzzy relative entropy, Represents attribute set The entropy of fuzzy information in spheres Represents the set of particles Remove pellets Post-attribute set The fuzzy information entropy below.
[0033] The above steps introduce a granular fuzzy information entropy measurement system, which effectively characterizes the uncertainty and fuzziness in electricity consumption data and improves the sensitivity to abnormal patterns.
[0034] Step S4 specifically includes: S401, For any ball The particle merging threshold is calculated using the following formula: , in, Indicates granules The merging threshold, and They are granules The number of particles that overlap with their adjacent particles. and They are granules The radius.
[0035] S402. Merge particles larger than the merging threshold. Repeat step S402 until all particles no longer meet the merging conditions, resulting in the final merged particle set. , This represents the total number of particles after merging.
[0036] S403, For any merged particles Any sample The reachability distance between samples within the same merged sphere is calculated using the following formula: , in, Indicates sample Relative to the sample The reachable distance, Indicates sample Its first The distance between the nearest neighbor samples Indicates sample With sample The distance between them This indicates the operation of taking the maximum value among them.
[0037] S404. Based on reachability distance, calculate the local reachability density of each sample. The calculation formula is as follows: , in, Indicates sample Locally achievable density, Indicates sample Relative to the sample The reachable distance, Indicates distance from sample Recent A set consisting of sample neighbors This indicates the radix operation.
[0038] S405, For any merged particles Any sample Calculate samples The degree of local anomaly based on the granules is calculated using the following formula: , in, Indicates sample Based on the degree of local anomaly in the granules, and Representing samples respectively and Locally achievable density, Indicates distance from sample Recent A set consisting of sample neighbors This indicates radix operation. Indicates the first A combined pellet.
[0039] The above steps, combined with the calculation of local reachability density, determine the degree of anomaly of the electricity sample within the merged spheres, enabling accurate identification of local outliers within the same category and avoiding missed detections.
[0040] Step S5 specifically includes: For any merged sphere Any sample The anomaly score for each electricity theft sample is calculated using the formula defined as follows: , in, Indicates sample Abnormal scores, Indicates granules Belonging to the granules For granules The weights, This represents the total number of samples in the electricity consumption dataset. Indicates control arrive A weighting factor for choosing between them.
[0041] The above steps use a multi-granularity weighted fusion strategy to dynamically balance the contributions of global and local anomalies, thereby improving the accuracy and interpretability of the final anomaly score.
[0042] In this embodiment, the anomaly score of a sample is used to measure the degree to which a sample is anomalous. The anomaly score is obtained by weighting a granular anomaly factor that contains multi-granularity information. Let the anomaly score threshold for determining electricity theft be... If the sample abnormal scores ,So The corresponding user was identified as an electricity thief; the anomaly score of all electricity consumption samples was compared with the threshold. By comparing each data point individually, electricity theft can be effectively identified. This process can promptly alert electricity inspectors, pointing out users with abnormally high scores who may be suspected of electricity theft. This prompts them to conduct targeted on-site verification and electricity usage checks on these users, ensuring that electricity theft can be investigated and dealt with in a timely manner and that electricity losses can be recovered.
[0043] This invention provides a method for detecting electricity theft based on fuzzy information entropy of granular spheres. By weighted fusion of global anomaly degree and local anomaly features characterized by local outlier degree based on granular spheres, and by introducing granular sphere weights to dynamically adjust the contribution of granular spheres of different granularities, it achieves accurate capture of global patterns and local details of electricity theft behavior, significantly improving the accuracy of detection results.
[0044] like Figure 2 As shown, another embodiment of the present invention provides a power theft detection system based on granular fuzzy information entropy, used to implement the method described in the first embodiment above. The system includes: The data acquisition module is used to acquire multi-source data from the power system as electricity consumption samples, and to normalize the multi-source data to obtain the processed dataset. The construction module is used to construct spheres of different granular sizes based on the processed dataset, and to characterize the local features of the electricity consumption samples covered by each sphere using the center and radius information of each sphere. The first calculation module is used to calculate the relative fuzzy entropy of each particle to characterize the global anomaly of the particle; The second calculation module is used to merge similar particles into merged particles using an adaptive threshold strategy, calculate the local reachability distance based on the merged particles, and calculate the degree of local anomaly of the sample within the merged particles based on the local reachability density difference. The third calculation module is used to calculate the final abnormal score of electricity theft for each sample by combining the global abnormality of the particles with the local abnormality information of the samples through a multi-granularity fusion strategy. The judgment module is used to set an abnormal score threshold, and judge whether the abnormal score of each data is greater than the threshold. If it is, it is judged as electricity theft and an abnormal result is output. If not, it is judged as normal electricity consumption data. The process continues until all electricity consumption samples are judged.
[0045] The construction module includes an initialization unit, a clustering unit, and a distribution metric calculation unit. The initialization unit initializes the processed dataset into a single original sphere, which covers all data in the dataset, and calculates the center and radius information of the sphere. The clustering unit performs a 2-Means clustering algorithm on the current sphere, dividing it into a first sub-sphere and a second sub-sphere. The distribution metric calculation unit calculates the distribution metrics of the current sphere, the first sub-sphere, and the second sub-sphere, and sets the sphere splitting criteria. The clustering unit also splits the spheres that meet the splitting criteria using the 2-Means clustering algorithm until all spheres no longer meet the splitting criteria, resulting in the final sphere set.
[0046] The first calculation module includes a fuzzy similarity unit, a fuzzy information entropy unit, and a fuzzy relative entropy unit. The fuzzy similarity unit is used to calculate the fuzzy similarity between each particle; the fuzzy information entropy unit is used to calculate the fuzzy information entropy based on the particle based on the fuzzy similarity; and the fuzzy relative entropy unit is used to calculate the fuzzy relative entropy of each particle based on the fuzzy information entropy of the particle.
[0047] The execution process of each module can be carried out according to the steps of the method for detecting electricity theft based on granular fuzzy information entropy provided in the first embodiment, and will not be described in detail in this embodiment.
[0048] The electricity theft detection system based on granular fuzzy information entropy and the electricity theft detection method based on granular fuzzy information entropy provided in this invention are based on the same inventive concept and have the same beneficial effects, and will not be described again here.
[0049] Another embodiment of the present invention provides an electronic device, which includes a processor, an input device, an output device, and a memory. The processor, the input device, the output device, and the memory are interconnected. The memory is used to store a computer program, which includes program instructions. The processor is configured to call the program instructions to execute the method described in the first embodiment above.
[0050] It should be understood that, in the embodiments of the present invention, the processor may be a Central Processing Unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0051] Input devices may include touchpads, microphones, etc., and output devices may include displays (LCDs, etc.), speakers, etc.
[0052] The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information about the device type.
[0053] In specific implementations, the processor, input device, and output device described in the embodiments of the present invention can execute the implementation of the method embodiments described in the embodiments of the present invention, or they can execute the implementation of the system embodiments described in the embodiments of the present invention, which will not be repeated here.
[0054] The present invention also provides an embodiment of a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the method described in the first embodiment above.
[0055] The computer-readable storage medium can be an internal storage unit of the terminal described in the foregoing embodiments, such as the terminal's hard drive or memory. The computer-readable storage medium can also be an external storage device of the terminal, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the terminal. The computer-readable storage medium is used to store the computer program and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0056] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0057] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the terminals and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0058] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.
[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.
Claims
1. A power stealing behavior detection method based on granular fuzzy information entropy, characterized in that, The method comprises the following steps: S1: obtaining multi-source data in a power system, and performing normalization processing on the multi-source data to obtain a processed data set; S2: constructing granules of different granularity sizes according to the processed data set, and using center and radius information of each granule to represent local features of power consumption samples covered by the granule; S3: calculating relative fuzzy entropy of each granule to represent a global abnormality degree of the granule; S4: merging similar granules to form merged granules through an adaptive threshold strategy, calculating local reachable distances according to the merged granules, and calculating a local abnormality degree of the power consumption samples in the merged granules according to a local reachable density difference; S5: through a multi-granularity fusion strategy, combining the global abnormality degree of the granule and the local abnormality information of the power consumption sample, and weightedly calculating an abnormality score of each power consumption sample; S6: setting an abnormality score threshold, judging whether the abnormality score of the data is greater than the threshold one by one, if yes, determining that the power consumption sample is a power stealing behavior and outputting an abnormality result, and if no, determining that the power consumption sample is normal power consumption data, and continuously traversing until the judgment of all power consumption samples is completed.
2. The method of claim 1, wherein, The specific method of the step S2 comprises: S201: initializing the processed data set as an original granule, the original granule covering all data in the data set, and calculating center and radius information of the granule; S202: performing a 2-Means clustering algorithm on the current granule to divide the current granule into a first sub-granule and a second sub-granule; S203: calculating distribution metrics of the current granule, the first sub-granule and the second sub-granule respectively, and setting a granule splitting criterion; S204: splitting the granule meeting the splitting criterion according to the 2-Means clustering algorithm, and repeating the step S204 until all granules no longer meet the splitting condition, to obtain a final granule set.
3. The method of claim 1, wherein, The specific method of the step S3 comprises: S301: calculating fuzzy similarity between each granule; S302: calculating fuzzy information entropy of the granule based on the fuzzy similarity; S303: calculating fuzzy relative entropy of each granule based on the fuzzy information entropy of the granule.
4. The method of claim 1, wherein, The specific method of the step S4 comprises: S401: calculating a merging threshold of any two sub-granules; S402: merging the sub-granules greater than the merging threshold, and repeating the step S402 until all sub-granules no longer meet the merging condition, to obtain a merged granule set.
5. The method of claim 4, wherein, The specific method of the step S4 further comprises: S403: for any power consumption sample in any merged granule, calculating reachable distances between the power consumption samples in the same merged granule. S404: Calculate the local reachable density of each power consumption sample according to the reachable distance.
6. A power stealing behavior detection system based on granular fuzzy information entropy, characterized in that, The system is used for implementing the method in any of claims 1-5, and comprises: a data acquisition module, configured to acquire multi-source data in a power system, and perform normalization processing on the multi-source data to obtain a processed data set; a construction module, configured to construct granules of different granular sizes according to the processed data set, and represent local features of power consumption samples covered by each granule by center and radius information of the granule; a first calculation module, configured to calculate a relative fuzzy entropy of each granule to represent a global anomaly degree of the granule; a second calculation module, configured to merge similar granules to form merged granules by an adaptive threshold strategy, calculate a local reachable distance according to the merged granules, and calculate a local anomaly degree of the power consumption samples in the merged granules according to a difference in local reachable density; a third calculation module, configured to calculate a final anomaly score of each power consumption sample for electricity stealing by a multi-granularity fusion strategy, in combination with the global anomaly degree of the granule and the local anomaly information of the power consumption sample, and by weighting; a determination module, configured to set an anomaly score threshold, determine whether the anomaly score of the data is greater than the threshold one by one, determine that the data is for electricity stealing and output an anomaly result if yes, and determine that the data is normal power consumption data if no, and continue to traverse until the determination of all power consumption samples is completed.
7. The system of claim 6, wherein, The construction module comprises an initialization unit, a clustering unit and a distribution metric calculation unit; the initialization unit is configured to initialize the processed data set as an original granule, the granule covering all data in the data set, and calculate center and radius information of the granule; the clustering unit is configured to perform a 2-Means clustering algorithm on the current granule to divide the current granule into a first sub-granule and a second sub-granule; the distribution metric calculation unit is configured to calculate distribution metrics of the current granule, the first sub-granule and the second sub-granule respectively, and set a splitting criterion for the granule; the clustering unit is further configured to split the granule that meets the splitting criterion according to the 2-Means clustering algorithm, until all granules no longer meet the splitting condition, and obtain a final granule set.
8. The system of claim 6, wherein, The first calculation module comprises a fuzzy similarity unit, a fuzzy information entropy unit and a fuzzy relative entropy unit; the fuzzy similarity unit is configured to calculate a fuzzy similarity between each granule; the fuzzy information entropy unit is configured to calculate a fuzzy information entropy based on the granule according to the fuzzy similarity; the fuzzy relative entropy unit is configured to calculate a fuzzy relative entropy of each granule according to the fuzzy information entropy of the granule.
9. An electronic device comprising: A processor, an input device, an output device and a memory are connected to each other, the memory is configured to store a computer program, the computer program comprises program instructions, and the processor is configured to invoke the program instructions to execute the method in any of claims 1-5.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program comprises program instructions, and the program instructions, when executed by a processor, cause the processor to execute the method in any of claims 1-5.