User electricity stealing behavior detection method and system based on entropy measurement of fuzzy relation
Through the entropy measurement method of fuzzy relationships, the user's upper fuzzy entropy and lower fuzzy entropy are calculated, the feature sequence and feature subset are constructed, and heterogeneous data are directly processed, which solves the problem of poor applicability of existing methods in processing uncertain information and lack of labeled data areas, and realizes efficient detection of power theft behavior.
Patent Information
- Application Number
- CN202510865612.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-07-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing detection methods for user power theft behavior are poor in processing data containing uncertain information, and are poor in applicability to areas with lack of labeled data, resulting in high detection costs and inefficiency.
The entropy measurement method based on fuzzy relationship is adopted, and the user's upper fuzzy entropy and lower fuzzy entropy are calculated, and the feature sequence and feature subset are constructed. The weighting function is used to determine whether the user has electricity theft behavior. The heterogeneous data is directly processed without discrete preprocessing, which reduces the data preprocessing cost.
Effectively processing uncertain information improves the efficiency and applicability of power theft behavior detection, reduces the dependence of data annotation, and is suitable for power theft behavior detection in various regions.
Smart Images

Figure CN120354330A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly relates to a method and system for detecting user electricity stealing behavior based on entropy measure of fuzzy relation. Background Art
[0002] With the continuous development of information technology, the detection technology for electricity stealing behavior has become more and more intelligent, improving the accuracy and efficiency of electricity stealing behavior detection. Especially with the development of technologies such as deep learning, neural network, and support vector machine, many methods for classifying unknown category samples based on training models have been proposed. These methods belong to supervised methods and require a large amount of data with category label information to support the training of the model. In practical applications, obtaining a large amount of labeled data on electricity stealing behavior requires high costs and consumes a lot of manpower and material resources. In addition, since the training model overly relies on the labeled data set used for training, and the characteristics of electricity consumption data vary greatly in each region, a model trained in one region cannot be directly applied to another region and needs to be retrained. If it is directly applied to another region without retraining, it is very likely to result in extremely poor detection effects. Therefore, these methods require high model training costs and cannot be well applied to regions with different characteristics, especially those with a lack of training data. Regarding the problem of high costs for obtaining labeled data for training the model, unsupervised methods do not need to use any category label information. They judge whether there is electricity stealing behavior by mining and analyzing the information between samples. Many scholars focus on using supervised methods to study user electricity stealing behavior detection technology and ignore the application of unsupervised methods. The detection rate of existing supervised methods highly depends on data annotation and deterministic information in the data, and it is difficult to cope with complex and changeable electricity stealing behaviors.
[0003] In summary, the existing methods for detecting user electricity stealing behavior have the disadvantages of being inapplicable to processing data containing uncertain information and having poor applicability to regions lacking labeled data. Summary of the Invention
[0004] Based on this, the purpose of the present invention is to provide a method and system for detecting user electricity stealing behavior based on entropy measure of fuzzy relation to at least solve the above deficiencies in the technology.
[0005] The present invention proposes a method for detecting user electricity stealing behavior based on entropy measure of fuzzy relation, including: Obtaining the electricity consumption data of multiple users, and performing normalization processing on each piece of the electricity consumption data to obtain normalized data; Processing each piece of the normalized data according to a metric algorithm to calculate the first membership relation of each user under a single attribute set; Calculate the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single-attribute set according to the first membership relationship, and construct the feature sequence of each user by using the first upper fuzzy entropy and the first lower fuzzy entropy to obtain the corresponding feature subset; Calculate the second membership relationship of each user under the feature subset according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset according to the second membership relationship; Calculate the first outlier degree of each user under the single-attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second outlier degree of each user under the feature subset according to the second upper fuzzy entropy and the second lower fuzzy entropy; Construct the first weighted function of each user under the single-attribute set and the second weighted function of each user under the feature subset, and calculate the outlier score of each user according to the first outlier degree, the first weighted function, the second outlier degree and the second weighted function, and compare the outlier score with the preset outlier threshold to determine whether each user has electricity theft behavior.
[0006] Further, the step of calculating the first membership relationship of each user under the single-attribute set by processing each of the normalized data according to the metric algorithm includes: Calculate the first membership relationship of each user under the single-attribute set by calculating each of the normalized data based on the fuzzy set theory and a preset fuzzy information system:
[0007] where, represents the membership degree between user and user , respectively represent the values of user and user under the single-attribute set a.
[0008] Further, the step of calculating the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single-attribute set according to the first membership relationship, and constructing the feature sequence of each user by using the first upper fuzzy entropy and the first lower fuzzy entropy to obtain the corresponding feature subset includes: Calculate the first upper granularity structure and the first lower granularity structure of each user under the single-attribute set according to the first membership relationship:
[0009]
[0010] where, and are respectively called the upper fuzzy set and the lower fuzzy set of the point relative to on the user set U; Define the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single attribute set by using the upper granularity structure and the first lower granularity structure: ; ; wherein, represents the number of users; Construct the feature sequence of each user according to the first upper fuzzy entropy and the first lower fuzzy entropy: , ; wherein, represents the number of attributes in the single attribute set, , represents the attribute universe, represents the membership relationship of the feature subset , represents the upper fuzzy entropy of the feature subset , represents the lower fuzzy entropy of the feature subset , and the feature sequence is the maximum value of the upper fuzzy entropy and the lower fuzzy entropy of each feature and is arranged in descending order; Construct the corresponding feature subset according to the feature sequence: , ; Meanwhile, , and .
[0011] Furthermore, the steps of calculating the second membership relationship of each user under the feature subset according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculating the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset include: The calculation formula of the second membership relationship is: ; In the formula, is the feature subset of , e represents the attribute in the feature subset d, represents the membership degree between user and user under the attribute e; Calculate the second upper granularity structure and the second lower granularity structure of each user under the feature subset according to the second membership relationship;
[0012]
[0013] In the formula, and are respectively called the upper fuzzy set and the lower fuzzy set of point relative to on the user set U; Calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset by using the second upper granularity structure and the second lower granularity structure: ; .
[0014] Furthermore, the steps of calculating the first outlier degree of each user under the single-attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculating the second outlier degree of each user under the feature subset according to the second upper fuzzy entropy and the second lower fuzzy entropy include: Calculate the first upper granularity correlation cardinality, the first lower granularity correlation cardinality and the first weighted function of each user under the single-attribute set according to the first upper granularity structure and the first lower granularity structure, and calculate the second upper granularity correlation cardinality, the second lower granularity correlation cardinality and the second weighted function of each user under the feature subset by using the second upper granularity structure and the second lower granularity structure; Calculate the first upper fuzzy relative entropy and the first lower fuzzy relative entropy of each user under the single-attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second upper fuzzy relative entropy and the second lower fuzzy relative entropy of each user under the feature subset by using the second upper fuzzy entropy and the second lower fuzzy entropy; Calculate the first outlier degree of each user under the single-attribute set according to the first upper fuzzy relative entropy and the first lower fuzzy relative entropy and the first upper granularity correlation cardinality and the first lower granularity correlation cardinality, and calculate the second outlier degree of each user under the feature subset by using the second upper fuzzy relative entropy and the second lower fuzzy relative entropy and the second upper granularity correlation cardinality and the second lower granularity correlation cardinality.
[0015] Furthermore, the calculation formulas of the first upper granularity correlation cardinality and the first lower granularity correlation cardinality are: ; ; The calculation formulas for the first upper fuzzy relative entropy and the first lower fuzzy relative entropy are as follows: ; ; In the formula, represents the first upper fuzzy entropy under the single attribute a without including the user ; represents the first upper fuzzy entropy under the single attribute a including the user ; represents the first lower fuzzy entropy under the single attribute a without including the user ; represents the first lower fuzzy entropy under the single attribute a including the user ; The calculation formula for the first outlier degree is: ; In the formula, is the cardinality of the user set , and abs(·) is the absolute value; The calculation formulas for the second upper granularity-related cardinality and the second lower granularity-related cardinality are: ; ; The calculation formulas for the second upper fuzzy relative entropy and the second lower fuzzy relative entropy are: ; ; In the formula, represents the second upper fuzzy entropy under the feature subset d without including the user ; represents the second upper fuzzy entropy under the feature subset d including the user ; represents the second lower fuzzy entropy under the feature subset d without including the user ; represents the second lower fuzzy entropy under the feature subset d including the user ; The calculation formula for the second outlier degree is: .
[0016] Furthermore, the calculation formula for the first weighted function is: ; The calculation formula for the second weighted function is: ; The calculation formula for the outlier score of each user is as follows: .
[0017] The present invention also provides a user electricity theft behavior detection system based on the entropy measure of fuzzy relations, including: A data acquisition module, configured to acquire the electricity consumption data of multiple users, and perform normalization processing on each piece of the electricity consumption data to obtain normalized data; A data processing module, configured to process each piece of the normalized data according to a metric algorithm to calculate the first membership relationship of each user under a single attribute set; A sequence construction module, configured to calculate the first upper fuzzy entropy and the first lower fuzzy entropy of each user under a single attribute set according to the first membership relationship, and construct a feature sequence of each user by using the first upper fuzzy entropy and the first lower fuzzy entropy to obtain a corresponding feature subset; A fuzzy entropy calculation module, configured to calculate the second membership relationship of each user under the feature subset according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset according to the second membership relationship; An outlier degree calculation module, configured to calculate the first outlier degree of each user under a single attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second outlier degree of each user under the feature subset according to the second upper fuzzy entropy and the second lower fuzzy entropy; An electricity theft judgment module, configured to construct a first weighted function of each user under a single attribute set and a second weighted function of each user under the feature subset, and calculate the outlier score of each user according to the first outlier degree, the first weighted function, the second outlier degree, and the second weighted function, and compare the outlier score with a preset outlier threshold to determine whether each user has an electricity theft behavior.
[0018] Further, the data processing module is specifically configured to: Calculate each piece of the normalized data based on fuzzy set theory and a preset fuzzy information system to calculate the first membership relationship of each user under a single attribute set:
[0019] In the formula, represents the membership degree between user and user , respectively represent the values of user and user under a single attribute set a.
[0020] Further, the sequence construction module is specifically configured to: Calculate the first upper granularity structure and the first lower granularity structure of each user under the single attribute set according to the first membership relationship:
[0021]
[0022] Among them, and are respectively called the upper fuzzy set and the lower fuzzy set of point relative to on the user set U; Define the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single attribute set by using the upper granularity structure and the first lower granularity structure: ; ; Construct the feature sequence of each user according to the first upper fuzzy entropy and the first lower fuzzy entropy: , ; Among them, represents the number of attributes in the single attribute set, , represents the attribute universe, represents the membership relationship of the feature subset , represents the upper fuzzy entropy of the feature subset , represents the lower fuzzy entropy of the feature subset , and the feature sequence is the maximum value of the upper fuzzy entropy and the lower fuzzy entropy of each feature and is arranged in descending order; Construct the corresponding feature subset according to the feature sequence: , ; At the same time, , and .
[0023] Further, the fuzzy entropy calculation module is specifically configured to: The calculation formula of the second membership relationship is: ; In the formula, is the feature subset of , e represents the attribute in the feature subset d, represents the user and the user membership degree between; Calculate the second upper granularity structure and the second lower granularity structure of each user under the feature subset according to the second membership relationship;
[0024]
[0025] In the formula, and are respectively called the upper fuzzy set and the lower fuzzy set of point relative to on the user set U; Calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset by using the second upper granularity structure and the second lower granularity structure: ; .
[0026] Furthermore, the outlier degree calculation module is specifically used for: Calculate the first upper granularity correlation cardinality, the first lower granularity correlation cardinality and the first weighted function of each user under the single attribute set according to the first upper granularity structure and the first lower granularity structure, and calculate the second upper granularity correlation cardinality, the second lower granularity correlation cardinality and the second weighted function of each user under the feature subset by using the second upper granularity structure and the second lower granularity structure; Calculate the first upper fuzzy relative entropy and the first lower fuzzy relative entropy of each user under the single attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second upper fuzzy relative entropy and the second lower fuzzy relative entropy of each user under the feature subset by using the second upper fuzzy entropy and the second lower fuzzy entropy; Calculate the first outlier degree of each user under the single attribute set according to the first upper fuzzy relative entropy, the first lower fuzzy relative entropy, the first upper granularity correlation cardinality and the first lower granularity correlation cardinality, and calculate the second outlier degree of each user under the feature subset by using the second upper fuzzy relative entropy, the second lower fuzzy relative entropy, the second upper granularity correlation cardinality and the second lower granularity correlation cardinality.
[0027] The present invention also proposes a storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned user electricity stealing behavior detection method based on fuzzy relation entropy measure is realized.
[0028] The present invention also provides a computer, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-described user electricity theft behavior detection method based on fuzzy relation entropy measure is implemented.
[0029] In the user electricity theft behavior detection method and system based on fuzzy relation entropy measure of the present invention, upper and lower granularity information spaces of a single user under attributes are used to design uncertainty information evaluation indexes such as upper fuzzy relative entropy and lower fuzzy relative entropy, calculate corresponding weights, construct upper granularity relative cardinality and lower granularity relative cardinality to characterize the quantitative relationship of users similar to this user, and design an index characterizing the degree of user outlier and an outlier score index for determining whether a user has abnormal behavior of electricity theft through six proposed measurement indexes, so as to solve the technical problems that the current user electricity theft behavior detection methods cannot effectively process uncertainty information and are highly dependent on the certainty information of data. By directly processing heterogeneous data through the method of fuzzy relation, the preprocessing step of discretizing numerical data is not required, effectively avoiding the loss of effective information of data. It is not necessary to use any labeled information for electricity theft behavior detection, which can effectively reduce the data preprocessing cost, and has the characteristics of strong applicability to various regions, effectively improving the efficiency of electricity theft behavior detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a flowchart of the user electricity theft behavior detection method based on fuzzy relation entropy measure in the first embodiment of the present invention; Figure 2 is a structural block diagram of the user electricity theft behavior detection system based on fuzzy relation entropy measure in the second embodiment of the present invention; Figure 3 is a structural block diagram of the computer in the third embodiment of the present invention.
[0031] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. SPECIFIC EMBODIMENTS
[0032] To facilitate understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present invention more thorough and comprehensive.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs. The terms used in the specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0034] Embodiment 1 Please refer to Figure 1 , which shows the user electricity theft behavior detection method based on entropy measure of fuzzy relation in the first embodiment of the present invention. The method specifically includes steps S101 to S106: S101. Obtain the electricity consumption data of multiple users, and perform normalization processing on each piece of the electricity consumption data to obtain normalized data; In specific implementation, obtain the electricity consumption data of multiple users, and perform normalization processing on each piece of the electricity consumption data to obtain normalized data. The electricity consumption data of multiple users is shown in Table 1: Table 1 Original data
[0035] The data samples of the fuzzy information system after standardization (normalization) processing are shown in Table 2: Table 2 Original data after standardization processing
[0036] In the data sample of Table 1, perform standardization processing on the attribute values respectively, and keep other data unchanged.
[0037] Among them, Table 1 gives the data samples of the fuzzy information system without standardization processing, and Table 2 is the data samples of the fuzzy information system after standardization processing. The fuzzy information system can be expressed as: ; Among them, ; Among them, and are interval-scale data, and are ordinal-scale data, is nominal-scale data.
[0038] S102. Process each piece of the normalized data according to the metric algorithm to calculate the first membership relationship of each user under the single-attribute set; In specific implementation, based on the fuzzy set theory and a preset fuzzy information system, calculate each of the normalized data to calculate the first membership relationship of each user under a single attribute set:
[0039] In the formula, represents the membership degree between user and user ; respectively represent the values of user and user under the single attribute set a.
[0040] Specifically, the membership relationships under the attributes are calculated as follows and represented using matrices: ; ; ; ; .
[0041] S103. Calculate the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single attribute set according to the first membership relationship, and construct a feature sequence for each user using the first upper fuzzy entropy and the first lower fuzzy entropy to obtain a corresponding feature subset; Further, calculate the first upper granularity structure and the first lower granularity structure of each user under the single attribute set according to the first membership relationship:
[0042]
[0043] Among them, and are respectively called the upper fuzzy set and the lower fuzzy set of point relative to on the user set U; Define the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single attribute set using the upper granularity structure and the first lower granularity structure: ; ; Among them, represents the number of users; Construct a feature sequence for each user according to the first upper fuzzy entropy and the first lower fuzzy entropy: , ; Among them, represents the number of attributes in a single-attribute set, , represents the entire set of attributes, represents the membership relationship of the feature subset , represents the upper fuzzy entropy of the feature subset , represents the lower fuzzy entropy of the feature subset . The feature sequence is the maximum value of the upper fuzzy entropy and the lower fuzzy entropy of each feature and is arranged in descending order; Construct the corresponding feature subset according to the feature sequence: , ; Meanwhile, , and .
[0044] In specific implementation, construct the first upper granularity structure and the first lower granularity structure under a single-attribute set.
[0045] Taking the single-attribute as an example: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Calculate the first upper fuzzy entropy and the first lower fuzzy entropy under each single-attribute based on the first upper granularity information granule and the first lower granularity information granule under a single-attribute.
[0046] , 1.9879, , , ; , 1.9194, , , ; Specifically, according to the first upper fuzzy entropy and the first lower fuzzy entropy, a feature sequence related to the user is constructed.
[0047] Take the maximum values of the first upper fuzzy entropy and the first lower fuzzy entropy under each attribute, and arrange the uncertainty information of the attributes in descending order.
[0048] The obtained relevant attribute sequence is . The more forward the attribute sequence is, the more important the attribute is. Each time an attribute is taken out, the following attribute sequence can be constructed , , , , .
[0049] S104. Calculate the second membership relationship of each user under the feature subset according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset according to the second membership relationship; Further, the calculation formula of the second membership relationship is: ; In the formula, is the feature subset of, e represents the attribute in the feature subset d, represents the membership degree between user and user under the attribute e; Calculate the second upper granularity structure and the second lower granularity structure of each user under the feature subset according to the second membership relationship;
[0050]
[0051] In the formula, and are respectively called the upper fuzzy set and the lower fuzzy set of point relative to on the user set U; Calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset by using the second upper granularity structure and the second lower granularity structure: ; .
[0052] In specific implementation, calculate the second membership relationship under the attribute of the feature subset in the fuzzy information system. The membership relationship calculation for the feature subset is as follows. Taking the feature subset C = as an example, for the same group of objects, take the minimum value of the membership relationship under a single attribute as the second membership relationship of the attribute subset.
[0053] ; Construct the second upper granularity structure and the second lower granularity structure under the feature subset. Taking the feature subset C = as an example: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Furthermore, based on the second upper granularity information granule and the second lower granularity information granule under the feature subset, calculate the second upper fuzzy entropy and the second lower fuzzy entropy under the feature subset.
[0054] Taking the feature subset C = as an example 2.1509; 2.1242; S105. Calculate the first outlier degree of each user under the single-attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second outlier degree of each user under the feature subset according to the second upper fuzzy entropy and the second lower fuzzy entropy; Further, calculate the first upper granularity correlation cardinality, the first lower granularity correlation cardinality, and the first weighted function of each user under the single-attribute set according to the first upper granularity structure and the first lower granularity structure, and use the second upper granularity structure and the second lower granularity structure to calculate the second upper granularity correlation cardinality, the second lower granularity correlation cardinality, and the second weighted function of each user under the feature subset; Calculate the first upper fuzzy relative entropy and the first lower fuzzy relative entropy of each user under the single-attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and use the second upper fuzzy entropy and the second lower fuzzy entropy to calculate the second upper fuzzy relative entropy and the second lower fuzzy relative entropy of each user under the feature subset; Calculate the first outlier degree of each user under the single-attribute set according to the first upper fuzzy relative entropy, the first lower fuzzy relative entropy, the first upper granularity correlation cardinality, and the first lower granularity correlation cardinality, and use the second upper fuzzy relative entropy, the second lower fuzzy relative entropy, the second upper granularity correlation cardinality, and the second lower granularity correlation cardinality to calculate the second outlier degree of each user under the feature subset.
[0055] Among them, the calculation formulas for the first upper granularity correlation cardinality and the first lower granularity correlation cardinality are: ; ; The calculation formulas for the first upper fuzzy relative entropy and the first lower fuzzy relative entropy are: ; ; In the formula, represents the first upper fuzzy entropy of the single-attribute a without including user ; represents the first upper fuzzy entropy of the single-attribute a including user ; represents the first lower fuzzy entropy of the single-attribute a without including user ; represents the first lower fuzzy entropy of the single-attribute a including user ; The calculation formula for the first outlier degree is: ; In the formula, For the user set the cardinality of, abs(·) is the absolute value; The calculation formulas for the second upper granularity-related cardinality and the second lower granularity-related cardinality are: ; ; The calculation formulas for the second upper fuzzy relative entropy and the second lower fuzzy relative entropy are: ; ; In the formula, represents the second upper fuzzy entropy of not including user under the feature subset d; represents the second upper fuzzy entropy of including user under the feature subset d; represents the second lower fuzzy entropy of not including user under the feature subset d; represents the second lower fuzzy entropy of including user under the feature subset d; The calculation formula for the second outlier degree is: .
[0056] In specific implementation, according to the first upper fuzzy entropy and the first lower fuzzy entropy under a single attribute, calculate the first upper fuzzy relative entropy and the first lower fuzzy relative entropy of each user under the single attribute The calculated results of the first upper fuzzy relative entropy and the first lower fuzzy relative entropy are represented by a matrix. Taking the upper fuzzy relative entropy and the lower fuzzy relative entropy under a single attribute as an example, each row represents user ~ , and each column represents , as shown in the following matrix
[0057]
[0058] Specifically, according to the first upper granularity information granule and the first lower granularity information granule under a single attribute, calculate the first upper granularity relative cardinality and the first lower granularity relative cardinality under the single attribute.
[0059] Taking the upper granularity relative cardinality of user under attribute as an example: ; ; The upper-granularity relative cardinality and lower-granularity relative cardinality of other users under a single attribute can be obtained in the same way.
[0060] Using the above first upper fuzzy relative entropy, first lower fuzzy relative entropy, first upper-granularity related cardinality, and first lower-granularity related cardinality, calculate the outlier degree of each user under a single attribute, that is, the first outlier degree.
[0061] Taking the user under the attribute as an example for calculating the outlier degree: ; The outlier degrees of other users can be calculated in the same way.
[0062] Furthermore, based on the second upper fuzzy entropy and second lower fuzzy entropy under the feature subset, calculate the second upper fuzzy relative entropy and second lower fuzzy relative entropy of each user under the feature subset in the feature sequence The calculated results of the second upper fuzzy relative entropy and second lower fuzzy relative entropy are represented by a matrix. Taking the second upper fuzzy relative entropy and second lower fuzzy relative entropy under the feature subset in the feature sequence as an example, each row represents the user ~ respectively, and each column represents the feature subset in the feature sequence as shown in the following matrix ; ; Specifically, based on the second upper-granularity information granule and second lower-granularity information granule under the feature subset in the feature sequence, calculate the second upper-granularity relative cardinality and second lower-granularity relative cardinality under the feature subset in the feature sequence.
[0063] Taking the user under the feature subset C = in the feature sequence as an example for the second upper-granularity relative cardinality and second lower-granularity relative cardinality: ; ; The second upper-granularity relative cardinality and second lower-granularity relative cardinality of other users under the feature subset in the feature sequence can be obtained in the same way.
[0064] Using the above second upper fuzzy relative entropy, second lower fuzzy relative entropy, second upper-granularity related cardinality, and second lower-granularity related cardinality, calculate the second outlier degree of each user under the feature subset: Taking the user under the feature subset C = in the feature sequence as an example for calculating the outlier degree: ; Other users can calculate it in the same way.
[0065] S106. Construct the first weighted function of each user under the single attribute set and the second weighted function of each user under the feature subset, and calculate the outlier scores of each user according to the first outlier degree, the first weighted function, the second outlier degree, and the second weighted function. Compare the outlier scores with a preset outlier threshold to determine whether each user has electricity theft behavior.
[0066] Further, the calculation formula of the first weighted function is: ; The calculation formula of the second weighted function is: ; The calculation formula of the outlier score of each user is: .
[0067] In specific implementation, calculate the weight of each user under each single attribute, that is, the first weighted function.
[0068] Taking user under attribute as an example for weight calculation: ; Other users can calculate it in the same way.
[0069] Specifically, calculate the weight of each user under the feature subset in the feature sequence, that is, the second weighted function.
[0070] Taking user under the feature subset C = in the feature sequence as an example for weight calculation: ; Other users can calculate it in the same way.
[0071] Calculate the outlier analysis of each user according to the above two outlier degrees and the corresponding weights. Taking the outlier score calculation of user under attribute as an example: ; The outlier scores of other users can be calculated in the same way = 0.0074, = 0.0156, = 0.0327, = 0.0169, = 0.0064, = 0.0066, = 0.0257; Set the threshold value to 0.02, compare the outlier score of each user with the threshold value, and those greater than the threshold value are outliers. The user has the characteristics of electricity theft behavior, where the and outlier scores of are greater than the threshold value, and the user set , do not have the behavior of electricity theft.
[0072] In summary, the user electricity theft behavior detection method based on the entropy measure of fuzzy relations in the above embodiments of the present invention designs uncertainty information evaluation indexes such as upper fuzzy relative entropy and lower fuzzy relative entropy by using the upper and lower granularity information spaces of a single user under attributes, calculates the corresponding weights, constructs the upper granularity relative cardinality and the lower granularity relative cardinality to characterize the quantitative relationship of users similar to this user, designs an index representing the degree of user outlier and an outlier score index for determining whether a user has an abnormal behavior of electricity theft behavior through six proposed measurement indexes, so as to solve the technical problems that the current user electricity theft behavior detection method cannot effectively process uncertainty information and has a strong dependence on the deterministic information of data. By directly processing heterogeneous data through the method of fuzzy relations, there is no need for a preprocessing step of discretizing numerical data, effectively avoiding the loss of effective information of data, and not requiring any labeled information for electricity theft behavior detection, which can effectively reduce the data preprocessing cost and has the characteristics of strong applicability to various regions, effectively improving the efficiency of electricity theft behavior detection.
[0073] Embodiment 2 On the other hand, the present invention also proposes a user electricity theft behavior detection system based on the entropy measure of fuzzy relations. Please refer to Figure 2 , which shows the user electricity theft behavior detection system based on the entropy measure of fuzzy relations in the second embodiment of the present invention. The system includes: A data acquisition module 11, configured to acquire the electricity consumption data of multiple users and perform normalization processing on each of the electricity consumption data to obtain normalized data; A data processing module 12, configured to process each of the normalized data according to a metric algorithm to calculate the first membership relationship of each user under a single attribute set; A sequence construction module 13, configured to calculate the first upper fuzzy entropy and the first lower fuzzy entropy of each user under a single attribute set according to the first membership relationship, and construct a feature sequence of each user by using the first upper fuzzy entropy and the first lower fuzzy entropy to obtain a corresponding feature subset; The fuzzy entropy calculation module 14 is configured to calculate the second membership relationship of each user under the feature subset according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset according to the second membership relationship; The outlier degree calculation module 15 is configured to calculate the first outlier degree of each user under the single-attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second outlier degree of each user under the feature subset according to the second upper fuzzy entropy and the second lower fuzzy entropy; The electricity theft judgment module 16 is configured to construct the first weighted function of each user under the single-attribute set and the second weighted function of each user under the feature subset, and calculate the outlier score of each user according to the first outlier degree, the first weighted function, the second outlier degree, and the second weighted function, and compare the outlier score with a preset outlier threshold to determine whether each user has electricity theft behavior.
[0074] Further, the data processing module 11 is specifically configured to: Calculate each of the normalized data based on the fuzzy set theory and a preset fuzzy information system to calculate the first membership relationship of each user under the single-attribute set:
[0075] where represents the user and the user the membership degree between, respectively represent the user and the user the values under the single-attribute set a.
[0076] Further, the sequence construction module 13 is specifically configured to: Calculate the first upper granularity structure and the first lower granularity structure of each user under the single-attribute set according to the first membership relationship:
[0077]
[0078] where and are respectively called the upper fuzzy set and the lower fuzzy set of the point relative to on the user set U; Define the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single-attribute set by using the upper granularity structure and the first lower granularity structure: ; ; Among them, represents the number of users; Construct the feature sequence of each user according to the first upper fuzzy entropy and the first lower fuzzy entropy: , ; Among them, represents the number of attributes in the single-attribute set, , represents the attribute universe, represents the membership relationship of the feature subset , represents the upper fuzzy entropy of the feature subset , represents the lower fuzzy entropy of the feature subset . The feature sequence is the maximum value of the upper fuzzy entropy and the lower fuzzy entropy of each feature and is arranged in descending order; Construct the corresponding feature subset according to the feature sequence: , ; At the same time, , and .
[0079] Furthermore, the fuzzy entropy calculation module 14 is specifically used for: The calculation formula of the second membership relationship is: ; In the formula, is the feature subset of , e represents the attribute in the feature subset d, represents the membership degree between user and user under the attribute e; Calculate the second upper granularity structure and the second lower granularity structure of each user under the feature subset according to the second membership relationship;
[0080]
[0081] In the formula, and are respectively called the upper fuzzy set and the lower fuzzy set of the point relative to on the user set U; Calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset by using the second upper granularity structure and the second lower granularity structure: ; 。
[0082] Further, the outlier degree calculation module 15 is specifically configured to: Calculate the first upper granularity correlation cardinality, the first lower granularity correlation cardinality, and the first weighted function of each user under the single attribute set according to the first upper granularity structure and the first lower granularity structure, and calculate the second upper granularity correlation cardinality, the second lower granularity correlation cardinality, and the second weighted function of each user under the feature subset by using the second upper granularity structure and the second lower granularity structure; Calculate the first upper fuzzy relative entropy and the first lower fuzzy relative entropy of each user under the single attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second upper fuzzy relative entropy and the second lower fuzzy relative entropy of each user under the feature subset by using the second upper fuzzy entropy and the second lower fuzzy entropy; Calculate the first outlier degree of each user under the single attribute set according to the first upper fuzzy relative entropy, the first lower fuzzy relative entropy, the first upper granularity correlation cardinality, and the first lower granularity correlation cardinality, and calculate the second outlier degree of each user under the feature subset by using the second upper fuzzy relative entropy, the second lower fuzzy relative entropy, the second upper granularity correlation cardinality, and the second lower granularity correlation cardinality.
[0083] The functions or operation steps implemented when the above modules and units are executed are substantially the same as those in the above method embodiment, and will not be described in detail here.
[0084] The user electricity theft behavior detection system based on the entropy measure of fuzzy relationship provided by the embodiment of the present invention has the same implementation principle and the same technical effects as those in the foregoing method embodiment. For a brief description, for the parts not mentioned in the system embodiment, reference may be made to the corresponding content in the foregoing method embodiment.
[0085] Embodiment III The present invention also proposes a computer. Please refer to Figure 3 , which shows the computer in the third embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored on the memory 10 and executable on the processor 20. When the processor 20 executes the computer program 30, the above-mentioned method for detecting user electricity theft behavior based on the entropy measure of fuzzy relationship is implemented.
[0086] Among them, the memory 10 includes at least one type of storage medium, and the storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disc, etc. The memory 10 can be an internal storage unit of a computer in some embodiments, such as the hard disk of the computer. The memory 10 can also be an external storage device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 10 can also include both an internal storage unit of a computer and an external storage device. The memory 10 can be used not only to store application software installed on the computer and various types of data, but also to temporarily store data that has been output or will be output.
[0087] Among them, the processor 20 can be an Electronic Control Unit (ECU, also known as a vehicle computer), a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments, and is used to run the program code stored in the memory 10 or process data, such as executing an access restriction program, etc.
[0088] It should be noted that Figure 3 The structure shown does not constitute a limitation on the computer. In other embodiments, the computer may include fewer or more components than shown in the figure, or combine certain components, or have a different component layout.
[0089] An embodiment of the present invention also proposes a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the user electricity theft behavior detection method based on the entropy measure of the fuzzy relationship as described above.
[0090] Those skilled in the art can understand that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device.
[0091] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection (electronic device) having one or more wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then storing it in a computer memory.
[0092] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: a discrete logic circuit having logic gate circuits for implementing logical functions on data signals, an application specific integrated circuit having appropriate combinational logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0093] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as falling within the scope described in this specification.
[0094] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A method for detecting users' electricity theft behavior based on entropy measure of fuzzy relation, characterized in that Including: Obtain the power consumption data of multiple users, and perform normalization processing on each piece of the power consumption data to obtain normalized data; Process each piece of the normalized data according to a metric algorithm to calculate the first membership relationship of each user under a single attribute set; Calculate the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single attribute set according to the first membership relationship, and construct a feature sequence of each user by using the first upper fuzzy entropy and the first lower fuzzy entropy to obtain a corresponding feature subset; Calculate the second membership relationship of each user under the feature subset according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset according to the second membership relationship; Calculate the first outlier degree of each user under the single attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second outlier degree of each user under the feature subset according to the second upper fuzzy entropy and the second lower fuzzy entropy; Construct a first weighted function of each user under the single attribute set and a second weighted function of each user under the feature subset, and calculate the outlier score of each user according to the first outlier degree, the first weighted function, the second outlier degree, and the second weighted function, and compare the outlier score with a preset outlier threshold to determine whether each user has electricity theft behavior.
2. The method for detecting user's electricity theft behavior based on entropy measure of fuzzy relation according to claim 1, characterized in that The step of processing each piece of the normalized data according to a metric algorithm to calculate the first membership relationship of each user under a single attribute set includes: Calculate the first membership relationship of each user under the single attribute set by performing calculations on each piece of the normalized data based on fuzzy set theory and a preset fuzzy information system: In the formula, represents the membership degree between user and user respectively represent the values of user and user under the single-attribute set a.
3. The method for detecting user's electricity theft behavior based on the entropy measure of fuzzy relation according to claim 2, characterized in that, The step of calculating the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single attribute set according to the first membership relationship, and constructing a feature sequence of each user by using the first upper fuzzy entropy and the first lower fuzzy entropy to obtain a corresponding feature subset includes: Calculate the first upper granularity structure and the first lower granularity structure of each user under the single attribute set according to the first membership relationship; Among them, and are respectively called the upper fuzzy set and the lower fuzzy set of point with respect to on the user set U; Define the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single attribute set by using the upper granularity structure and the first lower granularity structure; ; ; Among them, represents the number of users; Construct a feature sequence of each user according to the first upper fuzzy entropy and the first lower fuzzy entropy; , ; Among them, represents the number of attributes in a single-attribute set, , represents the universal set of attributes, represents the membership relationship of the feature subset ; represents the upper fuzzy entropy of the feature subset ; represents the lower fuzzy entropy of the feature subset , and the feature sequence is the maximum value of the upper fuzzy entropy and the lower fuzzy entropy of each feature and is arranged in descending order; Construct a corresponding feature subset according to the feature sequence; , ; Meanwhile, , and .
4. The method for detecting user's electricity theft behavior based on the entropy measure of fuzzy relation according to claim 3, characterized in that, The step of calculating the second membership relationship of each user under the feature subset according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculating the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset according to the second membership relationship includes: The calculation formula of the second membership relationship is: ; In the formula, is a characteristic subset of, where e represents an attribute in the characteristic subset d, represents the membership degree between user and user ; Calculate the second upper granularity structure and the second lower granularity structure of each user under the feature subset according to the second membership relationship; wherein, and are respectively called the upper fuzzy set and the lower fuzzy set of point with respect to on the user set U; Calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset by using the second upper granularity structure and the second lower granularity structure: ; 。 5. The method for detecting user's electricity stealing behavior based on the entropy measure of fuzzy relation according to claim 4, characterized in that, The steps of calculating the first outlier degree of each user under the single-attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculating the second outlier degree of each user under the feature subset according to the second upper fuzzy entropy and the second lower fuzzy entropy include: Calculating the first upper granularity correlation cardinality, the first lower granularity correlation cardinality, and the first weighted function of each user under the single-attribute set according to the first upper granularity structure and the first lower granularity structure, and calculating the second upper granularity correlation cardinality, the second lower granularity correlation cardinality, and the second weighted function of each user under the feature subset by using the second upper granularity structure and the second lower granularity structure; Calculating the first upper fuzzy relative entropy and the first lower fuzzy relative entropy of each user under the single-attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculating the second upper fuzzy relative entropy and the second lower fuzzy relative entropy of each user under the feature subset by using the second upper fuzzy entropy and the second lower fuzzy entropy; Calculating the first outlier degree of each user under the single-attribute set according to the first upper fuzzy relative entropy, the first lower fuzzy relative entropy, the first upper granularity correlation cardinality, and the first lower granularity correlation cardinality, and calculating the second outlier degree of each user under the feature subset by using the second upper fuzzy relative entropy, the second lower fuzzy relative entropy, the second upper granularity correlation cardinality, and the second lower granularity correlation cardinality.
6. The method for detecting user's electricity stealing behavior based on entropy measure of fuzzy relation according to claim 5, characterized in that, The calculation formulas for the first upper granularity correlation cardinality and the first lower granularity correlation cardinality are: ; ; The calculation formulas for the first upper fuzzy relative entropy and the first lower fuzzy relative entropy are: ; ; In the formula, represents the first upper fuzzy entropy under the single attribute a without the user ; represents the first upper fuzzy entropy under the single attribute a with the user ; represents the first lower fuzzy entropy under the single attribute a without the user ; represents the first lower fuzzy entropy under the single attribute a with the user ; The calculation formula for the first outlier degree is: ; wherein, is the cardinality of the user set , and abs(·) is the absolute value; The calculation formulas for the second upper granularity correlation cardinality and the second lower granularity correlation cardinality are: ; ; The calculation formulas for the second upper fuzzy relative entropy and the second lower fuzzy relative entropy are: ; ; In the formula, represents the second upper fuzzy entropy under the feature subset d without the user ; represents the second upper fuzzy entropy under the feature subset d with the user ; represents the second lower fuzzy entropy under the feature subset d without the user ; represents the second lower fuzzy entropy under the feature subset d with the user ; The calculation formula for the second outlier degree is: 。 7. The user electricity theft behavior detection method based on the entropy measure of fuzzy relation according to claim 6, characterized in that, The calculation formula for the first weighted function is: ; The calculation formula for the second weighted function is: ; The calculation formula for the outlier score of each user is: 。 8. A user electricity theft behavior detection system based on the entropy measure of fuzzy relations, characterized in that, Including: A data acquisition module, configured to acquire the power consumption data of multiple users, and perform normalization processing on each piece of the power consumption data to obtain normalized data; A data processing module, configured to process each piece of the normalized data according to a metric algorithm to calculate the first membership relationship of each user under the single-attribute set; A sequence construction module, configured to calculate the first upper fuzzy entropy and the first lower fuzzy entropy of each user under the single-attribute set according to the first membership relationship, and construct a feature sequence of each user by using the first upper fuzzy entropy and the first lower fuzzy entropy to obtain a corresponding feature subset; A fuzzy entropy calculation module, configured to calculate the second membership relationship of each user under the feature subset according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second upper fuzzy entropy and the second lower fuzzy entropy of each user under the feature subset according to the second membership relationship; An outlier degree calculation module, configured to calculate the first outlier degree of each user under a single attribute set according to the first upper fuzzy entropy and the first lower fuzzy entropy, and calculate the second outlier degree of each user under the feature subset according to the second upper fuzzy entropy and the second lower fuzzy entropy; A power theft judgment module, configured to construct a first weighted function of each user under a single attribute set and a second weighted function of each user under the feature subset, and calculate the outlier score of each user according to the first outlier degree, the first weighted function, the second outlier degree, and the second weighted function, and compare the outlier score with a preset outlier threshold to determine whether each user has a power theft behavior.
9. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the user power theft behavior detection method based on the entropy measure of fuzzy relationship according to any one of claims 1 to 7.
10. A computer, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the user power theft behavior detection method based on the entropy measure of fuzzy relationship according to any one of claims 1 to 7.