Data processing method and device, computer device and storage medium
By utilizing the normal distribution characteristics of electricity statistics in the electricity monitoring system, abnormal data can be detected and cleaned, thus solving the problem of bias in electricity statistics results and achieving efficient and accurate electricity statistics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2026-04-07
AI Technical Summary
Power monitoring systems are prone to abnormal situations such as data acquisition failure, meter replacement, multiplier change, and data acquisition program errors during power statistics, which can lead to deviations in power statistics results. Existing technologies are difficult to effectively handle the detection and cleaning of abnormal meter readings.
By obtaining the electricity statistics within a preset time period, and taking advantage of their normal distribution, the monitoring status is determined, and data cleaning is performed when an anomaly occurs to obtain corrected statistics.
This improves the efficiency and accuracy of anomaly detection, reduces the amount of computational data, and ensures the accuracy of power consumption statistics.
Smart Images

Figure CN114116837B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power data monitoring technology, and in particular to a data processing method, apparatus, computer equipment, and storage medium. Background Technology
[0002] When the power consumption monitoring system performs power consumption statistics, the collected electricity meter data is prone to abnormalities such as collection failure, meter replacement, multiplier change, collection program error, long-term lack of data update of electricity meter data, and sudden changes in meter bottom value, which can lead to relatively large deviations in the power consumption statistics results.
[0003] In existing technologies, anomaly detection is performed on the collected base values. When anomalies are detected, the base values are directly cleaned. However, since the base values are cumulative and can be cleared or customized, they do not follow a normal distribution. This makes it difficult to directly clean the base values and requires a large amount of data to be calculated. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides a data processing method, apparatus, computer equipment, and storage medium.
[0005] In a first aspect, this application provides a data processing method, including:
[0006] Obtain the power consumption statistics at multiple different times within a preset time period;
[0007] Based on the comparison results between the power consumption statistics and the power consumption threshold, the monitoring status corresponding to each power consumption statistics is determined;
[0008] When the monitoring status is abnormal, the power consumption statistics are cleaned to obtain corrected statistics.
[0009] Secondly, this application provides a data processing apparatus, comprising:
[0010] The acquisition module is used to acquire the power consumption statistics at multiple different times within a preset time period;
[0011] The determination module is used to determine the monitoring status corresponding to each of the power statistics values based on the comparison results between the power statistics values and the power threshold values;
[0012] The cleaning module is used to clean the power statistics when the monitoring status is abnormal, and obtain corrected statistics.
[0013] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps:
[0014] Obtain the power consumption statistics at multiple different times within a preset time period;
[0015] Based on the comparison results between the power consumption statistics and the power consumption threshold, the monitoring status corresponding to each power consumption statistics is determined;
[0016] When the monitoring status is abnormal, the power consumption statistics are cleaned to obtain corrected statistics.
[0017] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0018] Obtain the power consumption statistics at multiple different times within a preset time period;
[0019] Based on the comparison results between the power consumption statistics and the power consumption threshold, the monitoring status corresponding to each power consumption statistics is determined;
[0020] When the monitoring status is abnormal, the power consumption statistics are cleaned to obtain corrected statistics.
[0021] The aforementioned data processing method, apparatus, computer equipment, and storage medium include: acquiring power consumption statistics at multiple different times within a preset time period; determining the monitoring status corresponding to each power consumption statistics based on a comparison between the power consumption statistics and a power consumption threshold; and, when the monitoring status is abnormal, performing data cleaning on the power consumption statistics to obtain corrected statistics. By detecting whether the power consumption statistics are abnormal, and directly performing data cleaning on the power consumption statistics when they are abnormal, compared to directly cleaning the base values, it is easier to detect anomalies in power consumption statistics that follow a normal distribution. Furthermore, the amount of data in the power consumption statistics is much smaller than that in the base values, and data cleaning on the power consumption statistics reduces the amount of computational data. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating a data processing method in one embodiment;
[0025] Figure 2 This is a schematic diagram of the program modules of a data processing device in one embodiment;
[0026] Figure 3 This is a structural diagram of a computer device in one embodiment. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] In one embodiment, Figure 1 This is a flowchart illustrating a data processing method in one embodiment, with reference to... Figure 1 This paper provides a data processing method. This embodiment primarily illustrates the application of this method to a power monitoring system. The power monitoring system can be implemented using one server or a server cluster consisting of multiple servers. The data processing method specifically includes the following steps:
[0029] Step S210: Obtain the power consumption statistics corresponding to multiple different times within a preset time period.
[0030] Specifically, the preset time period can be customized according to the actual scenario, such as one day, three days, or one week. The electricity consumption statistics are used to indicate the electricity consumption within the preset time period. If the preset time period is selected as one day, the electricity consumption corresponding to different time periods within a day usually follows a normal distribution. For example, the electricity consumption corresponding to early morning and late night is relatively low, while the electricity consumption corresponding to daytime working hours and evening hours is relatively high.
[0031] Step S220: Based on the comparison results between the power consumption statistics and the power consumption threshold, determine the monitoring status corresponding to each of the power consumption statistics.
[0032] Specifically, the electricity consumption threshold is used to indicate the normal range of electricity consumption variation. Since the electricity consumption statistics follow a normal distribution, the corresponding range of variation for each time period can be obtained. If the electricity consumption statistics fall within this normal range, the monitoring status corresponding to the electricity consumption statistics is determined to be normal; if the electricity consumption statistics fall outside this range, it indicates that the electricity consumption statistics are too high or too low, and the monitoring status corresponding to the electricity consumption statistics is determined to be abnormal. In other words, utilizing the characteristic that electricity consumption statistics follow a normal distribution for anomaly detection is easier than directly detecting anomalies from the meter readings.
[0033] Step S230: When the monitoring status is abnormal, perform data cleaning on the power statistics to obtain corrected statistics.
[0034] Specifically, the amount of data in the electricity statistics is much smaller than that in the table base value. Data cleaning of the electricity statistics reduces the amount of data to be calculated and shortens the data cleaning time. The corrected statistics are the corrected electricity statistics, and the accuracy of the electricity statistics results is ensured based on the corrected statistics.
[0035] In one embodiment, obtaining the power consumption statistics corresponding to multiple different times within a preset time period includes: obtaining the data collection base values corresponding to multiple different times within the preset time period; determining the difference between the previous data collection base value and the subsequent data collection base value according to the statistical period, and generating the power consumption statistics at the same time as the previous data collection base value.
[0036] Specifically, the collected meter readings are the meter readings obtained from the electricity meter at different times, and there is a collection interval between any two adjacent collected meter readings. The collection interval can be customized according to the actual situation. For example, the collection interval is 5 minutes, that is, the meter reading is collected once every 5 minutes, resulting in multiple collected meter readings. The collected meter readings are denoted as M = {m0, m1, ..., m...} i The statistical period can be customized according to actual needs, such as 30 minutes, 1 hour, 2 hours, etc. In this embodiment, the statistical period is 1 hour, that is, the power consumption statistics are collected every hour. The power consumption statistics are denoted as P = {p0, p1, ..., p...} j}, where the previously mentioned base value is the first base value collected within the statistical period, and the subsequent base value is the last base value collected within the statistical period. That is, the difference between the base value at the first moment of an hour and the base value at the last moment of that hour is calculated. Since the collection interval is 5 minutes and the statistical period is 1 hour, that is, for 12 base values collected within 1 hour, p j =m 12(j+1) -m 12j , i = 12j, as shown in Table 1 and Table 2 below:
[0037] i m 0 12827.69 1 12827.7 2 12827.71 3 12827.72 4 12827.72 5 12827.73 6 12827.74 7 12827.74 8 12827.75 9 12827.76 10 12827.76 11 12827.77 12 12827.77 13 12827.78 14 12827.79 15 12827.79 16 12827.8 17 12827.8 18 12827.81 19 12827.81 20 12827.82
[0038] Table 1
[0039] j p 0 0.08 1 0.06 2 0.06 3 0.05
[0040] Table 2
[0041] Table 1 only shows a portion of the collected base values and does not provide a detailed representation. p0 = m 12-m0 = 12827.77 - 12827.69 = 0.08, meaning the electricity consumption statistics p0 at time m0 is 0.08, and p1 = m 24 -m 12 =12827.83-12827.77=0.06. The electricity consumption statistics for p1, which is 1 hour away from p0, is 0.06. And so on, each hour corresponds to one electricity consumption statistics value.
[0042] In one embodiment, determining the monitoring status corresponding to each of the power statistics based on the comparison result between the power statistics and the power threshold includes: determining the mean and variance based on all the power statistics within the preset time period; using the sum of the mean and three times the variance as a first threshold; and determining that the monitoring status corresponding to the power statistics is abnormal when the power statistics are less than the second threshold or greater than the first threshold.
[0043] Specifically, the electricity consumption statistics follow a normal distribution, therefore the corresponding parameters of the normal distribution can be calculated, namely the mean μ and the variance σ. The electricity consumption thresholds include a first threshold and a second threshold. The first threshold is μ + 3σ, and the second threshold is less than the first threshold. That is, the first threshold is the upper limit of the normal electricity consumption variation range, and the second threshold is the lower limit of the normal electricity consumption variation range. In this embodiment, the second threshold is set to 0. j <0 or p j When >μ+3σ, P j The corresponding monitoring status flag bit N j Set to 0, i.e., N j =0, then determine p j The corresponding monitoring status is abnormal.
[0044] When the current power consumption statistic is greater than the second threshold and less than the first threshold, or when the current power consumption statistic is equal to the second threshold or the first threshold, the monitoring status corresponding to the current power consumption statistic is determined to be normal. That is, 0≤p j When p ≤ μ+3σ, j The corresponding monitoring status flag bit N j Set to 1, i.e., N j =1, then determine p j The corresponding monitoring status is normal.
[0045] By leveraging the normal distribution of electricity consumption statistics for anomaly detection, abnormal statistical values can be quickly and accurately identified. Furthermore, based on these abnormal statistical values, related abnormal base values can be determined. Compared to directly detecting anomalies from large datasets of base values, this reduces the amount of data required for anomaly investigation, thus improving detection efficiency. Additionally, since base values can be customized according to the scenario, misjudgments are prone to occur, making it difficult to accurately identify abnormal base values. Detecting anomalies using normally distributed electricity consumption statistics avoids misjudgments, ensuring the accuracy of electricity consumption statistics results.
[0046] In one embodiment, when the monitoring state is abnormal, performing data cleaning on the power consumption statistics to obtain corrected statistics includes: when the monitoring state is abnormal, determining at least one abnormal baseline value based on the abnormal statistics and adjacent statistics; performing complementation on the abnormal baseline value to obtain a complement baseline value; and using the complement baseline value to perform data cleaning on the abnormal statistics and adjacent statistics to obtain the corresponding corrected statistics.
[0047] Specifically, the abnormal statistical value is the power consumption statistical value when the monitoring status is abnormal, i.e., N. k When N = 0, k The corresponding p k This is denoted as an abnormal statistical value. The adjacent statistical value is the electricity statistical value adjacent to the abnormal statistical value, i.e., the value adjacent to p. k The adjacent electricity statistics are N. k+1 The corresponding p k+1 and N k-1 The corresponding p k-1 The abnormal table base value is the collected table base value related to the abnormal statistical value, since p k =m 12(k+1) -m 12k The base value of the collection table related to the abnormal statistics is m. 12(k+1) and m 12k The specific value of the abnormal table base can be m. 12(k+1) and / or m 12k .
[0048] For m 12(k+1) and / or m 12k Perform a complement operation to obtain the base value of the complement table, which is m′. 12(k+1) and / or m′ 12k The data cleaning process is performed on the abnormal and adjacent statistical values using the complement table base value. Specifically, the electricity statistical value is recalculated using the complement table base value according to the aforementioned formula for calculating electricity statistics, thereby obtaining the corresponding corrected statistical value. For example, the complement table base value is m′. 12(k+1)When the outlier is corrected by data cleaning, the corrected statistic is p′. k+1 =m 12(k+2) -m′ 12(k+1) The corrected statistic after data cleaning of adjacent statistical values is p′. k =m′ 12(k+1) -m 12k If the base value of the complement table is m′ 12k The corrected statistical value of outliers after data cleaning is p′. k =m 12(k+1) -m′ 12k The corrected statistic after data cleaning of adjacent statistical values is p′. k-1 =m′ 12k -m 12(k-1) Similarly, the outlier table base value is used to recalculate the outlier statistics and adjacent statistics related to the outlier table base value.
[0049] In one embodiment, determining at least one abnormal table bottom value based on abnormal statistical values and adjacent statistical values includes: taking the collected table bottom values related to the abnormal statistical values and adjacent statistical values as candidate table bottom values; performing binary classification on the multiple candidate table bottom values to obtain classification results; and when the ratio of the first quantity to the second quantity is greater than or equal to a preset ratio, taking the candidate table bottom value under the second category as an abnormal table bottom value.
[0050] Specifically, if p k This is an outlier statistic, and the corresponding adjacent statistic is p. k+1 and p k-1 Because p k =m 12(k+1) -m 12k p k+1 =m 12(k+2) -m 12(k+1) p k-1 =m 12k -m 12(k-1) Therefore, the candidate table base value is X = {m} 12(k-1) m 12k m 12(k+1) m 12(k+2)The K-Mean algorithm is used to perform binary classification on multiple candidate table bottom values, meaning there are two categories: a first category and a second category. The classification result includes a first quantity and a second quantity. The first quantity indicates the number of candidate table bottom values in the first category, and the second quantity indicates the number of candidate table bottom values in the second category. In this embodiment, the preset ratio is set to 3, but it can be customized according to the actual scenario. If the ratio of the first quantity to the second quantity is greater than or equal to 3, it indicates that there are a few abnormal table bottom values, and the candidate table bottom values in the second category with a smaller number of values are considered abnormal table bottom values.
[0051] In one embodiment, after performing binary classification on the plurality of candidate table values to obtain classification results, the method further includes: when the ratio of the first quantity to the second quantity is less than a preset ratio, assigning the value zero to the abnormal statistical value to obtain the updated abnormal statistical value; wherein the monitoring status corresponding to the updated abnormal statistical value is normal.
[0052] Specifically, if the ratio between the first and second quantities is less than 3, it indicates that the anomaly may not be due to the table base value, but rather a possible table change or ratio change. The first threshold is assigned to the anomaly statistics value. If the anomaly statistics value is p... k That is, let p k =0, resulting in the updated anomaly statistics, since p k =0, and correspondingly let N k =1, which means switching the monitoring status from abnormal to normal.
[0053] In one embodiment, the step of complementing the abnormal table base value to obtain the complement table base value includes: acquiring aggregated data within the preset time period; and using the aggregated data to complement the abnormal table base value to obtain the complement table base value corresponding to the abnormal table base value.
[0054] Specifically, aggregated data is denoted as Among them, kw 12k+i This indicates the acquisition power obtained each time the base value of the acquisition meter is acquired; the acquisition power is also the same as the base value, and is acquired every 5 minutes, in KW. k This is used to indicate the statistical power obtained when calculating electricity consumption statistics; that is, the statistical power is the cumulative power of all collected data within one hour. The statistical power reflects the trend of electricity consumption changes over time. Before supplementing abnormal base values using aggregated data, the abnormal base values can be first set to empty (i.e., the value of zero is assigned to the abnormal base value), and then the supplemented value is assigned to the base value as the supplementary base value. Alternatively, the supplemented base value can be directly used to replace the abnormal base value.
[0055] If m12k For abnormal table base values, for m 12k The formula for finding the complement is as follows:
[0056]
[0057] Among them, KW k-1 Used to indicate KW k If the collected power obtained from the previous adjacent time step has multiple abnormal base values, such as m 12k and m 12(k+1) If all values are abnormal base values, then the complement should be calculated according to the following formula:
[0058]
[0059]
[0060] Following this reasoning, when multiple consecutive abnormal base values exist, to supplement each abnormal base value, the previously acquired base value and the supplemented value are added together to obtain the corresponding supplemented base value. The previously acquired base value is the base value acquired at the moment before the current abnormal base value. The supplemented value is the product of the supplemented coefficient and the previously acquired power. The previously acquired power is the acquired power obtained from the previous moment for the corresponding acquired power of the current abnormal base value. The supplemented coefficient is the ratio between the first difference and the cumulative power. The first difference is the difference between the first base value and the second base value. The first base value is the base value acquired before and adjacent to the multiple abnormal base values. The second base value is the base value acquired after and adjacent to the multiple abnormal base values. The cumulative power is the sum of the acquired power corresponding to the multiple abnormal base values and the acquired power corresponding to the first base value. In this way, when multiple consecutive abnormal base values exist, each abnormal base value can be supplemented sequentially according to the above process to obtain the corresponding supplemented base value.
[0061] Figure 1 This is a flowchart illustrating a data processing method in one embodiment. It should be understood that, although... Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0062] In one embodiment, such as Figure 2 As shown, a data processing apparatus is provided, comprising:
[0063] The acquisition module 310 is used to acquire the power consumption statistics corresponding to multiple different times within a preset time period;
[0064] The determination module 320 is used to determine the monitoring status corresponding to each of the power statistics values based on the comparison result between the power statistics values and the power threshold values;
[0065] The cleaning module 330 is used to clean the power statistics value to obtain a corrected statistical value when the monitoring status is abnormal.
[0066] In one embodiment, the acquisition module 310 is used for:
[0067] Obtain the base values of the data collection table corresponding to multiple different times within a preset time period;
[0068] The difference between the previously collected meter reading and the subsequently collected meter reading is determined according to the statistical period, and the electricity consumption statistical value at the same time as the previously collected meter reading is generated; wherein, the previously collected meter reading is the first collected meter reading within the statistical period, and the subsequently collected meter reading is the last collected meter reading within the statistical period.
[0069] In one embodiment, the determining module 320 is further configured to:
[0070] Based on all the electricity consumption statistics within the preset time period, the mean and variance are determined.
[0071] The sum of the mean and three times the variance is used as the first threshold; wherein, the power threshold includes the first threshold and the second threshold, and the second threshold is less than the first threshold;
[0072] When the power consumption statistics value is less than the second threshold, or when the power consumption statistics value is greater than the first threshold, the monitoring status corresponding to the power consumption statistics value is determined to be abnormal.
[0073] In one embodiment, the cleaning module 330 is further configured to:
[0074] When the monitoring status is abnormal, at least one abnormal meter reading is determined based on the abnormal statistical value and the adjacent statistical value; wherein, the abnormal statistical value is the power consumption statistical value when the monitoring status is abnormal, the adjacent statistical value is the power consumption statistical value adjacent to the abnormal statistical value, and the abnormal meter reading is the collected meter reading value related to the abnormal statistical value;
[0075] The abnormal table base value is complemented to obtain the complement table base value;
[0076] The abnormal statistical values and adjacent statistical values are cleaned using the base value of the complement table to obtain the corresponding corrected statistical values.
[0077] In one embodiment, the cleaning module 330 is further configured to:
[0078] The collected table base value related to the abnormal statistical value and the adjacent statistical value is used as the candidate table base value;
[0079] The multiple candidate table bottom values are classified into two categories to obtain a classification result; wherein, the classification result includes a first quantity and a second quantity, the first quantity is used to indicate the number of candidate table bottom values under the first category, and the second quantity is used to indicate the number of candidate table bottom values under the second category;
[0080] When the ratio of the first quantity to the second quantity is greater than or equal to a preset ratio, the candidate table bottom value under the second category is regarded as an abnormal table bottom value.
[0081] In one embodiment, the cleaning module 330 is further configured to:
[0082] When the ratio of the first quantity to the second quantity is less than a preset ratio, the value of zero is assigned to the abnormal statistics value to obtain the updated abnormal statistics value; wherein, the monitoring status corresponding to the updated abnormal statistics value is normal.
[0083] In one embodiment, the cleaning module 330 is further configured to:
[0084] Obtain aggregated data within the preset time period;
[0085] The aggregated data is used to complement the abnormal table base value to obtain the complement table base value corresponding to the abnormal table base value.
[0086] Figure 3 An internal structural diagram of a computer device in one embodiment is shown. This computer device may specifically be a server. Figure 3 As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store computer programs. When executed by the processor, these computer programs enable the processor to perform data processing methods. The internal memory may also store computer programs, which, when executed by the processor, enable the processor to perform data processing methods. Those skilled in the art will understand that... Figure 3The 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.
[0087] In one embodiment, the data processing apparatus provided in this application can be implemented as a computer program, and the computer program can be implemented as follows: Figure 3 It runs on the computer device shown. The computer device's memory can store the various program modules that make up the data processing device, for example, Figure 2 The acquisition module 310, determination module 320, and cleaning module 330 are shown. The computer program comprised of these modules causes the processor to execute the steps of the data processing methods in the various embodiments of this application described in this specification.
[0088] Figure 3 The computer equipment shown can be used as follows Figure 2 The acquisition module 310 in the data processing device shown acquires power consumption statistics at multiple different times within a preset time period. The computer device, through the determination module 320, determines the monitoring status corresponding to each power consumption statistics based on the comparison result between the power consumption statistics and a power consumption threshold. The computer device, through the cleaning module 330, performs data cleaning on the power consumption statistics to obtain corrected statistics when the monitoring status is abnormal.
[0089] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any of the above embodiments.
[0090] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the above embodiments.
[0091] 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 program can be stored in a non-volatile computer-readable storage medium, and when executed, it 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 non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0092] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0093] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A data processing method, characterized in that, The method includes: Obtain the power consumption statistics at multiple different times within a preset time period; Based on the comparison results between the power consumption statistics and the power consumption threshold, the monitoring status corresponding to each power consumption statistics is determined; When the monitoring status is abnormal, the power consumption statistics are cleaned to obtain corrected statistics. When the monitoring status is abnormal, the power consumption statistics are cleaned to obtain corrected statistics, including: When the monitoring status is abnormal, at least one abnormal meter reading is determined based on the abnormal statistical value and the adjacent statistical value; wherein, the abnormal statistical value is the power consumption statistical value when the monitoring status is abnormal, the adjacent statistical value is the power consumption statistical value adjacent to the abnormal statistical value, the power consumption statistical value is counted once every statistical period, the abnormal meter reading is the collected meter reading value related to the abnormal statistical value, the collected meter reading is the meter reading value collected from the power meter at different times, and any two adjacent collected meter readings are separated by a collection interval, the meter reading is collected once every collection interval, and multiple collected meter readings are obtained; The abnormal table base value is complemented to obtain the complement table base value; The data cleansing is performed on the abnormal statistical values and the adjacent statistical values using the base value of the complement table to obtain the corresponding corrected statistical values; The determination of at least one abnormal table base value based on abnormal statistical values and adjacent statistical values includes: The collected table base value related to the abnormal statistical value and the adjacent statistical value is used as the candidate table base value; The multiple candidate table bottom values are classified into two categories to obtain a classification result; wherein, the classification categories include a first category and a second category, and the classification result obtained after classification includes a first quantity and a second quantity, wherein the first quantity is used to indicate the number of candidate table bottom values under the first category, and the second quantity is used to indicate the number of candidate table bottom values under the second category. When the ratio of the first quantity to the second quantity is greater than or equal to a preset ratio, the candidate table bottom value under the second category is regarded as an abnormal table bottom value.
2. The method according to claim 1, characterized in that, The step of obtaining the power consumption statistics corresponding to multiple different times within a preset time period includes: Obtain the base values of the data collection table corresponding to multiple different times within a preset time period; The difference between the previously collected meter reading and the subsequently collected meter reading is determined according to the statistical period, and the electricity consumption statistical value at the same time as the previously collected meter reading is generated; wherein, the previously collected meter reading is the first collected meter reading within the statistical period, and the subsequently collected meter reading is the last collected meter reading within the statistical period.
3. The method according to claim 2, characterized in that, The step of determining the monitoring status corresponding to each of the power statistics based on the comparison results between the power statistics and the power threshold includes: Based on all the electricity consumption statistics within the preset time period, the mean and variance are determined. The sum of the mean and three times the variance is used as the first threshold; wherein, the power threshold includes the first threshold and the second threshold, and the second threshold is less than the first threshold; When the power consumption statistics value is less than the second threshold, or when the power consumption statistics value is greater than the first threshold, the monitoring status corresponding to the power consumption statistics value is determined to be abnormal.
4. The method according to claim 1, characterized in that, After performing binary classification on the multiple candidate table base values to obtain the classification results, the method further includes: When the ratio of the first quantity to the second quantity is less than a preset ratio, the value of zero is assigned to the abnormal statistics value to obtain the updated abnormal statistics value; wherein, the monitoring status corresponding to the updated abnormal statistics value is normal.
5. The method according to claim 1, characterized in that, The step of complementing the abnormal table base value to obtain the complement table base value includes: Obtain aggregated data within the preset time period; The aggregated data is used to complement the abnormal table base value to obtain the complement table base value corresponding to the abnormal table base value.
6. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire the power consumption statistics at multiple different times within a preset time period; The determination module is used to determine the monitoring status corresponding to each of the power statistics values based on the comparison results between the power statistics values and the power threshold values; The cleaning module is used to clean the power statistics value to obtain a corrected statistical value when the monitoring status is abnormal. When the monitoring status is abnormal, the power consumption statistics are cleaned to obtain corrected statistics, including: When the monitoring status is abnormal, at least one abnormal meter reading is determined based on the abnormal statistical value and the adjacent statistical value; wherein, the abnormal statistical value is the power consumption statistical value when the monitoring status is abnormal, the adjacent statistical value is the power consumption statistical value adjacent to the abnormal statistical value, the power consumption statistical value is counted once every statistical period, the abnormal meter reading is the collected meter reading value related to the abnormal statistical value, the collected meter reading is the meter reading value collected from the power meter at different times, and any two adjacent collected meter readings are separated by a collection interval, the meter reading is collected once every collection interval, and multiple collected meter readings are obtained; The abnormal table base value is complemented to obtain the complement table base value; The data cleansing is performed on the abnormal statistical values and the adjacent statistical values using the base value of the complement table to obtain the corresponding corrected statistical values; The determination of at least one abnormal table base value based on abnormal statistical values and adjacent statistical values includes: The collected table base value related to the abnormal statistical value and the adjacent statistical value is used as the candidate table base value; The multiple candidate table bottom values are classified into two categories to obtain a classification result; wherein, the classification categories include a first category and a second category, and the classification result obtained after classification includes a first quantity and a second quantity, wherein the first quantity is used to indicate the number of candidate table bottom values under the first category, and the second quantity is used to indicate the number of candidate table bottom values under the second category. When the ratio of the first quantity to the second quantity is greater than or equal to a preset ratio, the candidate table bottom value under the second category is regarded as an abnormal table bottom value.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
User power utilization transaction identification method, system and device and storage medium
CN113516192A