Enterprise user industry classification abnormity identification method based on sample expansion

By combining the KNN-Bagging algorithm with the Transformer model, an anomaly identification index system was constructed using 96-point load data. This solved the problems of low computational efficiency and sample imbalance of the traditional KNN algorithm under large data volumes, and achieved efficient identification of industry classification anomalies for enterprise users.

CN120632704APending Publication Date: 2025-09-12STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510598821.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The traditional KNN algorithm has low computational efficiency and is susceptible to noise interference in large data volumes or high dimensions, resulting in low accuracy in identifying anomalies in industry classification for enterprise users and serious sample imbalance problems.

Method used

The KNN-Bagging algorithm is used to expand samples, generate multiple sub-training sets and train the KNN model in parallel. The Transformer algorithm is combined to build an industry anomaly recognition model. The 96-point load data is used to build an anomaly classification and recognition indicator system and reconstruct the label library to automatically identify abnormal users.

Benefits of technology

It improves the accuracy of anomaly identification in industry classification for enterprise users, reduces model variance, enhances generalization ability, and solves the problem of sample imbalance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632704A_ABST
    Figure CN120632704A_ABST
Patent Text Reader

Abstract

The invention provides an enterprise user industry classification abnormity identification method based on sample expansion. The method comprises the steps that enterprise power consumption data are acquired, sample expansion is carried out on the enterprise power consumption data based on a KNN-Bagging algorithm, new enterprise power consumption data are obtained, and the new enterprise power consumption data comprise 96-point load data; based on 96-point load data, an industry anomaly classification and identification index system is constructed; the industry classification anomaly index system data and the user tag data are reconstructed to form an industry classification anomaly tag library; and constructing an industry anomaly identification model by using a Transform algorithm, and automatically outputting industry anomaly or potential anomaly users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method for identifying anomalies in industry classification of enterprise users based on sample expansion. Background Art

[0002] The traditional KNN algorithm needs to calculate the distance between each test sample and all training samples. When the data volume or dimension is large, the computational efficiency drops significantly, and the selection of the K value is easily affected by noise, resulting in overfitting and sample imbalance. Summary of the Invention

[0003] This application provides a method for identifying anomalies in enterprise user industry classification based on sample expansion to solve the technical problem of low anomaly identification accuracy.

[0004] In a first aspect, the present application provides a method for identifying anomalies in enterprise user industry classification based on sample expansion, comprising:

[0005] Obtaining enterprise electricity consumption data, and performing sample expansion on the enterprise electricity consumption data based on a KNN-Bagging algorithm to obtain new enterprise electricity consumption data, wherein the new enterprise electricity consumption data includes 96-point load data;

[0006] Based on the 96-point load data, an industry abnormality classification and identification indicator system is constructed;

[0007] Reconstruct the industry classification anomaly indicator system data and user label data to form an industry classification anomaly label library;

[0008] Use the Transformer algorithm to build an industry anomaly recognition model to automatically output industry anomalies or potential abnormal users.

[0009] Optionally, based on the KNN-Bagging algorithm, sample expansion is performed on the enterprise electricity consumption data to obtain new enterprise electricity consumption data, including:

[0010] Self-service sampling is performed on the enterprise electricity consumption data to generate multiple sub-training sets.

[0011] A KNN-Bagging model is trained for each sub-training set, and the K value or distance metric is set differently to increase diversity.

[0012] Optionally, the industry anomaly classification and identification indicator system includes load rate, peak load rate, flat load rate, daily peak-to-valley difference rate and valley load rate.

[0013] Optionally, use the Transformer algorithm to build an industry anomaly recognition model to automatically output industry anomalies or potential anomaly users, including:

[0014] Reconstruct enterprise indicator values ​​and abnormal labels to build an industry classification abnormal label library;

[0015] The Transformer algorithm is used to train the model, and the new enterprise electricity consumption data is imported for automatic identification to obtain abnormal or potentially abnormal users.

[0016] Optionally, obtain enterprise electricity consumption data, including:

[0017] In response to the analysis instruction, obtaining initial power usage data;

[0018] The enterprise electricity consumption data is obtained according to the initial electricity consumption data and the corresponding collection time.

[0019] Optionally, obtaining the enterprise electricity consumption data according to the initial electricity consumption data and its corresponding collection time includes:

[0020] The initial electricity usage data is grouped according to the initial electricity usage data and its corresponding collection time to obtain the enterprise electricity usage data, wherein the enterprise electricity usage data includes initial electricity usage data in different time periods.

[0021] In a second aspect, the present application provides a device for identifying anomalies in industry classification of enterprise users based on sample expansion, comprising:

[0022] An acquisition module is used to acquire enterprise electricity consumption data and perform sample expansion on the enterprise electricity consumption data based on a KNN-Bagging algorithm to obtain new enterprise electricity consumption data, wherein the new enterprise electricity consumption data includes 96-point load data;

[0023] A first processing module is used to construct an industry abnormality classification and identification indicator system based on the 96-point load data;

[0024] The second processing module is used to reconstruct the industry classification abnormality indicator system data and user label data to form an industry classification abnormality label library;

[0025] The classification module is used to build an industry anomaly recognition model using the Transformer algorithm and automatically output industry anomalies or potential abnormal users.

[0026] Optionally, the acquisition module, when executing the KNN-Bagging algorithm to perform sample expansion on the enterprise electricity consumption data to obtain new enterprise electricity consumption data, is configured to:

[0027] Self-service sampling is performed on the enterprise electricity consumption data to generate multiple sub-training sets.

[0028] A KNN-Bagging model is trained for each sub-training set, and the K value or distance metric is set differently to increase diversity.

[0029] Optionally, the above-mentioned generation module, when executing the Transformer algorithm to build an industry anomaly recognition model and automatically output industry anomaly or potential anomaly users, is used to:

[0030] Reconstruct enterprise indicator values ​​and abnormal labels to build an industry classification abnormal label library;

[0031] The Transformer algorithm is used to train the model, and the new enterprise electricity consumption data is imported for automatic identification to obtain abnormal or potentially abnormal users.

[0032] Optionally, the acquisition module, when acquiring the enterprise electricity consumption data, is used to:

[0033] In response to the analysis instruction, obtaining initial power usage data;

[0034] The enterprise electricity consumption data is obtained according to the initial electricity consumption data and the corresponding collection time.

[0035] Optionally, when obtaining the enterprise electricity consumption data based on the initial electricity consumption data and its corresponding collection time, the acquisition module is configured to:

[0036] The initial electricity usage data is grouped according to the initial electricity usage data and its corresponding collection time to obtain the enterprise electricity usage data, wherein the enterprise electricity usage data includes initial electricity usage data in different time periods.

[0037] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0038] The memory stores computer-executable instructions;

[0039] The processor executes the computer-executable instructions stored in the memory to implement the enterprise user industry classification anomaly identification method based on sample expansion as described in any one of the first aspects.

[0040] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the enterprise user industry classification anomaly identification method based on sample expansion as described in any one of the first aspects.

[0041] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the enterprise user industry classification anomaly identification method based on sample expansion as described in any one of the first aspects.

[0042] The present application provides a method for identifying anomalies in the industry classification of enterprise users based on sample expansion. By obtaining enterprise electricity consumption data and performing sample expansion on the enterprise electricity consumption data based on the KNN-Bagging algorithm, new enterprise electricity consumption data is obtained, wherein the new enterprise electricity consumption data includes 96-point load data; based on the 96-point load data, an industry anomaly classification identification index system is constructed; the industry classification anomaly index system data and user label data are reconstructed to form an industry classification anomaly label library; the Transformer algorithm is used to construct an industry anomaly identification model to automatically output industry anomalies or potential abnormal users. The parallel KNN algorithm based on the Bagging mechanism is proposed to generate multiple sub-training sets by performing bootstrap sampling on the training set, and train multiple KNN base models respectively, and finally predict the results through voting or averaging aggregation. Its core advantage is to reduce model variance and improve generalization ability. This method is used for sample expansion to solve the sample imbalance problem during multi-classification model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0044] Figure 1 A flowchart of a method for identifying anomalies in enterprise user industry classification based on sample expansion provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of the structure of an enterprise user industry classification anomaly identification device based on sample expansion provided in an embodiment of the present application;

[0046] Figure 3 This is a schematic diagram of the structure of an electronic device provided in this application.

[0047] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0048] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0049] The present invention relates to an electronic device, which may be a terminal device. The terminal device may be a wireless terminal or a wired terminal. A wireless terminal may be a device that provides voice and / or other service data connectivity to a user, a handheld device with wireless connectivity, or other processing devices connected to a wireless modem. A wireless terminal may communicate with one or more core network devices via a radio access network (RAN). A wireless terminal may be a mobile terminal, such as a mobile phone (also known as a "cellular" phone) or a computer with a mobile terminal. For example, a wireless terminal may be a portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile device that exchanges voice and / or data with the radio access network. For another example, a wireless terminal may be a Personal Communication Service (PCS) phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), or other device. A wireless terminal may also be referred to as a system, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, access terminal, user terminal, user agent, or user device or user equipment, without limitation herein. Optionally, the terminal device may also be a smartwatch, tablet computer, or other device.

[0050] With the accelerated construction of new power systems, the accuracy of enterprise user industry classification is becoming increasingly important for grid operations management, anti-electricity theft inspections, and power market transactions. In the field of power marketing, traditional industry classification methods mainly rely on business registration information and basic electricity consumption data, but face multiple challenges in practical application: First, cross-border business operations and the emergence of emerging business formats have blurred industry boundaries, making it difficult for a single electricity consumption indicator to accurately represent diverse electricity consumption patterns; second, samples of abnormal electricity usage have a significant long-tail distribution characteristic, such as the proportion of electricity theft users is usually less than 1%, and traditional supervised learning methods are susceptible to sample imbalance, resulting in a high rate of missed detection; third, power data collection suffers from problems such as the lack of spatiotemporal dimensions and device heterogeneity, which directly affect the effectiveness of feature engineering.

[0051] Current anomaly detection research in the power sector presents two major technical approaches. The LOF+SVM phased identification method proposed by State Grid Shanghai Electric Power uses an unsupervised algorithm to screen suspicious samples, combined with manual annotation to optimize the model, providing a feasible approach to addressing sample scarcity. However, existing methods still have limitations when addressing anomalies in the industry classification of enterprise users. They fail to fully consider the association rules of industry electricity consumption characteristics (such as the statistical relationship between contract capacity and peak and off-peak electricity consumption), resulting in a lack of business interpretability of the generated samples.

[0052] In the context of the new power system, the electricity consumption behavior data of corporate users presents multi-source heterogeneous characteristics, including structured data such as voltage / current time series signals and contract capacity, as well as unstructured features such as supply chain relationships and production cycles. This multidimensional data characteristic brings new challenges to sample augmentation technology: it is necessary to ensure that the generated samples are close to the real data in terms of statistical distribution (such as fitting industry electricity consumption preferences through Gaussian mixture models), while also meeting the physical constraints of electricity (such as the three-phase current balance relationship). Therefore, exploring generative augmentation methods that integrate domain knowledge and constructing augmented samples that take into account the rationality of data distribution and the consistency of business logic have become key breakthroughs in improving the accuracy of industry classification anomaly identification, which is of great practical significance for achieving precise line loss management and optimizing power market trading strategies.

[0053] In combination with the above scenarios, it can be seen that in the existing technology, there is a technical problem of inaccurate abnormality identification.

[0054] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0055] The present invention discloses a method for identifying anomalies in enterprise user industry classification based on sample expansion. First, in order to solve the problem of data sample imbalance, an innovative sample expansion method based on KNN classification is proposed. Sample expansion is achieved through a sample expansion algorithm to avoid reducing recognition accuracy due to data imbalance during model training; secondly, an industry anomaly evaluation index system is constructed based on 96-point load data; finally, the industry anomaly identification value and anomaly label are reconstructed, and an industry anomaly identification model is constructed using the transformer attention mechanism algorithm to automatically identify abnormal industry users. The main invention contents are as follows.

[0056] like Figure 1 As shown, Figure 1 A flow chart of a method for identifying anomalies in enterprise user industry classification based on sample expansion provided in an embodiment of the present application, a method for identifying anomalies in enterprise user industry classification based on sample expansion, specifically including steps S201 to S204, wherein:

[0057] S201 , obtaining enterprise electricity consumption data, and performing sample expansion on the enterprise electricity consumption data based on the KNN-Bagging algorithm to obtain new enterprise electricity consumption data, wherein the new enterprise electricity consumption data includes 96-point load data.

[0058] The traditional KNN algorithm needs to calculate the distance between each test sample and all training samples. When the data volume or dimension is large, the computational efficiency decreases significantly, and the selection of K value is easily affected by noise, resulting in overfitting. Therefore, an improved method of semi-supervised classification algorithm based on KNN-Bagging is proposed. The improved KNN algorithm is used to expand samples to avoid the problem of sample imbalance during model training.

[0059] Bagging (bootstrap aggregating) is a technique for reducing generalization error by combining several models. The main idea is to train several different models separately and then have all models vote on their output for a test example. This is an example of a common strategy in machine learning known as model averaging. Techniques that employ this strategy are known as ensemble methods.

[0060] This paper combines the bagging learning mechanism with the KNN algorithm to propose a parallel KNN algorithm based on the bagging mechanism. By bootstrapping the training set, it generates multiple sub-training sets, trains multiple KNN base models on each, and finally aggregates the prediction results through voting or averaging. Its core advantage is to reduce model variance and improve generalization ability.

[0061] Specifically, N samples are randomly sampled with replacement from the training set to generate M subsets (e.g., M = 100). A KNN model is trained on each subset, with different K values ​​or distance metrics set to increase diversity. Classification tasks use majority voting, while regression tasks use mean prediction. This patent uses a voting mechanism to determine whether industry classifications are abnormal.

[0062] S202. Based on 96-point load data, an industry abnormality classification and identification indicator system is constructed.

[0063] An industry anomaly classification and identification indicator system is constructed based on 96-point load data, mainly including peak load rate, flat load rate, valley load rate, etc.

[0064] The changes in the indicator system are used as the basis for changes in industry classification, mainly including the following indicators:

[0065] The load factor is an indicator used to measure the balance of electricity consumption and equipment utilization efficiency in the power system. It refers to the ratio of the average load throughout the day to the maximum load. The calculation formula is as follows.

[0066]

[0067] Among them, P average is the average load for the whole day, P max The maximum load of the day.

[0068] Peak Load Factor refers to the ratio of the average load during the peak period to the average load throughout the day. The calculation formula is as follows.

[0069]

[0070] Among them, P avpeak Represents the average load during peak period, P average Represents the average load for the entire day.

[0071] Peak Load Factor refers to the ratio of the average load during normal hours to the average load for the entire day. The calculation formula is as follows.

[0072]

[0073] Among them, P avsh Represents the average load during peak period, P average Represents the average load for the entire day.

[0074] The daily peak-to-valley difference rate reflects the degree of fluctuation of power load within a day and measures the peak-to-valley difference in electricity demand. The calculation formula is as follows.

[0075]

[0076] Among them, P max Indicates the maximum load of the user in a day, P min Indicates the minimum load of users in a day.

[0077] Peak Load Factor refers to the ratio of the average load during the valley period to the average load for the entire day. The calculation formula is as follows.

[0078]

[0079] Among them, P avsh Represents the average load during peak period, P average Represents the average load for the entire day.

[0080] S203: Reconstruct the industry classification anomaly indicator system data and the user label data to form an industry classification anomaly label library.

[0081] S204. Use the Transformer algorithm to build an industry anomaly recognition model to automatically output industry anomalies or potential abnormal users.

[0082] First, the industry classification anomaly indicator system data and user label data are reconstructed to form an industry classification anomaly label library. Then, using the label library data as the research object, the transformer algorithm is used to build an industry anomaly recognition model to achieve automatic identification of industry anomalies. The specific process is as follows:

[0083] Data indicator measurement is based on 96 points of basic load data. According to the indicator calculation formula, the indicator value of each enterprise is calculated; the enterprise indicator value and the enterprise abnormality label are reconstructed to build an industry abnormality classification and recognition model based on the attention mechanism; in the future, when data is imported into the model, the model automatically identifies whether the user has industry classification abnormalities.

[0084] The embodiment of the present application provides an enterprise user industry classification anomaly identification method based on sample expansion, which obtains enterprise electricity consumption data and performs sample expansion on the enterprise electricity consumption data based on the KNN-Bagging algorithm to obtain new enterprise electricity consumption data, wherein the new enterprise electricity consumption data includes 96-point load data; based on the 96-point load data, an industry anomaly classification identification index system is constructed; the industry classification anomaly index system data and user label data are reconstructed to form an industry classification anomaly label library; the Transformer algorithm is used to construct an industry anomaly identification model to automatically output industry anomalies or potential abnormal users. The parallel KNN algorithm based on the Bagging mechanism is proposed to generate multiple sub-training sets by performing bootstrap sampling on the training set, and train multiple KNN base models respectively, and finally predict the results by voting or averaging aggregation. Its core advantage is to reduce model variance and improve generalization ability. This method is used to expand samples and solve the sample imbalance problem during multi-classification model training.

[0085] In one possible implementation, the enterprise electricity consumption data is sampled and expanded based on the KNN-Bagging algorithm to obtain new enterprise electricity consumption data, including:

[0086] Self-service sampling of enterprise electricity consumption data is performed to generate multiple sub-training sets.

[0087] A KNN-Bagging model is trained for each sub-training set, and the K value or distance metric is set differently to increase diversity.

[0088] The original KNN algorithm is improved, and a semi-supervised classification algorithm based on KNN-Bagging is proposed. By training multiple KNN models in parallel, samples are classified simultaneously, and the result with the highest probability is taken as the final result, avoiding the random results of a single KNN classification.

[0089] In one achievable manner, the industry anomaly classification and identification indicator system includes load rate, peak load rate, flat load rate, daily peak-to-valley difference rate, and valley load rate.

[0090] In one possible implementation, obtaining enterprise electricity consumption data includes:

[0091] In response to the analysis instruction, obtaining initial power usage data;

[0092] The enterprise electricity consumption data is obtained based on the initial electricity consumption data and its corresponding collection time.

[0093] In one possible implementation, the enterprise electricity consumption data is obtained based on the initial electricity consumption data and its corresponding collection time, including:

[0094] The initial electricity consumption data is grouped according to the initial electricity consumption data and the corresponding collection time to obtain enterprise electricity consumption data, wherein the enterprise electricity consumption data includes the initial electricity consumption data in different time periods.

[0095] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.

[0096] It should be further noted that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0097] Figure 2 A schematic diagram of the structure of an enterprise user industry classification anomaly identification device based on sample expansion provided in an embodiment of the present application is shown as follows: Figure 2 As shown, the enterprise user industry classification anomaly identification device 40 based on sample expansion provided in the embodiment of the present application includes:

[0098] The acquisition module 401 is used to acquire enterprise electricity consumption data and perform sample expansion on the enterprise electricity consumption data based on the KNN-Bagging algorithm to obtain new enterprise electricity consumption data, wherein the new enterprise electricity consumption data includes 96-point load data;

[0099] The first processing module 402 is used to build an industry abnormality classification and identification indicator system based on the 96-point load data;

[0100] The second processing module 403 is used to reconstruct the industry classification abnormality indicator system data and the user label data to form an industry classification abnormality label library;

[0101] The classification module 404 is used to build an industry anomaly recognition model using the Transformer algorithm and automatically output industry anomalies or potential anomaly users.

[0102] Optionally, the acquisition module 401 , when executing the KNN-Bagging algorithm to perform sample expansion on the enterprise electricity consumption data to obtain new enterprise electricity consumption data, is configured to:

[0103] Self-service sampling of enterprise electricity consumption data is performed to generate multiple sub-training sets.

[0104] A KNN-Bagging model is trained for each sub-training set, and the K value or distance metric is set differently to increase diversity.

[0105] Optionally, the generation module 404, when executing the Transformer algorithm to build an industry anomaly identification model and automatically output industry anomaly or potential anomaly users, is used to:

[0106] Reconstruct enterprise indicator values ​​and abnormal labels to build an industry classification abnormal label library;

[0107] The Transformer algorithm is used to train the model, and new enterprise electricity consumption data is imported for automatic identification to obtain abnormal or potentially abnormal users.

[0108] Optionally, the acquisition module 401 is used to:

[0109] In response to the analysis instruction, obtaining initial power usage data;

[0110] The enterprise electricity consumption data is obtained based on the initial electricity consumption data and its corresponding collection time.

[0111] Optionally, the acquisition module 401, when executing the process of obtaining the enterprise electricity consumption data based on the initial electricity consumption data and its corresponding collection time, is configured to:

[0112] The initial electricity consumption data is grouped according to the initial electricity consumption data and the corresponding collection time to obtain enterprise electricity consumption data, wherein the enterprise electricity consumption data includes the initial electricity consumption data in different time periods.

[0113] The enterprise user industry classification anomaly identification device based on sample expansion provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effects are similar, and are not described in detail in this embodiment.

[0114] It should be understood that the above-described device embodiments are merely illustrative, and the device of the present application may also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementations may employ other division methods. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.

[0115] In addition, unless otherwise specified, the functional units / modules in the various embodiments of the present application may be integrated into a single unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The aforementioned integrated units / modules may be implemented in the form of hardware or software program modules.

[0116] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc.

[0117] Figure 3 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 3 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.

[0118] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that the at least one processor 501 performs the above method.

[0119] The specific implementation process of the processor 501 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0120] Unless otherwise specified, the processor 501 may be any appropriate hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC. Unless otherwise specified, the memory 502 may be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), and the like.

[0121] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0122] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above redundant field updating method for a distributed system is implemented.

[0123] An embodiment of the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the above redundant field update method for a distributed system.

[0124] In the above embodiments, the description of each embodiment has its own focus. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, 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, they should be considered to be within the scope of this specification.

[0125] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0126] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for identifying abnormalities in enterprise user industry classification based on sample expansion, characterized in that: include: Obtaining enterprise electricity consumption data, and performing sample expansion on the enterprise electricity consumption data based on a KNN-Bagging algorithm to obtain new enterprise electricity consumption data, wherein the new enterprise electricity consumption data includes 96-point load data; Based on the 96-point load data, an industry abnormality classification and identification indicator system is constructed; Reconstruct the industry classification anomaly indicator system data and user label data to form an industry classification anomaly label library; Use the Transformer algorithm to build an industry anomaly recognition model to automatically output industry anomalies or potential abnormal users.

2. The method for identifying anomalies in enterprise user industry classification based on sample expansion according to claim 1 is characterized in that: Based on the KNN-Bagging algorithm, the enterprise electricity consumption data is sampled and expanded to obtain new enterprise electricity consumption data, including: Self-service sampling is performed on the enterprise electricity consumption data to generate multiple sub-training sets. A KNN-Bagging model is trained for each sub-training set, and the K value or distance metric is set differently to increase diversity.

3. The method for identifying anomalies in enterprise user industry classification based on sample expansion according to claim 1 is characterized in that: The industry abnormality classification and identification indicator system includes load rate, peak load rate, flat load rate, daily peak-to-valley difference rate and valley load rate.

4. The method for identifying anomalies in enterprise user industry classification based on sample expansion according to claim 1 is characterized in that: Utilize the Transformer algorithm to build an industry anomaly recognition model, automatically outputting industry anomaly or potential anomaly users, including: Reconstruct enterprise indicator values ​​and abnormal labels to build an industry classification abnormal label library; The Transformer algorithm is used to train the model, and the new enterprise electricity consumption data is imported for automatic identification to obtain abnormal or potentially abnormal users.

5. The method for identifying anomalies in enterprise user industry classification based on sample expansion according to claim 1 is characterized in that: Obtain enterprise electricity consumption data, including: In response to the analysis instruction, obtaining initial power usage data; The enterprise electricity consumption data is obtained according to the initial electricity consumption data and the corresponding collection time.

6. The method for identifying anomalies in enterprise user industry classification based on sample expansion according to claim 5 is characterized in that: The enterprise electricity consumption data is obtained according to the initial electricity consumption data and its corresponding collection time, including: The initial electricity usage data is grouped according to the initial electricity usage data and its corresponding collection time to obtain the enterprise electricity usage data, wherein the enterprise electricity usage data includes initial electricity usage data in different time periods.

7. A device for identifying abnormalities in enterprise user industry classification based on sample expansion, characterized in that: include: An acquisition module is used to acquire enterprise electricity consumption data and perform sample expansion on the enterprise electricity consumption data based on a KNN-Bagging algorithm to obtain new enterprise electricity consumption data, wherein the new enterprise electricity consumption data includes 96-point load data; A first processing module is used to construct an industry abnormality classification and identification indicator system based on the 96-point load data; The second processing module is used to reconstruct the industry classification abnormality indicator system data and user label data to form an industry classification abnormality label library; The classification module is used to build an industry anomaly recognition model using the Transformer algorithm and automatically output industry anomalies or potential abnormal users.

8. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.

10. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.