Fitting method, device and master station system for missing daily power data
By combining the weights of the truth discovery algorithm and the truth update algorithm with the daily electricity consumption data of similar electricity meters in the same area, the weights of the electricity meter to be repaired are fitted, which solves the problem of low efficiency or large error in electricity data fitting in the existing technology and achieves efficient and accurate electricity data repair.
Patent Information
- Application Number
- CN202310094796.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-18
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-01-18
AI Technical Summary
Existing methods for fitting electricity data struggle to balance computational efficiency and fitting error, especially in scenarios with unstable electricity consumption, where existing methods suffer from large correction errors or low computational efficiency.
The weight update and truth update algorithms of the truth discovery algorithm are adopted. By obtaining the daily electricity consumption data of electricity meters of the same type and region without missing data, the weights of the electricity meters to be repaired are fitted and weighted summation is performed to predict the missing daily electricity consumption data.
While achieving high computational efficiency, it reduces fitting errors, making it suitable for scenarios with unstable power consumption and providing efficient and accurate power data repair.
Smart Images

Figure CN116109333B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electricity data processing technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for fitting missing daily electricity data. Background Technology
[0002] When the master station system remotely collects daily electricity data from electricity meters, factors such as on-site equipment failure and data acquisition channel failure may cause the master station system to fail to collect data remotely. At this time, the master station system will attempt to collect supplementary data. When the number of unsuccessful supplementary data collections exceeds a certain number, the master station system needs to fit the missing daily electricity data from the electricity meter to repair it. However, the existing methods for fitting electricity data are difficult to balance computational efficiency and fitting error. Summary of the Invention
[0003] Therefore, it is necessary to provide a method, apparatus, computer device, storage medium, and computer program product for fitting missing daily electricity consumption data to address the above-mentioned technical problems.
[0004] This application provides a method for fitting missing daily electricity consumption data, the method comprising:
[0005] Based on whether there is missing daily electricity consumption data for the current day, the electricity meters to be repaired are identified, and the daily electricity consumption data of the electricity meters to be repaired for the most recent N days are obtained; where N is a natural number greater than 0;
[0006] Obtain M electricity meters of the same type and region as the user of the electricity meter to be repaired, and which have no missing data; where M is a natural number greater than 0.
[0007] Obtain the daily electricity consumption data for the M electricity meters for the current day and the most recent N days;
[0008] The weight update algorithm of the truth discovery algorithm is used to fit the weights of the daily electricity consumption data of the M electricity meters for the current day and the most recent N days.
[0009] The truth update algorithm of the truth discovery algorithm is used to fit the missing daily electricity data of the electricity meter to be repaired on the current day according to the weights of the daily electricity data of the most recent N days.
[0010] In one embodiment, determining the electricity meter to be repaired based on whether there is missing daily electricity consumption data includes:
[0011] Obtain the daily electricity consumption data of the target electricity meter for that day, and perform a null value judgment on the daily electricity consumption data of the target electricity meter for that day; when the daily electricity consumption data for that day is null, it is determined that the target electricity meter has missing daily electricity consumption data for that day, and the target electricity meter is designated as an electricity meter to be repaired.
[0012] In one embodiment, the daily electricity consumption data for that day is checked for null values, including:
[0013] Anomaly detection is performed on the daily electricity consumption data of the target electricity meter for that day; after anomaly detection, null value judgment is performed on the daily electricity consumption data of the target electricity meter for that day.
[0014] In one embodiment, after performing anomaly detection on the daily electricity consumption data of the target electricity meter for that day, the method further includes:
[0015] If the daily electricity consumption data of the target electricity meter is abnormal, then the daily electricity consumption data of the target electricity meter for that day shall be removed.
[0016] In one embodiment, anomaly detection is performed on the daily electricity consumption data of the target electricity meter for that day, including:
[0017] Based on the abnormal feature database, anomaly detection is performed on the daily electricity consumption data of the electricity meter for that day.
[0018] In one embodiment, the method further includes:
[0019] If the daily electricity consumption data for that day is not empty, it is determined that there is no missing daily electricity consumption data for the target electricity meter, and the daily electricity consumption data of the target electricity meter is directly stored in the database.
[0020] In one embodiment, based on the weights of the daily electricity consumption data of the electricity meter to be repaired for the most recent N days, the missing daily electricity consumption data of the electricity meter to be repaired on the current day is fitted, including:
[0021] Based on the weights of the daily electricity consumption data of the meter to be repaired for the most recent N days, a weighted sum is performed on the daily electricity consumption data of the meter to be repaired for the most recent N days; based on the weighted summation result, the missing daily electricity consumption data of the meter to be repaired is fitted.
[0022] In one embodiment, after fitting the missing daily electricity consumption data of the meter to be repaired on that day, the method further includes:
[0023] The daily electricity consumption data obtained from the fitting process is labeled with fitting tags and stored in the database.
[0024] This application provides a fitting device for missing daily electricity data, the device comprising:
[0025] The missing data detection module is used to determine the electricity meter to be repaired based on whether there is missing daily electricity data for the current day, and to obtain the daily electricity data of the electricity meter to be repaired for the most recent N days; where N is a natural number greater than 0.
[0026] The electricity meter acquisition module is used to acquire M electricity meters of the same type and region as the user of the electricity meter to be repaired, and which have no missing data; where M is a natural number greater than 0.
[0027] The electricity meter acquisition module is also used to acquire the daily electricity consumption data of the M electricity meters for the current day and the most recent N days;
[0028] The weight fitting module is used to fit the weights of the daily electricity consumption data of the electricity meter to be repaired for the most recent N days based on the weight update algorithm of the truth discovery algorithm and the current day and the daily electricity consumption data of the M electricity meters.
[0029] The daily electricity consumption data fitting module is used to fit the missing daily electricity consumption data of the electricity meter to be repaired on the current day according to the weights of the daily electricity consumption data of the most recent N days of the truth value discovery algorithm and the truth value update algorithm.
[0030] This application provides a master station system, including a memory and a processor, wherein the memory stores a computer program and the processor executes the above-described method.
[0031] This application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor using the methods described above.
[0032] This application provides a computer program product having a computer program stored thereon, the computer program being executed by a processor using the above-described method.
[0033] The aforementioned method, device, master station system, storage medium, and computer program product for fitting missing daily electricity consumption data mainly determine the electricity meters to be repaired based on whether there is missing daily electricity consumption data on the current day. It then obtains the daily electricity consumption data of the electricity meters to be repaired for the most recent N days, where N is a natural number greater than 0. It also obtains M electricity meters of the same type and region as the electricity meters to be repaired, which do not have missing data, where M is a natural number greater than 0. The daily electricity consumption data of the M electricity meters for the current day and the most recent N days are obtained. Using a truth-finding algorithm with a weight update algorithm, the weights of the daily electricity consumption data of the electricity meters to be repaired for the most recent N days are fitted based on the daily electricity consumption data of the M electricity meters for the current day and the most recent N days. Finally, using a truth-finding algorithm with a truth update algorithm, the missing daily electricity consumption data of the electricity meters to be repaired for the current day is fitted based on the weights of the daily electricity consumption data of the electricity meters to be repaired for the most recent N days.
[0034] This application employs a truth discovery algorithm to fit the daily electricity consumption data of the meter to be repaired over the past N days to the current day and the past N days of data from M electricity meters of the same type and region as the user and without missing data. This fits the weights of the daily electricity consumption data of the meter to be repaired over the past N days. This method requires less data and has high computational efficiency. Furthermore, by using the weights of the daily electricity consumption data of the meter to be repaired over the past N days, it fits the missing daily electricity consumption data of the meter to be repaired on the current day, which can adapt to scenarios with unstable electricity consumption and has small errors. Attached Figure Description
[0035] Figure 1 This is a flowchart illustrating a fitting method for missing daily electricity consumption data in one embodiment;
[0036] Figure 2 This is a flowchart illustrating a fitting method for missing daily electricity consumption data in one embodiment;
[0037] Figure 3 A structural block diagram of a fitting device for missing daily electricity data in one embodiment;
[0038] Figure 4 This is an internal structure diagram of the main station system in one embodiment. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0040] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0041] Currently, for fitting electricity consumption data, methods based on mean and interpolation can be used. This method, which replaces missing and outlier values with the mean of a reference day, can effectively fit electricity consumption in scenarios with stable consumption and is computationally simple. However, due to the significant seasonal variations in user electricity consumption data, especially the large fluctuations around public holidays, the correction error of this fitting method is relatively large. Alternatively, intelligent electricity consumption fitting methods can be used, which employ neural network algorithms from machine learning to build an intelligent data fitting model based on historical data. However, this requires a large amount of sample data, the algorithm is complex, and the computational efficiency is low.
[0042] Based on this, in one embodiment, such as Figure 1As shown, a method for fitting missing daily electricity data is provided, including the following steps:
[0043] Step S101: Based on whether there is missing daily electricity consumption data for the electricity meter, determine the electricity meter to be repaired, and obtain the daily electricity consumption data of the electricity meter to be repaired for the most recent N days; where N is a natural number greater than 0.
[0044] The aforementioned electricity meters awaiting repair are those with missing daily electricity consumption data for the current day. The aforementioned N days represent the daily electricity consumption data for the N days prior to the current day when the missing data is found, where N is a natural number greater than 0. For example, when N is 7, if an electricity meter is missing daily electricity consumption data for the current day, then the meter is an electricity meter awaiting repair, and the main station system retrieves the daily electricity consumption data for the 7 days prior to the current day for the electricity meter awaiting repair.
[0045] Step S102: Obtain M electricity meters of the same type and region as the user of the electricity meter to be repaired, and which have no missing data; where M is a natural number greater than 0.
[0046] The above-mentioned M electricity meters without missing data are the electricity meters that the main station system finds based on the user attributes of the electricity meter to be repaired. These electricity meters are of the same type and area as the user of the electricity meter to be repaired and do not have missing data. There may be multiple electricity meters found, and M electricity meters are selected from them.
[0047] Step S103: Obtain the daily electricity consumption data of the M electricity meters for the current day and the most recent N days.
[0048] Step S104: Using the weight update algorithm of the truth discovery algorithm, the weights of the daily electricity consumption data of the M electricity meters for the current day and the most recent N days are fitted to the respective weights of the daily electricity consumption data of the electricity meters to be repaired for the most recent N days.
[0049] The aforementioned truth discovery algorithm is an effective method for obtaining reliable results from a dataset by calculating the reliability of the data source and the truth value of the object. It consists of two parts: weight update and truth value update. The main station system uses the daily electricity consumption data of M electricity meters for the current day and the most recent N days, and employs a weight update algorithm to predict the weights of the daily electricity consumption data for the most recent N days. Generally, N is 7, meaning that the daily electricity consumption data for the most recent 7 days is used. The calculation formula is as follows:
[0050] Among them, W d-k The weights of the electricity consumption data for the first k days are given, where k = 1...N; This represents the daily electricity consumption value of electricity meter i. The electricity consumption of meter i on the kth day; The Euclidean distance calculation function is typically used. Thus, the weight of the daily electricity consumption data for the most recent N days for the same type of electricity meter in the same area as the user whose meter is to be repaired can be calculated using the above formula. This weight can also be used as the weight of the daily electricity consumption data for the most recent N days for the meter to be repaired.
[0051] Step S105: Using the truth update algorithm of the truth discovery algorithm, the missing daily electricity data of the electricity meter to be repaired on the current day is fitted according to the weights of the daily electricity data of the most recent N days.
[0052] Specifically, for fitting the missing daily electricity consumption data of the electricity meter to be repaired, the main method is to use the weights of the daily electricity consumption data of the electricity meter over the most recent N days, and then perform a weighted summation of the daily electricity consumption data of the electricity meter over the most recent N days. Based on the weighted summation result, the missing daily electricity consumption data of the electricity meter is predicted to complete the fitting of the missing daily electricity consumption data of the electricity meter to be repaired. The calculation formula is as follows:
[0053] Where E r E represents the fitted value of the daily electricity consumption for meters with missing data. (d-k) Let N be the electricity consumption of the first k days of the electricity meter, where k = 1...N.
[0054] The above-mentioned method for fitting missing daily electricity consumption data mainly determines the electricity meters to be repaired based on whether there is any missing daily electricity consumption data for the current day. It then obtains the daily electricity consumption data for the most recent N days for these meters, where N is a natural number greater than 0. Next, it identifies M electricity meters of the same type and region as the meter to be repaired, and which do not have missing data, where M is a natural number greater than 0. The method also obtains the daily electricity consumption data for the current day and the most recent N days for these M meters. Finally, using the weight update algorithm of the truth discovery algorithm, it fits the weights of the daily electricity consumption data for the most recent N days for the meter to be repaired based on the weights of the daily electricity consumption data for the most recent N days for the meter to be repaired. Finally, using the truth update algorithm of the truth discovery algorithm, it fits the missing daily electricity consumption data for the current day for the meter to be repaired based on the weights of the daily electricity consumption data for the most recent N days for the meter to be repaired.
[0055] This application employs a truth discovery algorithm to fit the daily electricity consumption data of the meter to be repaired over the past N days to the current day and the past N days of data from M electricity meters of the same type and region as the user and without missing data. This fits the weights of the daily electricity consumption data of the meter to be repaired over the past N days. This method requires less data and has high computational efficiency. Furthermore, by using the weights of the daily electricity consumption data of the meter to be repaired over the past N days, it fits the missing daily electricity consumption data of the meter to be repaired on the current day, which can adapt to scenarios with unstable electricity consumption and has small errors.
[0056] In one embodiment, determining the electricity meter to be repaired based on whether there is missing daily electricity consumption data for that day includes: obtaining the daily electricity consumption data of the target electricity meter for that day, and performing a null value judgment on the daily electricity consumption data of the target electricity meter for that day; when the daily electricity consumption data for that day is null, determining that there is missing daily electricity consumption data for that day for the target electricity meter, and designating the target electricity meter as the electricity meter to be repaired.
[0057] The target electricity meters mentioned above are those that have not undergone null value detection. Specifically, the main station system obtains the daily electricity consumption data of the user's electricity meter on the day of operation through the data acquisition terminal, which is the daily electricity consumption data of the target electricity meter on that day. Then, it performs anomaly detection on the daily electricity consumption data of the target electricity meter on that day according to the anomaly feature database, and removes the abnormal daily electricity consumption data of the target electricity meter. For the target electricity meter whose abnormal daily electricity consumption data has been removed, the daily electricity consumption data for that day is missing. Then, the main station system performs null value detection on the daily electricity consumption data of the target electricity meter that has passed the anomaly detection. When it is determined to be null, the corresponding target electricity meter is designated as the electricity meter to be repaired, so as to perform subsequent fitting and repair of the missing daily electricity consumption data.
[0058] In one embodiment, determining null values for the daily electricity consumption data includes: performing anomaly detection on the daily electricity consumption data of the target electricity meter; and, after anomaly detection, determining null values for the daily electricity consumption data of the target electricity meter.
[0059] In one embodiment, after performing anomaly detection on the daily electricity consumption data of the target electricity meter, the method provided in this application further includes: if the daily electricity consumption data of the target electricity meter is abnormal, then the daily electricity consumption data of the target electricity meter is removed.
[0060] In one embodiment, anomaly detection is performed on the daily electricity consumption data of the target electricity meter for that day, including: performing anomaly detection on the daily electricity consumption data of the electricity meter for that day according to an anomaly feature database.
[0061] In one embodiment, the method provided by this application further includes: when the daily electricity consumption data of the day is not empty, determining that there is no missing daily electricity consumption data of the target electricity meter on that day, and directly storing the daily electricity consumption data of the target electricity meter into the database.
[0062] In one embodiment, fitting the missing daily electricity data of the electricity meter to be repaired on the current day according to the respective weights of the daily electricity data of the electricity meter to be repaired for the most recent N days includes: performing a weighted summation of the daily electricity data of the electricity meter to be repaired for the most recent N days according to the weights of the daily electricity data of the electricity meter to be repaired; and fitting the missing daily electricity data of the electricity meter to be repaired based on the weighted summation result.
[0063] In one embodiment, after fitting the missing daily electricity consumption data of the electricity meter to be repaired on the day, the method provided by this application further includes: attaching a fitting label to the fitted daily electricity consumption data and storing it in a database.
[0064] Specifically, after the missing daily electricity consumption data is fitted, a corresponding fitting label will be added to display the daily electricity consumption data with the fitting label as the fitted data.
[0065] To better understand the above methods, combined with Figure 2 This paper elaborates on an application example of the method for fitting missing daily electricity data in this application.
[0066] Steps S201-S203: The main station system acquires the daily electricity consumption data of the user's operating electricity meter on the current day through the acquisition terminal, i.e., the daily electricity consumption data of the target electricity meter on the current day. Then, it performs anomaly detection on the daily electricity consumption data of the target electricity meter according to the anomaly feature database, and removes the abnormal daily electricity consumption data of the target electricity meter. For the target electricity meter whose abnormal daily electricity consumption data has been removed, the daily electricity consumption data for that day is missing. Then, the main station system performs data null value judgment on the daily electricity consumption data of the target electricity meter that has passed the anomaly detection. When it is judged to be null, the corresponding target electricity meter is designated as the electricity meter to be repaired, and the daily electricity consumption data of the above-mentioned electricity meter for the most recent N days is acquired for subsequent fitting and repair of the missing daily electricity consumption data. The above-mentioned N days are the daily electricity consumption data of the N days before the current day when the daily electricity consumption data is missing, where N is a natural number greater than 0. For example, when N is 7, if the electricity meter is missing daily electricity consumption data for that day, then the electricity meter is the electricity meter to be repaired, and the main station system acquires the daily electricity consumption data of the electricity meter for the 7 days before the current day when the daily electricity consumption data is missing.
[0067] If the daily electricity consumption data of the target electricity meter is not empty, it is determined that there is no missing daily electricity consumption data for the target electricity meter, and step S206 is executed directly: the daily electricity consumption data of the target electricity meter is stored in the database. The database can be an MMP (Massively Parallel Processing) database.
[0068] Step S204: The main station system obtains daily electricity consumption data with reference value to obtain reliable daily electricity consumption fitting results. That is, the main station system finds electricity meters of the same type and region as the user of the electricity meter to be repaired, and which have no missing data, based on the user attributes of the electricity meter to be repaired. There may be multiple electricity meters found. M electricity meters are selected from them, and the daily electricity consumption data of the above M electricity meters for the current day and the most recent N days are obtained.
[0069] Step S205: The master station system uses a truth discovery algorithm to predict the daily electricity consumption of the running electricity meters. The aforementioned truth discovery algorithm is an effective method for obtaining reliable results from the dataset by calculating the reliability of the data source and the truth value of the object. It includes two parts: weight update and truth value update.
[0070] Regarding weight updates: The main station system uses the daily electricity consumption data of M electricity meters for the current day and the most recent N days, and employs a weight update algorithm to predict the weight of each of the daily electricity consumption data for the most recent N days. Generally, N is 7, meaning that the daily electricity consumption data for the most recent 7 days is used. The calculation formula is as follows:
[0071] Among them, W d-k The weights of the electricity consumption data for the first k days are given, where k = 1...N; This represents the daily electricity consumption value of electricity meter i. The electricity consumption of meter i on the kth day; The Euclidean distance calculation function is typically used. Thus, the weight of the daily electricity consumption data for the most recent N days for the same type of electricity meter in the same area as the user whose meter is to be repaired can be calculated using the above formula. This weight can also be used as the weight of the daily electricity consumption data for the most recent N days for the meter to be repaired.
[0072] For fitting the missing daily electricity consumption data of the electricity meter to be repaired: The main station system uses the weights of the daily electricity consumption data of the electricity meter to be repaired over the past N days to perform a weighted summation of the daily electricity consumption data of the electricity meter to be repaired. Based on the weighted summation result, the missing daily electricity consumption data of the electricity meter is predicted to complete the fitting of the missing daily electricity consumption data of the electricity meter to be repaired. The calculation formula is as follows:
[0073] Where E r E represents the fitted value of the daily electricity consumption for meters with missing data. (d-k) Let N be the electricity consumption of the first k days of the electricity meter, where k = 1...N.
[0074] This application proposes a method for fitting daily electricity consumption data from electricity meters based on a truth-finding algorithm to address the issues of missing and anomaly-related data. This method can dynamically update the reference day weights for electricity meters with missing data, achieving efficient and accurate fitting of daily electricity consumption data. It has at least the following advantages:
[0075] 1. In the weight update algorithm, the weight of the reference daily electricity consumption of electricity meters in the same user type and region is obtained based on the distance between the reference daily electricity consumption and the current daily electricity consumption. This weight update method is universal and does not require differentiated calculation for each user's electricity consumption data with large fluctuations. It can dynamically reflect the seasonal changes and fluctuations in user electricity consumption data before and after public holidays in real time, solving the problem of relatively low data accuracy caused by relying on experience-based assignment and the single implementation method in existing technologies.
[0076] 2. In the truth value update algorithm, the dynamically updated reference daily data weights are used as parameters. By weighting the electricity consumption data of the electricity meter over the past N days (typically N=7), the algorithm predicts the daily electricity consumption data of similar meters in the same area. Compared with existing intelligent electricity consumption fitting methods that generally require nearly 3 years of historical data, this method requires relatively less historical data, has higher repair efficiency, and is highly reusable.
[0077] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0078] In one embodiment, such as Figure 3 As shown, a device for fitting missing daily electricity data is provided, comprising:
[0079] The missing data determination module 301 is used to determine the electricity meter to be repaired based on whether there is missing daily electricity data on the current day, and to obtain the daily electricity data of the electricity meter to be repaired for the most recent N days; where N is a natural number greater than 0.
[0080] The electricity meter acquisition module 302 is used to acquire M electricity meters of the same type and region as the user of the electricity meter to be repaired, and which have no missing data; where M is a natural number greater than 0.
[0081] The electricity meter acquisition module 302 is also used to acquire the daily electricity consumption data of the M electricity meters for the current day and the most recent N days;
[0082] The weight fitting module 303 is used to fit the weights of the daily electricity data of the electricity meter to be repaired for the most recent N days based on the weight update algorithm of the truth discovery algorithm and the daily electricity data of the M electricity meters for the current day and the most recent N days.
[0083] The daily electricity consumption data fitting module 304 is used to fit the missing daily electricity consumption data of the electricity meter to be repaired on the current day according to the weights of the daily electricity consumption data of the most recent N days of the truth value discovery algorithm and the truth value update algorithm.
[0084] In one embodiment, the missing data determination module 301 is further configured to obtain the daily electricity consumption data of the target electricity meter for that day, and perform a null value determination on the daily electricity consumption data of the target electricity meter for that day. When the daily electricity consumption data for that day is null, it is determined that there is a missing daily electricity consumption data of the target electricity meter for that day, and the target electricity meter is designated as an electricity meter to be repaired.
[0085] In one embodiment, the missing value judgment module 301 is further used to perform anomaly detection on the daily electricity consumption data of the target electricity meter on the current day, and after anomaly detection, to judge the null value of the daily electricity consumption data of the target electricity meter on the current day.
[0086] In one embodiment, the missing judgment module 301 is further configured to remove the daily electricity consumption data of the target electricity meter if the daily electricity consumption data of the target electricity meter is abnormal.
[0087] In one embodiment, the missing judgment module 301 is further configured to perform anomaly detection on the daily electricity consumption data of the electricity meter on that day based on the anomaly feature library.
[0088] In one embodiment, the device further includes a storage module, which is used to determine that there is no missing daily electricity data for the target electricity meter when the daily electricity data for the day is not empty, and directly store the daily electricity data of the target electricity meter into the database.
[0089] In one embodiment, the daily electricity consumption data fitting module 304 is further configured to perform a weighted summation of the daily electricity consumption data of the meter to be repaired for the most recent N days based on the weights of the daily electricity consumption data of the meter to be repaired, and fit the missing daily electricity consumption data of the meter to be repaired based on the weighted summation result.
[0090] In one embodiment, the storage module is further configured to attach fitting labels to the fitted daily electricity data and store it in a database.
[0091] Specific limitations regarding the fitting device for missing daily electricity consumption data can be found in the limitations of the fitting method for missing daily electricity consumption data described above, and will not be repeated here. Each module in the aforementioned fitting device for missing daily electricity consumption data can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0092] In one embodiment, a master station system is provided, the internal structure of which can be shown in the following diagram. Figure 4As shown, the master station system includes a processor, memory, and network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores fitted data for missing daily electricity consumption data. The network interface communicates with external terminals via a network connection. The master station system also includes input / output interfaces, which are connection circuits between the processor and external devices for exchanging information; they are connected to the processor via a bus and are referred to as I / O interfaces. When the computer program is executed by the processor, it implements a method for fitting missing daily electricity consumption data.
[0093] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0094] In one embodiment, a master station system is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the various method embodiments described above.
[0095] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the various method embodiments described above.
[0096] In one embodiment, a computer program product is provided having a computer program stored thereon, the computer program being executed by a processor of the steps described in the various method embodiments above.
[0097] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0098] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0099] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0100] The above embodiments are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for fitting missing daily electricity consumption data, characterized in that, The method includes: Based on whether there is missing daily electricity consumption data for the current day, the electricity meters to be repaired are identified, and the daily electricity consumption data of the electricity meters to be repaired for the most recent N days are obtained; where N is a natural number greater than 0; Obtain M electricity meters of the same type and region as the user of the electricity meter to be repaired, and which have no missing data; where M is a natural number greater than 0. Obtain the daily electricity consumption data for the M electricity meters for the current day and the most recent N days; The weight update algorithm of the truth discovery algorithm is used to fit the weights of the daily electricity consumption data of the M electricity meters for the current day and the most recent N days. The formula used to calculate the weights is: ,in, The weights of the electricity consumption data for the first k days are given, where k = 1...N; This represents the daily electricity consumption value of electricity meter i. The electricity consumption of meter i on the kth day; The function for calculating Euclidean distance; The truth-update algorithm of the truth-finding algorithm is used to fit the missing daily electricity data of the meter to be repaired on the current day based on the weights of the daily electricity data of the most recent N days. The fitting formula is as follows: ,in The fitted value of the daily electricity consumption of the electricity meter to be repaired; This represents the electricity consumption of the meter to be repaired on the kth day prior to the repair date.
2. The method according to claim 1, characterized in that, Based on whether there are missing daily electricity consumption data on the electricity meter, identify the electricity meters that need to be repaired, including: Obtain the daily electricity consumption data of the target electricity meter for that day, and perform null value judgment on the daily electricity consumption data of the target electricity meter for that day; When the daily electricity consumption data for that day is empty, it is determined that the target electricity meter has missing daily electricity consumption data for that day, and the target electricity meter is designated as an electricity meter to be repaired.
3. The method according to claim 2, characterized in that, Perform null value detection on the daily electricity consumption data for that day, including: Anomaly detection is performed on the daily electricity consumption data of the target electricity meter for that day; After anomaly detection, the daily electricity consumption data of the target electricity meter for that day is checked for null values.
4. The method according to claim 3, characterized in that, After performing anomaly detection on the daily electricity consumption data of the target electricity meter for that day, the method further includes: If the daily electricity consumption data of the target electricity meter is abnormal, then the daily electricity consumption data of the target electricity meter for that day shall be removed.
5. The method according to claim 3, characterized in that, Anomaly detection is performed on the daily electricity consumption data of the target electricity meter for that day, including: Based on the abnormal feature database, anomaly detection is performed on the daily electricity consumption data of the electricity meter for that day.
6. The method according to claim 2, characterized in that, The method further includes: If the daily electricity consumption data for that day is not empty, it is determined that there is no missing daily electricity consumption data for the target electricity meter, and the daily electricity consumption data of the target electricity meter is directly stored in the database.
7. The method according to claim 1, characterized in that, Based on the weights of the daily electricity consumption data of the electricity meter to be repaired for the most recent N days, the missing daily electricity consumption data of the electricity meter to be repaired on the current day is fitted, including: Based on the weights of the daily electricity consumption data of the meter to be repaired over the past N days, a weighted sum is performed on the daily electricity consumption data of the meter to be repaired over the past N days. Based on the weighted summation result, the missing daily electricity consumption data of the electricity meter to be repaired is fitted.
8. The method according to claim 1, characterized in that, After fitting the missing daily electricity consumption data of the electricity meter to be repaired on that day, the method further includes: The daily electricity consumption data obtained from the fitting process is labeled with fitting tags and stored in the database.
9. A fitting device for missing daily electricity consumption data, characterized in that, The device includes: The missing data detection module is used to determine the electricity meter to be repaired based on whether there is missing daily electricity data for the current day, and to obtain the daily electricity data of the electricity meter to be repaired for the most recent N days; where N is a natural number greater than 0. The electricity meter acquisition module is used to acquire M electricity meters of the same type and region as the user of the electricity meter to be repaired, and which have no missing data; where M is a natural number greater than 0. The electricity meter acquisition module is also used to acquire the daily electricity consumption data of the M electricity meters for the current day and the most recent N days; The weight fitting module is used to fit the weight update algorithm of the truth discovery algorithm to the weights of the daily electricity consumption data of the M electricity meters for the current day and the most recent N days, based on the current day's and the most recent N days' daily electricity consumption data. The formula used to calculate the weights is: ,in, The weights of the electricity consumption data for the first k days are given, where k = 1...N; This represents the daily electricity consumption value of electricity meter i. The electricity consumption of meter i on the kth day; The function for calculating Euclidean distance; The daily electricity consumption data fitting module is used to fit the missing daily electricity consumption data of the meter to be repaired on the current day using the truth update algorithm of the truth discovery algorithm, based on the respective weights of the daily electricity consumption data of the meter to be repaired for the most recent N days; the fitting formula is: ,in The fitted value of the daily electricity consumption of the electricity meter to be repaired; This represents the electricity consumption of the meter to be repaired on the kth day prior to the repair date.
10. A master station system, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Recovery and tracing method and device for missing data of daily electric quantity
CN108519989A
Intelligent power consumption complementing method and system
CN114611856A
