Electric quantity abnormity screening method and system

Through automation technology, power consumption data is obtained and analyzed, and multi-level window analysis and ratio calculation is used to solve the problem of low efficiency of traditional power abnormal screening methods, and efficient and accurate power abnormal identification is achieved.

CN119740158AActive Publication Date: 2025-04-01GUANGDONG POWER GRID CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411729402.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-01
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

The traditional power abnormality screening method has low efficiency and high error rate, making it difficult to meet the current efficient and accurate management needs.

Method used

Through automated technology, the manual login measurement system is simulated to obtain the daily power consumption data of all users in the preset period, and the abnormal data is marked and filtered out through multi-level window analysis and ratio calculation.

Benefits of technology

It improves the efficiency and accuracy of power abnormality screening, reduces the false alarm rate, and can more accurately identify power abnormalities, meeting efficient and accurate management needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740158A_ABST
    Figure CN119740158A_ABST
Patent Text Reader

Abstract

The invention provides an electric quantity abnormity screening method and system. The method comprises the following steps: acquiring daily electricity consumption data of all users in a preset period through an automation technology; starting from the initial moment of the preset period, calculating the ratio of the data in the first window relative to the first-day data, and when the ratio exceeds a first preset threshold value, marking the data as initial abnormal data; sliding the first window to traverse all preset periods to obtain all preliminary abnormal data; starting from the earliest record of the preliminary abnormal data, calculating the ratio of the daily average electricity consumption in the second window to the preset historical time period data, and if the ratio is greater than or equal to a second preset threshold value, marking the data as first abnormal data; and sliding the second window to traverse all the preset periods to obtain all first abnormal data, and selecting electricity consumption data of which the electricity consumption is greater than a third preset threshold value and the electricity consumption difference of two adjacent days is smaller than a fourth preset threshold value from the first abnormal data to obtain abnormal data. According to the scheme, the problem of low efficiency of a traditional electric quantity abnormity screening method is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power information technology, and in particular to a method, system and computer-readable storage medium for screening electric power anomalies. Background Art

[0002] In recent years, with the improvement of residents' living standards and changes in electricity consumption habits, the number of inquiries and requests regarding electricity consumption and electricity charges has increased, especially in rural areas, where leakage of power lines behind the meter is common. Some users mistakenly believe that the electricity charges caused by leakage can be reduced or borne by the power supply department. This misunderstanding undoubtedly brings great difficulties to electricity charge recovery and customer service. However, traditional methods for screening abnormal electricity consumption are inefficient and have high error rates, making it difficult to meet the current needs for efficient and accurate management. Summary of the invention

[0003] The main purpose of the present application is to provide a method, system and computer-readable storage medium for screening power anomalies, so as to at least solve the problem of low efficiency of power anomaly screening methods in the prior art.

[0004] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for screening power anomalies is provided, including: using automation technology to simulate manual login to a metering system to obtain daily power consumption data of all users within a preset period; starting from the initial moment of the preset period, selecting a continuous time period of a first window length, calculating the ratio of each power consumption data in a first sub-window within the first window to the power consumption data of the first day within the first window, and obtaining multiple first results. When all the first results exceed a first preset threshold, the power consumption data is marked as preliminary abnormal data; sliding the first window until all the preset periods are traversed to obtain all the preliminary abnormal data; and Starting from the earliest moment among the multiple moments corresponding to all the preliminary abnormal data, a continuous time period of the second window length is selected, the average daily electricity consumption in the second window is calculated to obtain the first average daily electricity consumption, the ratio of the first average daily electricity consumption to the second average daily electricity consumption in the preset historical period is calculated to obtain a second result, and when the second result is greater than or equal to the second preset threshold, the electricity consumption data in the second window is marked as the first abnormal data; the second window is slided until all the preset periods are traversed to obtain all the first abnormal data; the electricity consumption data greater than the third preset threshold and the difference in electricity consumption between two adjacent days is less than the fourth preset threshold is selected from the first abnormal data to obtain abnormal data.

[0005] Optionally, automation technology is used to simulate manual login to the metering system to obtain daily electricity consumption data of all users within a preset period, including: using the date of each day as the naming standard for the folder of the electricity consumption data automatically exported from the manual login metering system, and storing the electricity consumption data in the corresponding folder; merging a first preset value of data files exported from each of the folders into one file; checking the number of the data files exported each day, and when the number of files on that day is less than the first preset value, automatically clearing the data in the corresponding folder, restarting the export process of the data for that day, and obtaining the electricity consumption data.

[0006] Optionally, the method further includes: based on the date input in the screening condition of the manual login metering system, retrieving the power consumption data corresponding to the date.

[0007] Optionally, before acquiring the daily electricity consumption data of all users within a preset period, the method further includes: preprocessing the data, wherein the preprocessing includes removing invalid data and processing missing values.

[0008] Optionally, the automation technology also includes: automatically merging multiple data files exported from the folder every day to form a unified data set.

[0009] Optionally, the length of the first window is set to cover the time period required to identify a sudden increase in user power consumption, the length of the first window is greater than the length of the first sub-window, and the length of the first sub-window is greater than the first day of the preset period.

[0010] Optionally, the first preset threshold is set as a multiple threshold, which is used as a benchmark for screening the preliminary abnormal data, and the second preset threshold is set as a ratio threshold, which is used as a judgment standard for the first abnormal data.

[0011] Optionally, the preset historical period is a historical reference period, including last month and the same period last year, which is used to provide a reference benchmark for the second daily average electricity consumption.

[0012] According to another aspect of the present application, a power anomaly screening system is provided, including: an acquisition module, used to use automation technology to simulate manual login to the metering system, and obtain daily power consumption data of all users within a preset period; a power surge screening module, used to select a continuous time period of a first window length starting from the initial moment of the preset period, calculate the ratio of each power consumption data in a first sub-window within the first window to the power consumption data of the first day within the first window, and obtain multiple first results. When all the first results exceed a first preset threshold, the power consumption data is marked as preliminary abnormal data; a first traversal module, used to slide the first window until all the preset periods are traversed to obtain all the preliminary abnormal data; and a daily average power consumption comparison and analysis module. A block is used to select a continuous time period of the second window length starting from the earliest moment among the multiple moments corresponding to all the preliminary abnormal data, calculate the average daily power consumption in the second window, obtain the first average daily power consumption, calculate the ratio of the first average daily power consumption to the second average daily power consumption in the preset historical period, obtain the second result, and when the second result is greater than or equal to the second preset threshold, mark the power consumption data in the second window as the first abnormal data; a second traversal module is used to slide the second window until all the preset periods are traversed to obtain all the first abnormal data; a leakage characteristic constant power module is used to select power consumption data greater than the third preset threshold and the power consumption difference between two adjacent days is less than the fourth preset threshold from the first abnormal data to obtain abnormal data.

[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the power abnormality screening methods.

[0014] By applying the technical solution of the present application, the daily electricity consumption data of all users within a preset period is obtained through automation technology; starting from the initial moment of the preset period, a continuous time period of the first window length is selected, and the ratio of the data in the window to the data of the first day is calculated. When the ratio exceeds the first preset threshold, it is marked as preliminary abnormal data; the first window is slid until all preset periods are traversed to obtain all preliminary abnormal data; starting from the earliest record of the preliminary abnormal data, a continuous time period of the second window length is selected, the average daily electricity consumption in the second window is calculated, and the ratio with the preset historical period data is calculated. If the ratio is greater than or equal to the second preset threshold, it is further marked as the first abnormal data; the second window is slid until all preset periods are traversed to obtain all first abnormal data; the electricity consumption data greater than the third preset threshold and the difference in electricity consumption between two adjacent days less than the fourth preset threshold is selected from the first abnormal data to obtain abnormal data, thereby solving the problem of low efficiency of traditional electricity anomaly screening methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0016] Figure 1 A hardware structure block diagram of a mobile terminal for performing a method for screening abnormal power supply provided in an embodiment of the present application is shown;

[0017] Figure 2 A schematic diagram of a flow chart of a method for screening abnormal power consumption provided according to an embodiment of the present application is shown;

[0018] Figure 3 A schematic diagram of a main program flow of a method for screening abnormal power supply provided in an embodiment of the present application is shown;

[0019] Figure 4 A flowchart of power consumption data export of an optional power consumption anomaly screening method provided according to an embodiment of the present application is shown;

[0020] Figure 5 A flowchart of combined power consumption data of an optional power anomaly screening method provided according to an embodiment of the present application is shown;

[0021] Figure 6 A flow chart of an optional method for screening abnormal power consumption provided in accordance with an embodiment of the present application is shown.

[0022] The reference numerals are as follows:

[0023] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION

[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] As introduced in the background technology, the power anomaly screening method in the prior art has low efficiency and high error rate, which makes it difficult to meet the current efficient and accurate management needs. In order to solve the problem of low efficiency of the power anomaly screening method, the embodiments of the present application provide a power anomaly screening method, system and computer-readable storage medium.

[0028] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0029] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for screening abnormal power consumption according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of device information in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0031] In this embodiment, a method for screening power anomalies running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] Figure 2 is a flow chart of a method for screening abnormal power according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0033] Step S201, using automation technology to simulate manual login to the metering system to obtain daily electricity consumption data of all users within a preset period;

[0034] Specifically, automation technology usually refers to the use of programming and software tools to automatically perform a series of tasks that humans can complete manually, in order to improve efficiency and reduce errors. In this solution, automation technology is mainly used to simulate the process of power company employees logging into the power metering system, automatically performing data query and export operations, thereby avoiding the tedious steps of manual repeated login and data export.

[0035] Since the power metering system usually requires user verification, including entering login information such as username and password, the automation software automatically completes the login process by simulating these manual operations. This technology can use automation frameworks or libraries such as selenium, BeautifulSoup or Scrapy, which can control the browser or directly parse web page data to automate login and data crawling.

[0036] After logging into the system, the automation software automatically queries and downloads the daily power consumption data of all power users according to the preset period (for example, the past 60 days in this solution) and screening conditions. The system may provide a batch export function for data, but in order to ensure the integrity and accuracy of the data, the automation software will check the export status of the data. If it is found to be incomplete, it will automatically perform additional export until all the required data is obtained.

[0037] Step S202, starting from the initial moment of the above-mentioned preset cycle, selecting a continuous time period of the first window length, calculating the ratio of each of the above-mentioned power consumption data in the first sub-window of the above-mentioned first window to the above-mentioned power consumption data of the first day in the above-mentioned first window, and obtaining a plurality of first results. When all of the above-mentioned first results exceed the first preset threshold value, marking the above-mentioned power consumption data as preliminary abnormal data;

[0038] Specifically, for selecting the first window length, from the first day of the preset period (60 days), a time window of fixed length (called the first window) is selected, for example, 7 consecutive days. The selection of this window length is based on the analysis of the abnormal characteristics of electricity consumption. Usually, abnormal conditions will appear in a short period of time, so a moderate short-term window is selected for data comparison and analysis. In the selected first window, another subwindow is selected (for example, the last five days in the first window in this solution), and the ratio between the electricity consumption data of each day in the last five days in the first window and the electricity consumption data of the first day (first day) of the window is calculated. This calculation step is used to evaluate the trend of electricity consumption over time, especially whether there is a sudden and continuous increase. There is a preset threshold value for judging whether the ratio of electricity consumption is abnormal. If all calculated ratios (i.e., the first result) exceed this first preset threshold value, for example, the ratio in this solution is greater than 13 times, this indicates that in the selected first window, the user's electricity consumption has a significant and continuous surge, which is a preliminary sign of abnormal electricity consumption. When the ratio exceeds the preset threshold, the algorithm will mark all electricity consumption data in the first window as preliminary abnormal data. This means that for each 7-day cycle, if the electricity consumption on each day increases significantly relative to the first day, the electricity consumption data for these 7 days will be considered to be potentially abnormal.

[0039] Step S203, sliding the first window until all the preset cycles are traversed to obtain all the preliminary abnormal data;

[0040] Specifically, after completing the analysis of the first first window, the window is slid forward by one day (or according to the specific settings), and the same data ratio calculation and abnormal data marking are continued for the new first window. This process is repeated until all data within the entire preset period is covered, thereby ensuring that preliminary abnormal data within the entire period is identified.

[0041] Step S204, starting from the earliest moment among the multiple moments corresponding to all the preliminary abnormal data, selecting a continuous time period of the second window length, calculating the average daily power consumption in the second window, obtaining the first average daily power consumption, calculating the ratio of the first average daily power consumption to the second average daily power consumption in the preset historical period, obtaining a second result, and marking the power consumption data in the second window as the first abnormal data when the second result is greater than or equal to the second preset threshold;

[0042] Specifically, for selecting the second window length, based on the earliest recorded time point of the preliminary abnormal data, a new time window is selected, called the second window, whose length is different from the first window (for example, 5 consecutive days in this solution), which is used to evaluate the average change of electricity consumption over a long period of time. In the second window, the electricity consumption data of each day is averaged to obtain the average daily electricity consumption in the window, that is, the first daily average electricity consumption. This step is to capture the daily pattern of electricity consumption behavior and check whether there are fluctuations beyond the normal range. Next, the first daily average electricity consumption is compared with the second daily average electricity consumption in a preset historical period (such as last month or the same period last year). The second daily average electricity consumption is the average daily electricity consumption under the historical normal electricity consumption mode, which is used as a benchmark for judging abnormalities. There is a second preset threshold value for judging whether the ratio between the first daily average electricity consumption and the second daily average electricity consumption is abnormal. If the calculated ratio (second result) is greater than or equal to this threshold, for example, the ratio in this solution is greater than or equal to 5, this means that the average daily electricity consumption of the user in the second window is significantly higher than the historical normal level, which is further evidence of abnormal electricity consumption. If the second result exceeds the second preset threshold, the power consumption data in the second window will be marked as the first abnormal data. This means that not only the sudden increase in power consumption in a short period of time is identified, but also it is confirmed that this sudden increase has not returned to the normal level in a long period of time, thereby increasing the reliability of abnormal judgment.

[0043] Through this process, the preliminary abnormal data is further verified and refined into the first abnormal data, which usually means that the abnormal situation is more obvious and persistent. The second-level analysis increases the depth and breadth of abnormal detection, plays a key role in confirming power anomalies, and also provides a more accurate basis for the final abnormal data screening.

[0044] Step S205, sliding the second window until all the preset cycles are traversed to obtain all the first abnormal data;

[0045] Specifically, after the first abnormal data is initially marked, the second window will continue to slide. This means that the system will move the window to the next time point to cover a new time period. For example, if the second window is 5 consecutive days, then after analyzing the first 5-day window, it will move to cover 5 consecutive days starting from the second day, and so on. The second window will continue to slide until it covers the entire preset period (such as 60 days) and analyzes every consecutive time period within the period. This ensures that the algorithm can check all possible data fluctuation patterns within the period, not just the direct subsequent time period of the preliminary abnormal data. Through the sliding and analysis of the second window, if in any window, the ratio of the calculated daily average electricity consumption to the historical daily average electricity consumption is greater than or equal to the second preset threshold, then all electricity consumption data in the window will be marked as the first abnormal data. This marking will continue during the process of traversing the entire preset period until all data has been checked. This traversal process ensures that the data within the entire period is fully analyzed, not just a simple confirmation of the preliminary abnormal data. It enables the screening algorithm to capture abnormal patterns that may appear in different parts of the period, enhancing the comprehensiveness and accuracy of the screening.

[0046] Step S206, selecting power consumption data greater than the third preset threshold and with a power consumption difference between two consecutive days less than a fourth preset threshold from the first abnormal data to obtain abnormal data.

[0047] Specifically, from the set of data that has been marked as the first abnormal data, the data with power consumption greater than the third preset threshold is further screened out. This threshold is usually set to a higher fixed value, such as 15 kWh in this solution. It reflects that in the power system, only when the power consumption reaches or exceeds this value can it be identified as a truly abnormal situation, which helps to filter out those data that are initially marked as abnormal but the actual power consumption change is not significant. In addition to the absolute value of power consumption, it is also checked whether the power consumption difference between two adjacent days is less than another preset threshold, that is, the fourth preset threshold. For example, in this solution, this threshold is set to 10 kWh. Even if the power consumption of a certain day is greater than the third preset threshold, if the difference between it and the power consumption of the previous day or the next day is less than 10 kWh, it indicates that this high power consumption change is relatively stable, rather than a random or instantaneous abnormal phenomenon. This difference check helps to identify data that continues to remain at an abnormal level rather than a short-term fluctuation, thereby improving the accuracy and reliability of anomaly detection.

[0048] Obtaining abnormal data: By screening the above two conditions, we can further narrow down the scope from the first abnormal data and identify those data points that not only have significantly higher power consumption than normal levels, but also show a relatively stable change pattern between two consecutive days. These data points are finally confirmed as abnormal data, and they represent abnormal power consumption within the preset period that may really require the power company's attention and investigation.

[0049] This final screening step effectively identifies the most likely power anomalies from a large amount of data by combining the absolute value and relative stability of power consumption, reducing the workload of subsequent manual intervention and on-site inspections, and improving the efficiency and accuracy of the entire screening process.

[0050] Figure 3 1 is a main program flow chart of the method for screening abnormal power according to an embodiment of the present application. Figure 3 As shown, the following steps are included:

[0051] Check whether the historical export files are complete;

[0052] If the historical export files are complete, export the user's electricity meter data for the day;

[0053] If the historical export file is incomplete, the export history does not export data, and you can perform the "Export the user meter data of the day" step;

[0054] Merge the data in each export directory into one table;

[0055] Analyze and screen daily electricity consumption;

[0056] Output the screening results;

[0057] End the process.

[0058] In a specific embodiment of the present application, automation technology is used to simulate a manual login metering system to obtain daily electricity consumption data for all users within a preset period, including: using the date of each day as the naming standard for the above-mentioned electricity consumption data automatically exported from the above-mentioned manual login metering system as the folder naming standard, and storing the above-mentioned electricity consumption data in the corresponding folder; merging the first preset value of data files exported from each of the above-mentioned folders into one file; checking the number of the above-mentioned data files exported each day, and when the number of files on that day is less than the above-mentioned first preset value, automatically clearing the data in the corresponding folder, restarting the export process of the data for that day, and obtaining the above-mentioned electricity consumption data.

[0059] Specifically, the automation technology simulates the operation of power company employees and automatically logs into the power metering system. This process is similar to the manual operation of employees to log into the system, but it is automatically executed by the software, avoiding the tediousness and possible errors of manual operation. The software automatically performs data query and export to obtain the daily power consumption data of all users within the preset period.

[0060] File naming and storage: The software will automatically classify and store the electricity consumption data according to the date of each day. Specifically, the daily electricity consumption data will be stored in a folder named after the date of the day, for example, "2023-03-15" represents the data on March 15. The data in each folder corresponds to the electricity consumption of all users on that day, which is convenient for subsequent data processing and analysis by date.

[0061] File merging: After storing the data, the software will further process and merge multiple data files exported in each folder (for example, due to system limitations, each export is 600 pages, and there may be 8 exports) into a single file. The purpose of this is to simplify data management and make subsequent data analysis more convenient, avoiding the need to open and operate multiple files when processing data.

[0062] Data integrity check and remediation: The software has the function of automatically checking data integrity. It will check whether the number of data files exported each day reaches the preset first preset value (such as 8 files). If the number of files on a certain day is less than this preset value, it indicates that the data export is incomplete, which may be due to system limitations or technical problems in the export process. At this time, the software will automatically clear the data in the folder and restart the export process of the data for the day to ensure the integrity of the data and the accuracy of subsequent analysis.

[0063] Specifically, according to an optional power consumption data export flow chart of the power consumption abnormality screening method provided in an embodiment of the present application, Figure 4 As shown, the following steps are included:

[0064] Traverse the required export folders;

[0065] Open the browser through selenium technology;

[0066] Log in to the system through interfaces such as tag search and tag click to enter the metering system;

[0067] Get the export date based on the folder name;

[0068] Enter the date in the metering system filter conditions to query the meter data for that day;

[0069] Export data every 600 pages;

[0070] Determine whether the number of files in the directory is increased by 1 by exporting the directory;

[0071] If the number of files in the directory has not increased by 1, wait for 10 seconds and perform the step "Determine whether the number of files in the directory has increased by 1 by exporting the directory";

[0072] When the number of files in the directory increases by 1, determine whether all the data for the day has been exported;

[0073] If all data for the day has not been exported, execute the "Export data every 600 pages" step;

[0074] When all the data for the day is exported, copy the data to the export folder;

[0075] Determine whether the traversal is complete;

[0076] If the traversal is not complete, execute the "Traverse the required export folder" step;

[0077] When the traversal is completed, the process ends.

[0078] Through the above steps, the power anomaly screening software can continuously and automatically export and organize the power consumption data within the preset period from the power metering system to form an orderly and complete data set. Through automated login, data export, file naming and storage, data merging, integrity checking and data remediation, the entire data acquisition process is designed to be both efficient and reliable, ensuring that each user's daily power consumption data can be accurately collected, providing high-quality data support for the accurate identification and subsequent processing of power anomalies.

[0079] In one embodiment of the present application, the method further includes: based on the date input in the screening condition of the manual login metering system, retrieving the electricity consumption data corresponding to the date.

[0080] Specifically, the automation technology simulates the operation process of employees in the power metering system, which includes logging into the system and setting filtering conditions in the system. Usually, when employees search for data in the system, they enter a specific date or date range as a query parameter to obtain the power consumption information within the corresponding time. The software automates this operation so that the system can automatically obtain the required data every day without human intervention. After logging into the system automatically, the software automatically enters the preset date in the system's filtering conditions. The date here refers to the specific date on which the software plans to obtain power consumption data. For example, if the software is scheduled to run automatically every night, it will enter the date of the day in the evening and retrieve the power consumption data of all users on that day. This date-based data retrieval ensures the real-time and relevance of the data, that is, the data obtained by the software is always up to date and corresponds to the target date.

[0081] By accurately entering the target date in the screening conditions, the software can retrieve the electricity consumption data directly related to that date with high accuracy. This step is a key point in the entire data acquisition process because it is directly related to the accuracy and effectiveness of subsequent data analysis. Only by ensuring that the acquired data accurately matches the target date can the power anomaly screening algorithm perform analysis based on the correct data set, thereby effectively identifying the true power anomaly.

[0082] In a specific embodiment of the present application, before obtaining the daily electricity consumption data of all users within a preset period, the method further includes: preprocessing the data, and the preprocessing includes removing invalid data and processing missing values.

[0083] Specifically, data preprocessing is an indispensable step before data analysis, especially when processing large amounts of data, the quality of the data directly affects the credibility of the analysis results. Through automated preprocessing, the power anomaly screening software can ensure that the power consumption data obtained from the power metering system is properly cleaned and prepared, thereby supporting subsequent in-depth analysis and anomaly identification.

[0084] Removing invalid data: Before analyzing the power consumption data, we check and remove data that does not meet the requirements or cannot be used for analysis. Invalid data may include incorrect readings, non-numeric characters, extreme outliers (such as negative power consumption or excessive power consumption beyond physical possibility), duplicate records, or any other form of non-compliant data. Removing these invalid data can prevent them from misleading the analysis results and ensure that the algorithm identifies power anomalies based on reliable data.

[0085] Handling missing values: Sometimes in the data set, you may encounter missing electricity consumption data for some users on certain dates. This may be due to metering equipment failure, data transmission problems, or system recording errors. The preprocessing performed by the software also includes the processing of these missing values. Common processing methods include filling missing values ​​(for example, using the user's historical average electricity consumption, median, or average electricity consumption of other users during the time period), or in some cases, if there are too many missing data, you may choose to exclude the data of the entire user to avoid affecting the accuracy of the analysis results. The purpose of handling missing values ​​is to make the data set more complete to support the comprehensive analysis of the algorithm.

[0086] By removing invalid data and processing missing values, the software can significantly improve the quality of the data set. This step is critical to ensuring the accuracy and effectiveness of the power anomaly screening algorithm. High-quality data sets can not only reduce errors in the analysis results, but also improve the algorithm's ability to identify true anomalies, thereby improving the efficiency and reliability of the entire power anomaly screening process.

[0087] In a specific embodiment of the present application, the above-mentioned automation technology also includes: automatically merging multiple data files exported from the folder every day to form a unified data set.

[0088] Specifically, the process of automatically merging data files ensures that daily electricity consumption data can be fully collected and integrated even under system export restrictions. This operation also helps correct duplicate data or data fragmentation problems that may be caused by multiple exports, improves the integrity and accuracy of the data set, and provides a solid data foundation for accurate screening of power anomalies. Through automation technology, user electricity consumption data is exported from the power metering system every day and stored in a folder named after the date of the day. Since the system may limit the amount of data exported each time, multiple export operations may be required in a day, resulting in multiple data files in each folder. In order to facilitate subsequent data analysis and processing, it also has the function of automatically merging data files. It will identify each folder named after the date and automatically merge all exported data files in these folders into a unified data file. This process usually uses data processing techniques, such as the concat function in the pandas library, to splice multiple CSV or Excel files together, using unique identifiers such as asset numbers as primary keys to ensure accurate merging of data. By automatically merging multiple data files in a folder, a unified data set containing electricity consumption data for all users on a specific date can be generated. This data set is complete and structured, which is convenient for further processing and analysis by the algorithm. A unified data set not only simplifies data management, but also improves the efficiency and accuracy of data analysis.

[0089] Specifically, according to an optional power consumption anomaly screening method provided in an embodiment of the present application, a combined power consumption data flow chart is as follows: Figure 5 As shown, the following steps are included:

[0090] Traverse the directories that need to be merged;

[0091] Determine whether the traversal is complete;

[0092] When the traversal is completed, end the process;

[0093] Before the traversal is completed, use pandas technology to read all the data in the directory;

[0094] Use concat to merge all the data;

[0095] Select the required field data;

[0096] Save the merged data in the current directory and execute the "Traverse the directories to be merged" step.

[0097] In a specific embodiment of the present application, the length of the first window is set to cover the time period required to identify a sudden increase in user electricity consumption, the length of the first window is greater than the length of the first sub-window, and the length of the first sub-window is greater than the first day of the preset period.

[0098] Specifically, the length of the first window is set based on the time period required to identify a sudden increase in the user's electricity consumption. The choice of this time period is critical because it determines the shortest duration of the change in electricity consumption that the software can detect. For example, if the software is designed to identify significant increases in electricity consumption that last for several days, the length of the first window will be set to cover this period, such as 7 days. Setting the window length in this way ensures that the software can capture the complete pattern of the sudden increase in electricity consumption.

[0099] Inside the first window, a smaller first sub-window is further divided. The length of the first sub-window is smaller than the first window, but still larger than the first day of the preset cycle. For example, if the length of the first window is set to 7 days, the first sub-window is set to 5 days. This division enables the software to detect changes in electricity consumption on a shorter time scale, which helps to distinguish normal fluctuations in electricity consumption from abnormal surges in electricity consumption. At the same time, by setting the first sub-window to be larger than the first day of the preset cycle, the software can ensure that changes in electricity consumption after the start of the cycle are taken into account during analysis to avoid missing important data.

[0100] By setting windows of different lengths, the power anomaly screening software can find a balance between flexibility and accuracy. A longer first window ensures that the software captures a continuous surge in power, while a shorter first sub-window helps the software identify changes in power consumption more quickly and more precisely. This multi-level window setting enables the software to more accurately screen out anomalies from user power consumption data, reduce false alarm rates, and improve screening efficiency.

[0101] In a specific embodiment of the present application, the first preset threshold is set as a multiple threshold, which is used as a benchmark for screening the preliminary abnormal data, and the second preset threshold is set as a ratio threshold, which is used as a judgment standard for the first abnormal data.

[0102] Specifically, the first preset threshold is set as a multiple threshold. In the preliminary stage of power anomaly screening, this multiple threshold will be used to screen preliminary abnormal data. The specific operation is that the software will compare the user's power consumption in different time periods. If the power consumption in a certain period of time is significantly increased relative to the reference period (such as the first day or average daily power consumption), and the increase ratio exceeds the multiple set by the first preset threshold, then the data during this period will be preliminarily marked as abnormal. For example, if the first preset threshold is set to 13 times, the software will filter out user data whose power consumption suddenly increases to more than 13 times the first day.

[0103] After the initial screening of abnormal data, the "second preset threshold" will be further used to accurately determine which data are truly abnormal. This threshold is usually expressed as a ratio, which is used to evaluate the reliability of the abnormal data initially screened out. For example, the second preset threshold may be set as the ratio of the average daily electricity consumption to the average daily electricity consumption of the previous month or the same period last year during a sudden increase in electricity consumption. If this ratio exceeds the limit set by the second preset threshold (such as 5 times), then this part of the data will be confirmed as abnormal and subsequently processed as the first abnormal data. This helps the software exclude increases in electricity consumption due to seasonal changes, equipment upgrades or other normal factors, thereby more accurately identifying true electricity anomalies.

[0104] By setting these two preset thresholds, a phased strategy is adopted to filter abnormal data. The first preset threshold is used to quickly exclude most normal data and narrow the scope of abnormal data; while the second preset threshold is used for further precise judgment to ensure that the data finally filtered out does represent power anomalies. This strategy not only improves the efficiency of abnormal data screening, but also increases the accuracy of judgment and avoids a large number of false positives.

[0105] Identification and feedback of abnormal data: After screening and judging the above two preset thresholds, the software can identify the real possible abnormal power data and output this data to the power company for further analysis and processing. The identified abnormal data may include a significant increase in user power consumption, continuous high power consumption or other unusual power consumption patterns. This data is crucial for power companies to promptly detect potential circuit faults, leakage or abnormal user power consumption behavior.

[0106] In a specific embodiment of the present application, the above-mentioned preset historical period is a historical reference period, including last month and the same period last year, which is used to provide a reference benchmark for the above-mentioned second daily average electricity consumption.

[0107] Specifically, the preset historical period refers to a period of time in the past that is selected as a reference point for the current electricity consumption analysis. These historical periods include but are not limited to the previous month and the same period last year (for example, if it is October 2023, then the same period last year refers to October 2022), which provide the user's electricity consumption data during these specific historical periods so that the software can compare and analyze the current electricity consumption pattern.

[0108] The electricity consumption data within the preset historical time period is used as a reference benchmark for the second average daily electricity consumption. This means that the average daily electricity consumption within these historical time periods is usually calculated by dividing the total electricity consumption within the time period by the number of days in that time period. This average daily electricity consumption becomes the key benchmark for the software to evaluate whether the user's current electricity consumption pattern is abnormal. When identifying abnormal user electricity consumption, the user's average daily electricity consumption within the current preset period is compared with the average daily electricity consumption within the preset historical period. Through the set second preset threshold (ratio threshold), if the ratio between the user's current average daily electricity consumption and the average daily electricity consumption in the historical reference period exceeds a certain limit, then this may indicate that the user's electricity consumption pattern is abnormal and requires further investigation.

[0109] By using data from the previous month and the same period last year as a reference baseline, the software is able to take into account the impact of seasonality, cyclicality, and other long-term trends on electricity consumption. For example, electricity consumption is usually higher in the summer than in the winter, and specific events last year (such as large events or abnormal weather) may also affect electricity consumption. By comparing with historical data, the software is able to exclude these normal fluctuations and focus on identifying true electricity consumption anomalies.

[0110] The use of preset historical time periods improves the accuracy of anomaly identification. By comparing current data with historical data, the software is able to evaluate current electricity usage based on the user's long-term electricity usage patterns. If a user's electricity usage shows a significant and unexpected increase without considering seasonal factors, this may point to a circuit failure, leakage or other anomaly, and this data will be marked for further review.

[0111] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the power anomaly screening method of the present application will be described in detail below in combination with specific embodiments.

[0112] This embodiment relates to a specific method for screening power anomalies. A flowchart of an optional method for screening power anomalies provided in an embodiment of the present application is as follows: Figure 6 As shown, the following steps are included:

[0113] Traverse the directory to be analyzed, a total of 60 days of user meter data;

[0114] Determine whether the directory traversal is complete;

[0115] When the directory is not traversed completely, read the merged meter data in the folder;

[0116] Add the merged meter data to list A and execute the step of "Traversing the directory to be analyzed, a total of 60 days of user meter data";

[0117] When the directory traversal is complete, traverse list A;

[0118] Determine whether list A has been traversed;

[0119] If list A is not traversed completely, the data of two days are subtracted with the meter asset number as the primary key to obtain the electricity consumption data of one day;

[0120] Store the reduced power consumption data into another list B, and execute the "traverse the list" step;

[0121] After list A is traversed, traverse list B;

[0122] Determine whether list B has been traversed;

[0123] If list B is not traversed completely, select 7 days of electricity consumption data;

[0124] Divide the electricity consumption of the last five days by the electricity consumption of the first day. If both are greater than 13 times, the user is selected;

[0125] Add the selected users to the total data and execute the "Traverse List B" step;

[0126] After list B is traversed, read the electricity consumption data of all users in the previous month;

[0127] Calculate the average daily electricity consumption of all users last month;

[0128] Traverse the total data, starting from the first day, and obtain the electricity consumption data for five consecutive days each time;

[0129] Calculate the average daily electricity consumption for the five days;

[0130] If the average daily electricity consumption is 5 times or more than the average daily electricity consumption of the previous month, the user will be selected;

[0131] On this basis, the user's electricity consumption after five days is greater than 15 kWh, and the difference in electricity consumption between two consecutive days is within 10 kWh;

[0132] The user data selected in the previous step is the user data with abnormal power consumption, which is exported to the network disk;

[0133] End the process.

[0134] The embodiment of the present invention also provides a power anomaly screening system, including:

[0135] An acquisition module is used to use automation technology to simulate manual login to the metering system and obtain daily electricity consumption data of all users within a preset period;

[0136] Specifically, the acquisition module is used to simulate the process of power company employees logging into the power metering system through automation technology to automatically perform data query and export operations, thereby avoiding the cumbersome steps of manually repeating login and exporting data. Since the power metering system usually requires user verification, including entering login information such as username and password, the automation software automatically completes the login process by simulating these manual operations. This technology can use automation frameworks or libraries such as selenium, BeautifulSoup or Scrapy, which can control the browser or directly parse web page data to realize the automation of login and data capture. After logging into the system, the automation software automatically queries and downloads the daily electricity consumption data of all power users according to the preset cycle (for example, nearly 60 days in this solution) and screening conditions. The system may provide the function of batch exporting data, but in order to ensure the integrity and accuracy of the data, the automation software will check the export status of the data. If it is found to be incomplete, it will automatically perform supplementary export until all required data is obtained.

[0137] The power surge screening module is used to select a continuous time period of the first window length from the initial moment of the above-mentioned preset period, calculate the ratio of each of the above-mentioned power consumption data in the first sub-window of the above-mentioned first window to the above-mentioned power consumption data of the first day in the above-mentioned first window, obtain multiple first results, and when all of the above-mentioned first results exceed the first preset threshold value, mark the above-mentioned power consumption data as preliminary abnormal data;

[0138] Specifically, in the power surge screening module, for selecting the first window length, a fixed length time window (called the first window) is selected from the first day of the preset period (60 days), for example, 7 consecutive days. The selection of this window length is based on the analysis of the abnormal characteristics of power consumption. Usually, abnormal conditions will appear in a short period of time, so a moderate short-term window is selected for data comparison and analysis. In the selected first window, a subwindow is selected (for example, the last five days in the first window in this solution), and the ratio between the power consumption data of each day in the last five days in the first window and the power consumption data of the first day (first day) of the window is calculated. This calculation step is used to evaluate the trend of power consumption over time, especially whether there is a sudden and continuous substantial increase. There is a preset threshold value for judging whether the ratio of power consumption is abnormal. If all calculated ratios (i.e., the first result) exceed this first preset threshold value, for example, the ratio in this solution is greater than 13 times, this indicates that in the selected first window, the user's power consumption has increased significantly and continuously, which is a preliminary sign of power abnormality. When the ratio exceeds the preset threshold, the algorithm will mark all the electricity consumption data in the first window as preliminary abnormal data. This means that for each 7-day cycle, if the electricity consumption of each day increases significantly compared to the first day, the electricity consumption data for these 7 days will be considered to have potential abnormalities.

[0139] A first traversal module, used for sliding the first window until all the preset cycles are traversed to obtain all the preliminary abnormal data;

[0140] Specifically, after the first traversal module completes the analysis of the first first window, it slides the window forward by one day (or according to specific settings), and continues to perform the same data ratio calculation and abnormal data marking on the new first window. This process will be repeated until all data within the entire preset period is covered, thereby ensuring that preliminary abnormal data within the entire period is identified.

[0141] The daily average power consumption comparison and analysis module is used to select a continuous time period of the second window length from the earliest time among the multiple times corresponding to all the above preliminary abnormal data, calculate the daily average power consumption in the above second window, obtain the first daily average power consumption, calculate the ratio of the above first daily average power consumption to the second daily average power consumption in the preset historical period, obtain the second result, and when the above second result is greater than or equal to the second preset threshold value, mark the power consumption data in the above second window as the first abnormal data;

[0142] Specifically, in the daily average power consumption comparison and analysis module, for selecting the second window length, based on the earliest recording time point of the preliminary abnormal data, a new time window is selected, called the second window, whose length is different from the first window (for example, 5 consecutive days in this solution), which is used to evaluate the average change of power consumption over a long period of time. In the second window, the power consumption data of each day is averaged to obtain the daily average power consumption in the window, that is, the first daily average power consumption. This step is to capture the daily pattern of power consumption behavior and check whether there are fluctuations beyond the normal range. Next, the first daily average power consumption is compared with the second daily average power consumption in a preset historical period (such as last month or the same period last year). The second daily average power consumption is the average daily power consumption under the historical normal power consumption mode, which is used as a benchmark for judging abnormalities. There is a second preset threshold value for judging whether the ratio between the first daily average power consumption and the second daily average power consumption is abnormal. If the calculated ratio (second result) is greater than or equal to this threshold, for example, the ratio in this solution is greater than or equal to 5, this means that the average daily power consumption of the user in the second window is significantly higher than the historical normal level, which is further evidence of power abnormality. If the second result exceeds the second preset threshold, the power consumption data in the second window will be marked as the first abnormal data. This means that not only the sudden increase in power consumption in a short period of time is identified, but also it is confirmed that this sudden increase has not returned to the normal level in a long period of time, thereby increasing the reliability of abnormal judgment.

[0143] Through the daily average power consumption comparison analysis module, the preliminary abnormal data is further verified and refined into the first abnormal data, which usually means that the abnormal situation is more obvious and persistent. The second level analysis increases the depth and breadth of abnormal detection, plays a key role in confirming power anomalies, and also provides a more accurate basis for the final abnormal data screening.

[0144] A second traversal module, used for sliding the second window until all the preset cycles are traversed to obtain all the first abnormal data;

[0145] Specifically, the second traversal module is used to continue sliding the second window after the first abnormal data is initially marked. This means that the system will move the window to the next time point to cover a new time period. For example, if the second window is 5 consecutive days, then after analyzing the first 5-day window, it will move to cover 5 consecutive days starting from the second day, and so on. The second window will continue to slide until it covers the entire preset period (such as 60 days) and analyzes every continuous time period in the period. This ensures that the algorithm can check all possible data fluctuation patterns in the period, not just the direct subsequent time period of the preliminary abnormal data. Through the sliding and analysis of the second window, if in any window, the ratio of the calculated daily average electricity consumption to the historical daily average electricity consumption is greater than or equal to the second preset threshold, then all electricity consumption data in the window will be marked as the first abnormal data. This marking will continue during the process of traversing the entire preset period until all data has been checked. This traversal process ensures that the data in the entire period is fully analyzed, not just a simple confirmation of the preliminary abnormal data. It enables the screening algorithm to capture abnormal patterns that may appear in different parts of the period, enhancing the comprehensiveness and accuracy of the screening.

[0146] The leakage characteristic constant power module is used to select power consumption data greater than the third preset threshold and the power consumption difference between two consecutive days is less than the fourth preset threshold from the above-mentioned first abnormal data to obtain abnormal data.

[0147] Specifically, the leakage characteristic constant power module is used to further filter out data with power consumption greater than the third preset threshold from the set of data that has been previously marked as the first abnormal data. This threshold is usually set to a higher fixed value, such as 15 kWh in this solution. It reflects that in the power system, only when the power consumption reaches or exceeds this value can it be identified as a truly abnormal situation, which helps to filter out those data that are initially marked as abnormal but the actual power consumption changes are not significant. In addition to the absolute value of power consumption, it is also checked whether the power consumption difference between two adjacent days is less than another preset threshold, that is, the fourth preset threshold. For example, in this solution, this threshold is set to 10 kWh. Even if the power consumption of a certain day is greater than the third preset threshold, if the difference between it and the power consumption of the previous day or the next day is less than 10 kWh, it indicates that this high power consumption change is relatively stable, rather than a random or instantaneous abnormal phenomenon. This difference check helps to identify data that continues to remain at an abnormal level rather than a short-term fluctuation, thereby improving the accuracy and reliability of anomaly detection.

[0148] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned power abnormality screening method.

[0149] Specifically, the power abnormality screening method includes:

[0150] Step S201, using automation technology to simulate manual login to the metering system to obtain daily electricity consumption data of all users within a preset period;

[0151] Step S202, starting from the initial moment of the above-mentioned preset cycle, selecting a continuous time period of the first window length, calculating the ratio of each of the above-mentioned power consumption data in the first sub-window of the above-mentioned first window to the above-mentioned power consumption data of the first day in the above-mentioned first window, and obtaining a plurality of first results. When all of the above-mentioned first results exceed the first preset threshold value, marking the above-mentioned power consumption data as preliminary abnormal data;

[0152] Step S203, sliding the first window until all the preset cycles are traversed to obtain all the preliminary abnormal data;

[0153] Step S204, starting from the earliest moment among the multiple moments corresponding to all the preliminary abnormal data, selecting a continuous time period of the second window length, calculating the average daily power consumption in the second window, obtaining the first average daily power consumption, calculating the ratio of the first average daily power consumption to the second average daily power consumption in the preset historical period, obtaining a second result, and marking the power consumption data in the second window as the first abnormal data when the second result is greater than or equal to the second preset threshold;

[0154] Step S205, sliding the second window until all the preset cycles are traversed to obtain all the first abnormal data;

[0155] Step S206, selecting power consumption data greater than the third preset threshold and with a power consumption difference between two consecutive days less than a fourth preset threshold from the first abnormal data to obtain abnormal data.

[0156] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the steps of the above-mentioned power abnormality screening method are implemented.

[0157] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes at least the steps of the above-mentioned power anomaly screening method.

[0158] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0159] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0160] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0161] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0163] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0164] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0165] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0166] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0167] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for screening abnormal electric quantity, characterized in that: include: Use automation technology to simulate manual login to the metering system to obtain daily electricity consumption data of all users within a preset period; Starting from the initial moment of the preset period, a continuous time period of a first window length is selected, and a ratio of each of the power consumption data in a first sub-window within the first window to the power consumption data of the first day within the first window is calculated to obtain a plurality of first results, and when all of the first results exceed a first preset threshold, the power consumption data is marked as preliminary abnormal data; Slide the first window until all the preset cycles are traversed to obtain all the preliminary abnormal data; Starting from the earliest moment among the multiple moments corresponding to all the preliminary abnormal data, selecting a continuous time period of a second window length, calculating the average daily power consumption in the second window to obtain a first average daily power consumption, calculating the ratio of the first average daily power consumption to the second average daily power consumption in a preset historical period to obtain a second result, and when the second result is greater than or equal to a second preset threshold, marking the power consumption data in the second window as first abnormal data; Slide the second window until all the preset cycles are traversed to obtain all the first abnormal data; The power consumption data whose power consumption is greater than the third preset threshold and whose power consumption difference between two consecutive days is less than the fourth preset threshold is selected from the first abnormal data to obtain abnormal data.

2. The method according to claim 1, characterized in that Use automation technology to simulate manual login to the metering system to obtain daily electricity consumption data of all users within a preset period, including: The power consumption data automatically exported from the manual login metering system uses the date of each day as a folder naming standard, and stores the power consumption data in a corresponding folder; Merging a first preset number of data files exported from each of the folders into one file; The number of the data files exported every day is checked. When the number of files on that day is less than the first preset value, the data in the corresponding folder is automatically cleared, and the export process of the data for that day is restarted to obtain the power consumption data.

3. The method according to claim 1, characterized in that The method further comprises: Based on the date input in the screening condition of the manual login metering system, the power consumption data corresponding to the date is retrieved.

4. The method according to claim 1, characterized in that: Before obtaining the daily electricity consumption data of all users within a preset period, the method further includes: The data is preprocessed, and the preprocessing includes removing invalid data and processing missing values.

5. The method according to claim 1, characterized in that The automation technology also includes: Automatically merge multiple data files exported from the daily folder to form a unified data set.

6. The method according to claim 1, characterized in that The length of the first window is set to cover the time period required for identifying a sudden increase in user power consumption. The length of the first window is greater than the length of the first sub-window, and the length of the first sub-window is greater than the first day of the preset period.

7. The method according to claim 1, characterized in that The first preset threshold is set as a multiple threshold, which is used as a benchmark for screening the preliminary abnormal data, and the second preset threshold is set as a ratio threshold, which is used as a judgment standard for the first abnormal data.

8. The method according to claim 1, characterized in that The preset historical period is a historical reference period, including last month and the same period last year, and is used to provide a reference benchmark for the second daily average electricity consumption.

9. A power anomaly screening system, characterized in that: include: An acquisition module is used to use automation technology to simulate manual login to the metering system and obtain daily electricity consumption data of all users within a preset period; an electricity consumption sudden increase screening module, configured to select a continuous time period of a first window length from the initial moment of the preset period, calculate a ratio of each electricity consumption data in a first sub-window in the first window to the electricity consumption data of the first day in the first window, obtain a plurality of first results, and mark the electricity consumption data as preliminary abnormal data when all the first results exceed a first preset threshold; A first traversal module, used for sliding the first window until all the preset cycles are traversed to obtain all the preliminary abnormal data; A daily average power consumption comparison and analysis module, configured to select a continuous time period of a second window length, starting from the earliest moment among the multiple moments corresponding to all the preliminary abnormal data, calculate the daily average power consumption in the second window, obtain a first daily average power consumption, calculate the ratio of the first daily average power consumption to the second daily average power consumption in a preset historical period, obtain a second result, and mark the power consumption data in the second window as first abnormal data when the second result is greater than or equal to a second preset threshold; A second traversal module, used for sliding the second window until all the preset cycles are traversed to obtain all the first abnormal data; The leakage characteristic constant power module is used to select power consumption data greater than the third preset threshold and the power consumption difference between two consecutive days is less than the fourth preset threshold from the first abnormal data to obtain abnormal data.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the power abnormality screening method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Abnormal electric quantity data detection method based on long-term and short-term memory network

    CN111612651A

  • Electricity consumption abnormity prompting method and device, computer equipment and storage medium

    CN112714368A

  • Method and device for checking user with abnormal electric quantity, computer device and storage medium

    CN113988800A

  • Grading and time-sharing electricity consumption abnormal change analysis method for elderly people living alone

    CN114022307A