Electricity charge auditing anomaly analysis, research and judgment method, system, device, medium and program
By using a pre-trained electricity bill audit anomaly analysis and judgment model, and constructing a multi-dimensional feature electricity bill dataset using gradient boosting trees and long short-term memory networks, the inefficiency and accuracy problems of existing electricity bill audit systems are solved, and automated, accurate electricity bill anomaly identification and adaptive analysis are achieved.
Patent Information
- Application Number
- CN202511765058.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-03-10
AI Technical Summary
The existing electricity bill audit system cannot automatically identify anomalies, and its reliance on a large amount of manual intervention leads to low efficiency, difficulty in ensuring accuracy and fairness, low level of intelligence, difficulty in adaptively adjusting rules, and lack of quality and efficiency analysis and optimization mechanisms.
A pre-trained electricity bill audit anomaly analysis and judgment model is adopted. Electricity bill data is analyzed through gradient boosting tree and long short-term memory network to construct a multi-dimensional feature electricity bill dataset, so as to realize automated audit and accurate anomaly identification.
The system can complete the review of massive amounts of electricity bill data in a short period of time, which improves review efficiency, reduces labor costs, reduces subjective errors, and enables adaptive analysis for different electricity usage scenarios, ensuring the accuracy and flexibility of electricity bill management.
Smart Images

Figure CN121637318A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity billing technology, specifically to a method, system, equipment, medium, and program for analyzing and judging anomalies in electricity bill audits. Background Technology
[0002] In today's booming electricity market and increasingly diversified user demands, the accuracy and efficiency of electricity bill settlement play a crucial role in the operation of power companies, directly determining the quality of their services and their market competitiveness. However, with the rapid development of marketing operations, continuous technological innovation, and the rapid iteration of user needs, existing electricity bill auditing systems are gradually revealing many insurmountable defects and shortcomings when dealing with the efficient and accurate handling of complex electricity bill auditing tasks.
[0003] The limitations of existing electricity consumption and billing verification functions are particularly prominent in handling critical issues such as abnormal electricity consumption and billing. While numerous verification rules can detect anomalies, the subsequent judgment work heavily relies on business personnel. Business personnel need to invest a lot of time and energy to query users' historical electricity consumption and billing data and combine it with their own experience to judge whether it is a genuine anomaly. This method, which cannot rely on the system for automatic judgment, not only increases the difficulty and uncertainty of verification, but also makes the verification process cumbersome and prone to errors.
[0004] Excessive manual intervention is another major drawback of the existing system. Because the system struggles to automate complex review tasks, staff are forced to perform frequent manual operations, such as querying historical data and conducting detailed comparative analyses. This not only significantly increases the workload of staff, leaving them exhausted, but also leads to a substantial decline in overall work efficiency. Furthermore, the increased manual intervention lengthens the review cycle, making it difficult for power companies to respond quickly to dynamic changes in market demand, putting them at a disadvantage in market competition. The subjective factors influencing the review results during manual review cannot be ignored. The experience level, judgment ability, and work status of staff can all interfere with the accuracy and impartiality of the review results. At the same time, the increased manual operation also raises the risk of data entry errors and comparison mistakes, further affecting the accuracy of electricity bill calculations. In addition, the existing system has a low level of intelligence, relying mainly on preset review rules and lacking the ability to deeply mine and intelligently analyze data. Faced with a constantly changing market environment and user needs, the system cannot quickly and adaptively adjust review rules and strategies, resulting in a gradual deterioration in review effectiveness. At the same time, the system lacks a comprehensive evaluation and analysis mechanism for the quality and efficiency of electricity bill issuance, making it difficult to identify and improve problems in a timely manner, and unable to propose targeted optimization suggestions. This greatly limits the continuous optimization of review rules and processes, making it difficult to meet the new demands of the electricity market development. Summary of the Invention
[0005] To address the problems of existing electricity bill auditing systems, such as inefficiency due to their inability to automatically identify anomalies, reliance on extensive manual intervention leading to low efficiency, inaccuracy and unfairness due to subjective factors, low level of intelligence hindering adaptive rule adjustments, and lack of quality and efficiency analysis and optimization mechanisms, this invention provides a method for analyzing and judging anomalies in electricity bill auditing. This method eliminates the need for manual, piecemeal checks, enabling the auditing of massive amounts of electricity bill data in a short time, shortening the audit cycle, and exponentially improving auditing efficiency, effectively solving the efficiency bottleneck problem of traditional methods.
[0006] To achieve the above objectives, the present invention provides the following technical solution.
[0007] In a first aspect, the present invention provides a method for analyzing and judging anomalies in electricity bill audits, including: The electricity bill data to be analyzed is preprocessed to obtain the electricity bill dataset to be analyzed; The electricity bill dataset to be analyzed is input into a pre-trained electricity bill audit anomaly analysis and judgment model for analysis, and the analysis results are obtained. Based on the analysis results, the abnormal situation of the electricity bill is obtained. The training methods for the pre-trained electricity bill audit anomaly analysis and judgment model include: Electricity cost data is acquired and preprocessed to obtain a multi-dimensional feature electricity cost dataset; Gradient boosting trees are used to learn the gradient of the loss function on the multi-dimensional feature electricity cost dataset; a long short-term memory network is used to perform time-series processing on the multi-dimensional feature electricity cost dataset to obtain electricity cost time-series feature data. The gradient of the loss function and the time-series characteristic data of electricity charges are input into the electricity charge audit anomaly analysis and judgment model for training, resulting in a pre-trained electricity charge audit anomaly analysis and judgment model.
[0008] As a further improvement of the present invention, the step of acquiring electricity bill data and preprocessing it to obtain a multi-dimensional feature electricity bill dataset includes: Collect basic electricity cost data, real-time electricity consumption data, user profile data, and external related data to form core data; The core data is preprocessed, outliers in the electricity bill data are removed, missing values are filled, and the data format is standardized to obtain the preprocessed electricity bill data. The preprocessed electricity bill data is checked for data integrity. If the check is successful, the electricity bill data is obtained. Based on the core feature dimensions of electricity bill data, we obtain electricity consumption trend features, rate matching features, user profile features, and external influence features, forming a multi-dimensional feature electricity bill dataset.
[0009] As a further improvement of the present invention, the step of learning the gradient of the loss function by using a gradient boosting tree on a multi-dimensional feature electricity cost dataset includes: Gradient boosting trees are used to learn the mapping relationship between multi-dimensional features and electricity bill anomaly labels in a multi-dimensional feature electricity bill dataset, and the objective function is obtained.
[0010] in, Let be the objective function. The loss function; For the true label of the i-th electricity bill sample, Let be the predicted value for the i-th electricity bill sample; For regularization terms; Add a new tree, learn the errors left by the previous tree based on the objective function, and correct the errors of the previous tree with each new tree. Repeat this process until the loss value meets the set conditions, and you will get a trained gradient boosting tree and obtain the gradient of the loss function.
[0011] As a further improvement of the present invention, the step of using a long short-term memory network to perform time-series processing on a multi-dimensional feature electricity bill dataset to obtain electricity bill time-series feature data includes: The daily electricity load curve is used as the input sequence of the long short-term memory network. Multi-dimensional electricity cost data is processed by time step, selectively memorizing long-term electricity consumption patterns and filtering short-term fluctuations, and outputting electricity consumption trend predictions. Extracting time-series feature data reflecting users' long-term electricity consumption behavior patterns from electricity consumption trend forecasting yields electricity bill time-series feature data.
[0012] As a further improvement of the present invention, the gradient of the loss function and the time-series characteristic data of electricity charges are input into the electricity charge audit anomaly analysis and judgment model for training, resulting in a pre-trained electricity charge audit anomaly analysis and judgment model, including: The gradient of the loss function and the time-series characteristic data of electricity bills are input into the electricity bill audit anomaly analysis and judgment model to obtain the trained electricity bill audit anomaly analysis and judgment model. The training set of the multi-dimensional feature electricity bill dataset is input into the trained electricity bill audit anomaly analysis and judgment model. The five-fold cross-validation method is used for training to obtain the trained electricity bill audit anomaly analysis and judgment model and the training results. The validation set in the multi-dimensional feature electricity bill dataset is input into the trained electricity bill audit anomaly analysis and judgment model to obtain the validation results; The training results are compared with the verification results. If the comparison results meet the set requirements, the pre-trained electricity bill audit anomaly analysis and judgment model is obtained.
[0013] As a further improvement of the present invention, the step of inputting the electricity bill dataset to be analyzed into a pre-trained electricity bill audit anomaly analysis and judgment model for analysis, obtaining analysis results, and obtaining anomalies in electricity bills based on the analysis results includes: The electricity bill dataset to be analyzed is input into a pre-trained electricity bill audit anomaly analysis and judgment model to calculate the electricity bill anomaly probability value. When the electricity bill anomaly probability value is greater than the set condition, it is judged as abnormal data. A secondary verification is performed on the normal data containing abnormal electrical trends to identify hidden abnormal data; Based on abnormal data and latent abnormal data, abnormal results are obtained, analyzed, and each abnormal result is labeled with an abnormality type to form an abnormal situation of electricity charges.
[0014] Secondly, the present invention provides an electricity bill audit anomaly analysis and judgment system, comprising: Data set acquisition module: used to preprocess the electricity bill data to be analyzed to obtain the electricity bill dataset to be analyzed; Analysis Results Module: This module is used to input the electricity bill dataset to be analyzed into a pre-trained electricity bill audit anomaly analysis and judgment model for analysis, obtain analysis results, and identify anomalies in the electricity bills based on the analysis results. The training method for the pre-trained electricity bill audit anomaly analysis and judgment model includes: Electricity cost data is acquired and preprocessed to obtain a multi-dimensional feature electricity cost dataset; Gradient boosting trees are used to learn the gradient of the loss function on the multi-dimensional feature electricity cost dataset; a long short-term memory network is used to perform time-series processing on the multi-dimensional feature electricity cost dataset to obtain electricity cost time-series feature data. The gradient of the loss function and the time-series characteristic data of electricity charges are input into the electricity charge audit anomaly analysis and judgment model for training, resulting in a pre-trained electricity charge audit anomaly analysis and judgment model.
[0015] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned method for analyzing and judging anomalies in electricity bill auditing.
[0016] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for analyzing and judging anomalies in electricity bill auditing.
[0017] Fifthly, the present invention provides a computer program product, including computer instructions, which, when executed by a processor, implement the aforementioned method for analyzing and judging anomalies in electricity bill auditing.
[0018] Compared with the prior art, the present invention has the following beneficial effects: This invention utilizes a pre-trained electricity bill audit anomaly analysis and judgment model to rapidly analyze pre-processed electricity bill datasets, eliminating the need for manual review. It can complete the audit of massive amounts of electricity bill data in a short time, shortening the audit cycle and exponentially improving audit efficiency. This effectively solves the efficiency bottleneck of traditional methods, enabling more timely and efficient electricity bill audits and providing strong support for the operational flow of power companies. Secondly, this invention constructs a multi-dimensional feature electricity bill dataset and uses gradient boosting trees to learn the gradient of the loss function. Simultaneously, it employs a long short-term memory network for time-series processing to obtain time-series feature data of electricity bills. This key information is then input into the model for comprehensive analysis and judgment. This multi-dimensional and in-depth data analysis approach can accurately capture subtle anomalies in electricity bill data, avoiding subjective errors in manual audits and greatly improving the accuracy of anomaly identification. It ensures that every potential anomaly can be accurately identified, laying a solid foundation for the accuracy of electricity bill management. Then, the pre-trained model of the present invention is trained by learning from a large amount of multi-dimensional electricity cost data. It can automatically learn and understand the electricity cost characteristics and patterns under different electricity consumption scenarios. When faced with new electricity consumption scenarios, it can automatically adjust the analysis and judgment strategy without manually resetting complex rules, accurately identify abnormal situations, and achieve self-adaptation to different electricity consumption scenarios.
[0019] Therefore, this invention effectively reduces labor and management costs. By achieving automated review and accurate anomaly identification, it reduces reliance on a large number of manual reviewers, thus lowering labor costs. At the same time, the efficient and accurate review results also reduce secondary reviews and management costs caused by human error. Attached Figure Description
[0020] The accompanying drawings described herein are for illustrative purposes only and are not intended to limit the scope of the invention in any way. In the drawings: Figure 1 This is a flowchart illustrating the method for analyzing and judging anomalies in electricity bill auditing according to the present invention. Figure 2 This is a flowchart illustrating the training method of a pre-trained electricity bill audit anomaly analysis and judgment model according to the present invention. Figure 3 This is a schematic diagram illustrating the actual steps of the electricity bill audit anomaly analysis and judgment method of the present invention; Figure 4 This is a schematic diagram illustrating the steps of the artificial intelligence model feature engineering in the present invention's method for analyzing and judging anomalies in electricity bill audits; Figure 5 This is a schematic diagram of the structure of an electricity bill audit anomaly analysis and judgment system according to the present invention; Figure 6 This is a schematic diagram of the training system for a pre-trained electricity bill audit anomaly analysis and judgment model according to the present invention; Figure 7 This is a schematic diagram of an electronic device in an embodiment of the present invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0023] To address the problems of existing electricity bill auditing systems, such as inability to automatically identify anomalies, inefficiency due to reliance on extensive manual intervention, inaccuracy and fairness affected by subjective factors, low level of intelligence hindering adaptive rule adjustments, and lack of quality and efficiency analysis and optimization mechanisms, this invention provides a method for analyzing and judging anomalies in electricity bill auditing. Figure 1 As shown, it includes: S100: Preprocess the electricity bill data to be analyzed to obtain the electricity bill dataset to be analyzed; S200: Input the electricity bill dataset to be analyzed into the pre-trained electricity bill audit anomaly analysis and judgment model, perform analysis, obtain analysis results, and obtain abnormal situations of electricity bills based on the analysis results.
[0024] like Figure 2 As shown, a training method for a pre-trained electricity bill audit anomaly analysis and judgment model includes: S201: Obtain electricity bill data and preprocess it to obtain a multi-dimensional feature electricity bill dataset; S202: Use gradient boosting trees to learn the gradient of the loss function from the multi-dimensional feature electricity cost dataset; use a long short-term memory network to perform time-series processing on the multi-dimensional feature electricity cost dataset to obtain electricity cost time-series feature data. S203: Input the gradient of the loss function and the time-series characteristic data of electricity bills into the electricity bill audit anomaly analysis and judgment model for training, and obtain the pre-trained electricity bill audit anomaly analysis and judgment model.
[0025] This method eliminates the need for manual, step-by-step checks, enabling the review of massive amounts of electricity bill data in a short time. This shortens the review cycle, exponentially improves the efficiency of electricity bill review, and effectively solves the efficiency bottleneck problem of traditional methods.
[0026] The following detailed drawings further illustrate the present invention.
[0027] A method for analyzing and judging anomalies in electricity bill audits, such as Figure 3 As shown, it specifically includes: S1: Data Acquisition and Preprocessing By connecting to the power marketing system, smart meter data platform, user file management system and external public data platform, four types of core data are collected: basic electricity fee data, real-time electricity consumption data, user file data and external related data.
[0028] Basic electricity bill data includes users' monthly and quarterly electricity consumption, electricity bill amount, rate standard and payment status, etc. Real-time electricity consumption data includes hourly electricity load and peak-valley electricity distribution uploaded by smart meters; User profile data includes user type, electricity capacity, power supply voltage level, account opening time, historical change records, etc.; among which user types include residential, industrial and commercial, and agricultural. External data includes regional monthly average temperature, seasonal variation data, industrial policy adjustment notices, and holiday arrangements.
[0029] The four types of core data collected were preprocessed to remove outliers, fill in missing values, and standardize the data format to obtain preprocessed electricity bill data.
[0030] Specifically, data exceeding a reasonable range are marked as outliers and removed to avoid interfering with model training; the reasonable range is set based on current electricity pricing. Missing user profile data is filled in by classifying it using historical electricity consumption characteristics. For example, some older users whose electricity consumption types are not labeled are filled in by classifying them using peak-valley electricity consumption ratios. The time format and data units of different systems are standardized, such as unifying "kilowatt-hour" and "degree" as "kWh", and unifying the timestamp as Beijing time "YYYY-MM-DD HH:MM:SS", to ensure data consistency.
[0031] After preprocessing, the electricity bill data is checked for data integrity and it is determined whether the checked electricity bill data meets the requirements for daily electricity consumption calculation. If it does not meet the requirements, it is determined whether the deviation threshold meets the set conditions. If it does meet the conditions, the electricity bill data is obtained.
[0032] Differentiated completeness standards are established based on user type to ensure that the original data meets the minimum sample size requirement for model training: Existing users must have complete daily electricity consumption data for the past 20 days or more. If this is not met, the original error rule will be triggered, and if the data missing rate is too high, manual review is recommended; if the data is met, the user will proceed to the daily electricity consumption calculation stage.
[0033] For newly installed or changed users, data must be collected daily from the transformer energization date to the 24th of that month, meaning there must be no missing data for any single day. Otherwise, it will be judged as "incomplete data" and marked as a user awaiting re-inspection. For example, if a newly installed user's transformer is energized on May 10, 2025, complete data must be ensured for 15 days from May 10 to 24 before subsequent calculations can proceed.
[0034] Based on the data completeness results, a scenario-specific formula is used to calculate daily electricity consumption, thus resolving the calculation deviation problem caused by missing frozen readings. Scenario 1: Data integrity = 100%, meaning no missing data for 23 consecutive days, calculated directly using frozen indicator differences: Electricity consumption on day x = (frozen reading on day x+1) Electricity consumption on day x = (frozen reading on day x+1) × comprehensive rate (Day x frozen data) × Overall multiplier Note: The data collected during the periodic trial calculation is the reading at midnight on the 24th of each month, so 23 days of complete data can cover the entire monthly cycle.
[0035] Scenario 2: Data completeness <100%, meaning there are missing readings. For single-day missing readings, the data is fitted using interpolation of the preceding and following readings.
[0036] For consecutive missing values: use the "historical mean substitution method".
[0037] For example: If a user's reading is missing on May 15th, the most recent reading before that is May 14th (100 kWh), and the most recent reading after that is May 17th (160 kWh). The number of days spanning this period is 3. Therefore, the electricity consumption on May 15th would be: .
[0038] By using the average daily electricity consumption benchmark, the fluctuation range of daily electricity consumption is quantified, providing a reference threshold for anomaly detection: Daily average electricity consumption calculation:
[0039] Daily electricity consumption deviation calculation:
[0040] Differentiated fluctuation thresholds are set based on user voltage levels and electricity usage types to achieve tiered anomaly early warning:
[0041] This review rule serves as a preliminary step in data preprocessing and complements the subsequent XGBoost-LSTM model: it eliminates invalid samples through completeness judgment to reduce model noise; and it inputs "daily electricity consumption deviation" as a derived feature into the model (corresponding to the DIFFERENCE_M_* field in featureTransform.py) to improve the accuracy of anomaly identification. The abnormal probability (P_final) output by the model is combined with the fluctuation threshold of this rule to form a "rule + AI" dual verification (if the rule determines that it is abnormal and the model P_final > 80%, the system will be directly triggered to intercept).
[0042] S2: As Figure 4 As shown, multi-dimensional feature engineering construction Based on the electricity cost data in S1, core feature dimensions are constructed to provide accurate input for the artificial intelligence model. These core features include electricity consumption trend features, rate matching features, user profile features, and external influence features. Electricity consumption trend characteristics include calculating the user's electricity consumption growth rate, electricity price fluctuation coefficient, and peak-valley electricity consumption ratio change rate over the past 3, 6, and 12 months, reflecting the stability of electricity consumption patterns; Electricity consumption growth rate over the past 12 months:
[0043] Electricity price fluctuation factor:
[0044] Peak-valley electricity consumption ratio change rate:
[0045] The rate matching feature compares the actual rate charged by the user with the rate marked in the profile to generate a rate matching degree index.
[0046] User profile features are based on user type and electricity capacity to build classification features. For example, production cycle labels are added for industrial and commercial users, peak season or off-season labels are marked for manufacturing users, and family structure labels are added for residential users, such as elderly people living alone or large families. The external impact feature is to convert temperature data into a temperature sensitivity coefficient and combine it with seasonal and policy factors to generate external impact weights.
[0047] By using feature cross-combination and dimensionality reduction, the high-dimensional features are compressed into 20-30 core feature vectors, reducing the computational complexity of the model while retaining more than 95% of the original information. This completes the construction of multi-dimensional features and yields multi-dimensional feature electricity cost data.
[0048] S3: Artificial Intelligence Model Training and Optimization The electricity bill audit anomaly analysis and judgment model includes gradient boosting tree and long short-term memory network.
[0049] Gradient Boosting Tree (XGBoost) is selected as the main model to identify explicit anomalies such as rate errors and sudden changes in electricity consumption. Leveraging its strong fitting ability to structured data, the mapping relationship between multi-dimensional features and electricity rate anomaly labels is learned to obtain the objective function:
[0050] in, The objective function and the loss function are: , For the true label of the i-th electricity bill sample, Let be the predicted value of the i-th electricity bill sample; regularization term , The number of leaf nodes. Leaf weight, , .
[0051] The learning rate η = 0.05, the maximum tree depth = 6, the subsampling rate = 0.8, the early stopping rounds = 10, and training is stopped when the validation set loss has not improved for 10 consecutive rounds.
[0052] The gradient of the loss function is obtained by taking the derivative of the objective function. Based on the gradient of the loss function, a new tree is added to specifically learn the residuals left by the previous model. This process is repeated continuously, with each new tree correcting the errors of the previous round, until the loss value meets the set conditions, thus obtaining the trained gradient boosting tree model.
[0053] By pairing a Long Short-Term Memory (LSTM) network as an auxiliary model, and targeting the gradual abnormal changes in electricity consumption trends, long-term dependencies are captured through time-series data training, thus compensating for the main model's shortcomings in recognizing time-series features. Network structure: 2-layer LSTM units (hidden layer dimension 64→128) + fully connected layer (output dimension 1), using ReLU activation function, dropout rate 0.2 to suppress overfitting.
[0054] Input sequence: Daily electricity load curves of users over the past 12 months, divided into 24-hour time steps.
[0055] Output: Electricity consumption trend forecast for the next month, used to detect hidden anomalies such as slow increases in electricity consumption.
[0056] Long Short-Term Memory (LSTM) networks are used to process multi-dimensional electricity bill data over time to obtain time-series electricity bill feature data. Specifically, LSTM uses its unique gating mechanism to take the user's daily electricity load curves from the past 12 months as the input sequence, processes the multi-dimensional electricity bill data step by step, selectively memorizes long-term electricity consumption patterns (such as seasonal cycles) and filters out short-term fluctuations, and finally outputs a prediction of the electricity consumption trend for the next month, thereby extracting time-series feature data that reflects the user's long-term electricity consumption behavior patterns.
[0057] Using multi-dimensional characteristic electricity bill data as training data, the data is labeled as normal or abnormal. Abnormal samples include subcategories such as rate errors, meter malfunctions, and data entry errors. The training data is divided into training and validation sets in a 7:3 ratio. The five-fold cross-validation method is used to train the electricity bill audit anomaly analysis and judgment model. If the training results meet the set requirements, the pre-trained electricity bill audit anomaly analysis and judgment model is obtained.
[0058] Each month, based on newly added audited data, including anomaly labeling results after manual review, the model is incrementally trained and feature weights are updated. For example, when a new electricity pricing policy is implemented in a certain region, the weight of the rate matching feature is automatically increased. A model performance evaluation index system is established, with anomaly identification accuracy, false positive rate, and false negative rate as the core indicators. When the indicators exceed the preset threshold, the model parameters are adjusted to ensure the long-term applicability of the model.
[0059] S4: Anomaly Analysis and Result Output Input the electricity bill dataset to be analyzed into the pre-trained electricity bill audit anomaly analysis and judgment model. The model outputs the judgment result through the following logic: The main model XGBoost is used to calculate the probability value of abnormal electricity charges. When the probability is greater than 80%, it is initially judged as abnormal. The auxiliary model (LSTM) performs a second verification on users who are initially judged as normal but whose electricity consumption trend is abnormal, and supplements the identification of hidden anomalies. The abnormal results are corrected by combining the characteristics of external influences, such as excluding normal electricity charge increases caused by electricity price policy adjustments, to avoid misjudgment.
[0060] Then, a user-level anomaly report is generated: each abnormal user is labeled with the anomaly type, such as incorrect rate application or suspected meter malfunction, the cause of the anomaly is speculated, such as the user is actually an industrial or commercial user, or is mistakenly billed at the residential rate, and key supporting data, such as a 6-month rate comparison table and an electricity consumption trend chart. By statistically analyzing the percentage of abnormal users, the distribution of the top three abnormal types, and the concentration of abnormalities in different regions, data support is provided for management decisions. The list of abnormal users is automatically pushed to the reviewers' workbench, marked with high and low priority, guiding manual review to focus on core issues. At the same time, it supports the closed-loop entry of abnormal rectification results, realizing full-process management of judgment, rectification, and verification.
[0061] In summary, this method, through the automated processing capabilities of artificial intelligence algorithms, enables parallel analysis of batch data. After classifying user electricity bill data according to preset dimensions, the algorithm simultaneously performs data cleaning, feature extraction, and anomaly identification, solving the efficiency bottleneck of large-scale user review and ensuring timely electricity bill settlement, reducing user complaints caused by review delays. Secondly, this method, through a multi-dimensional feature fusion model and deep learning algorithms, can simultaneously incorporate core features such as electricity trend features, rate matching features, user profile features, and external influence features. The algorithm autonomously learns the normal electricity consumption baseline of different users, accurately capturing problems such as electricity bill calculation errors and abnormal electricity consumption caused by meter malfunctions, while avoiding misjudgments of normal electricity fluctuations, balancing the rigor of review with user experience. Thirdly, this method, through user-layered modeling and dynamic threshold adjustment mechanisms, first divides users into multiple subgroups according to electricity consumption type and user scale, and then trains an artificial intelligence model separately for each group. The model autonomously learns the electricity consumption fluctuation patterns of that group and generates personalized normal ranges. This solves the drawbacks of traditional one-size-fits-all rules, adapts to the actual electricity consumption characteristics of different users, and improves the flexibility and applicability of anomaly judgment. Fourth, this method uses a collaborative model of automated review by artificial intelligence and manual review, requiring only a small number of people to be responsible for the final review of abnormal data; at the same time, the algorithm can automatically generate anomaly analysis reports, clearly identifying the anomaly type, the inferred cause of the anomaly, and supporting data, reducing the time required for manual analysis.
[0062] The present invention will be further explained and illustrated below with reference to specific embodiments.
[0063] This embodiment is based on the actual electricity bill data of State Grid Beijing Electric Power Company from January 2024 to June 2025, covering 320,000 residential users and 80,000 industrial and commercial users, and obtains the incremental synchronous user basic electricity bill data at 2:00 am every day.
[0064] Subscribe to the device topic to receive 15-minute electricity load data, JSON format example: {"timestamp":"2025-10-01 08:15:00", "load": 1.2, "unit": "kW"}; call the RESTful API to obtain profile data such as user type and voltage level, with a response timeout threshold set to 5 seconds; and obtain the daily average temperature data.
[0065] Outlier removal was performed on the above data, and extreme data was filtered using the 3σ principle (|x-μ|>3σ), such as monthly electricity consumption of residential users >10000kWh (σ=500kWh, μ=300kWh). Missing user type fields were automatically filled using an electricity consumption characteristic classification algorithm. Standardized timestamps were used to unify units. The missing rate was then calculated; if data for ≥20 days was complete, it proceeded to the calculation stage. Data continuity from the transformer power-on date to the 24th was verified. The actual implemented tariff rate was compared with the archived tariff rate to generate a matching index.
[0066] The labeled data from January 2023 to June 2024 was divided into training and validation sets in a 7:3 ratio; the learning rate η=0.05, the maximum tree depth=6, and the subsampling rate=0.8 were set.
[0067] The user's 24-hour electricity load curve over the past 12 months; 2-layer LSTM (hidden layers 64→128) + fully connected layer (output dimension 1), Dropout=0.2 to suppress overfitting; minimize MSE loss to capture latent anomalies such as "slowly increasing electricity consumption".
[0068] The system automatically intercepts and generates rectification work orders, pushes them to the manual review workbench, and simultaneously generates a PDF report containing the anomaly type, supporting data, and rectification suggestions; it also calculates the anomaly rate, the top 3 anomaly types, and generates a regional anomaly heat map; and it batch writes to the Oracle database with a response time of ≤5 minutes / 100,000 households.
[0069] The second objective of this invention is to propose an anomaly analysis and judgment system for electricity bill auditing, such as... Figure 5 As shown, it includes: Data set acquisition module 100: used to preprocess the electricity bill data to be analyzed to obtain the electricity bill dataset to be analyzed; Analysis Result Module 200: This module is used to input the electricity bill dataset to be analyzed into the pre-trained electricity bill audit anomaly analysis and judgment model, perform analysis, obtain analysis results, and obtain anomalies in electricity bills based on the analysis results. like Figure 6 As shown, a training system for a pre-trained electricity bill audit anomaly analysis and judgment model includes: Multi-dimensional feature module 201: used to acquire electricity bill data and preprocess it to obtain a multi-dimensional feature electricity bill dataset; Model processing module 202: Used to learn the gradient of the loss function by using a gradient boosting tree on the multi-dimensional feature electricity cost dataset; and to perform time-series processing on the multi-dimensional feature electricity cost dataset by using a long short-term memory network to obtain electricity cost time-series feature data. Pre-training module 203: This module is used to input the gradient of the loss function and the time-series feature data of electricity bills into the electricity bill audit anomaly analysis and judgment model for training, thereby obtaining the pre-trained electricity bill audit anomaly analysis and judgment model.
[0070] like Figure 7 As shown, a third objective of this invention is to provide an electronic device comprising a processor 301, a memory 302, and a display screen 303. The memory 302 and the display screen 303 are both connected to the processor 301, such as via a bus 304. Optionally, the electronic device may further include a transceiver 305. It should be noted that in practical applications, the transceiver 305 is not limited to one type, and the structure of this electronic device does not constitute a limitation on the embodiments of this application.
[0071] Processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0072] Bus 304 may include a pathway for transmitting information between the aforementioned components. Bus 304 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 304 can be divided into address bus, data bus, control bus, etc.
[0073] The memory 302 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or it may be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0074] The memory 302 is used to store application code that executes the solution of this application, and its execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 302 to implement the content shown in the foregoing method embodiments.
[0075] Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0076] A fourth objective of this invention is to provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, performs the aforementioned functions. Figure 1 The illustrated method embodiments include various processes. For example, a memory may include instructions that can be executed by a processor of an electronic device to perform the described method.
[0077] A computer-readable storage medium can be a tangible device that holds and stores instructions used by an instruction execution device. A computer-readable storage medium can be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof. Specifically, a computer-readable storage medium can be a portable computer disk, a hard disk, a USB flash drive, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), staging random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory stick, floppy disk, optical disk, magnetic disk, mechanical encoding device, or any combination thereof.
[0078] A fifth objective of this invention is to provide a computer program product comprising computer instructions that, when executed by a processor, implement the above-described... Figure 1 The various processes of the method embodiments shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0079] Many embodiments and applications beyond the examples provided will be apparent to those skilled in the art upon reading the foregoing description. Therefore, the scope of this teaching should not be determined by reference to the foregoing description, but rather by reference to the foregoing claims and the full scope of their equivalents. For purposes of completeness, all articles and references, including patent applications and publications, are incorporated herein by reference. The omission of any aspect of the subject matter disclosed herein in the foregoing claims is not intended as a waiver of that subject matter, nor should it be construed as an indication that the applicant has not considered that subject matter as part of the disclosed inventive subject matter.
[0080] The above content provides a further detailed description of the present invention. It should not be construed that the specific embodiments of the present invention are limited to this. For those skilled in the art, several simple deductions or substitutions can be made without departing from the concept of the present invention, and all such deductions or substitutions should be considered to fall within the scope of protection of the present invention as defined by the submitted claims.
Claims
1. An electricity charge audit anomaly analysis and judgment method, characterized by comprising: preprocessing the electricity charge data to be analyzed to obtain an electricity charge data set to be analyzed; inputting the electricity charge data set to be analyzed into a pre-trained electricity charge audit anomaly analysis and judgment model for analysis to obtain an analysis result, and obtaining an abnormal situation of the electricity charge according to the analysis result; the training method of the pre-trained electricity charge audit anomaly analysis and judgment model, comprising: obtaining electricity charge data and preprocessing the same to obtain a multi-dimensional feature electricity charge data set; learning the multi-dimensional feature electricity charge data set by using a gradient boosting tree to obtain the gradient of a loss function, and performing time series processing on the multi-dimensional feature electricity charge data set by using a long short-term memory network to obtain electricity charge time series feature data; inputting the gradient of the loss function and the electricity charge time series feature data into the electricity charge audit anomaly analysis and judgment model for training processing to obtain the pre-trained electricity charge audit anomaly analysis and judgment model.
2. The method according to claim 1, characterized in that, The method of obtaining electricity charge data and preprocessing the same to obtain a multi-dimensional feature electricity charge data set comprises: collecting basic frozen data, real-time electricity consumption data, user profile data and external associated data to form core data; preprocessing the core data to eliminate abnormal values in the electricity charge data, filling in missing values, and then unifying the data format to obtain preprocessed electricity charge data; performing data completeness verification on the preprocessed electricity charge data, and obtaining electricity charge data if the verification is qualified; performing core feature dimension processing based on the electricity charge data to obtain electricity consumption trend features, rate matching features, user portrait features and external influence features, and forming a multi-dimensional feature electricity charge data set.
3. The method of claim 1, wherein, The method of learning the multi-dimensional feature electricity charge data set by using a gradient boosting tree to obtain the gradient of a loss function comprises: using a gradient boosting tree to learn the mapping relationship between multi-dimensional features in the multi-dimensional feature electricity charge data set and electricity charge anomaly labels to obtain a target function; wherein, is an objective function, is a loss function; is a true label of the i-th electricity cost sample, is a predicted value of the i-th electricity cost sample; is a regularization term; adding a next tree, learning the errors left by the previous tree according to the target function, correcting the errors of the previous tree by each new tree, and repeating until the loss value meets the set condition, then obtaining a trained gradient boosting tree to obtain the gradient of the loss function.
4. The method of claim 1, wherein, The method of performing time series processing on the multi-dimensional feature electricity charge data set by using a long short-term memory network to obtain electricity charge time series feature data comprises: using daily electricity load curves as input sequences of the long short-term memory network, processing multi-dimensional electricity charge data by time steps, selectively remembering long-term electricity consumption patterns and filtering short-term fluctuations, and outputting electricity consumption trend prediction; extracting time series feature data reflecting user long-term electricity consumption behavior rules in the electricity consumption trend prediction to obtain electricity charge time series feature data.
5. The method of claim 1, wherein, The method of inputting the gradient of the loss function and the electricity charge time series feature data into the electricity charge audit anomaly analysis and judgment model for training processing to obtain the pre-trained electricity charge audit anomaly analysis and judgment model comprises: inputting the gradient of the loss function and the electricity charge time series feature data into the electricity charge audit anomaly analysis and judgment model to obtain a trained electricity charge audit anomaly analysis and judgment model; The training set in the multi-dimensional feature electricity charge data set is input into the trained electricity charge review abnormal analysis and judgment model, a five-fold cross-validation method is used for training, and a trained electricity charge review abnormal analysis and judgment model and a training result are obtained; The verification set in the multi-dimensional feature electricity charge data set is input into the trained electricity charge review abnormal analysis and judgment model, and a verification result is obtained; The training result and the verification result are compared, and if the comparison result meets the set requirement, a pre-trained electricity charge review abnormal analysis and judgment model is obtained.
6. The method of claim 1, wherein, The electricity charge data set to be analyzed is input into the pre-trained electricity charge review abnormal analysis and judgment model for analysis, and an analysis result is obtained. According to the analysis result, the abnormal situation of the electricity charge is obtained, including: The electricity charge data set to be analyzed is input into the pre-trained electricity charge review abnormal analysis and judgment model, and the electricity charge abnormal probability value is calculated. When the electricity charge abnormal probability value is greater than the set condition, it is determined as abnormal data; The normal data with electricity trend abnormal data is subjected to secondary verification, and the implicit abnormal data is identified; According to the abnormal data and the implicit abnormal data, an abnormal result is obtained. The abnormal result is analyzed, each abnormal result is labeled with an abnormal type, and the abnormal situation of the electricity charge is formed.
7. An electricity charge review abnormal analysis and judgment system, characterized by comprising: A data set acquisition module for preprocessing the electricity charge data to be analyzed to obtain an electricity charge data set to be analyzed; An analysis result module for inputting the electricity charge data set to be analyzed into a pre-trained electricity charge review abnormal analysis and judgment model for analysis to obtain an analysis result, and obtaining the abnormal situation of the electricity charge according to the analysis result; The training method of the pre-trained electricity charge review abnormal analysis and judgment model comprises: Obtaining electricity charge data and preprocessing to obtain a multi-dimensional feature electricity charge data set; Using gradient boosting tree to learn the multi-dimensional feature electricity charge data set to obtain the gradient of the loss function; using long short-term memory network to process the multi-dimensional feature electricity charge data set in time sequence to obtain electricity time sequence feature data; The gradient of the loss function and the electricity time sequence feature data are input into the electricity charge review abnormal analysis and judgment model for training processing to obtain a pre-trained electricity charge review abnormal analysis and judgment model.
8. An electronic device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the electricity charge review abnormal analysis and judgment method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the electricity charge review abnormal analysis and judgment method of any one of claims 1-6.
10. A computer program product, characterised in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the electricity charge review abnormal analysis and judgment method of any one of claims 1-6.