Electricity charge anomaly detection method and device based on graph neural network and incremental learning
By constructing the graph structure information of the electricity meter and using a graph neural network model for topology consistency judgment and anomaly confidence analysis, the misjudgment problem in the existing technology of electricity bill anomaly detection is solved, and higher detection accuracy and reliability are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, electricity bill anomaly detection often uses isolated analysis of the time series characteristics of a single meter, ignoring the coordinated electricity consumption patterns of meters within the same distribution area and the metering correlation between meters at different levels. This leads to normal group behavior or systemic deviations being misjudged as individual anomalies.
A graph neural network-based and incremental learning approach is used to construct the graph structure information of the electricity meter. By combining the results of electricity anomaly detection and logical judgment, the graph neural network model is used to perform topological consistency judgment and anomaly confidence analysis to correct the electricity anomaly detection results and reduce misjudgments.
This improves the accuracy of electricity bill anomaly detection, reduces false positives, ensures the reliability and accuracy of electricity bill anomaly detection, and avoids misjudging normal group behavior or systemic deviations as individual anomalies.
Smart Images

Figure CN121786676A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity billing technology, and in particular to a method and apparatus for detecting anomalies in electricity bills based on graph neural networks and incremental learning. Background Technology
[0002] With the development of society and economy and the progress of science and technology, the power system has become an indispensable infrastructure in modern society, and the relationship between its consumption and production is becoming increasingly complex. Power companies rely on smart meters and automated metering systems to achieve accurate electricity monitoring and billing. However, in the process of power equipment iteration and smart meter technology upgrades, errors and anomalies still exist in electricity billing. This not only affects the economic benefits of power suppliers but also undermines the fairness and transparency between power suppliers and consumers, urgently requiring a more reliable detection solution.
[0003] In existing technologies, electricity bill anomaly detection often uses isolated analysis of the time series characteristics of individual meters. When analyzing single-meter data in isolation, the coordinated electricity consumption patterns of meters within the same distribution area and the metering correlation between meters at different levels are ignored, leading to the misjudgment of normal group behavior or systemic deviations as individual anomalies. Summary of the Invention
[0004] This invention provides a method and apparatus for detecting abnormal electricity charges based on graph neural networks and incremental learning, in order to solve the problem of misjudgment of abnormal electricity charges.
[0005] In a first aspect, embodiments of the present invention provide a method for detecting anomalies in electricity charges based on graph neural networks and incremental learning, comprising: Obtain electricity consumption data from each electricity meter in the area to be tested; Features are extracted from electricity consumption data, and the extracted features are input into the electricity bill anomaly detection model to obtain the electricity consumption anomaly detection results for each electricity meter. A graph structure is constructed based on the connection relationship of each electricity meter, and the graph structure information is input into the graph neural network model to obtain the logical judgment result of each electricity meter. The electricity meter with the final abnormal electricity bill is determined based on the results of electricity anomaly detection and logical judgment.
[0006] In one possible implementation, the electricity meter with the final abnormal electricity bill is determined based on the results of abnormal electricity consumption detection and logical judgment, including: The results of the power consumption anomaly detection are corrected based on the logical judgment results, and the final electricity meter with the abnormal electricity bill is determined based on the corrected results.
[0007] In one possible implementation, the logical judgment result includes a topology consistency judgment result and a first anomaly confidence level. The topology consistency judgment result includes "topology consistency is correct," which means that the hierarchical relationship of the energy meter is consistent with the actual physical topology. The results of power consumption anomaly detection are corrected based on the logical judgment results, including: Determine whether the topology consistency judgment result of a certain electricity meter is correct. If the logic judgment result of a certain electricity meter is that the topological consistency is correct, and the first anomaly confidence level is higher than the first confidence threshold, the electricity meter is determined to be the final electricity meter with an abnormal electricity bill based on the electricity consumption anomaly detection result.
[0008] In one possible implementation, the electricity consumption anomaly detection result includes an electricity bill anomaly label and a second anomaly confidence level, wherein the electricity bill anomaly label includes anomaly; Determining whether an electricity meter is ultimately the one with abnormal electricity charges based on the results of electricity usage anomaly detection includes: Determine whether the electricity bill anomaly label on a certain electricity meter is abnormal; If an electricity meter has an abnormal electricity bill label and the second abnormality confidence level is higher than the second confidence level threshold, then the electricity meter will be designated as the final electricity meter with an abnormal electricity bill.
[0009] In one possible implementation, the graph structure information includes nodes, edges, and edge connection strength; wherein each node corresponds to an electricity meter, and the edges represent the hierarchical relationship and association between the electricity meters; Before inputting the graph structure information into the graph neural network model, the following steps are also included: Based on preset power grid topology rules, identify and remove erroneous edges; Normalize the connection strength and delete edges whose connection strength is lower than the strength threshold.
[0010] In one possible implementation, the connection strength is calculated using the transformer area line loss rate, historical data consistency, and physical distance.
[0011] One possible implementation also includes: Real-time acquisition of the operating status information of each electricity meter; the operating status information includes addition, removal, and faults; The graph structure information is dynamically updated based on the running status information.
[0012] One possible implementation also includes: Based on the final electricity meter readings for abnormal electricity charges and the newly added electricity consumption data, the electricity charge anomaly detection model and the graph neural network model are incrementally trained using an incremental learning algorithm to update the model parameters. This includes using incremental learning algorithms to incrementally train the electricity bill anomaly detection model and the graph neural network model, including: The electricity bill anomaly detection model is updated using the fast incremental support vector data description algorithm. The graph neural network model is updated using a graph continuous learning algorithm.
[0013] Secondly, embodiments of the present invention provide an electricity bill anomaly detection device based on graph neural networks and incremental learning, comprising: The data acquisition module is used to acquire the electricity consumption data of each electricity meter in the area to be tested; The electricity consumption anomaly detection module is used to extract features from electricity consumption data and input the extracted features into the electricity bill anomaly detection model to obtain the electricity consumption anomaly detection results for each electricity meter. The logic judgment module is used to construct graph structure information based on the connection relationship of each energy meter, and input the graph structure information into the graph neural network model to obtain the logic judgment result of each energy meter; The anomaly determination module is used to determine the electricity meter with the final electricity bill anomaly based on the results of electricity anomaly detection and logical judgment.
[0014] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation thereof.
[0015] In this embodiment of the invention, a graph structure information is constructed based on the connection relationship of electricity meters, and a graph neural network model is used to obtain logical judgment results. The electricity consumption characteristics of a single meter are combined with the coordinated laws of the transformer area and the correlation between upper and lower level metering to avoid misjudging normal group behavior or systemic deviations as individual anomalies. At the same time, the dual results of the electricity bill anomaly detection model and the graph neural network model are fused to achieve a comprehensive evaluation of single meter characteristics and global correlations, reduce misjudgments of electricity bill anomalies, and improve the accuracy of electricity bill anomaly detection. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the implementation of the electricity bill anomaly detection method based on graph neural networks and incremental learning provided in this embodiment of the invention. Figure 2 This is a schematic diagram of the structure of the electricity bill anomaly detection device based on graph neural network and incremental learning provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0017] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0018] See Figure 1 The document illustrates a flowchart of the implementation of the electricity bill anomaly detection method based on graph neural networks and incremental learning provided in this embodiment of the invention, detailed below: Step 101: Obtain the electricity consumption data of each electricity meter in the area to be tested.
[0019] Specifically, the core task of this step is to collect electricity consumption data from all electricity meters within the target area. This data typically includes meter readings, current, voltage, power, power factor, and usage time. This data forms the basis for subsequent anomaly detection; this step is the cornerstone of the entire method, and the accuracy, completeness, and timeliness of the data directly affect the performance and effectiveness of the entire electricity anomaly detection system.
[0020] Step 102: Extract features from the electricity consumption data and input the extracted features into the electricity bill anomaly detection model to obtain the electricity consumption anomaly detection results for each electricity meter.
[0021] In this embodiment, the raw electricity consumption data may contain a large amount of dimensionality and noise. Feature extraction can reduce the dimensionality of the data to a more meaningful feature space, reducing computational complexity. The extracted features better reflect the essential characteristics of the data, such as electricity consumption patterns and electricity consumption time distribution, which helps in subsequent analysis and judgment. By extracting features related to anomaly detection, the model's sensitivity to anomalies and detection accuracy can be improved. In actual detection, the extracted features are input into the pre-trained electricity bill anomaly detection model, and the model will output the electricity consumption anomaly detection results for each electricity meter.
[0022] Step 103: Construct graph structure information based on the connection relationship of each electricity meter, and input the graph structure information into the graph neural network model to obtain the logical judgment result of each electricity meter.
[0023] In this embodiment, by constructing a graph structure, the hierarchical and interrelationships between electricity meters can be represented in a structured manner. For example, an electricity meter may be connected to multiple sub-meters; this hierarchical relationship can be represented by nodes and edges in the graph. Graph structure information can provide the model with additional contextual information, helping it better understand the mutual influence and dependencies between electricity meters. Graph neural networks are neural network models specifically designed for processing graph structure data. They can learn the characteristics of electricity meters in the graph and use the edges connecting nodes to propagate and update node characteristics. The graph neural network model can make logical judgments based on the graph structure information, such as determining whether an anomaly of a certain electricity meter conforms to its position and role in the power grid topology. Through graph structure information, it is possible to check whether the hierarchical relationship of electricity meters is consistent with the actual power grid topology. If the hierarchical relationship of a certain electricity meter does not match the actual topology, it may indicate an anomaly. Combining the logical judgment results of graph structure information, the truly abnormal electricity meters can be identified more accurately, reducing false alarms and missed alarms. By constructing a graph structure, the model can better understand the interrelationships between electricity meters, thereby improving the accuracy of anomaly detection.
[0024] Step 104: Determine the electricity meter with the final electricity bill abnormality based on the electricity anomaly detection results and logical judgment results.
[0025] In this embodiment, the results of the electricity anomaly detection model and the graph neural network model are combined to comprehensively consider information from both sources, thus providing a more complete assessment of the anomalies of each electricity meter. By fusing information from multiple sources, the potential for misjudgments from a single model can be reduced, improving the accuracy and reliability of the final judgment.
[0026] In this embodiment of the invention, a graph structure information is constructed based on the connection relationship of electricity meters, and a graph neural network model is used to obtain logical judgment results. The electricity consumption characteristics of a single meter are combined with the coordinated laws of the transformer area and the correlation between upper and lower level metering to avoid misjudging normal group behavior or systemic deviations as individual anomalies. At the same time, the dual results of the electricity bill anomaly detection model and the graph neural network model are fused to achieve a comprehensive evaluation of single meter characteristics and global correlations, reduce misjudgments of electricity bill anomalies, and improve the accuracy of electricity bill anomaly detection.
[0027] In one possible implementation, the electricity meter with the final abnormal electricity bill is determined based on the results of abnormal electricity consumption detection and logical judgment, including: The results of the power consumption anomaly detection are corrected based on the logical judgment results, and the final electricity meter with the abnormal electricity bill is determined based on the corrected results.
[0028] In this embodiment, correcting the electricity anomaly detection results through logical judgment can effectively improve the accuracy and reliability of detection, and reduce false alarms and missed alarms. By combining the results of the electricity anomaly detection model and the graph neural network model, the anomaly status of each electricity meter can be more comprehensively evaluated, improving the reliability of the detection results.
[0029] In one possible implementation, the logical judgment result includes a topology consistency judgment result and a first anomaly confidence level. The topology consistency judgment result includes "topology consistency is correct," which means that the hierarchical relationship of the energy meter is consistent with the actual physical topology. The results of power consumption anomaly detection are corrected based on the logical judgment results, including: Determine whether the topology consistency judgment result of a certain electricity meter is correct. If the logic judgment result of a certain electricity meter is that the topological consistency is correct, and the first anomaly confidence level is higher than the first confidence threshold, determine whether the electricity meter is the final electricity meter with abnormal electricity bill based on the electricity consumption anomaly detection result; If the logic judgment result of a certain electricity meter is a topology consistency error, and the first anomaly confidence level is higher than the first confidence level threshold, the electricity consumption data of that electricity meter will not be processed.
[0030] Specifically, the graph neural network model outputs the topology consistency judgment result (correct / incorrect) and the first anomaly confidence level for each electricity meter based on the graph structure information of the meter connection relationship. The result is a value between 0 and 1, where 1 indicates complete confidence. Depending on the actual scenario requirements, such as the power grid's requirements for topology judgment accuracy, a preset threshold, such as 0.8, is used to filter high-reliability topology judgment results. Results below the threshold are not considered reliable and are not included in the correction process.
[0031] In this embodiment, topology consistency errors include two core scenarios: Physical attribution error: The system record attribution of the electricity meter does not match the actual physical connection. For example, the system record for sub-meter X belongs to the master meter Y, but sub-meter X is actually connected to the line of master meter Z. In this case, the electricity consumption data of sub-meter X will inevitably contradict the data of the incorrect superior master meter Y, which may be misjudged as abnormal by the single-meter detection model. However, this contradiction stems from the attribution error rather than a logical error in electricity consumption.
[0032] Data logic error: The physical attribution of the electricity meters is correct, but the electricity consumption data between the upper and lower level meters violates the hierarchical logic. For example, the monthly electricity consumption of the master meter M is 800 kWh, but the total consumption of its subordinate sub-meters is only 400 kWh, and there is still a significant difference after deducting reasonable line losses. This contradiction directly reflects the abnormal logical relationship between the upper and lower level electricity consumption, indicating that the data logic of the topological association is unreliable. It may stem from problems such as master meter metering failure or missing data collection from sub-meters, rather than abnormal electricity charges from a single meter.
[0033] In this embodiment, by using the conditions of topological consistency errors and a first anomaly confidence level exceeding a threshold, the two types of electricity meters with abnormal electricity charges due to errors in association relationships (physical or data logic) rather than actual electricity charges can be directly excluded, avoiding the waste of resources such as subsequent manual verification. When the electricity meter topological relationship is correct and the judgment is reliable (the first confidence level meets the standard), further judgment is made based on the electricity consumption anomaly detection results, avoiding the omission of real anomalies in individual meters due to over-reliance on topological logic, such as user electricity theft causing abnormal sub-meter data, and matching the electricity consumption logic of the upper-level master meter. Introducing a first confidence threshold, and only performing corrections on high-reliability topological judgment results, can avoid low-confidence judgments in graph neural network models, such as ambiguous topological associations, from interfering with the final conclusion, thus improving the rigor of the correction logic.
[0034] In one possible implementation, the electricity consumption anomaly detection result includes an electricity bill anomaly label and a second anomaly confidence level, wherein the electricity bill anomaly label includes anomaly; Determining whether an electricity meter is ultimately the one with abnormal electricity charges based on the results of electricity usage anomaly detection includes: Determine whether the electricity bill anomaly label on a certain electricity meter is abnormal; If an electricity meter has an abnormal electricity bill label and the second abnormality confidence level is higher than the second confidence threshold, then the electricity meter will be regarded as the final electricity meter with abnormal electricity bill. If the electricity bill abnormality label of a certain electricity meter is abnormal, and the second abnormality confidence level is lower than or equal to the second confidence level threshold, the electricity consumption data of that electricity meter will not be processed. If the electricity bill anomaly label of a certain electricity meter is normal, and the second anomaly confidence level is lower than or equal to the second confidence level threshold, the electricity consumption data of that electricity meter will not be processed. If the electricity bill anomaly label of a certain electricity meter is normal, and the second anomaly confidence level is higher than the second confidence level threshold, the electricity consumption data of that electricity meter will not be processed.
[0035] Specifically, the electricity bill anomaly detection model is based on the characteristics of single-meter electricity consumption data, such as consumption fluctuations and year-on-year comparison deviations, and outputs an electricity bill anomaly label (abnormal / normal) and a second anomaly confidence score for each meter, such as a value between 0 and 1. Based on the required accuracy of anomaly judgment, such as the power grid's tolerance for false alarms, a preset threshold, such as 0.75, is used to filter out highly reliable anomaly labels. Labels below the threshold are not considered reliable and are not adopted even if marked as abnormal.
[0036] For example: Electricity meter A is labeled as abnormal, with a second anomaly confidence level of 0.8, which is greater than the threshold of 0.75. Therefore, it is determined to be an electricity meter with final abnormal electricity charges. Electricity meter B is labeled as abnormal, with a second anomaly confidence level of 0.6, which is less than the threshold of 0.75. It is not considered a final abnormality, and its electricity consumption data is not processed because the model's anomaly judgment is unreliable. Electricity meter C is labeled as normal, with a second anomaly confidence level of 0.9. Regardless of whether it is higher than the threshold, it is not considered a final abnormality, and its electricity consumption data is not processed. Electricity meter D is labeled as normal, with a second anomaly confidence level of 0.5. Regardless of whether it is lower than the threshold, it is not considered a final abnormality, and its electricity consumption data is not processed.
[0037] In this embodiment, the electricity bill anomaly detection model may output anomaly labels due to data noise, such as a sudden surge in temporary electricity consumption, or feature similarity, such as the similarity between normal seasonal fluctuations and abnormal electricity consumption characteristics, resulting in unreliable (low confidence) output labels. By using a second confidence threshold, only anomalies that the model is highly confident in are retained, such as those with a confidence level > 0.75, avoiding the inclusion of judgments that the model is unsure of in the final result and significantly reducing the false alarm rate. When the model outputs a normal label, regardless of the confidence level, it is stipulated that it should not be considered an anomaly. This is because the core logic of the normal label is the absence of significant abnormal features, while the core goal of anomaly detection is to identify clear anomalies, not to verify the reliability of normality. This rule avoids the logical contradiction of forcibly determining anomalies based on the high confidence level of normal labels, ensuring a consistent judgment standard.
[0038] In one possible implementation, the graph structure information includes nodes, edges, and edge connection strength; wherein each node corresponds to an electricity meter, and the edges represent the hierarchical relationship and association between the electricity meters; Before inputting the graph structure information into the graph neural network model, the following steps are also included: Based on preset power grid topology rules, identify and remove erroneous edges; Normalize the connection strength and delete edges whose connection strength is lower than the strength threshold.
[0039] Specifically, each electricity meter is assigned a unique identifier, such as an ID, as a node in the graph. Node attributes can include basic information such as meter type (master meter / sub-meter) and the distribution area it belongs to. Based on the power grid physical topology record, edges are added to electricity meters with hierarchical relationships, such as master meter A corresponding to sub-meter B, and sub-meter B corresponding to sub-sub-meter C. The edge label indicates the relationship type, such as direct or indirect dependency. According to the power grid topology rules, if a sub-meter cannot be associated with the master meter across distribution areas, and there are no dependency edges between electricity meters at the same level, all edges are scanned and conflicting items are marked. For example, if the system records that sub-meter X belongs to both the master meter of distribution area A and the master meter of distribution area B, violating the unique dependency rule, one of the conflicting edges is deleted, or the correct edge is retained based on the actual physical connection. The connection strength of all edges is mapped to the 0-1 range. For example, if the original strength range is 1-10, the strength is normalized using the formula Normalized Strength = (Original Strength - 1) / 9. Then, a strength threshold is set, and edges with normalized strength < 0.3 are deleted, such as edges between the master meter and sub-meters that are too far away or have weak data correlation. The preprocessed graph structure retains only valid nodes, correct edges, and high-strength associations as the final input, which is then fed into the graph neural network model for topology consistency judgment.
[0040] In this embodiment, during actual power grid operation, the topological relationships of electricity meters recorded by the system may contain errors, such as human input errors or failure to update records after equipment replacement, resulting in contradictory or invalid edges in the initial graph structure. By removing erroneous edges based on topological rules, this type of noise can be filtered out in advance, such as erroneous edges linking sub-meters across transformer areas, preventing the graph neural network model from making misjudgments based on erroneous associations, such as incorrectly determining that the topological consistency is correct. The initial graph structure may contain a large number of weakly related edges, such as weak data associations between a sub-meter and a main meter that does not belong to the same transformer area. These edges are not only meaningless for topological judgment but also increase the computational burden on the model, and the complexity of the graph neural network increases significantly with the number of edges. By normalization and strength threshold filtering, high-strength core related edges are retained, such as the main meter and its directly subordinate sub-meters, which reduces the computational load of the model and allows the model to focus on valuable relationships, improving judgment accuracy.
[0041] In one possible implementation, the connection strength is calculated using the transformer area line loss rate, historical data consistency, and physical distance.
[0042] In this embodiment, the line loss rate is the ratio of the difference between the total electricity consumption of the upper-level master meter and the total electricity consumption of the lower-level sub-meters to the total electricity consumption of the upper-level master meter. Line loss rate = (Total meter electricity consumption - Sub-meter total consumption) / Total meter electricity consumption × 100%. The line loss rate is negatively correlated with connection strength: the lower the line loss rate, the more matched the electricity consumption logic between the upper-level master meter and the lower-level sub-meters, the closer the association, and the higher the connection strength; the higher the line loss rate, the greater the contradiction in the electricity consumption logic, and the lower the connection strength. The line loss rate is mapped to an inverse weight of 0-1, such as a 2% line loss rate corresponding to a weight of 0.9, and a 15% line loss rate corresponding to a weight of 0.3.
[0043] Historical data consistency refers to the degree of similarity in the electricity consumption trends and fluctuation patterns of two electricity meters, such as main meter A and sub-meter B. This can be calculated using cosine similarity, Pearson correlation coefficient, etc. Consistency is positively correlated with connection strength: the more consistent the historical electricity consumption trends, such as a 30% increase in main meter A's electricity consumption in summer and a simultaneous 28% increase in sub-meter B's, the closer the correlation and the higher the connection strength. Conversely, the greater the trend difference, such as an increase in main meter consumption while a decrease in sub-meter consumption, the lower the connection strength. The similarity value is directly used as the weight.
[0044] Physical distance refers to the actual distance between two electricity meters in the physical power grid, such as the length of the conductor from the main meter to the branch meter. Distance is negatively correlated with connection strength: the closer the physical distance, the higher the probability that they belong to the same local power grid, the closer the connection, and the stronger the connection; the farther the distance, the more likely they belong to different distribution areas, and the weaker the connection. A quantification method is to map the distance to an inverse weight of 0-1.
[0045] For example, the connection strength can be obtained by weighting and summing the line loss rate, historical data consistency, and physical distance.
[0046] One possible implementation also includes: Real-time acquisition of the operating status information of each electricity meter; the operating status information includes addition, removal, and faults; The graph structure information is dynamically updated based on the running status information.
[0047] In this embodiment, real-time automatic updates enable unmanned maintenance of the topology map, reducing the workload of manual verification and avoiding oversights in manual operations, such as missing the registration of newly added energy meters or accidentally deleting the association of valid energy meters.
[0048] One possible implementation also includes: Based on the final electricity meter readings for abnormal electricity charges and the newly added electricity consumption data, the electricity charge anomaly detection model and the graph neural network model are incrementally trained using an incremental learning algorithm to update the model parameters. This includes using incremental learning algorithms to incrementally train the electricity bill anomaly detection model and the graph neural network model, including: The electricity bill anomaly detection model is updated using the fast incremental support vector data description algorithm. The graph neural network model is updated using a graph continuous learning algorithm.
[0049] Specifically, the Fast Incremental Support Vector Data Description algorithm is an incremental version of Support Vector Data Description. Its core principle is to update the anomaly boundaries using only new data: the original model learns the feature boundaries of normal electricity consumption data through historical data, and determines anomalies when these boundaries are exceeded; after new data is input, the algorithm only calculates the relationship between the new samples and the original boundaries, without needing to retrain all historical data; if there are normal patterns or new anomaly patterns in the new data that are not covered by the original boundaries, the boundary parameters are dynamically adjusted, such as updating the support vectors, to ensure that the model can identify the latest anomalies.
[0050] The graph continuous learning algorithm is designed for the connection relationships of electricity meters in a graph-structured power grid. Its core is to retain the learning results of the historical graph structure when updating the model: the original graph neural network model has learned the correlation rules between the topological relationships of electricity meters and anomalies, such as the logic of multiple meter anomalies under a certain distribution area; new data may be accompanied by minor changes in the graph structure, such as the update of the connection strength of some electricity meters. The algorithm avoids the model forgetting the historical rules due to new data by means of weight regularization, knowledge distillation and other means; only the parameters of graph nodes and edges related to new data are updated, rather than retraining the entire graph model.
[0051] In this embodiment, through incremental training, the model can continuously absorb the patterns of newly added data, always matching the current electricity consumption scenario and avoiding a decrease in accuracy. Incremental learning is trained using only newly added data and a small amount of historical key parameters, reducing training time to minutes and eliminating the need to store all historical data, significantly reducing computational and storage costs. The electricity bill anomaly detection model is biased towards single-meter feature judgment, using a fast incremental algorithm to optimize anomaly boundaries and ensure the accuracy of single-meter anomaly detection; the graph neural network model is biased towards multi-meter logical judgment, using a graph continuous learning algorithm to retain historical topological patterns and avoid degradation of logical judgment ability due to updates. The combination of the two achieves dual optimization of single-meter detection and multi-meter logic.
[0052] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0053] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0054] Figure 2 The diagram shows a schematic of the electricity bill anomaly detection device based on graph neural networks and incremental learning provided in an embodiment of the present invention. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below: like Figure 2 As shown, the electricity bill anomaly detection device 2 based on graph neural networks and incremental learning includes: The data acquisition module 21 is used to acquire the electricity consumption data of each electricity meter in the area to be tested; The electricity consumption anomaly detection module 22 is used to extract features from electricity consumption data and input the extracted features into the electricity bill anomaly detection model to obtain the electricity consumption anomaly detection results for each electricity meter. The electricity consumption anomaly detection results include an electricity bill anomaly label and a second anomaly confidence level. The electricity bill anomaly label includes anomaly. The logic judgment module 23 is used to construct graph structure information based on the connection relationship of each energy meter, and input the graph structure information into the graph neural network model to obtain the logic judgment result of each energy meter. The logic judgment result includes the topology consistency judgment result and the first anomaly confidence level. The topology consistency judgment result includes correct topology consistency, which means that the hierarchical relationship of the energy meter is consistent with the actual physical topology. The anomaly determination module 24 is used to determine the final electricity meter with an abnormal electricity bill based on the electricity anomaly detection results and logical judgment results.
[0055] In one possible implementation, the exception determination module 24 is further used for: The results of the power consumption anomaly detection are corrected based on the logical judgment results, and the final electricity meter with the abnormal electricity bill is determined based on the corrected results.
[0056] In one possible implementation, the exception determination module 24 is further used for: Determine whether the topology consistency judgment result of a certain electricity meter is correct. If the logic judgment result of a certain electricity meter is that the topological consistency is correct, and the first anomaly confidence level is higher than the first confidence threshold, the electricity meter is determined to be the final electricity meter with an abnormal electricity bill based on the electricity consumption anomaly detection result.
[0057] In one possible implementation, the exception determination module 24 is further used for: Determine whether the electricity bill anomaly label on a certain electricity meter is abnormal; If an electricity meter has an abnormal electricity bill label and the second abnormality confidence level is higher than the second confidence level threshold, then the electricity meter will be designated as the final electricity meter with an abnormal electricity bill.
[0058] In this embodiment of the invention, a graph structure information is constructed based on the connection relationship of electricity meters, and a graph neural network model is used to obtain logical judgment results. The electricity consumption characteristics of a single meter are combined with the coordinated laws of the transformer area and the correlation between upper and lower level metering to avoid misjudging normal group behavior or systemic deviations as individual anomalies. At the same time, the dual results of the electricity bill anomaly detection model and the graph neural network model are fused to achieve a comprehensive evaluation of single meter characteristics and global correlations, reduce misjudgments of electricity bill anomalies, and improve the accuracy of electricity bill anomaly detection.
[0059] Figure 3This is a schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 3 As shown, the electronic device 3 of this embodiment includes a processor 30 and a memory 31. The memory 31 stores a computer program 32. When the processor 30 executes the computer program 32, it implements the steps in the various method embodiments described above. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each module / unit in the various device embodiments described above.
[0060] For example, computer program 32 may be divided into one or more modules / units, which are stored in memory 31 and executed by processor 30 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 32 in electronic device 3.
[0061] Electronic device 3 may include, but is not limited to, processor 30 and memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 3 may also include input / output devices, network access devices, buses, etc.
[0062] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.
[0063] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0064] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for detecting anomalies in electricity charges based on graph neural networks and incremental learning, characterized in that, include: Obtain electricity consumption data from each electricity meter in the area to be tested; Feature extraction is performed on the electricity consumption data, and the extracted features are input into the electricity bill anomaly detection model to obtain the electricity consumption anomaly detection results for each electricity meter; A graph structure information is constructed based on the connection relationship of each energy meter, and the graph structure information is input into a graph neural network model to obtain the logical judgment result of each energy meter; The electricity meter with the final abnormal electricity bill is determined based on the results of the electricity anomaly detection and the logical judgment results.
2. The electricity bill anomaly detection method based on graph neural networks and incremental learning according to claim 1, characterized in that, The step of determining the final electricity meter with abnormal electricity charges based on the electricity consumption anomaly detection result and the logical judgment result includes: The abnormal electricity consumption detection results are corrected based on the logical judgment results, and the electricity meter with the final abnormal electricity bill is determined based on the corrected results.
3. The electricity bill anomaly detection method based on graph neural networks and incremental learning according to claim 2, characterized in that, The logical judgment result includes the topology consistency judgment result and the first anomaly confidence level. The topology consistency judgment result includes correct topology consistency, which means that the hierarchical relationship of the energy meter is consistent with the actual physical topology. The step of correcting the power consumption anomaly detection result based on the logical judgment result includes: Determine whether the topology consistency judgment result of a certain electricity meter is correct; If the logical judgment result of a certain electricity meter indicates that the topology consistency is correct, and the first anomaly confidence level is higher than the first confidence level threshold, then the electricity meter is determined to be the final electricity meter with an abnormal electricity bill based on the electricity consumption anomaly detection result.
4. The electricity bill anomaly detection method based on graph neural networks and incremental learning according to claim 3, characterized in that, The electricity consumption anomaly detection results include an electricity bill anomaly label and a second anomaly confidence level, wherein the electricity bill anomaly label includes anomaly; The step of determining whether the electricity meter is ultimately the electricity meter with abnormal electricity charges based on the electricity consumption anomaly detection results includes: Determine whether the electricity bill anomaly label on a certain electricity meter is abnormal; If the electricity bill anomaly label of a certain electricity meter is abnormal, and the second anomaly confidence level is higher than the second confidence level threshold, then the electricity meter is regarded as the final electricity meter with an abnormal electricity bill.
5. The electricity bill anomaly detection method based on graph neural networks and incremental learning according to claim 1, characterized in that, The graph structure information includes nodes, edges, and edge connection strength; wherein each node corresponds to an electricity meter, and the edges represent the hierarchical relationship and association between the electricity meters; Before inputting the graph structure information into the graph neural network model, the following steps are also included: Based on preset power grid topology rules, identify and remove erroneous edges; The connection strength is normalized, and edges with connection strength below the strength threshold are deleted.
6. The electricity bill anomaly detection method based on graph neural networks and incremental learning according to claim 5, characterized in that, The connection strength is calculated based on the transformer area line loss rate, historical data consistency, and physical distance.
7. The electricity bill anomaly detection method based on graph neural networks and incremental learning according to claim 5, characterized in that, Also includes: Real-time acquisition of the operating status information of each electricity meter; wherein, the operating status information includes addition, removal, and fault; The graph structure information is dynamically updated based on the running status information.
8. The electricity bill anomaly detection method based on graph neural networks and incremental learning according to claim 1, characterized in that, Also includes: Based on the final electricity meter readings for abnormal electricity charges and the newly added electricity consumption data, the electricity charge anomaly detection model and the graph neural network model are incrementally trained using an incremental learning algorithm to update the model parameters. The incremental training of the electricity bill anomaly detection model and the graph neural network model using an incremental learning algorithm includes: The electricity fee anomaly detection model is updated using the Fast Incremental Support Vector Data Description algorithm. The graph neural network model is updated using a graph continuous learning algorithm.
9. A device for detecting anomalies in electricity charges based on graph neural networks and incremental learning, characterized in that, include: The data acquisition module is used to acquire the electricity consumption data of each electricity meter in the area to be tested; The electricity consumption anomaly detection module is used to extract features from the electricity consumption data and input the extracted features into the electricity bill anomaly detection model to obtain the electricity consumption anomaly detection results for each electricity meter. The logic judgment module is used to construct graph structure information based on the connection relationship of each energy meter, and input the graph structure information into the graph neural network model to obtain the logic judgment result of each energy meter; The anomaly determination module is used to determine the final electricity meter with an abnormal electricity bill based on the electricity anomaly detection results and the logical judgment results.
10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 8.