An electricity fee accounting abnormality tracing method and system based on association rule mining

By using a multi-source data fusion method based on association rule mining and Bayesian networks, the efficiency and accuracy issues of the traditional electricity billing model under the power market reform were solved. This enabled intelligent tracing and risk control of electricity billing anomalies, thereby improving the intelligence level and operational efficiency of the power market.

CN122114984APending Publication Date: 2026-05-29STATE GRID SHANDONG ELECTRIC POWER CO MARKETING SERVICE CENT (MEASURING CENT)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID SHANDONG ELECTRIC POWER CO MARKETING SERVICE CENT (MEASURING CENT)
Filing Date
2026-01-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Traditional electricity billing models are inefficient and struggle to automatically uncover the underlying causes of anomalies in the face of challenges such as the expansion of data volume, the complexity of transaction rules, high timeliness requirements, and significant risk management pressures following the reform of the electricity market. This results in biased anomaly assessments and insufficient risk control.

Method used

This study employs a method based on association rule mining, combining multi-source data fusion with an improved association rule mining algorithm. It utilizes Bayesian networks for reverse reasoning to construct a multi-dimensional electricity consumption data system, mines strong association rules, and traces the source of electricity bill anomalies. The search space is optimized through Apriori pruning strategy, and a Bayesian network model is constructed to trace the source of anomalies in electricity consumption and billing audits.

Benefits of technology

It improves the intelligence level and processing efficiency of electricity billing, can automatically identify abnormal patterns and accurately trace the cause, reduce reliance on manual verification, reduce economic losses and operational risks, and improve the timeliness and accuracy of electricity market settlement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122114984A_ABST
    Figure CN122114984A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of power marketing, and provides an electricity fee accounting abnormality traceability method and system based on association rule mining, which comprises the following steps: obtaining a multi-dimensional electricity fee auditing abnormality traceability data system; performing data mining on the obtained data system based on an association analysis algorithm of a fusion Apriori pruning strategy to obtain strong association rules; constructing a Bayesian network model with the electricity fee auditing result as a result node by using the obtained strong association rules; performing electricity fee auditing abnormality traceability analysis according to the constructed Bayesian network model to complete the electricity fee accounting abnormality traceability based on association rule mining.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electricity marketing technology, specifically relating to a method and system for tracing the source of anomalies in electricity billing based on association rule mining. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] With the advancement of my country's strategic goals of "carbon peaking and carbon neutrality" and the deepening of power market reform, the construction of a unified national power market system has entered a critical stage. Pilot provinces for reform are at the forefront in opening up power market transactions to manufacturing enterprises and promoting market-based pricing for renewable energy. While these reform measures have greatly stimulated market vitality, they have also brought unprecedented complex challenges to power transaction settlement.

[0004] Currently, facing this changing landscape, the traditional electricity billing model is encountering severe challenges: (1) The data volume has grown exponentially due to the full entry of manufacturing enterprises into the market, the surge in new energy entities, and the high-frequency trading in the electricity spot market; (2) The trading rules are extremely complex. Medium- and long-term trading is intertwined with spot trading, electricity trading and ancillary service trading coexist, and diversified pricing mechanisms such as new energy bidding and floating coal benchmark prices are superimposed, and the rules are updated frequently; (3) The timeliness and accuracy of settlement are extremely important, especially in the context of the trial operation of quarterly settlement and future continuous settlement. Any accounting delay or error may cause market disputes. (4) The pressure of risk management is enormous. Abnormal accounting may not only lead to huge economic losses, but also affect market fairness and participants' confidence.

[0005] Traditional electricity billing mainly relies on manual experience for verification and comparison. In the face of the new situation, its drawbacks are becoming increasingly apparent: it is inefficient and cannot handle massive data processing; it relies on expert experience and is prone to oversights; and it lacks the ability to automatically and accurately trace the causes of anomalies.

[0006] Most existing automated anomaly detection methods focus only on single dimensions such as sudden changes in electricity consumption curves or abnormal payment records. They fail to integrate multi-source heterogeneous data such as equipment operating status, user behavior patterns, and external climate environment, resulting in one-sided anomaly judgments and an inability to automatically uncover the deeper underlying causes of anomalies. For example, it is difficult to distinguish between anomalies caused by meter malfunctions, human tampering, seasonal load changes, or spot price fluctuations.

[0007] Therefore, there is an urgent need for an electricity billing anomaly tracing technology that can integrate multi-source data, automatically mine abnormal patterns, and intelligently trace the root causes, in order to improve the intelligence level, processing efficiency, and risk prevention and control capabilities of electricity market settlement. Summary of the Invention

[0008] To address the aforementioned issues, this invention proposes a method and system for tracing anomalies in electricity billing based on association rule mining. By combining multi-source data fusion and improved association rule mining, it analyzes multi-dimensional electricity consumption data, employs association rule mining algorithms to uncover strong association rules, and utilizes the reverse reasoning capabilities of Bayesian networks to trace the source of anomalies in electricity consumption and billing. This improves the efficiency of identifying anomalies in electricity consumption and billing audits, quickly locates the cause, and accurately traces the source.

[0009] According to some embodiments, the first solution of the present invention provides a method for tracing the source of anomalies in electricity billing based on association rule mining, which adopts the following technical solution: A method for tracing the source of anomalies in electricity billing based on association rule mining, comprising: Acquire a multi-dimensional data system for tracing the source of anomalies in volume and fee audits; The association analysis algorithm based on the Apriori pruning strategy is used to perform data mining on the acquired data system to obtain strong association rules. Using the obtained strong association rules, a Bayesian network model with the result of the quantity and fee review is constructed. Based on the constructed Bayesian network model, anomaly tracing analysis of electricity billing audit was conducted, and anomaly tracing of electricity billing calculation based on association rule mining was completed.

[0010] As a further technical limitation, the constructed Bayesian network model represents the causal relationships between variables through a directed acyclic graph; specifically, once the set of parent nodes of any node is determined, the variable and all its non-descendant nodes satisfy the conditional independence assumption; the conditional independence assumption adopts a joint probability distribution, that is, the product of the conditional probabilities of each node, specifically manifested as follows: ; in, Let pa(X) represent the joint probability distribution of the quantities. i ) represents variable X i The set of direct parent nodes, It is a finite set of variables.

[0011] As a further technical limitation, it is assumed that there exists a set of mutually exclusive complete event sets. It satisfies P( )≥0; i=1,2,3,...n The condition is that when another conditional event A occurs simultaneously with all the events in the complete event set, according to Bayes' theorem, we can obtain: ; in, Represents the prior probability. This represents a combination of posterior probability and observed data. This represents conditional probability, describing the likelihood of event B occurring given that event A has occurred.

[0012] As a further technical limitation, in the process of analyzing the source of the volume and fee audit anomalies, the probability of the target node's volume and fee audit anomaly is set to 100%. Using Bayesian back reasoning, the posterior probability of each anomaly's cause is inferred, i.e., the source probability, to analyze the possible causes of the volume and fee anomalies; specifically: Select target nodes and use the volume and cost anomalies as result nodes to construct a Bayesian causal network. The strength of causal relationships between nodes is quantified by a conditional probability table. Set prior and observed values, assign prior probability to each accident node to reflect its independent probability of occurrence, force the probability of the target node's quantity and fee audit abnormality to be set to 100%, and simulate the observation conditions for the known quantity and fee audit abnormality to occur. Solve for the posterior probability for each causal point. ,pass Calculating the posterior probability, since P(B)=1, can be simplified to... = ; in, This represents the conditional probability, i.e., if the cause... The probability of occurrence leading to abnormal charges; Compare the posterior probabilities of all causes The higher the value, the greater the contribution of the cause to the volume and fee anomaly; by sorting and identifying key risk factors, the source analysis of volume and fee audit anomalies is completed.

[0013] As a further technical limitation, in the data mining process, an association analysis algorithm that integrates the Apriori pruning strategy is used to mine associations of electricity fee anomalies. The Apriori algorithm and the association analysis algorithm are integrated and improved. The Apriori pruning strategy is used to reduce the number of candidate itemsets, and the efficient tree structure of the association analysis algorithm is combined to accelerate the mining of frequent itemsets. The search space is optimized through the prior knowledge of Apriori to complete the data mining and obtain strong association rules.

[0014] As a further technical limitation, the acquired multi-dimensional data system for tracing anomalies in electricity billing audits includes at least user electricity consumption data, equipment status data, and external environment data. Specifically, the user electricity consumption data includes electricity bill amount, whether it is overdue, and the type of electricity billing anomaly. The equipment status data includes equipment operating status and equipment communication status. The external environment data includes temperature and season. The types of electricity billing anomalies include bill generation anomalies, spot calculation anomalies, and electricity price execution anomalies. The electricity bill amount, temperature, and equipment status are all classified into discrete levels.

[0015] According to some embodiments, the second aspect of the present invention provides a system for tracing the source of anomalies in electricity billing based on association rule mining, which adopts the following technical solution: A system for tracing the source of anomalies in electricity billing based on association rule mining, comprising: The acquisition module is configured to acquire a multi-dimensional data system for tracing the source of anomalies in the quantity and fee audit. The data mining module is configured to perform data mining on the acquired data system based on an association analysis algorithm that incorporates Apriori pruning strategies to obtain strong association rules. The building module is configured to use the acquired strong association rules to construct a Bayesian network model with the volume and fee audit results as the result nodes. The traceability module is configured to perform source tracing analysis of anomalies in quantity and fee audits based on the constructed Bayesian network model, and to complete source tracing of anomalies in electricity billing based on association rule mining.

[0016] As a further technical limitation, the constructed Bayesian network model uses a directed acyclic graph to represent the causal relationships between variables; Specifically, once the set of parent nodes of any given node is determined, the variable and all its non-descendant nodes satisfy the conditional independence assumption; this conditional independence assumption adopts a joint probability distribution, that is, the product of the conditional probabilities of each node, specifically manifested as follows: ; in, Let pa(X) represent the joint probability distribution of the quantities. i ) represents variable X i The set of direct parent nodes, It is a finite set of variables.

[0017] As a further technical limitation, it is assumed that there exists a set of mutually exclusive complete event sets. It satisfies P( )≥0; i=1,2,3,...n The condition is that when another conditional event A occurs simultaneously with all the events in the complete event set, according to Bayes' theorem, we can obtain: ; in, Represents the prior probability. This represents a combination of posterior probability and observed data. This represents conditional probability, describing the likelihood of event B occurring given that event A has occurred.

[0018] As a further technical limitation, in the process of analyzing the source of the volume and fee audit anomalies, the probability of the target node's volume and fee audit anomaly is set to 100%. Using Bayesian back reasoning, the posterior probability of each anomaly's cause is inferred, i.e., the source probability, to analyze the possible causes of the volume and fee anomalies; specifically: Select target nodes and use the volume and cost anomalies as result nodes to construct a Bayesian causal network. The strength of causal relationships between nodes is quantified by a conditional probability table. Set prior and observed values, assign prior probability to each accident node to reflect its independent probability of occurrence, force the probability of the target node's quantity and fee audit abnormality to be set to 100%, and simulate the observation conditions for the known quantity and fee audit abnormality to occur. Solve for the posterior probability for each causal point. ,pass Calculating the posterior probability, since P(B)=1, can be simplified to... = ; in, This represents the conditional probability, i.e., if the cause... The probability of occurrence leading to abnormal charges; Compare the posterior probabilities of all causes The higher the value, the greater the contribution of the cause to the volume and fee anomaly; by sorting and identifying key risk factors, the source analysis of volume and fee audit anomalies is completed.

[0019] As a further technical limitation, in the data mining process, an association analysis algorithm that integrates the Apriori pruning strategy is used to mine associations of electricity fee anomalies. The Apriori algorithm and the association analysis algorithm are integrated and improved. The Apriori pruning strategy is used to reduce the number of candidate itemsets, and the efficient tree structure of the association analysis algorithm is combined to accelerate the mining of frequent itemsets. The search space is optimized through the prior knowledge of Apriori to complete the data mining and obtain strong association rules.

[0020] As a further technical limitation, the acquired multi-dimensional data system for tracing anomalies in electricity billing audits includes at least user electricity consumption data, equipment status data, and external environment data. Specifically, the user electricity consumption data includes electricity bill amount, whether it is overdue, and the type of electricity billing anomaly. The equipment status data includes equipment operating status and equipment communication status. The external environment data includes temperature and season. The types of electricity billing anomalies include bill generation anomalies, spot calculation anomalies, and electricity price execution anomalies. The electricity bill amount, temperature, and equipment status are all classified into discrete levels.

[0021] According to some embodiments, a third aspect of the present invention provides a computer-readable storage medium, employing the following technical solution: A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the electricity billing anomaly tracing method based on association rule mining as described in the first aspect of the present invention.

[0022] According to some embodiments, the fourth aspect of the present invention provides an electronic device, which adopts the following technical solution: An electronic device includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, it implements the steps in the method for tracing the source of anomalies in electricity billing based on association rule mining as described in the first aspect of the present invention.

[0023] According to some embodiments, the fifth aspect of the present invention provides a computer program product, which adopts the following technical solution: A computer program product includes software code, wherein the program in the software code performs the steps of the electricity billing anomaly tracing method based on association rule mining as described in the first aspect of the present invention.

[0024] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention combines multi-source data fusion with improved association rule mining, analyzes multi-dimensional electricity consumption data, employs association rule mining algorithms to uncover strong association rules, and utilizes the reverse reasoning capabilities of Bayesian networks for tracing the source of consumption and billing anomalies. It overcomes the limitations of traditional single-dimensional anomaly detection, constructing a multi-dimensional data system encompassing users, devices, and the environment. Through association rule mining, it can discover complex association patterns such as "high-temperature season, user overdue payments, and simultaneous spot calculation anomalies" and "surge in electricity consumption," providing richer and more accurate contextual information for anomaly determination.

[0025] This invention uses Bayesian networks for reasoning, which can not only output a judgment of "whether it is abnormal", but also give the probability of various potential causes in the form of probabilities, which greatly enhances the interpretability of the model and helps operation and maintenance personnel understand the logic of the anomaly, rather than treating it as a "black box" conclusion.

[0026] This invention improves upon the classic FP-growth algorithm (association analysis algorithm) by incorporating Apriori's pruning strategy. This effectively reduces invalid search paths and the size of conditional FP-trees in the early stages of frequent itemset mining, resulting in higher operational efficiency compared to traditional algorithms when processing massive amounts of electricity billing data, thus meeting the high demands of the electricity market for timely settlement. The entire process, from data fusion and pattern mining to causal reasoning, can be completed automatically, significantly reducing reliance on manual verification and expert experience, and lowering labor costs. Furthermore, it can continuously learn and update association rules and network parameters from new data, possessing the ability to self-evolve and optimize.

[0027] Through continuous correlation mining and probabilistic tracing, this invention enables power companies to identify high-frequency, high-risk abnormal pattern combinations (such as specific equipment being prone to failure in specific seasons), thereby enabling targeted equipment maintenance, user electricity behavior guidance, or rule optimization, transforming passive handling into proactive prevention, and effectively reducing operational risks and economic losses. Attached Figure Description

[0028] The accompanying drawings, which form part of this embodiment, are used to provide a further understanding of this embodiment. The illustrative embodiments and their descriptions are used to explain this embodiment and do not constitute an improper limitation of this embodiment.

[0029] Figure 1 This is a flowchart of the electricity billing anomaly tracing method based on association rule mining in Embodiment 1 of the present invention; Figure 2 This is an architecture diagram of the electricity billing anomaly tracing method based on association rule mining in Embodiment 1 of the present invention; Figure 3 This is a structural block diagram of the electricity billing anomaly tracing system based on association rule mining in Embodiment 2 of the present invention. Detailed Implementation

[0030] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0031] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, 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.

[0032] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0033] In this invention, terms such as "upper," "lower," "left," "right," "front," "back," "vertical," "horizontal," "side," and "bottom" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used only to facilitate the description of the structural relationships of the various components or elements of this invention and do not specifically refer to any component or element in this invention. They should not be construed as limiting the invention.

[0034] In this invention, terms such as "fixed connection," "connected," and "linked" should be interpreted broadly, indicating a fixed connection, an integral connection, or a detachable connection; a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can determine the specific meaning of these terms in this invention based on the specific circumstances, and they should not be construed as limitations on the invention.

[0035] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0036] Example 1 Embodiment 1 of this invention introduces a method for tracing the source of anomalies in electricity billing based on association rule mining.

[0037] like Figure 1 The method for tracing the source of anomalies in electricity billing based on association rule mining, as shown, includes: Acquire a multi-dimensional data system for tracing the source of anomalies in volume and fee audits; The association analysis algorithm based on the Apriori pruning strategy is used to perform data mining on the acquired data system to obtain strong association rules. Using the obtained strong association rules, a Bayesian network model with the result of the quantity and fee review is constructed. Based on the constructed Bayesian network model, anomaly tracing analysis of electricity billing audit was conducted, and anomaly tracing of electricity billing calculation based on association rule mining was completed.

[0038] Traditional electricity billing relies on manual verification, which is inefficient and prone to missing anomalies. While existing methods can detect anomalies, many only analyze electricity consumption or payment records, ignoring related factors such as equipment status and user behavior, and cannot automatically trace the root cause of anomalies (such as meter malfunction, human tampering, or weather factors). Therefore, this embodiment combines multi-source data fusion with improved association rule mining techniques and methods, proposing a new approach... Figure 2 The electricity billing anomaly tracing method shown is based on association rule mining. It analyzes multi-dimensional electricity consumption data, mines strong association rules using association rule mining algorithms, and leverages the reverse reasoning capabilities of Bayesian networks to trace the source of consumption and billing anomalies. This improves the efficiency of identifying anomalies in consumption and billing audits, quickly locates the cause, and accurately traces the source. The main contents are as follows: (1) A multi-dimensional data-based system for tracing the source of abnormalities in the billing audit was constructed, integrating user electricity consumption data (electricity amount, whether it is overdue, electricity abnormality), equipment status data (equipment operation status, equipment communication status), and external environment data (temperature, season) to construct a multi-dimensional abnormal frequent itemset system; (2) The FP-growth algorithm is improved. In the FP-growth conditional pattern FP tree generation stage, Apriori pruning conditions (such as "subsets of frequent itemsets must be frequent") are introduced to filter out low-support items in advance and reduce the size of the conditional FP tree. (3) Introduce Bayesian network for anomaly tracing analysis. Using the target node as the benchmark, use Bayesian backward reasoning to infer the posterior probability of each anomaly cause and the specific tracing probability.

[0039] As one or more implementation methods, this embodiment mainly considers three dimensions in the process of constructing the data usage audit anomaly tracing system, as shown in Table 1: user electricity usage, equipment status data, and external environment data. By merging the multi-dimensional data under consideration, a complete transaction set containing all attributes is formed, ensuring that each transaction contains three types of attributes: user electricity usage, equipment status, and external environment.

[0040] Table 1. Dimensional Indicators for Anomaly Tracing

[0041] FP-tree (Frequent Pattern Tree) is a data structure for efficiently mining frequent itemsets. Its core advantage lies in achieving compressed storage of transaction data through two database scans and directly extracting frequent patterns from the tree structure, thus avoiding the inefficiency of multiple database scans in the traditional Apriori algorithm.

[0042] As one or more embodiments, this embodiment uses the FP-growth algorithm for electricity charge anomaly association mining, combines and improves the Apriori algorithm and the FP-growth algorithm, uses the pruning strategy of Apriori to reduce the number of candidate item sets, and combines the efficient tree structure of FP-growth to accelerate the mining of frequent item sets. Through this combination method, while maintaining the efficiency of FP-growth, the algorithm further optimizes the search space using the prior knowledge of Apriori; Specifically: (1) Scan the database, count the single-item frequency, and generate frequent item sets ; (2) Candidate generation and pruning (Apriori stage): Based on generate candidate item sets ; Use the Apriori principle for pruning. If a subset of a certain candidate item set is not in , then delete this candidate item; (3) Construct an FP tree from the preprocessed data, only retain frequent items, and avoid over-mining; (4) Extract conditional pattern bases from the FP tree, generate conditional FP trees, and recursively mine frequent item sets. The optimization process combining the pruning strategy of Apriori is as follows: 1) Pre-pruning When constructing a conditional FP tree, only retain frequent items (filtered by support).

[0043] 2) Path pruning If the total support of the item set on a certain path < min_support, terminate the recursive traversal of this branch.

[0044] Support represents the frequency of the item set X appearing in all transactions, that is, the universality of the item set X. The mathematical expression is: ; 3) Subset verification When merging the results, ensure that all subsets are frequent item sets.

[0045] The topological structure of the Bayesian network in this embodiment formally represents the causal association relationship between variables through a directed acyclic graph (DAG). Its core feature is that when the set of parent nodes of any node is determined, this variable and all its non-child nodes (i.e., non-descendant nodes) satisfy the conditional independence assumption. This feature enables the joint probability distribution of variables to be decomposed into the product form of the conditional probabilities of each node, specifically manifested as: ; where, pa(X i ) represents the variable Xi The set of direct parent nodes, It is a finite set of variables.

[0046] The decomposition method in this embodiment not only demonstrates the ability of Bayesian networks to simplify complex probabilistic relationships, but also provides a theoretical basis for their application in probabilistic reasoning, causal inference and other fields.

[0047] Suppose there exists a set of mutually exclusive complete events. It satisfies P( )≥0; i=1,2, 3,...n The condition is that when another conditional event A occurs simultaneously with all the events in the complete event set, the following mathematical relationship can be established according to Bayes' theorem: ; in, This represents prior probability, which is usually based on the researcher's experience or obtained through statistical analysis of historical data.

[0048] In this embodiment, Conditional probability refers to a more accurate inference obtained by combining posterior probability with observed data and adjusting the initial hypothesis using a probability update mechanism. This describes the probability of event B occurring given that event A has occurred.

[0049] Set the probability of the target node "volume and billing audit anomaly" to 100%, and use Bayesian back reasoning to infer the posterior probability of each cause of the anomaly, the specific source probability, and analyze the possible causes of the volume and billing anomaly: (1) Select target nodes and use quantity and cost anomalies as result nodes to construct a Bayesian causal network. The strength of causal relationship between nodes is quantified by conditional probability table (CPT).

[0050] (2) Set prior and observed values, assign prior probability to each accident node to reflect its independent occurrence probability; force the probability of the target node “abnormal quantity and fee audit” to be set to 100% to simulate the observation conditions of “known abnormal quantity and fee audit occurrence”.

[0051] (3) Solve for the posterior probability for each causal point. The posterior probability is calculated using the formula: ; Since P(B)=1, it simplifies to = .

[0052] in, Let be the conditional probability, representing "if the cause..." "The probability of occurrence leading to abnormal charges."

[0053] (4) Compare the posterior probabilities of all causes. The higher the value, the greater the contribution of the cause to the volume and fee anomaly; by sorting, key risk factors can be identified, providing data support for the prevention of volume and fee audit anomalies.

[0054] This embodiment uses real usage and pricing data from a certain province as a basis to perform association mining. The resulting association rules are as follows: (1) When {Overdue: Yes, Temperature: High, Spot Calculation: Abnormal, Equipment Status: Normal}, the following abnormalities are likely to occur: {Power Consumption: High, Season: Summer, Equipment Communication Status: Online}. Correlation Strength (Lift): 4.56.

[0055] (2) When {Overdue: Yes, Temperature: High, Spot Calculation: Abnormal}, the following abnormalities are likely to occur: {Electricity Consumption: High, Season: Summer, Equipment Status: Normal, Equipment Communication Status: Online}. Correlation Strength (Lift): 4.52.

[0056] (3) When {Overdue: Yes, Temperature: High, Spot Calculation: Abnormal}, the following abnormalities are likely to occur: {Electricity Consumption: High, Season: Summer, Equipment Communication Status: Online}. Correlation Strength (Lift): 4.37.

[0057] (4) When {Overdue: Yes, Temperature: High, Spot Calculation: Abnormal, Equipment Communication Status: Online}, the following abnormalities are likely to occur: {Power Consumption: High, Season: Summer, Equipment Status: Normal}. Correlation Strength (Lift): 4.34.

[0058] (5) When {Electricity consumption: High, Temperature: High, Spot calculation: Abnormal}, the following abnormalities are likely to occur: {Overdue: Yes, Season: Summer, Equipment status: Normal, Equipment communication status: Online}. Correlation strength (lifting degree): 4.10.

[0059] In this embodiment, the probability of abnormal electricity bills is set to 100%. The posterior probability of each cause is analyzed. Equipment status and season are important causes of abnormal electricity bills. The source tracing results are shown in Table 2.

[0060] Table 2 Source tracing results Reasons for abnormal electricity bill probability of occurrence Equipment malfunction 88.00% High power consumption 83.67% High temperature 89.34% Season; Summer 87.50% Is it overdue: Yes 86.40% Device communication status: Offline 54.40% This embodiment, by mining correlation patterns in electricity consumption data (such as equipment operating status, electricity consumption changes, and environmental factors), can discover complex anomalies that are difficult to capture using traditional methods. For example, when a user's electricity consumption suddenly increases, correlation rules can be combined with factors such as equipment replacement records and seasonal changes to more accurately determine whether it is an anomaly. This method can automatically extract correlation rules from massive amounts of data, reducing manual intervention and improving processing efficiency. By tracing the causes of anomalies, power companies can strengthen equipment maintenance and analyze user electricity consumption behavior in a targeted manner, reducing manual inspection costs and improving resource utilization efficiency. This also allows for timely resolution of abnormal user electricity bills, reducing disputes and improving service quality and user trust.

[0061] This embodiment constructs a multi-dimensional traceability data system integrating "user-device-environment," deeply merging previously fragmented data sources such as electricity consumption behavior, physical equipment status, external climate environment, and even market rule execution (e.g., spot market calculations). This panoramic data fusion allows anomaly analysis to be placed within a real and complex context, enabling the discovery of cross-domain and hidden composite anomaly patterns, such as "communication interruption of a certain model of metering equipment during high summer temperatures coinciding with a surge in spot market prices during a specific period, leading to a surge in user-side settlement fees." This fundamentally avoids misjudgments and omissions caused by incomplete information; it breaks through the limitations of traditional single-dimensional anomaly detection, constructing a multi-dimensional data system covering users, equipment, and environment; through association rule mining, it can discover complex correlation patterns such as "high temperature season, user overdue payments, and simultaneous spot market calculation anomalies" and "surge in electricity consumption"; this multivariate association analysis provides richer and more accurate contextual information for anomaly determination.

[0062] This embodiment introduces Bayesian networks as the causal reasoning engine, achieving a revolutionary change. Bayesian networks express causal or dependency relationships between variables using an intuitive graphical model, and their reverse reasoning capabilities can output a quantitative and probabilistic causal analysis report. Using Bayesian networks for reasoning not only outputs a judgment of "whether it is abnormal," but also gives the probability of various potential causes in probabilistic form. This output result is intuitive and quantifiable, greatly enhancing the interpretability of the model and helping operations and maintenance personnel understand the logic behind the anomaly, rather than viewing it as a "black box" conclusion.

[0063] This embodiment improves upon the classic FP-growth algorithm by incorporating Apriori's pruning strategy. It organically integrates Apriori's prior pruning concept into the conditional construction process of the FP-tree, achieving a dual pruning mechanism combining "early prevention" and "process control." This effectively reduces invalid search paths and the size of the conditional FP-tree in the early stages of frequent itemset mining, resulting in higher operational efficiency compared to traditional algorithms when processing massive amounts of electricity billing data, meeting the high demands of the electricity market for timely settlement. The entire process, from data fusion and pattern mining to causal reasoning, can be completed automatically, significantly reducing manual verification and reliance on expert experience, thus lowering labor costs. Furthermore, it can continuously learn and update association rules and network parameters from new data, possessing the ability for self-evolution and optimization.

[0064] Through continuous correlation mining and probabilistic tracing, power companies can identify high-frequency, high-risk abnormal pattern combinations (such as specific equipment being prone to failure in specific seasons), thereby enabling targeted equipment maintenance, user electricity behavior guidance, or rule optimization, transforming passive handling into proactive prevention, and effectively reducing operational risks and economic losses.

[0065] Traditional methods for handling abnormal electricity bills rely on a crude approach of "manual screening + on-site inspection," which is labor-intensive and slow in response. This implementation, through automated and intelligent analysis and tracing, can accurately pinpoint the root cause of anomalies, thereby enabling precise scheduling of maintenance resources. When the system's tracing shows that the probability of anomalies is highly concentrated in "user behavior" or "climate factors," while the probability of "equipment failure" is extremely low, unnecessary on-site dispatch can be avoided, saving significant manpower and transportation costs. This implementation can quickly and accurately provide users with data-supported explanations for anomalies (e.g., "Your electricity bill this month is higher than usual. According to system analysis, the main reason is that there were X days when the spot market was at a high price, and your electricity consumption during those days increased by Y% compared to usual"). This can effectively reduce user complaints and disputes caused by a lack of transparency, improve customer satisfaction, and reduce service and compliance costs. It frees settlement auditors from tedious and repetitive data comparison work, allowing them to focus on more valuable advanced tasks such as rule optimization, risk strategy development, and complex case analysis.

[0066] This embodiment, through the construction and continuous mining of a risk pattern library, can accumulate and form a dynamically updated "electricity bill anomaly risk pattern library." For example, "in a certain region during the rainy season, the failure rate of smart meter communication modules is significantly positively correlated with the settlement anomaly rate." Based on the constructed pattern library, relevant departments can deploy maintenance plans, issue electricity usage reminders, or adjust settlement review strategies in advance for specific seasons, specific equipment, or user groups, thus eliminating risks at the outset. Specific types of settlement anomalies that occur frequently (such as "spot calculation anomalies" often associated with a certain type of transaction curve) can provide valuable feedback to market operators, revealing potential ambiguities or loopholes in existing market rules or system design, and providing data-driven decision support for iterative optimization of rules.

[0067] Example 2 Embodiment 2 of the present invention introduces an anomaly tracing system for electricity billing based on association rule mining.

[0068] like Figure 3 The electricity billing anomaly tracing system shown includes: The acquisition module is configured to acquire a multi-dimensional data system for tracing the source of anomalies in the quantity and fee audit. The data mining module is configured to perform data mining on the acquired data system based on an association analysis algorithm that incorporates Apriori pruning strategies to obtain strong association rules. The building module is configured to use the acquired strong association rules to construct a Bayesian network model with the volume and fee audit results as the result nodes. The traceability module is configured to perform source tracing analysis of anomalies in quantity and fee audits based on the constructed Bayesian network model, and to complete source tracing of anomalies in electricity billing based on association rule mining.

[0069] As one or more implementation methods, the constructed Bayesian network model represents the causal relationships between variables through a directed acyclic graph; specifically, once the set of parent nodes of any node is determined, the variable and all its non-descendant nodes satisfy the conditional independence assumption; the conditional independence assumption adopts a joint probability distribution, that is, the product of the conditional probabilities of each node, specifically manifested as follows: ; in, Let pa(X) represent the joint probability distribution of the quantities. i ) represents variable X i The set of direct parent nodes, It is a finite set of variables.

[0070] As one or more implementation methods, it is assumed that there exists a set of mutually exclusive complete event sets. It satisfies P( )≥0; i=1,2,3,...n The condition is that when another conditional event A occurs simultaneously with all the events in the complete event set, according to Bayes' theorem, we can obtain: ; in, Represents the prior probability. This represents a combination of posterior probability and observed data. This represents conditional probability, describing the likelihood of event B occurring given that event A has occurred.

[0071] As one or more implementation methods, in the process of analyzing the source of the volume and fee audit anomaly, the probability of the target node's volume and fee audit anomaly is set to 100%. Using Bayesian back reasoning, the posterior probability of each anomaly's cause is inferred, i.e., the source probability, to analyze the possible causes of the volume and fee anomaly; specifically: Select target nodes and use the volume and cost anomalies as result nodes to construct a Bayesian causal network. The strength of causal relationships between nodes is quantified by a conditional probability table. Set prior and observed values, assign prior probability to each accident node to reflect its independent probability of occurrence, force the probability of the target node's quantity and fee audit abnormality to be set to 100%, and simulate the observation conditions for the known quantity and fee audit abnormality to occur. Solve for the posterior probability for each causal point. ,pass Calculating the posterior probability, since P(B)=1, can be simplified to... = ; in, This represents the conditional probability, i.e., if the cause... The probability of occurrence leading to abnormal charges; Compare the posterior probabilities of all causes The higher the value, the greater the contribution of the cause to the volume and fee anomaly; by sorting and identifying key risk factors, the source analysis of volume and fee audit anomalies is completed.

[0072] As one or more implementation methods, in the data mining process, an association analysis algorithm that integrates the Apriori pruning strategy is used to mine associations of electricity fee anomalies. The Apriori algorithm and the association analysis algorithm are integrated and improved. The Apriori pruning strategy is used to reduce the number of candidate itemsets. The efficient tree structure of the association analysis algorithm is combined to accelerate the mining of frequent itemsets. The search space is optimized through the prior knowledge of Apriori to complete the data mining and obtain strong association rules.

[0073] As one or more implementation methods, the acquired multi-dimensional data system for tracing anomalies in electricity billing audits includes at least user electricity consumption data, equipment status data, and external environment data; wherein, the user electricity consumption data includes electricity bill amount, whether it is overdue, and the type of electricity billing anomaly; the equipment status data includes equipment operating status and equipment communication status; the external environment data includes temperature and season; the types of electricity billing anomalies include bill generation anomalies, spot calculation anomalies, and electricity price execution anomalies; the electricity bill amount, temperature, and equipment status are all classified into discrete levels.

[0074] This embodiment breaks through the limitations of traditional single-dimensional anomaly detection and constructs a multi-dimensional data system covering users, devices, and environment. Through association rule mining, it can discover complex association patterns such as "high temperature season, user overdue payment, and simultaneous spot calculation anomaly" and "surge in electricity consumption", providing richer and more accurate contextual information for anomaly judgment.

[0075] This embodiment uses Bayesian networks for reasoning, which can not only output a judgment of "whether it is abnormal", but also give the probability of various potential causes in the form of probabilities, which greatly enhances the interpretability of the model and helps operation and maintenance personnel understand the logic of the anomaly, rather than treating it as a "black box" conclusion.

[0076] This embodiment improves upon the classic FP-growth algorithm (association analysis algorithm) by incorporating Apriori's pruning strategy. This effectively reduces invalid search paths and the size of conditional FP-trees in the early stages of frequent itemset mining, resulting in higher operational efficiency compared to traditional algorithms when processing massive amounts of electricity billing data, meeting the high demands of the electricity market for timely settlement. The entire process, from data fusion and pattern mining to causal reasoning, can be completed automatically, significantly reducing reliance on manual verification and expert experience, thus lowering labor costs. Furthermore, it can continuously learn and update association rules and network parameters from new data, possessing the ability to self-evolve and optimize.

[0077] Through continuous correlation mining and probabilistic tracing, power companies can identify high-frequency, high-risk abnormal pattern combinations (such as specific equipment being prone to failure in specific seasons), thereby enabling targeted equipment maintenance, user electricity behavior guidance, or rule optimization, transforming passive handling into proactive prevention, and effectively reducing operational risks and economic losses.

[0078] The detailed steps are the same as those of the electricity billing anomaly tracing method based on association rule mining provided in Example 1, and will not be repeated here.

[0079] Example 3 Embodiment 3 of the present invention provides a computer-readable storage medium.

[0080] A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the method for tracing the source of anomalies in electricity billing based on association rule mining as described in Embodiment 1 of the present invention.

[0081] The detailed steps are the same as those of the electricity billing anomaly tracing method based on association rule mining provided in Example 1, and will not be repeated here.

[0082] Example 4 Embodiment 4 of the present invention provides an electronic device.

[0083] An electronic device includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, it implements the steps in the method for tracing the source of anomalies in electricity billing based on association rule mining as described in Embodiment 1 of the present invention.

[0084] The detailed steps are the same as those of the electricity billing anomaly tracing method based on association rule mining provided in Example 1, and will not be repeated here.

[0085] Example 5 Embodiment 5 of the present invention provides a computer program product.

[0086] A computer program product includes software code, wherein the program in the software code performs the steps of the electricity billing anomaly tracing method based on association rule mining as described in Embodiment 1 of the present invention.

[0087] The detailed steps are the same as those of the electricity billing anomaly tracing method based on association rule mining provided in Example 1, and will not be repeated here.

[0088] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0089] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0090] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0091] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0092] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0093] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

[0094] The above description is merely a preferred embodiment of this practice and is not intended to limit the scope of this practice. Various modifications and variations can be made to this practice by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this practice should be included within the protection scope of this practice.

Claims

1. A method for tracing the source of anomalies in electricity billing based on association rule mining, characterized in that, include: Acquire a multi-dimensional data system for tracing the source of anomalies in volume and fee audits; The association analysis algorithm based on the Apriori pruning strategy is used to perform data mining on the acquired data system to obtain strong association rules. Using the obtained strong association rules, a Bayesian network model with the result of the quantity and fee review is constructed. Based on the constructed Bayesian network model, anomaly tracing analysis of electricity billing audit was conducted, and anomaly tracing of electricity billing calculation based on association rule mining was completed.

2. The method for tracing the source of anomalies in electricity billing based on association rule mining as described in claim 1, characterized in that, The constructed Bayesian network model represents the causal relationships between variables through a directed acyclic graph. Specifically, once the set of parent nodes of any node is determined, the variable and all its non-descendant nodes satisfy the conditional independence assumption. This conditional independence assumption adopts a joint probability distribution, i.e., the product of the conditional probabilities of each node, specifically as follows: ; in, Let pa(X) represent the joint probability distribution of the quantities. i ) represents variable X i The set of direct parent nodes, It is a finite set of variables.

3. The method for tracing the source of anomalies in electricity billing based on association rule mining as described in claim 1, characterized in that, Suppose there exists a set of mutually exclusive complete events. It satisfies P( )≥0; i=1,2,3,...n The condition is that when another conditional event A occurs simultaneously with all the events in the complete event set, according to Bayes' theorem, we can obtain: ; in, Represents the prior probability. This represents a combination of posterior probability and observed data. This represents conditional probability, describing the likelihood of event B occurring given that event A has occurred.

4. The method for tracing the source of anomalies in electricity billing based on association rule mining as described in claim 1, characterized in that, In the process of tracing the source of the volume and fee audit anomalies, the probability of occurrence of the target node's volume and fee audit anomaly is set to 100%. Using Bayesian back reasoning, the posterior probability of each anomaly's cause is inferred, i.e., the source probability, to analyze the possible causes of the volume and fee anomalies; specifically: Select target nodes and use the volume and cost anomalies as result nodes to construct a Bayesian causal network. The strength of causal relationships between nodes is quantified by a conditional probability table. Set prior and observed values, assign prior probability to each accident node to reflect its independent probability of occurrence, force the probability of the target node's quantity and fee audit abnormality to be set to 100%, and simulate the observation conditions for the known quantity and fee audit abnormality to occur. Solve for the posterior probability for each causal point. ,pass Calculating the posterior probability, since P(B)=1, can be simplified to... = ;in This represents the conditional probability, i.e., if the cause... The probability of occurrence leading to abnormal charges; Compare the posterior probabilities of all causes The higher the value, the greater the contribution of the cause to the volume and fee anomaly; by sorting and identifying key risk factors, the source analysis of volume and fee audit anomalies is completed.

5. The method for tracing the source of anomalies in electricity billing based on association rule mining as described in claim 1, characterized in that, In the data mining process, an association analysis algorithm incorporating the Apriori pruning strategy is used to mine associations of electricity fee anomalies. The Apriori algorithm is integrated and improved with the association analysis algorithm. The Apriori pruning strategy is used to reduce the number of candidate itemsets, and the efficient tree structure of the association analysis algorithm is combined to accelerate the mining of frequent itemsets. The search space is optimized through the prior knowledge of Apriori to complete the data mining and obtain strong association rules.

6. The method for tracing the source of anomalies in electricity billing based on association rule mining as described in claim 1, characterized in that, The acquired multi-dimensional data system for tracing anomalies in electricity billing audits includes at least user electricity consumption data, equipment status data, and external environment data. The user electricity consumption data includes electricity bill amount, whether it is overdue, and the type of electricity bill anomaly. The equipment status data includes equipment operating status and equipment communication status. The external environment data includes temperature and season. The types of electricity bill anomalies include bill generation anomalies, spot calculation anomalies, and electricity price execution anomalies. The electricity bill amount, temperature, and equipment status are all classified into discrete levels.

7. A system for tracing the source of anomalies in electricity billing based on association rule mining, characterized in that, include: The acquisition module is configured to acquire a multi-dimensional data system for tracing the source of anomalies in the quantity and fee audit. The data mining module is configured to perform data mining on the acquired data system based on an association analysis algorithm that incorporates Apriori pruning strategies to obtain strong association rules. The building module is configured to use the acquired strong association rules to construct a Bayesian network model with the volume and fee audit results as the result nodes. The traceability module is configured to perform source tracing analysis of anomalies in quantity and fee audits based on the constructed Bayesian network model, and to complete source tracing of anomalies in electricity billing based on association rule mining.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method for tracing the source of anomalies in electricity billing based on association rule mining as described in any one of claims 1-6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the steps of the method for tracing the source of anomalies in electricity billing based on association rule mining as described in any one of claims 1-6.

10. A computer program product, comprising software code, characterized in that, The program in the software code executes the steps of the electricity billing anomaly tracing method based on association rule mining as described in any one of claims 1-6.