Electricity abnormity user data storage method and device, electronic equipment and readable medium
By clustering, generating similarity matrices, and classifying user data with abnormal electricity consumption, the problem of not being able to monitor and accurately detect users with abnormal electricity consumption in real time in existing technologies has been solved, thereby improving the stability and security of the power system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID HUBEI ELECTRIC POWER INFORMATION & TELECOMMUNICATION COMPANY
- Filing Date
- 2024-08-22
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, manual periodic meter calibration cannot monitor the behavior of users with abnormal electricity consumption in real time, which leads to a decrease in the stability and security of the power system. Furthermore, it cannot accurately detect data of users with abnormal electricity consumption, resulting in large errors in the power system and affecting normal operation.
By acquiring historical datasets of users with abnormal electricity consumption, clustering and similarity matrix generation are performed, and the data is filtered, classified, and detected. The data of users with abnormal electricity consumption is monitored and stored in real time, enabling dynamic updates.
It improves the accuracy of detecting abnormal power consumption data and the stability of the power system, reduces power loss, and ensures the safety and normal operation of the power system.
Smart Images

Figure CN119066580B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure relate to the field of computer technology, and more specifically to a method, apparatus, electronic device, and readable medium for storing user data in case of power outages. Background Technology
[0002] With the rapid advancement of the market economy and the rapid development of science and technology, the application scope of smart meters is expanding, and abnormal electricity consumption behavior is becoming increasingly difficult to detect. Classifying user data by level and conducting real-time monitoring can improve the stability and security of the power system. Furthermore, dynamically updating the database of users with abnormal electricity consumption can also enhance the stability and security of the power system. In addition, clustering large amounts of abnormal electricity consumption data to reduce errors can also improve the stability and security of the power system. Data storage for users with abnormal electricity consumption is a technology for storing such data. Currently, the common method for storing data on users with abnormal electricity consumption is to manually periodically verify the meters.
[0003] However, when using the above method, the following technical problems often arise:
[0004] First, manual, periodic meter verification cannot monitor the behavior of users with abnormal electricity consumption in real time, which may lead to power losses and reduce the stability and security of the power system. Second, the sheer volume of user data makes it difficult to accurately detect users with abnormal electricity consumption, resulting in significant errors in the storage of such data and thus affecting the normal operation of the power system.
[0005] Second, after storing the data of users with abnormal electricity consumption corresponding to at least one behavior detection result into the database of users with abnormal electricity consumption, it is impossible to dynamically update the database of users with abnormal electricity consumption. Furthermore, manual updates are prone to errors and are inefficient, which may result in insufficient detection of users with abnormal electricity consumption. This could lead to power loss in the power system and poor stability and security of the power system.
[0006] Third, when clustering large amounts of abnormal electricity consumption data, the identified operational behaviors of abnormal electricity consumption users may have significant errors, leading to a decrease in the accuracy of the results and consequently a decrease in the safety and stability of the power system.
[0007] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0008] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion that follows. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0009] Some embodiments of this disclosure provide methods, apparatus, electronic devices, and readable media for storing user data in case of power outages, in order to solve one or more of the technical problems mentioned in the background section above.
[0010] In a first aspect, some embodiments of this disclosure provide a method for storing data on users with abnormal electricity consumption. The method includes: acquiring a historical dataset of users with abnormal electricity consumption and a dataset of users to be tested, wherein the historical dataset of users with abnormal electricity consumption includes operational behavior data corresponding to the historical users with abnormal electricity consumption; performing clustering processing on the historical dataset of users with abnormal electricity consumption to obtain clustering results, thereby determining a target dataset of users with abnormal electricity consumption; generating a similarity user matrix based on the dataset of users to be tested and the target dataset of users with abnormal electricity consumption; filtering the similarity user matrix for target user data to obtain a filtered target dataset; classifying the filtered target dataset into different levels to obtain a divided target dataset; detecting abnormal electricity consumption behavior in at least one divided target user corresponding to a preset level in the divided target dataset to obtain a behavior detection result set, wherein the behavior detection results in the behavior detection result set represent abnormal behavior detection results and normal behavior detection results; issuing an early warning for at least one behavior detection result in the behavior detection result set that represents an abnormal behavior detection result; and storing the user data corresponding to the at least one behavior detection result representing abnormal electricity consumption behavior in a database of users with abnormal electricity consumption.
[0011] Secondly, some embodiments of this disclosure provide a data storage device for users with abnormal electricity consumption. The device includes: an acquisition unit configured to acquire a historical dataset of users with abnormal electricity consumption and a dataset of users to be tested, wherein the historical dataset of users with abnormal electricity consumption includes operational behavior data corresponding to the historical users with abnormal electricity consumption; a clustering unit configured to perform clustering processing on the historical dataset of users with abnormal electricity consumption to obtain clustering results, thereby determining a target dataset of users with abnormal electricity consumption; a generation unit configured to generate a similarity user matrix based on the dataset of users to be tested and the target dataset of users with abnormal electricity consumption; and a filtering unit configured to filter the similarity user matrix for target user data to obtain a filtered result. The system comprises: a selected target user dataset; a partitioning unit configured to partition the selected target user dataset into different levels to obtain a partitioned target user dataset; a detection unit configured to detect abnormal electricity consumption behavior of at least one partitioned target user in the partitioned target user dataset corresponding to a preset level to obtain a behavior detection result set, wherein the behavior detection results in the behavior detection result set represent abnormal behavior detection results and normal behavior detection results; and a storage unit configured to issue an early warning for at least one behavior detection result in the behavior detection result set that represents an abnormal behavior detection result, and to store the abnormal electricity consumption user data corresponding to at least one behavior detection result representing abnormal electricity consumption behavior in an abnormal electricity consumption user database.
[0012] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0013] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0014] The above embodiments of this disclosure have the following beneficial effects: The electricity consumption anomaly user data storage method of some embodiments of this disclosure reduces power loss caused by the power system, improves the stability and security of the power system, and improves the accuracy of detecting electricity consumption anomaly user data, which is beneficial to the normal operation of the power system. Specifically, the reasons for power loss, reduced stability and security of the power system, and inaccurate detection of electricity consumption anomaly user data, affecting the normal operation of the power system, are: manual periodic meter verification cannot monitor the behavior of electricity consumption anomaly users in real time, which may lead to power loss and reduce the stability and security of the power system. Due to the large amount of user data, it is impossible to accurately detect electricity consumption anomaly user data when detecting electricity consumption anomaly users, resulting in a large error in the storage of electricity consumption anomaly user data, thereby affecting the normal operation of the power system. Based on this, the electricity consumption anomaly user data storage method of some embodiments of this disclosure first obtains a historical electricity consumption anomaly user dataset and a user dataset to be tested. The historical electricity consumption anomaly user dataset includes historical electricity consumption anomaly user data, which can provide convenience for subsequent operations. Then, the aforementioned historical abnormal electricity consumption user dataset is clustered to obtain clustering results, which are used to determine the target abnormal electricity consumption user dataset. This clustering of a large amount of user data improves the accuracy of detecting abnormal electricity consumption users. Next, a similarity user matrix is generated based on the aforementioned user dataset to be tested and the target abnormal electricity consumption user dataset, thereby improving the accuracy of detecting abnormal electricity consumption users. This also facilitates real-time monitoring of abnormal electricity consumption user data, reduces power losses in the power system, and improves the stability and security of the power system. Secondly, the target user data is filtered from the aforementioned similarity user matrix to obtain a filtered target user dataset, thus improving the efficiency of identifying potential abnormal electricity consumption users from a large amount of data. Thirdly, the filtered target user dataset is hierarchically divided to obtain a segmented target user dataset. This allows for prioritization of abnormal electricity consumption user data, improving the accuracy of detecting abnormal electricity consumption users and contributing to the normal operation of the power system. Then, abnormal electricity consumption behavior detection is performed on at least one target user of the corresponding preset level in the aforementioned segmented target user dataset to obtain a behavior detection result set. The behavior detection results in this set represent both abnormal and normal behavior detection results, thus enabling real-time monitoring of users with abnormal electricity consumption behavior. Finally, an alert is issued for at least one behavior detection result in the set that represents an abnormal behavior detection result, and the data corresponding to the at least one behavior detection result representing abnormal electricity consumption behavior is stored in the abnormal electricity consumption user database.This improves the stability and security of the power system. Consequently, it reduces power losses, enhances the stability and security of the power system, increases the accuracy of detecting abnormal power consumption data, and facilitates the normal operation of the power system. Attached Figure Description
[0015] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0016] Figure 1 This is a flowchart of some embodiments of the method for storing user data with abnormal electricity consumption according to this disclosure;
[0017] Figure 2 This is a schematic diagram of the structure of some embodiments of the power consumption anomaly user data storage device according to the present disclosure;
[0018] Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0019] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0020] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0021] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0022] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0023] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0024] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] Figure 1 This is a flow 100 of some embodiments of the power consumption anomaly user data storage method disclosed herein. The power consumption anomaly user data storage method includes the following steps:
[0026] Step 101: Obtain the historical dataset of users with abnormal electricity consumption and the dataset of users to be tested.
[0027] In some embodiments, the executing entity (e.g., a computing device) of the electricity consumption anomaly user data storage method can obtain a historical electricity consumption anomaly user dataset and a user dataset to be tested via a wired or wireless connection. The historical electricity consumption anomaly user data in the aforementioned historical electricity consumption anomaly user dataset includes: operation behavior data corresponding to the historical electricity consumption anomaly users.
[0028] Here, the user data to be tested in the aforementioned user dataset can refer to user data whose operational behavior data has not been tested. The historical abnormal electricity consumption user data in the aforementioned historical abnormal electricity consumption user dataset includes: operational behavior data corresponding to historical abnormal electricity consumption users. The aforementioned operational behavior data can refer to abnormal electricity consumption behavior data.
[0029] It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other currently known or future wireless connection methods.
[0030] It should be noted that the aforementioned computing devices can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. For example, the computing device can be the aforementioned target terminal. When the computing device is software, it can be installed on the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.
[0031] Step 102: Perform clustering processing on the above-mentioned historical abnormal electricity consumption user dataset to obtain clustering results, so as to determine the target abnormal electricity consumption user dataset.
[0032] In some embodiments, the aforementioned execution entity may perform clustering processing on the aforementioned historical abnormal electricity consumption user dataset to obtain clustering results, thereby determining the target abnormal electricity consumption user dataset.
[0033] Here, the "target abnormal electricity consumption user data" in the aforementioned target abnormal electricity consumption user dataset can refer to user data with a high probability of abnormal electricity consumption behavior. Here, the aforementioned clustering process can refer to K-Means clustering.
[0034] Optionally, the aforementioned executing entity can perform clustering processing on the aforementioned historical abnormal electricity consumption user dataset through the following steps to obtain clustering results, thereby determining the target abnormal electricity consumption user dataset:
[0035] The first step is to preprocess the above-mentioned historical abnormal electricity consumption user dataset to obtain the preprocessed abnormal electricity consumption user dataset.
[0036] Here, the data preprocessing mentioned above can refer to data cleaning. The preprocessed dataset of users with abnormal electricity consumption can refer to the set after removing duplicate and redundant data of users with abnormal electricity consumption.
[0037] The second step is to extract key features from the preprocessed dataset of users with abnormal electricity consumption to obtain a key feature set of the user data with abnormal electricity consumption.
[0038] Here, the aforementioned preset key features can refer to pre-defined key features. These key features can refer to electricity consumption characteristics. Alternatively, they can refer to electricity consumption time period characteristics.
[0039] The third step is to perform feature dimensionality reduction on the key feature set of the above-mentioned abnormal electricity consumption user data to obtain the dimensionality-reduced key feature set of abnormal electricity consumption user data.
[0040] The fourth step is to determine the electricity consumption pattern information corresponding to the preprocessed electricity consumption anomaly user dataset based on the key feature set of the dimensionality-reduced user data, thereby obtaining the electricity consumption pattern information set.
[0041] Here, the aforementioned electricity consumption pattern information set may include normal electricity consumption pattern information and abnormal electricity consumption pattern information.
[0042] As an example, the aforementioned execution entity can determine the electricity consumption pattern of the preprocessed electricity consumption anomaly user dataset corresponding to the key feature set of the dimensionality-reduced electricity consumption anomaly user data to obtain an electricity consumption pattern information set.
[0043] Fifth step: Based on the above electricity consumption pattern information set, select several user data from the preprocessed electricity consumption anomaly user dataset by performing a preset clustering, and obtain the selected electricity consumption anomaly user dataset.
[0044] Here, the aforementioned preset number of clusters can refer to the number of pre-defined cluster centers. For example, the aforementioned preset number of clusters could refer to 10. The aforementioned user data selection can refer to the random selection of user data.
[0045] As an example, the aforementioned executing entity can delete the electricity consumption pattern information that is classified as abnormal electricity consumption pattern information from the aforementioned electricity consumption pattern information set, resulting in a deleted electricity consumption pattern information set. Then, from the deleted electricity consumption pattern information set, a preset number of user data points are selected from the preprocessed abnormal electricity consumption user dataset, resulting in a selected abnormal electricity consumption user dataset.
[0046] Step 6: Determine the cluster mean of the selected dataset of users with abnormal electricity consumption, and obtain the cluster mean set corresponding to the data of users with abnormal electricity consumption.
[0047] Here, the cluster mean mentioned above can refer to the mean of the selected abnormal electricity user data in the selected abnormal electricity user data set.
[0048] Step 7: Remove the selected abnormal electricity user dataset from the above historical abnormal electricity user dataset to obtain the removed abnormal electricity user dataset.
[0049] Here, "removal" can refer to deletion.
[0050] Step 8: For each data point of the removed abnormal electricity consumption user in the above-mentioned removed abnormal electricity consumption user dataset, compare the cluster mean of the removed abnormal electricity consumption user data with the cluster mean of each abnormal electricity consumption user in the cluster mean set corresponding to the above-mentioned abnormal electricity consumption user data to generate a comparison result set.
[0051] Here, the comparison result in the above comparison result set can refer to the result that the cluster mean of the data of users with abnormal electricity consumption after removal is greater than the corresponding cluster mean of the data of users with abnormal electricity consumption.
[0052] Step 9: In response to determining that the number of the above comparison result set is equal to the number of preset times, merge the above comparison result set into cluster results.
[0053] Here, the aforementioned preset number of times can refer to a pre-set number of times. For example, the aforementioned preset number of times could refer to 20 times.
[0054] Step 10: Filter the data of users with abnormal electricity consumption based on the above clustering results to obtain the filtered dataset of users with abnormal electricity consumption, which will be used as the target dataset of users with abnormal electricity consumption.
[0055] The content in steps one through ten above constitutes an inventive point of this disclosure, solving the third technical problem mentioned in the background: "When clustering large amounts of abnormal electricity user data, the identified operational behaviors corresponding to the abnormal electricity user data may have significant errors, leading to decreased accuracy of the results and consequently a decrease in the safety and stability of the power system." Factors leading to a decrease in the safety and stability of the power system often include: when clustering large amounts of abnormal electricity user data, the identified operational behaviors corresponding to the abnormal electricity user data may have significant errors, leading to decreased accuracy of the results and consequently a decrease in the safety and stability of the power system. Solving these factors can improve the safety and stability of the power system. To achieve this effect, the first step involves preprocessing the aforementioned historical abnormal electricity user dataset to obtain a preprocessed abnormal electricity user dataset. The second step involves extracting preset key features from the preprocessed abnormal electricity user dataset to obtain a key feature set for the abnormal electricity user data. The third step involves performing feature dimensionality reduction on the key feature set of the abnormal electricity user data to obtain a dimensionality-reduced key feature set for the abnormal electricity user data. Step 4: Based on the key feature set of the dimensionality-reduced abnormal electricity consumption user data, determine the electricity consumption pattern information corresponding to the preprocessed abnormal electricity consumption user dataset, obtaining an electricity consumption pattern information set. Step 5: Based on the electricity consumption pattern information set, select several user data points from the preprocessed abnormal electricity consumption user dataset for a predetermined clustering, obtaining a selected abnormal electricity consumption user dataset. This reduces the amount of abnormal electricity consumption user data. Step 6: Determine the cluster mean of the selected abnormal electricity consumption user dataset, obtaining a cluster mean set corresponding to the abnormal electricity consumption user data. Step 7: Remove the selected abnormal electricity consumption user dataset from the historical abnormal electricity consumption user dataset, obtaining a removed abnormal electricity consumption user dataset. Step 8: For each removed abnormal electricity consumption user data point in the removed abnormal electricity consumption user dataset, compare the cluster mean of the removed abnormal electricity consumption user data with the cluster mean of each abnormal electricity consumption user data point in the corresponding cluster mean set to generate a comparison result set. This avoids large errors in the operational behaviors corresponding to the identified abnormal electricity consumption user data, improving the accuracy of the results and thus enhancing the safety and stability of the power system. The ninth step involves merging the above comparison result sets into cluster results to determine if the number of results corresponds to the preset number of comparisons. The tenth step involves filtering the abnormal electricity consumption user data from the clustering results to obtain a filtered abnormal electricity consumption user dataset, which serves as the target abnormal electricity consumption user dataset. This reduces the errors in the operational behaviors corresponding to the identified abnormal electricity consumption user data, thereby improving the safety and stability of the power system.
[0056] Step 103: Generate a similarity user matrix based on the above-mentioned user dataset to be tested and the above-mentioned target abnormal electricity consumption user dataset.
[0057] In some embodiments, the execution entity may generate a similarity user matrix based on the user dataset to be tested and the target abnormal electricity consumption user dataset.
[0058] Here, the aforementioned similarity user matrix can refer to the matrix composed of the similarity between the user data to be tested in the aforementioned user dataset to be tested and the target user data with abnormal electricity consumption in the aforementioned target user dataset with abnormal electricity consumption.
[0059] Optionally, the aforementioned executing entity can generate a similarity user matrix based on the aforementioned user dataset to be tested and the aforementioned target dataset of users with abnormal electricity consumption through the following steps:
[0060] The first step is to impute missing values in the above-mentioned user dataset to be tested, resulting in the imputed user dataset.
[0061] As an example, the aforementioned execution entity can use interpolation to fill in missing values in the aforementioned user dataset to be tested, thereby obtaining the filled user dataset.
[0062] The second step is to standardize the padded user dataset to obtain the processed user dataset.
[0063] The third step is to determine the similarity user matrix based on the target abnormal electricity consumption user dataset and the processed user dataset.
[0064] Optionally, the aforementioned executing entity can determine the similarity user matrix based on the aforementioned target abnormal electricity consumption user dataset and the aforementioned processed user dataset through the following steps:
[0065] The first step is to clean the target dataset of users with abnormal electricity consumption to obtain the cleaned user dataset.
[0066] The second step is to process the missing values in the cleaned user dataset to obtain the missing value-processed user dataset.
[0067] Here, the missing value handling mentioned above can refer to missing value imputation.
[0068] The third step is to perform data standardization on the user dataset after handling the missing values to obtain the standardized user dataset.
[0069] The fourth step is to determine the similarity between the standardized user data in the above standardized user dataset and the processed user data in the above processed user dataset, and obtain a similarity set.
[0070] Fifth, based on the above similarity set, construct a similarity matrix as a similarity user matrix, where the elements of the above similarity user matrix represent the similarity between the target abnormal electricity consumption user data in the target abnormal electricity consumption user dataset and the processed user data in the above processed user dataset.
[0071] As an example, the aforementioned execution entity can fill the empty matrix with each similarity from the aforementioned similarity set to obtain a similarity user matrix.
[0072] Step 104: Filter the target user data from the above similarity user matrix to obtain the filtered target user dataset.
[0073] In some embodiments, the execution entity may perform target user data filtering on the similarity user matrix to obtain a filtered target user dataset.
[0074] Here, the aforementioned target user data may refer to user data that is more likely to have abnormal electricity usage.
[0075] As an example, the aforementioned execution entity can assign similarity scores to each user data corresponding to the aforementioned similarity user matrix, obtaining a scoring result set. Then, the user data corresponding to scores higher than a preset score value in the scoring result set are further filtered to obtain a filtered target user dataset. The aforementioned preset score value can refer to a pre-defined score value. For example, the aforementioned preset score value could be 0.7. The similarity of the aforementioned user data is linearly related to the aforementioned scoring results.
[0076] Step 105: Divide the above-filtered target user dataset into different levels to obtain the divided target user dataset.
[0077] In some embodiments, the execution entity may classify the filtered target user dataset into different levels to obtain a divided target user dataset.
[0078] Here, the target user dataset after the above division includes: high-risk target user data, medium-risk target user data, and low-risk target user data.
[0079] Optionally, the aforementioned executing entity can perform the following steps to classify the filtered target user dataset into different levels, thereby obtaining the divided target user dataset:
[0080] The first step is to perform feature engineering on the above-screened target user dataset to obtain the processed target user dataset.
[0081] The second step is to perform data preprocessing on the target user dataset after the above processing to obtain the preprocessed target user dataset.
[0082] Here, the aforementioned data preprocessing can refer to data cleaning.
[0083] The third step is to sort the similarity of each preprocessed target user data in the preprocessed target user dataset to obtain a sorted target user data sequence.
[0084] Here, the sorting mentioned above can refer to sorting from smallest to largest.
[0085] The fourth step is to classify the sorted target user data sequence into different levels according to the preset level threshold, thereby obtaining the divided target user data sequence, which includes: first risk user data, second risk user data, and third risk user data.
[0086] Here, the aforementioned preset threshold levels can refer to "a threshold of 0.8 for the first level, 0.5 for the second level, and 0.2 for the third level." The aforementioned first-risk user data corresponds to the first-level threshold and can refer to "high-risk" user data. The aforementioned second-risk user data corresponds to the second-level threshold and can refer to "medium-risk" user data. The aforementioned third-risk user data corresponds to the third-level threshold and can refer to "low-risk" user data.
[0087] The fifth step is to examine the target user data sequence after the above division to obtain the examined target user dataset, which is used as the target user dataset after division.
[0088] Here, the aforementioned inspection may refer to a safety inspection.
[0089] Step 106: Perform abnormal electricity consumption behavior detection on at least one target user of the corresponding preset level in the above-mentioned target user dataset to obtain a behavior detection result set, wherein the behavior detection results in the above-mentioned behavior detection result set represent abnormal behavior detection results and normal behavior detection results.
[0090] In some embodiments, the execution entity may perform electricity consumption abnormality detection on at least one of the target users corresponding to a preset level in the target user dataset after division, and obtain a behavior detection result set, wherein the behavior detection results in the behavior detection result set represent abnormal behavior detection results and normal behavior detection results.
[0091] Here, the aforementioned preset level can refer to a pre-defined level. For example, the aforementioned preset level could refer to the first level corresponding to "high risk".
[0092] As an example, the aforementioned execution entity can determine the operational behavior corresponding to at least one target user at a preset level in the aforementioned segmented target user dataset, thereby obtaining an operational behavior set. In response to determining that abnormal electricity consumption operational behavior exists within the aforementioned operational behavior set, the operational behavior set is labeled with abnormal electricity consumption behavior, resulting in a labeled operational behavior information set. Then, the labeled operational behavior information set is used for detection, resulting in a behavior detection result set, wherein the behavior detection results in the aforementioned behavior detection result set represent abnormal behavior detection results and normal behavior detection results.
[0093] Step 107: Issue an early warning for at least one behavior detection result in the above behavior detection result set that represents an abnormal behavior detection result, and store the abnormal electricity user data corresponding to at least one behavior detection result that represents abnormal electricity consumption behavior into the abnormal electricity user database.
[0094] In some embodiments, the execution entity may issue an early warning for at least one behavior detection result in the behavior detection result set that represents an abnormal behavior detection result, and store the abnormal electricity user data corresponding to at least one behavior detection result representing abnormal electricity consumption behavior in the abnormal electricity user database.
[0095] Here, the aforementioned database of users with abnormal electricity consumption can refer to a database that stores data on users with abnormal electricity consumption. The aforementioned abnormal behavior detection results can refer to the results of behavior detection indicating abnormal electricity consumption.
[0096] Optionally, the aforementioned implementing entity may issue an early warning for at least one behavior detection result in the aforementioned behavior detection result set that represents an abnormal behavior detection result through the following steps, and store the abnormal electricity user data corresponding to at least one behavior detection result representing abnormal electricity consumption behavior into the abnormal electricity user database:
[0097] The first step is to determine the source table corresponding to at least one abnormal electricity user data in the aforementioned abnormal electricity user database and the condition list corresponding to at least one abnormal electricity user data in the aforementioned abnormal electricity user database.
[0098] Here, the aforementioned source table can refer to the data table in the database of users with abnormal electricity consumption that stores the corresponding sources of user data. The aforementioned source can also refer to the address source corresponding to the user data with abnormal electricity consumption. The aforementioned list of conditions may include, but is not limited to, at least one of the following: electricity consumption pattern condition, time condition.
[0099] The second step is to retrieve the operation behavior information corresponding to at least one user with abnormal electricity consumption from the database of users with abnormal electricity consumption, based on the name of the source table and the conditions in the condition list.
[0100] Here, the aforementioned database may refer to MySQL. The aforementioned operational behavior information may refer to abnormal electricity consumption behavior information. For example, the aforementioned operational behavior information may refer to the reading information of the metering device. The aforementioned metering device may refer to the electricity meter.
[0101] The third step is to perform frequency statistics on the operation behavior information corresponding to at least one user with abnormal electricity consumption, and obtain the statistical results, wherein the statistical results represent the number of times each operation behavior information occurs.
[0102] As an example, the aforementioned execution entity can iterate through the operation behavior information corresponding to at least one user with abnormal electricity consumption data and store it in an empty dictionary to obtain a dictionary containing operation behavior information. Here, the keys in the dictionary represent operation behavior information, and the values represent the frequency of the corresponding operation behavior information. Then, for each operation behavior information, in response to determining that the operation behavior information exists in the dictionary, the frequency of the corresponding operation behavior information is incremented by one. In response to determining that the operation behavior information does not exist in the dictionary, the operation behavior information is added to the dictionary, and the frequency corresponding to the operation behavior information is initialized. Finally, in response to determining that the traversal is complete, each operation behavior information and its corresponding value in the obtained dictionary are determined as the statistical result.
[0103] The fourth step is to set a preset baseline threshold, where the preset baseline threshold represents the maximum baseline value of the frequency of operation behavior information.
[0104] For example, the aforementioned preset baseline threshold could be 25.
[0105] Fifth step: In response to the determination that there is a statistical value in the statistical results that is greater than the preset baseline threshold, the operation behavior information corresponding to the statistical value in the statistical results that is greater than the preset baseline threshold is marked as abnormal operation behavior information.
[0106] Step 6: In response to determining that the above-mentioned operational behavior information is abnormal operational behavior information, create an abnormal electricity consumption detection model in the above-mentioned abnormal electricity consumption user database.
[0107] Here, the aforementioned electricity consumption anomaly detection model can refer to a model used to detect abnormal electricity consumption behavior of users corresponding to abnormal electricity consumption user data. The input of the aforementioned electricity consumption anomaly detection model can be the abnormal electricity consumption user data, and the output of the aforementioned electricity consumption anomaly detection model can be the abnormal electricity consumption behavior of the abnormal electricity consumption user.
[0108] Step 7: Based on the above-mentioned electricity consumption anomaly detection model, determine the electricity consumption anomaly mode corresponding to at least one electricity consumption anomaly user data, and obtain the electricity consumption anomaly mode for the electricity consumption anomaly user.
[0109] Step 8: Based on the above-mentioned abnormal electricity consumption users' application of abnormal electricity consumption methods, perform anomaly repair operations on the data of at least one abnormal electricity consumption user to obtain the abnormal repaired user dataset.
[0110] Here, the aforementioned anomaly repair operations can refer to operations that prevent abnormal electricity usage. For example, the aforementioned anomaly repair operations could refer to warning operations. Alternatively, the aforementioned anomaly repair operations could refer to power outage operations performed on the user.
[0111] Step 9: Determine the set of conditional parameter information in the user dataset after the above anomaly repair.
[0112] Here, the conditional parameter information in the above-mentioned conditional parameter information set can refer to electricity consumption threshold condition information. For example, the conditional parameter information in the above-mentioned conditional parameter information set can refer to an electricity consumption threshold of 900 kWh.
[0113] Step 10: In response to the determination that the above condition parameter information set meets the preset condition information set, the above-mentioned anomaly repaired user dataset is marked to obtain the marked user dataset.
[0114] Here, the aforementioned preset conditions can refer to pre-set conditions. For example, the aforementioned preset conditions could refer to the condition that "the electricity consumption threshold is less than 1000 kWh".
[0115] As an example, the aforementioned executing entity can mark each anomaly-repaired user data in the above anomaly-repaired user dataset as "non-power-use anomaly user data" to obtain the marked user dataset.
[0116] Step 11: In response to determining that each user in the above-mentioned marked user dataset accesses the above-mentioned abnormal electricity consumption user database, perform permission verification on each user in the above-mentioned marked user dataset to obtain the permission verification result.
[0117] Here, the aforementioned permission verification can refer to identity verification.
[0118] Step 12: Based on the above permission verification results, store the access log information corresponding to each user to obtain the access log information set.
[0119] Step 13: Perform real-time detection on the above-mentioned labeled user dataset and the above-mentioned access log information set to obtain the first detection result and the second detection result.
[0120] Here, the first detection result mentioned above refers to the detection result of the labeled user dataset. The second detection result mentioned above refers to the detection result of the access log information set.
[0121] As an example, the aforementioned executing entity can use monitoring equipment to perform real-time monitoring of the tagged user dataset and obtain the monitoring results. Here, the aforementioned monitoring equipment can refer to smart meter devices.
[0122] Step 14: In response to determining that the first detection result indicates an abnormality and the second detection result is abnormal, the electricity consumption abnormality user database is updated according to the labeled user dataset to obtain the updated electricity consumption abnormality user database.
[0123] As an example, the aforementioned executing entity can add the aforementioned labeled user dataset to the aforementioned electricity consumption anomaly user database, and remove at least one unlabeled user data corresponding to the aforementioned labeled user dataset from the aforementioned electricity consumption anomaly user database to obtain a removed electricity consumption anomaly user database, which serves as the updated electricity consumption anomaly user database.
[0124] The relevant content in steps one through fourteen above constitutes an inventive point of this disclosure, solving the second technical problem mentioned in the background art: "After storing the power consumption anomaly user data corresponding to at least one behavior detection result into the power consumption anomaly user database, the power consumption anomaly user database cannot be dynamically updated, and manual updates are prone to errors and are inefficient, resulting in insufficient detection of users with power consumption anomalies, which may lead to power loss in the power system and poor stability and security of the power system." Factors leading to poor stability and security of the power system are often as follows: After storing the power consumption anomaly user data corresponding to at least one behavior detection result into the power consumption anomaly user database, the power consumption anomaly user database cannot be dynamically updated, and manual updates are prone to errors and are inefficient, resulting in insufficient detection of users with power consumption anomalies, which may lead to power loss in the power system and poor stability and security of the power system. Solving these factors can improve the stability and security of the power system. To achieve this effect, the first step is to determine the source table corresponding to at least one power consumption anomaly user data in the aforementioned power consumption anomaly user database and the condition list corresponding to at least one power consumption anomaly user data in the aforementioned power consumption anomaly user database. The second step involves retrieving the operation behavior information corresponding to at least one user with abnormal electricity consumption from the database of users with abnormal electricity consumption, based on the names of the source tables and the conditions in the condition list. The third step involves performing frequency statistics on the operation behavior information corresponding to the at least one user with abnormal electricity consumption, obtaining statistical results, where the statistical results represent the frequency of occurrence of each operation behavior information. This allows for the detection of users with abnormal electricity consumption, reducing the possibility of power loss to the power system. The fourth step involves setting a preset baseline threshold, where the preset baseline threshold represents the maximum baseline value for the frequency of operation behavior information occurrences. The fifth step involves marking the operation behavior information corresponding to statistical results greater than the preset baseline threshold as abnormal operation behavior information, in response to the determination that there are statistical results greater than the preset baseline threshold. The sixth step involves creating an electricity consumption anomaly detection model in the database of users with abnormal electricity consumption, in response to the determination that the operation behavior information is abnormal, based on the electricity consumption anomaly detection model. The seventh step involves determining the electricity consumption anomaly mode corresponding to the at least one user with abnormal electricity consumption based on the electricity consumption anomaly detection model, obtaining the electricity consumption anomaly mode for each user with abnormal electricity consumption. Step 8: Based on the above-mentioned abnormal power consumption users' application of abnormal power consumption methods, perform anomaly repair operations on the data of at least one of the above-mentioned abnormal power consumption users to obtain an anomaly-repaired user dataset. Step 9: Determine the set of conditional parameter information in the above-mentioned anomaly-repaired user dataset. Step 10: In response to determining that the above-mentioned conditional parameter information set meets the preset conditional information set, mark the above-mentioned anomaly-repaired user dataset to obtain a marked user dataset. This improves the stability and security of the power system.
[0125] The above embodiments of this disclosure have the following beneficial effects: The electricity consumption anomaly user data storage method of some embodiments of this disclosure reduces power loss caused by the power system, improves the stability and security of the power system, and improves the accuracy of detecting electricity consumption anomaly user data, which is beneficial to the normal operation of the power system. Specifically, the reasons for power loss, reduced stability and security of the power system, and inaccurate detection of electricity consumption anomaly user data, affecting the normal operation of the power system, are: manual periodic meter verification cannot monitor the behavior of electricity consumption anomaly users in real time, which may lead to power loss and reduce the stability and security of the power system. Due to the large amount of user data, it is impossible to accurately detect electricity consumption anomaly user data when detecting electricity consumption anomaly users, resulting in a large error in the storage of electricity consumption anomaly user data, thereby affecting the normal operation of the power system. Based on this, the electricity consumption anomaly user data storage method of some embodiments of this disclosure first obtains a historical electricity consumption anomaly user dataset and a user dataset to be tested. The historical electricity consumption anomaly user dataset includes historical electricity consumption anomaly user data, which can provide convenience for subsequent operations. Then, the aforementioned historical abnormal electricity consumption user dataset is clustered to obtain clustering results, which are used to determine the target abnormal electricity consumption user dataset. This clustering of a large amount of user data improves the accuracy of detecting abnormal electricity consumption users. Next, a similarity user matrix is generated based on the aforementioned user dataset to be tested and the target abnormal electricity consumption user dataset, thereby improving the accuracy of detecting abnormal electricity consumption users. This also facilitates real-time monitoring of abnormal electricity consumption user data, reduces power losses in the power system, and improves the stability and security of the power system. Secondly, the target user data is filtered from the aforementioned similarity user matrix to obtain a filtered target user dataset, thus improving the efficiency of identifying potential abnormal electricity consumption users from a large amount of data. Thirdly, the filtered target user dataset is hierarchically divided to obtain a segmented target user dataset. This allows for prioritization of abnormal electricity consumption user data, improving the accuracy of detecting abnormal electricity consumption users and contributing to the normal operation of the power system. Then, abnormal electricity consumption behavior detection is performed on at least one target user of the corresponding preset level in the aforementioned segmented target user dataset to obtain a behavior detection result set. The behavior detection results in this set represent both abnormal and normal behavior detection results, thus enabling real-time monitoring of users with abnormal electricity consumption behavior. Finally, an alert is issued for at least one behavior detection result in the set that represents an abnormal behavior detection result, and the data corresponding to the at least one behavior detection result representing abnormal electricity consumption behavior is stored in the abnormal electricity consumption user database.This improves the stability and security of the power system. Consequently, it reduces power losses, enhances the stability and security of the power system, increases the accuracy of detecting abnormal power consumption data, and facilitates the normal operation of the power system.
[0126] Further reference Figure 2 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a method for storing user data with abnormal electricity consumption. These device embodiments are similar to... Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0127] like Figure 2 As shown, a data storage device 200 for users with abnormal electricity consumption in some embodiments includes: an acquisition unit 201, a clustering unit 202, a generation unit 203, a filtering unit 204, a partitioning unit 205, a detection unit 206, and a storage unit 207. The acquisition unit 201 is configured to acquire a historical dataset of users with abnormal electricity consumption and a dataset of users to be tested. The historical dataset of users with abnormal electricity consumption includes operational behavior data corresponding to the users with abnormal electricity consumption. The clustering unit 202 is configured to perform clustering processing on the historical dataset of users with abnormal electricity consumption to obtain clustering results, thereby determining a target dataset of users with abnormal electricity consumption. The generation unit 203 is configured to generate a similarity user matrix based on the dataset of users to be tested and the target dataset of users with abnormal electricity consumption. The filtering unit 204 is configured to filter the target user data on the similarity user matrix to obtain a filtered target user dataset. The partitioning unit 206... 05 is configured to classify the above-filtered target user dataset into different levels to obtain a divided target user dataset; detection unit 206 is configured to detect abnormal electricity consumption behavior of at least one divided target user in the above-defined target user dataset corresponding to a preset level to obtain a behavior detection result set, wherein the behavior detection results in the above-defined behavior detection result set represent abnormal behavior detection results and normal behavior detection results; storage unit 207 is configured to issue an early warning for at least one behavior detection result in the above-defined behavior detection result set that represents an abnormal behavior detection result, and to store the abnormal electricity consumption user data corresponding to at least one behavior detection result representing abnormal electricity consumption behavior in the abnormal electricity consumption user database.
[0128] It is understandable that the units described in the device 200 are related to the reference. Figure 1 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 200 and the units contained therein, and will not be repeated here.
[0129] The following is for reference. Figure 3 It shows a schematic diagram of the structure of an electronic device (such as a computing device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0130] like Figure 3 As shown, the electronic device 300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 304. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 304 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0131] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 3 Each box shown can represent a device or multiple devices as needed.
[0132] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 309, or installed from storage device 308, or installed from ROM 302. When the computer program is executed by processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.
[0133] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0134] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0135] The aforementioned computer-readable medium may be included within the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire a historical abnormal electricity consumption user dataset and a user dataset to be examined, wherein the historical abnormal electricity consumption user data in the aforementioned historical abnormal electricity consumption user dataset includes: operational behavior data corresponding to the historical abnormal electricity consumption users; perform clustering processing on the aforementioned historical abnormal electricity consumption user dataset to obtain clustering results, thereby determining a target abnormal electricity consumption user dataset; generate a similarity user matrix based on the aforementioned user dataset to be examined and the aforementioned target abnormal electricity consumption user dataset; and filter the target user data from the aforementioned similarity user matrix to obtain... The process involves: obtaining a filtered target user dataset; classifying the filtered target user dataset into different levels to obtain a segmented target user dataset; detecting abnormal electricity consumption behavior in at least one segmented target user corresponding to a preset level in the segmented target user dataset to obtain a behavior detection result set, wherein the behavior detection results in the behavior detection result set represent abnormal behavior detection results and normal behavior detection results; issuing an early warning for at least one behavior detection result in the behavior detection result set that represents an abnormal behavior detection result, and storing the abnormal electricity consumption user data corresponding to at least one behavior detection result representing abnormal electricity consumption behavior in the abnormal electricity consumption user database.
[0136] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0137] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0138] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor can be described as including: an acquisition unit, a clustering unit, a generation unit, a filtering unit, a partitioning unit, a detection unit, and a storage unit. The names of these units do not necessarily limit the unit itself; for example, a clustering unit can also be described as "a unit that performs clustering processing on the aforementioned historical abnormal electricity consumption user dataset to obtain clustering results, thereby determining the target abnormal electricity consumption user dataset."
[0139] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0140] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for storing user data with abnormal electricity consumption, comprising: Obtain a historical dataset of users with abnormal electricity consumption and a dataset of users to be tested. The historical dataset of users with abnormal electricity consumption includes the operational behavior data corresponding to the users with abnormal electricity consumption. Clustering is performed on the historical abnormal electricity consumption user dataset to obtain clustering results, thereby determining the target abnormal electricity consumption user dataset. The target abnormal electricity consumption user data in the target abnormal electricity consumption user dataset refers to the abnormal electricity consumption user data with a high probability of abnormal electricity consumption behavior. A similarity user matrix is generated based on the user dataset to be tested and the target dataset of users with abnormal electricity consumption. The similarity user matrix is filtered to obtain the filtered target user dataset; The filtered target user dataset is divided into levels to obtain the segmented target user dataset; Abnormal electricity consumption behavior detection is performed on at least one target user in the target user dataset corresponding to a preset level to obtain a behavior detection result set. The behavior detection results in the behavior detection result set represent abnormal behavior detection results and normal behavior detection results. The preset level refers to the first level corresponding to high risk. The system issues an early warning for at least one behavior detection result in the behavior detection result set that represents an abnormal behavior detection result, and stores the user data corresponding to the at least one behavior detection result representing abnormal electricity consumption behavior in the user database for abnormal electricity consumption. The step of clustering the historical abnormal electricity consumption user dataset to obtain clustering results and determine the target abnormal electricity consumption user dataset includes: The historical abnormal electricity consumption user dataset is preprocessed to obtain the preprocessed abnormal electricity consumption user dataset. Pre-defined key features are extracted from the preprocessed dataset of users with abnormal electricity consumption to obtain a key feature set of the user data with abnormal electricity consumption. The key feature set of the abnormal electricity consumption user data is subjected to feature dimensionality reduction to obtain the dimensionality-reduced key feature set of the abnormal electricity consumption user data; Based on the key feature set of the dimensionality-reduced abnormal electricity consumption user data, determine the electricity consumption pattern information corresponding to the preprocessed abnormal electricity consumption user dataset, and obtain the electricity consumption pattern information set. Based on the electricity consumption pattern information set, a number of user data are selected from the preprocessed electricity consumption abnormal user dataset by performing a preset clustering, and the selected electricity consumption abnormal user dataset is obtained. Determine the cluster mean of the selected dataset of users with abnormal electricity consumption to obtain the cluster mean set corresponding to the data of users with abnormal electricity consumption; The selected abnormal electricity consumption user dataset is removed from the historical abnormal electricity consumption user dataset to obtain the abnormal electricity consumption user dataset after removal. For each user data point in the dataset of users with abnormal electricity consumption after removal, the cluster mean of the user data point after removal is compared with the cluster mean of each user data point in the cluster mean set of the user data point with abnormal electricity consumption to generate a comparison result set. In response to determining that the number corresponding to the comparison result set is equal to the number corresponding to the preset number of times, the comparison result set is merged into a clustering result; The clustering results are then filtered to obtain a dataset of users with abnormal electricity consumption, which is used as the target dataset of users with abnormal electricity consumption.
2. The method according to claim 1, wherein, The step of generating a similarity user matrix based on the user dataset to be tested and the target dataset of users with abnormal electricity consumption includes: The missing value imputation process is performed on the user dataset to be tested to obtain the imputed user dataset; The padded user dataset is standardized to obtain the processed user dataset; Based on the target dataset of users with abnormal electricity consumption and the processed dataset of users, a similarity user matrix is determined.
3. The method according to claim 2, wherein, The step of determining a similarity user matrix based on the target abnormal electricity consumption user dataset and the processed user dataset includes: The target dataset of users with abnormal electricity consumption is cleaned to obtain a cleaned dataset. The cleaned user dataset is processed to remove missing values, resulting in a user dataset with missing values removed. The user dataset after missing value processing is subjected to data standardization processing to obtain a standardized user dataset; The similarity between the standardized user data in the standardized user dataset and the processed user data in the processed user dataset is determined to obtain a similarity set; Based on the similarity set, a similarity matrix is constructed as a similarity user matrix, wherein the elements corresponding to the similarity user matrix represent the similarity between the target abnormal electricity consumption user data in the target abnormal electricity consumption user dataset and the processed user data in the processed user dataset.
4. The method according to claim 1, wherein, The step of classifying the filtered target user dataset into different levels to obtain a divided target user dataset includes: The filtered target user dataset is subjected to feature engineering to obtain the processed target user dataset; The processed target user dataset is preprocessed to obtain a preprocessed target user dataset. The similarity of each preprocessed target user data in the preprocessed target user dataset is sorted to obtain a sorted target user data sequence. According to a preset level threshold, the sorted target user data sequence is divided into levels to obtain a divided target user data sequence, wherein the divided target user data sequence includes: first risk user data, second risk user data, and third risk user data. The segmented target user data sequence is examined to obtain the examined target user dataset, which is used as the segmented target user dataset.
5. A data storage device for users with abnormal power consumption, comprising: The acquisition unit is configured to acquire a historical abnormal electricity consumption user dataset and a user dataset to be tested, wherein the historical abnormal electricity consumption user data in the historical abnormal electricity consumption user dataset includes: operation behavior data corresponding to the historical abnormal electricity consumption users; Clustering units are configured to perform clustering processing on the historical abnormal electricity consumption user dataset to obtain clustering results, thereby determining the target abnormal electricity consumption user dataset, wherein the target abnormal electricity consumption user data in the target abnormal electricity consumption user dataset refers to the abnormal electricity consumption user data with a high probability of abnormal electricity consumption behavior. The generation unit is configured to generate a similarity user matrix based on the user dataset to be tested and the target dataset of users with abnormal electricity consumption. The filtering unit is configured to filter the target user data in the similarity user matrix to obtain a filtered target user dataset. A partitioning unit is configured to perform hierarchical partitioning on the filtered target user dataset to obtain a partitioned target user dataset. The detection unit is configured to perform abnormal electricity consumption behavior detection on at least one segmented target user in the segmented target user dataset corresponding to a preset level, and obtain a behavior detection result set, wherein the behavior detection results in the behavior detection result set represent abnormal behavior detection results and normal behavior detection results, and the preset level refers to the first level corresponding to high risk; The storage unit is configured to issue an early warning for at least one behavior detection result in the behavior detection result set that represents an abnormal behavior detection result, and to store the abnormal electricity user data corresponding to at least one behavior detection result representing abnormal electricity consumption behavior into the abnormal electricity user database. The clustering unit is further configured as follows: The historical abnormal electricity consumption user dataset is preprocessed to obtain the preprocessed abnormal electricity consumption user dataset. Pre-defined key features are extracted from the preprocessed dataset of users with abnormal electricity consumption to obtain a key feature set of the user data with abnormal electricity consumption. The key feature set of the abnormal electricity consumption user data is subjected to feature dimensionality reduction to obtain the dimensionality-reduced key feature set of the abnormal electricity consumption user data; Based on the key feature set of the dimensionality-reduced abnormal electricity consumption user data, determine the electricity consumption pattern information corresponding to the preprocessed abnormal electricity consumption user dataset, and obtain the electricity consumption pattern information set. Based on the electricity consumption pattern information set, a number of user data are selected from the preprocessed electricity consumption abnormal user dataset by performing a preset clustering, and the selected electricity consumption abnormal user dataset is obtained. Determine the cluster mean of the selected dataset of users with abnormal electricity consumption to obtain the cluster mean set corresponding to the data of users with abnormal electricity consumption; The selected abnormal electricity consumption user dataset is removed from the historical abnormal electricity consumption user dataset to obtain the abnormal electricity consumption user dataset after removal. For each user data point in the dataset of users with abnormal electricity consumption after removal, the cluster mean of the user data point after removal is compared with the cluster mean of each user data point in the cluster mean set of the user data point with abnormal electricity consumption to generate a comparison result set. In response to determining that the number corresponding to the comparison result set is equal to the number corresponding to the preset number of times, the comparison result set is merged into a clustering result; The clustering results are then filtered to obtain a dataset of users with abnormal electricity consumption, which is used as the target dataset of users with abnormal electricity consumption.
6. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 4.
7. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Power consumption anomaly classification method based on KNN neural network algorithm
CN114372808A
Method and system for identifying abnormal electricity users in power system
CN117171682A