A method, device and terminal equipment for detecting abnormality in electric power user archive information
By obtaining electricity user file information, extracting user electricity consumption information and using anomaly detection models to predict and calculate, generating anomaly probability values, and automatically generating anomaly work orders, the problem of low efficiency of manual verification is solved, the detection accuracy and efficiency are improved, and the quality of power network operation is ensured.
Patent Information
- Application Number
- CN202411981350.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the existing technology, the anomaly detection of electricity user file information relies on manual verification, which is inefficient and has a high probability of false detection and missed detection, resulting in errors in electricity bill calculation and increased work pressure.
By obtaining electricity user file information, extracting user electricity usage information, and using the preset user file anomaly detection model to perform predictive calculations, an abnormal electricity usage probability value is generated, and an abnormal work order is automatically generated when the threshold is exceeded.
It improves the accuracy and efficiency of anomaly detection in electricity user file information, shortens the review cycle of electricity billing, and improves the quality of power network operation.
Smart Images

Figure CN119939455B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular relates to a method, device and terminal equipment for detecting abnormalities in power user archive information. Background Art
[0002] In the process of power business processing, it is necessary to calculate the amount and fee of user file information collected from the user end. Among them, the electricity consumption and electricity fee review link is the most complex and time-consuming in the entire electricity fee cycle, and it is very easy to cause errors in electricity fee calculation due to abnormal conditions in user file information not being promptly checked.
[0003] In the existing technology, the electricity consumption and electricity fee audit method only relies on manual verification and statistical analysis to identify abnormal situations in the electricity user files. When abnormal situations are found in the electricity user files, an electricity file abnormal work order is manually generated according to the abnormal situation of the user. The completed abnormal work order still needs to be manually verified by the business personnel on the other side of the power grid. After verification, a non-policy refund process is initiated for the electricity user.
[0004] However, with the current digital development of the power business, the number of staff responsible for calculating electricity bills has been greatly reduced. The method of relying solely on manual investigation of abnormal conditions in user file information and statistics on quantity and fees is inefficient and cannot guarantee accuracy, which can easily cause losses to users and power operators. Summary of the Invention
[0005] In view of this, the embodiments of the present application provide a method, apparatus and terminal device for detecting anomalies in power user file information, which are used to realize automatic detection of anomalies in power user file information, aiming to solve the problem that the existing technology relies solely on manual anomaly detection of power user files, which is inefficient and has a high probability of false detection and missed detection, while also bringing complex workload and heavy business processing pressure to power operation workers.
[0006] A first aspect of an embodiment of the present application provides a method for detecting anomalies in power user profile information, comprising:
[0007] Obtaining electricity user profile information;
[0008] Extracting the power user profile information separately to obtain power consumption information of multiple users;
[0009] Based on the preset power user file sample information and the preset user file anomaly detection model, predict and calculate the power consumption information of multiple users respectively to obtain multiple power consumption anomaly probability values;
[0010] When the power consumption abnormality probability value is greater than a preset abnormality probability threshold, user file abnormality work order information is generated according to the power user file information.
[0011] A second aspect of an embodiment of the present application provides a device for detecting abnormalities in electric power user profile information, comprising:
[0012] The power user file information acquisition module is used to obtain power user file information;
[0013] A user electricity usage information extraction module is used to extract the power user file information separately to obtain multiple users' electricity usage information;
[0014] A power consumption anomaly probability value calculation module is used to perform prediction calculations on the power consumption information of multiple users based on preset power user profile sample information and a preset user profile anomaly detection model to obtain multiple power consumption anomaly probability values;
[0015] The user profile abnormal work order information generation module is used to generate user profile abnormal work order information according to the power user profile information when the power consumption abnormal probability value is greater than a preset abnormal probability threshold.
[0016] A third aspect of an embodiment of the present application provides a terminal device, which includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, it implements the steps of the method for detecting anomalies in power user profile information as described in any one of the first aspects above.
[0017] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, comprising: storing a computer program, characterized in that when the computer program is executed by a processor, the steps of the method for detecting anomalies in power user profile information as described in any one of the first aspects above are implemented.
[0018] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by extracting information from the power user file information, multiple user electricity consumption information is automatically generated, and then the user electricity consumption information is predicted and calculated through the user file anomaly detection model, and the calculated power consumption anomaly probability value is used to judge whether there is an abnormality in the power user file. When it is determined that the power user file is abnormal, a user file anomaly work order is automatically generated, thereby improving the accuracy and efficiency of detecting anomalies in the power user file information, shortening the review cycle of electricity fee accounting, and improving the quality of power network operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 This is a schematic diagram of the implementation process of the method for detecting abnormality in power user profile information provided in Example 1 of the present application;
[0021] Figure 2 This is a schematic diagram of the implementation process of the method for detecting abnormality in power user profile information provided in Example 2 of the present application;
[0022] Figure 3 This is a schematic diagram of the implementation process of the method for detecting abnormality in power user profile information provided in Example 3 of the present application;
[0023] Figure 4 This is a schematic diagram of the implementation process of the method for detecting abnormality in power user profile information provided in the fourth embodiment of the present application;
[0024] Figure 5 This is a schematic diagram of the implementation process of the method for detecting abnormality in power user profile information provided in Example 5 of the present application;
[0025] Figure 6 This is a schematic diagram of the implementation process of the method for detecting abnormality in power user profile information provided in Example 5 of the present application;
[0026] Figure 7 This is a schematic diagram of the structure of the power user profile information anomaly detection device provided in an embodiment of the present application;
[0027] Figure 8 It is a schematic diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0029] In order to illustrate the technical solution described in this application, specific embodiments are provided below.
[0030] Figure 1The following is a flowchart of the method for detecting abnormalities in the power user profile information provided in the first embodiment of the present application, which is described in detail as follows:
[0031] Step S101, obtaining electricity user profile information.
[0032] In this embodiment, the power user profile information can be obtained from the power network's marketing system. The power user profile information may include customer snapshots, installation point snapshots, service location snapshots, customer agreement snapshots, customer pipeline snapshots, voltage regulation equipment snapshots, and connection snapshots.
[0033] Step S102: extract the power user profile information separately to obtain power consumption information of multiple users.
[0034] In this embodiment, the electricity user file information can be parsed, irrelevant data can be eliminated, and then the electricity bill settlement related data can be extracted. The extracted information can be used to generate multiple wide table files according to different contents as user electricity usage information.
[0035] In this embodiment, preferably, the user electricity consumption information includes electricity power factor information, demand electricity charge information, basic electricity charge information, transformer power loss information and power grid line loss information. The electricity power factor information includes the metering point number, metering point level, user electricity consumption category, user operating capacity, power factor assessment method, power factor assessment standard, electricity consumption category of the metering point electricity price, electricity price industry classification of the metering point electricity price, metering point capacity, total forward reactive power and total reverse reactive power. The demand electricity charge information includes user electricity consumption category, user operating capacity, user account establishment date, pricing strategy, metering point electricity price, electricity price industry classification of the metering point electricity price, basic electricity charge calculation method (basic electricity charge calculated according to demand), metering point area number, transformer area number, transformer operating status, power supply nature, user contract capacity, and demand verification value. Basic electricity bill information includes user electricity usage category, user operating capacity, user account establishment date, pricing strategy, metering point electricity price, industry classification of the metering point electricity price, basic electricity fee calculation method (basic electricity fee calculated by capacity), metering point substation number, and transformer substation number. Transformer energy loss information includes metering point level, metering point metering method, transformer loss allocation flag, transformer loss billing flag, transformer loss calculation method, transformer loss allocation agreement value, transformer loss number, transformer substation number, metering point substation number, substation status, substation power supply unit, and transformer public / private marking. Power grid line loss information includes metering point line number, line relationship, line loss calculation flag, line loss allocation flag, line loss calculation method code, line loss allocation agreement value, line power supply unit, line status, line reactance per unit length, line resistance per unit length, conductor length, public / private line flag, total forward reactive power, and total reverse reactive power. Power factor information, demand charge information, basic charge information, transformer power loss information, and power grid line loss information can all be presented in the form of a wide table.
[0036] Step S103 , based on the preset power user profile sample information and the preset user profile anomaly detection model, predictive calculations are performed on the power consumption information of the plurality of users to obtain a plurality of power consumption anomaly probability values.
[0037] In this embodiment, the preset user profile anomaly detection model can be a neural network model, specifically, a random forest model. It is understandable that the user's electricity consumption information needs to be pre-processed before it can be input into the user profile anomaly detection model for calculation. The pre-processing includes cleaning the data, filling in the missing data items in the data, marking and removing the outliers in the data, and then inserting it into the user profile anomaly detection model to continue data processing after processing such as feature scaling and normalization. The preset electricity user profile sample information can be past electricity user profiles collected from the marketing system, which is used to train the neural network so that the trained neural network can meet the prediction requirements for user electricity consumption information. When the neural network training is completed, the currently collected user electricity consumption information is input into the trained neural network for calculation, and the calculation error result is the probability of electricity consumption anomaly, where the error result can be the mean square error.
[0038] Step S104, determining whether the power consumption abnormality probability value is greater than a preset abnormality probability threshold; if so, generating user file abnormality work order information based on the power user file information; if not, generating user file normal work order information based on the power user file information.
[0039] In this embodiment, the preset abnormal probability threshold can be manually set. When the abnormal power usage probability value is greater than the abnormal probability threshold, it indicates that the power user profile corresponding to the abnormal power usage probability value has an abnormal situation. In this case, a user profile abnormal work order can be generated based on the power user profile, and the work order information can be sent to the power user terminal after manual review. When the abnormal power usage probability value is less than or equal to the abnormal probability threshold, it indicates that the power user profile corresponding to the abnormal power usage probability value has no abnormal situation. In this case, normal user profile work order information is generated to indicate that the power user profile is normal and there is no need to generate an abnormal work order and notify the power user.
[0040] The method for detecting anomalies in power user file information provided in the embodiment of the present application automatically generates multiple user electricity usage information by extracting information from the power user file information, and then predicts and calculates the user electricity usage information through a user file anomaly detection model. The calculated power usage anomaly probability value is used to determine whether the power user file is highly likely to have an anomaly. When it is determined that the power user file is anomaly, a user file anomaly work order is automatically generated, thereby improving the accuracy and efficiency of detecting anomalies in power user file information, shortening the review cycle of electricity fee accounting, and improving the quality of power network operation.
[0041] Figure 2The flowchart of the method for detecting abnormalities in power user profile information provided in the second embodiment of the present application is shown. The method differs from the first embodiment in that the preset power user profile sample information includes a plurality of preset user power usage sample information; the step S103 specifically includes:
[0042] Step S201: extract parameters of a preset user profile anomaly detection model to obtain a user profile anomaly detection model parameter set.
[0043] In this embodiment, it is understood that the preset user profile anomaly detection model may be a random forest model, and the extracted parameters of the random forest model may be the number of trees, the maximum depth, the minimum number of sample splits, etc. The extracted parameters are aggregated into a set to generate a user profile anomaly detection model parameter set.
[0044] Step S202: Generate parameter list information based on the user profile anomaly detection model parameter set and the preset parameter candidate value range.
[0045] In this embodiment, the preset parameter candidate value range can be manually set. By adding and subtracting the user profile anomaly detection model parameters from the preset parameter candidate value range, the upper and lower limits of the user profile anomaly detection model parameters, as well as multiple intermediate values, are obtained. Based on the user profile anomaly detection model parameters and their upper and lower limits and intermediate values, a list is generated for subsequent training of the user profile anomaly detection model, i.e., parameter list information is generated.
[0046] Step S203 : obtaining a trained user profile anomaly detection model based on the parameter list information, a plurality of preset user electricity usage sample information, and a preset user profile anomaly detection model.
[0047] In this embodiment, preset user electricity usage sample information and parameter list information may be input into a preset user profile anomaly detection model to train the user profile anomaly detection model. When the mean square error value calculated by the model is less than a preset mean square error threshold, the model training is completed, and a trained user profile anomaly detection model is obtained. The preset mean square error threshold may be 90%.
[0048] In this embodiment, it is understood that different user profile anomaly detection models are trained for different user electricity usage information to ensure the accuracy of the detection of different user electricity usage information. For example, for detecting electricity power factor information, it is necessary to train the preset user profile anomaly detection model with preset electricity power factor sample information, and after training, a model is obtained that is only used to predict the occurrence of electricity power factor; for detecting demand electricity charge information, it is necessary to train the preset user profile anomaly detection model with preset demand electricity charge sample information, and after training, a model is obtained that is only used to predict demand electricity charge expenditure.
[0049] Step S204 , performing prediction calculation on the electricity usage information of the plurality of users according to the trained user profile anomaly detection model to obtain a plurality of electricity usage anomaly probability values.
[0050] In this embodiment, the electricity usage information of multiple users is respectively input into multiple trained user profile anomaly detection models, and the user electricity usage information is predicted and calculated using the model parameters adjusted during the training process. The electricity usage anomaly probability value is calculated by the calculated user electricity usage information prediction value and the user electricity usage information true value, which is used to subsequently determine whether there is an abnormality in the electricity user profile.
[0051] The method for detecting anomalies in electric power user profile information provided in the embodiment of the present application extracts parameters from a user profile anomaly detection model, summarizes the extracted parameters to generate a parameter list as the initial parameters of the model, and trains the user profile anomaly detection model with pre-collected user electricity usage samples, thereby adjusting the initial parameters of the model. This makes the user profile anomaly detection model have higher accuracy in prediction and decision-making, thereby improving the efficiency and effectiveness of anomaly detection for user profile information, thereby ensuring the normal operation of the power network.
[0052] Figure 3 The flowchart of the method for detecting abnormality in the power user profile information provided in the third embodiment of the present application is shown. The difference between the method and the second embodiment is that the step S203 specifically includes:
[0053] Step S301: extract parameter combinations from the parameter list information to obtain first parameter combination information and second parameter combination information.
[0054] In this embodiment, it is understood that the parameter list information may include multiple value combinations of multiple parameters of the user profile anomaly detection model. Calculations are performed using different parameter value combinations and different user electricity usage samples to evaluate model performance. The parameter combinations in the parameter list information are extracted to obtain multiple parameter combinations, including first parameter combination information and second parameter combination information.
[0055] Step S302 : Divide a plurality of preset user electricity usage sample information to obtain first user electricity usage sample information and second user electricity usage sample information.
[0056] In this embodiment, multiple preset user electricity usage sample information are divided to divide the user electricity usage samples into a training set and a test set, wherein 80% of the user electricity usage sample information can be divided into the first user electricity usage sample information as the training set, and the remaining 20% can be divided into the second user electricity usage sample information as the test set.
[0057] Step S303 : obtaining first user profile detection information according to the first user's electricity usage sample information, the first parameter combination information, and a preset user profile anomaly detection model.
[0058] In this embodiment, the parameters in the first parameter combination information are used as parameters of the user profile anomaly detection model, and the first user's electricity usage sample information is input into the user profile anomaly detection model with the parameters in the first parameter combination information for calculation, and the calculation result is the first user profile detection information.
[0059] Step S304: Obtain second user profile detection information according to the second user's electricity usage sample information, the first parameter combination information, and a preset user profile anomaly detection model.
[0060] In this embodiment, the parameters in the first parameter combination information are used as parameters of the user profile anomaly detection model, and the second user's electricity usage sample information is input into the user profile anomaly detection model with the parameters in the first parameter combination information for calculation, and the calculation result is the second user profile detection information.
[0061] Step S305 : Obtain third user profile detection information based on the first user's electricity usage sample information, the second parameter combination information, and a preset user profile anomaly detection model.
[0062] In this embodiment, the parameters in the second parameter combination information are used as parameters of the user profile anomaly detection model, and the first user's electricity usage sample information is input into the user profile anomaly detection model with the parameters in the second parameter combination information for calculation, and the calculation result is the third user profile detection information.
[0063] Step S306 : Obtain fourth user profile detection information according to the second user's electricity usage sample information, the second parameter combination information, and a preset user profile anomaly detection model.
[0064] In this embodiment, the parameters in the second parameter combination information are used as parameters of the user profile anomaly detection model, and the second user's electricity usage sample information is input into the user profile anomaly detection model with the parameters in the second parameter combination information for calculation, and the calculation result is the fourth user profile detection information.
[0065] Step S307: Obtain a trained user profile anomaly detection model based on the first user profile detection information, the second user profile detection information, the third user profile detection information, the fourth user profile detection information, and a preset user profile anomaly detection model.
[0066] In this embodiment, the accuracy of the user profile anomaly detection model corresponding to the first parameter combination information can be calculated through the first user profile detection information and the second user profile detection information, and the accuracy of the user profile anomaly detection model corresponding to the second parameter combination information can be calculated through the third user profile detection information and the fourth user profile detection information. By comparing the size relationship between the two accuracy rates, the user profile anomaly detection model corresponding to the set of parameters with the higher accuracy rate is used as the trained user profile anomaly detection model.
[0067] In this embodiment, the performance of the trained model can also be evaluated by calculating the recall rate and F1 score of the user profile anomaly detection model to ensure the stability and consistency of the user profile anomaly detection model on different data sets.
[0068] The method for detecting anomalies in power user profile information provided in the embodiment of the present application calculates user profile detection information by selecting multiple parameter combination information, and is used to evaluate the calculation accuracy of the user profile anomaly detection model during the training process based on the calculated user profile detection information, and selects the parameter combination that optimizes the prediction performance of the user profile anomaly detection model from multiple sets of parameter combination information, thereby improving the stability and reliability of the trained user profile anomaly detection model.
[0069] Figure 4 The flowchart of the method for detecting abnormality in the power user profile information provided in the fourth embodiment of the present application is shown. The difference between the method and the third embodiment is that the step S307 specifically includes:
[0070] Step S401: Calculate the first user profile detection accuracy rate based on the first user profile detection information and the second user profile detection information.
[0071] In this embodiment, the first user profile detection information may be divided by the second user profile detection information to obtain the first user profile detection accuracy rate.
[0072] Step S402: Calculate the second user profile detection accuracy rate based on the third user profile detection information and the fourth user profile detection information.
[0073] In this embodiment, the second user profile detection accuracy rate may be obtained by dividing the third user profile detection information by the fourth user profile detection information.
[0074] Step S403, determining whether the first user profile detection accuracy is greater than the second user profile detection accuracy; if so, proceeding to step S404; if not, proceeding to step S405.
[0075] In this embodiment, when the first user profile detection accuracy rate is greater than the second user profile detection accuracy rate, it indicates that when the user profile anomaly detection model uses the first parameter combination information, the performance of the user profile anomaly detection model is better than when the second parameter combination information is used for the user profile anomaly detection model, and the use of the first parameter combination information can make the prediction results of user electricity usage information more accurate and reliable. When the first user profile detection accuracy rate is less than or equal to the second user profile detection accuracy rate, it indicates that when the user profile anomaly detection model uses the second parameter combination information, the performance of the user profile anomaly detection model is better than when the first parameter combination information is used for the user profile anomaly detection model, and the use of the second parameter combination information can make the prediction results of user electricity usage information more accurate and reliable.
[0076] Step S404: Using the first parameter combination information as a parameter combination of a preset user profile anomaly detection model to obtain a trained user profile anomaly detection model.
[0077] In this embodiment, when the first user profile detection accuracy is greater than the second user profile detection accuracy, it means that when the user profile anomaly detection model uses the first parameter combination information, the performance of the user profile anomaly detection model is better than when the second parameter combination information is used for the user profile anomaly detection model. The use of the first parameter combination information can make the prediction results of the user's electricity usage information more accurate and reliable. Therefore, the first parameter combination information is used as the model parameter of the user profile anomaly detection model. At this point, the training is completed, and the trained user profile anomaly detection model is obtained.
[0078] Step S405 : Using the second parameter combination information as a parameter combination of a preset user profile anomaly detection model to obtain a trained user profile anomaly detection model.
[0079] In this embodiment, when the first user profile detection accuracy is less than or equal to the second user profile detection accuracy, it means that when the user profile anomaly detection model uses the second parameter combination information, the performance of the user profile anomaly detection model is better than when the first parameter combination information is used for the user profile anomaly detection model. The use of the second parameter combination information can make the prediction results of the user's electricity usage information more accurate and reliable. Therefore, the second parameter combination information is used as the model parameter of the user profile anomaly detection model. At this point, the training is completed, and the trained user profile anomaly detection model is obtained.
[0080] In this embodiment, the trained user profile anomaly detection model can be encapsulated and integrated into the marketing system of the power network through a RESTful API interface, thereby realizing the automated anomaly detection and review process of power user profile information.
[0081] The method for detecting anomalies in power user profile information provided in the embodiment of the present application calculates the prediction accuracy of the user profile anomaly detection model corresponding to different model parameters, determines a set of parameters with the best performance as the parameters after model training, thereby ensuring the prediction accuracy of the user profile anomaly detection model, and is used to timely identify abnormal situations in user profiles, reduce the workload of staff, and promptly notify power service providers and users to take measures to deal with abnormal situations to ensure the normal operation of the power network.
[0082] Figure 5 The flowchart of the method for detecting abnormality in the power user profile information provided in the fifth embodiment of the present application is shown. The difference between the method and the second embodiment is that the step S204 specifically includes:
[0083] Step S501 : extracting features from a plurality of user electricity usage information to obtain user electricity usage feature information.
[0084] In this embodiment, an autoencoder method may be used to extract features from user electricity usage information, and the extracted features are used as user electricity usage feature information for subsequent detection, analysis, and calculation.
[0085] Step S502 : performing multiple sampling processes on the user's electricity consumption characteristic information according to a preset number of characteristic sampling times to obtain multiple sets of user electricity consumption sampling information; the user electricity consumption sampling information sets include multiple electricity consumption sampling information.
[0086] In this embodiment, the preset number of feature sampling times can be manually set. The user's electricity usage feature information is sampled to calculate the scattered values of the user's electricity usage information. The sampled data is aggregated into a user electricity usage sample information set, which is used to subsequently perform feature importance assessment on each user's electricity usage information.
[0087] Step S503 : Calculate the power consumption information gain corresponding to each user power consumption sampling information set according to the preset feature sampling times, the number of power consumption sampling information in the user power consumption sampling information set, and the plurality of power consumption sampling information.
[0088] In this embodiment, the preset feature sampling times can be manually set. This can be achieved by dividing the preset feature sampling times by the number of electricity usage sampling information, using the result of the division as a coefficient, then performing a logarithmic operation on the coefficient to obtain a logarithmic calculation result. The coefficient and the logarithmic calculation result are then multiplied to obtain the electricity usage information gain corresponding to the user's electricity usage sampling information set. It can be understood that the greater the information entropy of a data feature, the more important the feature information contained in the data feature.
[0089] Step S504, determining whether the power consumption information gain is greater than a preset power consumption information gain threshold; if so, proceeding to step S505; if not, not using the user power consumption sampling information set corresponding to the power consumption information gain as user power consumption prediction information.
[0090] In this embodiment, the preset electricity consumption information gain threshold can be manually set. When the electricity consumption information gain is greater than the preset electricity consumption information gain threshold, it means that the user electricity consumption sampling information set corresponding to the electricity consumption information gain has a more important data feature and is of great reference value for abnormal situations of user electricity consumption information. In this case, the user electricity consumption sampling information set corresponding to the electricity consumption information gain is used as user electricity consumption prediction information. When the electricity consumption information gain is less than or equal to the preset electricity consumption information gain threshold, it means that the data feature of the user electricity consumption sampling information set corresponding to the electricity consumption information gain is not of high importance and is of little reference value for abnormal situations of user electricity consumption information. In this case, the user electricity consumption sampling information set corresponding to the electricity consumption information gain is not used as user electricity consumption prediction information.
[0091] Step S505: taking the user electricity consumption sampling information set corresponding to the electricity consumption information gain as user electricity consumption prediction information.
[0092] In this embodiment, when the electricity consumption information gain is greater than the preset electricity consumption information gain threshold, it means that the user electricity consumption sampling information set corresponding to the electricity consumption information gain has a more important data feature and is of great reference value for abnormal situations of user electricity consumption information. Therefore, the user electricity consumption sampling information set corresponding to the electricity consumption information gain is used as user electricity consumption prediction information.
[0093] Step S506 , calculating a power consumption anomaly probability value based on the user power consumption prediction information, the user power consumption information, and the trained user profile anomaly detection model.
[0094] In this embodiment, the trained user profile anomaly detection model can be a random forest model, and the power usage anomaly probability value can be a mean squared error. The power usage anomaly probability value can be obtained by inputting user power usage information into the trained user profile anomaly detection model for prediction calculation. The prediction result is then compared with the previously calculated user power usage prediction information and the mean squared error is calculated to obtain the power usage anomaly probability value.
[0095] The method for detecting anomalies in power user profile information provided in the embodiment of the present application performs multiple samplings on the data features of the user's electricity usage information, thereby dispersing the overall user electricity usage information into various local information and performing importance assessments on the data features respectively, to ensure the effectiveness and accuracy of the output results of the user profile anomaly detection model.
[0096] Figure 6 The flowchart of the method for detecting abnormality in the power user profile information provided in the sixth embodiment of the present application is shown. The difference between the method and the fifth embodiment is that the step S503 specifically includes:
[0097] Step S601 : Calculate user power usage experience entropy information based on a preset number of feature sampling times and the number of power usage sampling information in a user power usage sampling information set.
[0098] In this embodiment, the preset feature sampling times can be manually set. The feature sampling times can be divided by the number of power consumption sampling information in the user power consumption sampling information set to calculate the user power consumption experience entropy information, which prepares for the subsequent calculation of the power consumption information gain.
[0099] Step S602 : Calculating user electricity usage experience conditional entropy information based on the user electricity usage experience entropy information and electricity usage sampling information.
[0100] In this embodiment, the user's electricity usage experience entropy information may be subjected to a logarithmic operation, and the result of the logarithmic operation may be multiplied by the electricity usage sampling information to obtain the user's electricity usage experience conditional entropy information.
[0101] Step S603 : Calculating the power consumption information gain corresponding to each user power consumption sampling information set based on the user power consumption experience entropy information and the user power consumption experience conditional entropy information.
[0102] In this embodiment, the user's electricity usage experience entropy information may be divided by the user's electricity usage experience conditional entropy information to obtain the electricity usage information gain corresponding to the user's electricity usage sampling information set.
[0103] The method for detecting anomalies in power user profile information provided in the embodiment of the present application quantifies the importance and reliability of multiple local user power usage information by gradually calculating the power usage information gain of multiple sampled local user power usage information, thereby ensuring the accuracy of the output results of the user profile anomaly detection model, helping staff to quickly identify and lock in anomalies in user profiles, and ensuring the safety and stability of power network operations.
[0104] Corresponding to the method of the above embodiment, Figure 7 A structural block diagram of an apparatus for detecting abnormalities in electric power user profile information provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown. Figure 7 The exemplary power user profile information anomaly detection device may be the execution subject of the power user profile information anomaly detection method provided in the aforementioned first embodiment.
[0105] Reference Figure 7 , the power user profile information anomaly detection device includes:
[0106] The power user profile information acquisition module 710 is used to acquire power user profile information;
[0107] The user electricity usage information extraction module 720 is used to extract the power user profile information separately to obtain multiple user electricity usage information;
[0108] The power consumption anomaly probability value calculation module 730 is used to perform prediction calculations on the power consumption information of multiple users based on the preset power user profile sample information and the preset user profile anomaly detection model to obtain multiple power consumption anomaly probability values;
[0109] The user profile abnormal work order information generating module 740 is configured to generate user profile abnormal work order information according to the power user profile information when the power consumption abnormality probability value is greater than a preset abnormality probability threshold.
[0110] The process of each module in the power user profile information anomaly detection device provided in the embodiment of the present application realizing its own function can be specifically referred to the aforementioned Figure 1 The description of the first embodiment is omitted here.
[0111] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0112] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0113] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0114] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0115] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish descriptions and should not be understood as indicating or implying relative importance. It should also be understood that although the terms "first", "second", etc. are used in the text to describe various elements in some embodiments of the present application, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first table can be named a second table, and similarly, a second table can be named a first table without departing from the scope of the various described embodiments. Both the first table and the second table are tables, but they are not the same table.
[0116] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0117] The method for detecting anomalies in electricity user profile information provided in the embodiments of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of terminal devices.
[0118] For example, the terminal device can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set-top box (STB), customer premises equipment (CPE) and / or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network.
[0119] As an example and not a limitation, when the terminal device is a wearable device, the wearable device can also be a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are full-featured, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0120] Figure 8This is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application. Figure 8 As shown, the terminal device 8 of this embodiment includes: at least one processor 80 ( Figure 8 Only one is shown), a memory 81, wherein the memory 81 stores a computer program 82 that can be run on the processor 80. When the processor 80 executes the computer program 82, the steps in the above-mentioned embodiments of the method for detecting abnormality of the power user profile information are implemented, such as Figure 1 Alternatively, when the processor 70 executes the computer program 72, the functions of the modules / units in the above-mentioned device embodiments are realized, for example, Figure 7 Functions of modules 710 to 740 are shown.
[0121] The terminal device 8 can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device can include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will understand that Figure 8 It is only an example of the terminal device 8 and does not constitute a limitation of the terminal device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include an input and sending device, a network access device, a bus, etc.
[0122] The processor 80 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0123] In some embodiments, the memory 81 may be an internal storage unit of the terminal device 8, such as a hard disk or memory of the terminal device 8. The memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 8. Furthermore, the memory 81 may include both an internal storage unit of the terminal device 8 and an external storage device. The memory 81 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 81 may also be used to temporarily store data that has been sent or is about to be sent.
[0124] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0125] An embodiment of the present application also provides a terminal device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, the terminal device implements the steps of any of the above-mentioned method embodiments.
[0126] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0127] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0128] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0129] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0130] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0131] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0132] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for detecting abnormalities in electric power user profile information, characterized in that: include: Obtaining electricity user profile information; Extracting the power user profile information separately to obtain power consumption information of multiple users; Based on the preset power user file sample information and the preset user file anomaly detection model, predict and calculate the power consumption information of multiple users respectively to obtain multiple power consumption anomaly probability values; When the power consumption abnormality probability value is greater than a preset abnormality probability threshold, generating user file abnormality work order information according to the power user file information; The preset power user file sample information includes a plurality of preset user power consumption sample information; The step of performing prediction calculations on the electricity consumption information of a plurality of users based on the preset electricity user profile sample information and the preset user profile anomaly detection model to obtain a plurality of electricity consumption anomaly probability values specifically includes: Extract parameters of the preset user profile anomaly detection model to obtain a user profile anomaly detection model parameter set; Generate parameter list information based on the user profile anomaly detection model parameter set and the preset parameter candidate value range; Obtaining a trained user profile anomaly detection model based on the parameter list information, multiple preset user electricity usage sample information, and a preset user profile anomaly detection model; According to the trained user profile anomaly detection model, predictive calculations are performed on the electricity usage information of the plurality of users to obtain a plurality of electricity usage anomaly probability values; The step of performing prediction calculation on the electricity usage information of the plurality of users based on the trained user profile anomaly detection model to obtain a plurality of electricity usage anomaly probability values specifically includes: Extracting features from the plurality of user electricity usage information to obtain user electricity usage feature information; According to a preset number of feature sampling times, the user's power consumption feature information is sampled multiple times to obtain multiple sets of user power consumption sampling information; the user power consumption sampling information set includes multiple power consumption sampling information; Calculate the power consumption information gain corresponding to each user power consumption sampling information set based on the preset feature sampling times, the number of power consumption sampling information in the user power consumption sampling information set, and the multiple power consumption sampling information; When the power consumption information gain is greater than a preset power consumption information gain threshold, the user power consumption sampling information set corresponding to the power consumption information gain is used as the user power consumption prediction information; Calculating an abnormal power consumption probability value based on the user power consumption prediction information, the user power consumption information, and the trained user profile abnormality detection model; The step of calculating the power consumption information gain corresponding to each user power consumption sampling information set based on the preset feature sampling times, the number of power consumption sampling information in the user power consumption sampling information set, and the multiple power consumption sampling information specifically includes: Calculate the user's electricity consumption experience entropy information based on the preset feature sampling times and the number of electricity consumption sampling information in the user's electricity consumption sampling information set; Calculating user electricity usage experience conditional entropy information based on the user electricity usage experience entropy information and electricity usage sampling information; The power consumption information gain corresponding to each user power consumption sampling information set is calculated based on the user power consumption experience entropy information and the user power consumption experience conditional entropy information.
2. The method for detecting abnormality in electric power user profile information according to claim 1, wherein: The user electricity consumption information includes electricity power factor information, demand electricity fee information, basic electricity fee information, transformer power loss information and power grid line loss information.
3. The method for detecting abnormality in electric power user profile information according to claim 1, wherein: The step of obtaining a trained user profile anomaly detection model based on the parameter list information, a plurality of preset user electricity usage sample information, and a preset user profile anomaly detection model specifically includes: Performing parameter combination extraction on the parameter list information to obtain first parameter combination information and second parameter combination information; Dividing a plurality of preset user electricity usage sample information to obtain first user electricity usage sample information and second user electricity usage sample information; Obtaining first user profile detection information based on the first user's electricity usage sample information, the first parameter combination information, and a preset user profile anomaly detection model; Obtaining second user profile detection information based on the second user's electricity usage sample information, the first parameter combination information, and a preset user profile anomaly detection model; Obtaining third user profile detection information based on the first user electricity usage sample information, the second parameter combination information, and a preset user profile anomaly detection model; Obtaining fourth user profile detection information based on the second user's electricity usage sample information, the second parameter combination information, and a preset user profile anomaly detection model; A trained user profile anomaly detection model is obtained based on the first user profile detection information, the second user profile detection information, the third user profile detection information, the fourth user profile detection information, and a preset user profile anomaly detection model.
4. The method for detecting abnormality in electric power user profile information according to claim 3, wherein: The step of obtaining a trained user profile anomaly detection model based on the first user profile detection information, the second user profile detection information, the third user profile detection information, the fourth user profile detection information, and a preset user profile anomaly detection model specifically includes: Calculating a first user profile detection accuracy rate based on the first user profile detection information and the second user profile detection information; Calculating a second user profile detection accuracy rate based on the third user profile detection information and the fourth user profile detection information; Determining whether the first user profile detection accuracy is greater than the second user profile detection accuracy; If yes, the first parameter combination information is used as the parameter combination of the preset user profile anomaly detection model to obtain a trained user profile anomaly detection model; If not, the second parameter combination information is used as the parameter combination of the preset user profile anomaly detection model to obtain a trained user profile anomaly detection model.
5. A device for detecting abnormalities in electric power user profile information, characterized in that: include: The power user file information acquisition module is used to obtain power user file information; A user electricity usage information extraction module is used to extract the power user file information separately to obtain multiple users' electricity usage information; A power consumption anomaly probability value calculation module is used to perform prediction calculations on the power consumption information of multiple users based on preset power user profile sample information and a preset user profile anomaly detection model to obtain multiple power consumption anomaly probability values; A user profile abnormal work order information generation module is configured to generate user profile abnormal work order information based on the power user profile information when the power consumption abnormality probability value is greater than a preset abnormality probability threshold; The preset power user file sample information includes a plurality of preset user power consumption sample information; The step of performing prediction calculations on the electricity consumption information of a plurality of users based on the preset electricity user profile sample information and the preset user profile anomaly detection model to obtain a plurality of electricity consumption anomaly probability values specifically includes: Extract parameters of the preset user profile anomaly detection model to obtain a user profile anomaly detection model parameter set; Generate parameter list information based on the user profile anomaly detection model parameter set and the preset parameter candidate value range; Obtaining a trained user profile anomaly detection model based on the parameter list information, multiple preset user electricity usage sample information, and a preset user profile anomaly detection model; According to the trained user profile anomaly detection model, predictive calculations are performed on the electricity usage information of the plurality of users to obtain a plurality of electricity usage anomaly probability values; The step of performing prediction calculation on the electricity usage information of the plurality of users based on the trained user profile anomaly detection model to obtain a plurality of electricity usage anomaly probability values specifically includes: Extracting features from the plurality of user electricity usage information to obtain user electricity usage feature information; According to a preset number of feature sampling times, the user's power consumption feature information is sampled multiple times to obtain multiple sets of user power consumption sampling information; the user power consumption sampling information set includes multiple power consumption sampling information; Calculate the power consumption information gain corresponding to each user power consumption sampling information set based on the preset feature sampling times, the number of power consumption sampling information in the user power consumption sampling information set, and the multiple power consumption sampling information; When the power consumption information gain is greater than a preset power consumption information gain threshold, the user power consumption sampling information set corresponding to the power consumption information gain is used as the user power consumption prediction information; Calculating an abnormal power consumption probability value based on the user power consumption prediction information, the user power consumption information, and the trained user profile abnormality detection model; The step of calculating the power consumption information gain corresponding to each user power consumption sampling information set based on the preset feature sampling times, the number of power consumption sampling information in the user power consumption sampling information set, and the multiple power consumption sampling information specifically includes: Calculate the user's electricity consumption experience entropy information based on the preset feature sampling times and the number of electricity consumption sampling information in the user's electricity consumption sampling information set; Calculating user electricity usage experience conditional entropy information based on the user electricity usage experience entropy information and electricity usage sampling information; The power consumption information gain corresponding to each user power consumption sampling information set is calculated based on the user power consumption experience entropy information and the user power consumption experience conditional entropy information.
6. A terminal device, characterized in that: The terminal device includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Power consumption data anomaly detection method and device, computer equipment and storage medium
CN113284002A