Electric energy power estimation method and device, equipment and medium
By performing anomaly detection and multi-dimensional information fusion on the power data sequence, the problem of low power estimation accuracy of electricity meters is solved, and high-precision estimation is achieved in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN STAR INSTR
- Filing Date
- 2026-01-06
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies for estimating the power of electricity meters, especially in environments with rapid fluctuations, sudden load changes, or high-frequency noise interference, have low estimation accuracy and cannot accurately reflect the dynamic characteristics of instantaneous power changes.
By performing anomaly detection on the power data sequence, the abnormal data and its type can be accurately located. By setting different sampling time points before and after the sampling, and combining the target estimation model and the target correction term, multi-dimensional information fusion and compensation can be performed to improve the estimation accuracy.
It significantly improves the accuracy of power estimation corresponding to abnormal sampling time, and can more accurately reflect the dynamic changes of power.
Smart Images

Figure CN121995106A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity meter technology, and in particular to a method, apparatus, device and medium for estimating electrical power. Background Technology
[0002] In existing technologies, the estimation of power from electricity meters typically employs traditional sampling and calculation methods. These methods include averaging data within a specific time window or using adjacent data points. While simple to implement, these methods have significant limitations in practical applications. When the power environment around the electricity meter experiences rapid fluctuations, sudden load changes, or high-frequency noise interference, relying solely on the average value of a single time window or the time of adjacent sampling points often leads to a large deviation between the estimated result and the actual power value, failing to accurately reflect the dynamic characteristics of instantaneous power changes. Furthermore, in environments with high-frequency electromagnetic interference, the time of adjacent sampling points may be contaminated by noise; directly using the time of the nearest neighbor sampling point introduces noise into the result, further reducing estimation accuracy. Therefore, improving the estimation accuracy during power estimation is a pressing issue that needs to be addressed. Summary of the Invention
[0003] In view of this, embodiments of this application provide a method, apparatus, device and medium for estimating electrical power, in order to solve the problem of low estimation accuracy in the process of estimating electrical power.
[0004] In a first aspect, embodiments of this application provide a method for estimating electrical power, the estimation method comprising: Acquire the power data sequence of multiple sampling points, perform anomaly detection on the power data of each sampling point, and determine the abnormal power data, the anomaly type of the abnormal power data, and the abnormal sampling point time corresponding to the abnormal power data. Obtain the target anomaly type to be estimated. For any anomaly sampling point time in the target anomaly type, determine the previous sampling point time and the subsequent sampling point time corresponding to the anomaly sampling point time. The distance between the previous sampling point time and the anomaly sampling point time is a first duration, and the distance between the subsequent sampling point time and the anomaly sampling point time is a second duration. The first duration is greater than the second duration. Obtain the freeze type of the power data sequence, determine the target estimation model that matches the freeze type, the target estimation model includes the abnormal sampling point time, the previous sampling point time, the power data before the previous sampling point time, the parameters corresponding to the power data after the subsequent sampling point time and the power data after the subsequent sampling point time, and the target correction term; The target correction value of the target correction term is calculated, and the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, and the subsequent power data are input into the target estimation model. The estimated power data corresponding to the abnormal sampling point time is output in combination with the target correction value.
[0005] Secondly, embodiments of this application provide an electrical power estimation device, the estimation device comprising: The detection module is used to acquire the power data sequence of multiple sampling points, perform anomaly detection on the power data of each sampling point, and determine the abnormal power data, the anomaly type of the abnormal power data, and the abnormal sampling point time corresponding to the abnormal power data. The first determining module is used to obtain the target anomaly type to be estimated, and for any anomaly sampling point time in the target anomaly type, determine the previous sampling point time and the subsequent sampling point time corresponding to the anomaly sampling point time; the distance between the previous sampling point time and the anomaly sampling point time is a first duration, and the distance between the subsequent sampling point time and the anomaly sampling point time is a second duration, wherein the first duration is greater than the second duration. The second determining module is used to obtain the freeze type of the power data sequence, determine the target estimation model that matches the freeze type, and the target estimation model includes the abnormal sampling point time, the previous sampling point time, the power data before the previous sampling point time, the parameters corresponding to the power data after the subsequent sampling point time and the power data after the subsequent sampling point time, and the target correction term. The output module is used to calculate the target correction value of the target correction item, input the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, and the subsequent power data into the target estimation model, and output the estimated power data corresponding to the abnormal sampling point time in combination with the target correction value.
[0006] Thirdly, embodiments of this application provide a computer device, the computer device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the estimation method as described above.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the estimation method described above.
[0008] The advantages of this application compared to the prior art are: This application enables precise location of abnormal data, their types, and corresponding time points through anomaly detection in power data sequences, laying the foundation for subsequent targeted estimation. After determining the target anomaly type, by setting different sampling time intervals before and after the anomaly sampling point, particularly making the first interval longer than the second, the more stable historical data trends before the anomaly and the more immediate real-time data information after the anomaly can be utilized more fully, improving the accuracy of the estimation. Furthermore, the target estimation model is matched according to the freeze type of the power data sequence, making the model selection more targeted. The target estimation model incorporates parameters corresponding to the anomaly sampling time, the previous sampling time, the previous power data, the subsequent sampling time, and the subsequent power data, as well as a target correction term, achieving the fusion of multi-dimensional information. Finally, by calculating the target correction value of the target correction term and substituting it into the model, the influence of different operating conditions and data fluctuations on the estimation results can be effectively compensated, thereby significantly improving the accuracy of the estimated power data corresponding to the anomaly sampling time. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic flowchart illustrating a method for estimating electrical power according to an embodiment of this application; Figure 2 This is a schematic diagram of the structure of an electrical power estimation device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0013] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0014] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0015] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0016] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0017] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0018] To illustrate the technical solution of this application, specific embodiments are described below.
[0019] like Figure 1 As shown, Figure 1 This is a schematic flowchart illustrating a method for estimating electrical power according to an embodiment of this application, as shown below. Figure 1 As shown, the method for estimating electrical power may include the following steps.
[0020] S101: Obtain the power data sequence of multiple sampling points, perform anomaly detection on the power data of each sampling point, and determine the abnormal power data, the anomaly type of the abnormal power data, and the abnormal sampling point time corresponding to the abnormal power data.
[0021] In step S101, the power data sequence of multiple sampling points is a set of power records within a continuous time period extracted from the historical database of the power monitoring system according to a preset time granularity. Anomaly detection involves identifying abnormal values in the power data sequence where each sampling point deviates from the normal operating range or does not conform to the inherent patterns of the data, using a preset anomaly detection algorithm. Abnormal power data refers to abnormal values that deviate from the normal operating range or do not conform to the inherent patterns of the data.
[0022] In this embodiment, a sequence of power data at multiple sampling points is acquired, wherein the power data sequence is a time-ordered sequence. Anomaly detection is performed on the power data at each sampling point. During anomaly detection, a multi-dimensional normal data model is first constructed based on the power data sequence under historical normal operating conditions. This model covers the data's fluctuation range, trend, periodicity, and correlation with other relevant parameters (such as ambient temperature, equipment load rate, etc., if present). When detecting the power data at each sampling point, the actual value of that sampling point is compared with the normal data model in multiple dimensions. For example, it is determined whether it exceeds a preset static threshold range; if the data is periodic, it is checked whether it deviates from the historical average fluctuation range of the corresponding period position. The rate of change of the sampling point with the adjacent sampling points is determined to conform to the normal dynamic trend, and whether there are any abrupt changes or drifts. When the sampling point significantly deviates from the normal data model in any one or more dimensions, it is determined to be abnormal power data. The anomaly type is determined based on the pattern and degree of deviation. Examples include "overpower anomaly" (exceeding the upper threshold), "underpower anomaly" (below the lower threshold), "mutation anomaly" (significant jumps within a short period), "drift anomaly" (long-term deviation from the trend), and "data missing / invalid anomaly" (complete absence of data or data with fixed invalid values). The anomaly sampling time directly corresponds to the timestamp information of the abnormal power data in the power data sequence, thus accurately pinpointing the specific time the anomaly occurred.
[0023] Optionally, the anomaly types include missing anomaly types, cusp anomaly types, and persistent anomaly types; Anomaly detection is performed on each power data point to determine the abnormal power data, the anomaly type, and the corresponding abnormal sampling point time, including: For each power data point, perform missing anomaly detection to determine the abnormal power data corresponding to the missing anomaly type and the time of the abnormal sampling point corresponding to the abnormal power data. For each power data point, perform peak anomaly detection to determine the abnormal power data and the time of the abnormal sampling point corresponding to the peak anomaly type. For each power data point, continuous anomaly detection is performed to determine the abnormal power data corresponding to the continuous anomaly type and the time of the abnormal sampling point corresponding to the abnormal power data.
[0024] In this embodiment, when performing missing anomaly detection on each power data, the power data sequence is traversed through a preset time window. If no valid power data record is detected at the position corresponding to a certain sampling point time, and the duration of the missing state exceeds the set missing threshold, the power data corresponding to the sampling point time is determined to be a missing anomaly type, and the sampling point time is marked as an abnormal sampling point time.
[0025] When performing peak anomaly detection on each power data point, the deviation of the power value at each sampling point in the power data sequence from the average power value of its adjacent sampling points is calculated, such as the first three and last three sampling points. First, a peak deviation threshold is set, which can be configured based on the fluctuation range of historical normal data or equipment characteristics. For a given sampling point, if the absolute value of the difference between its power value and the average power value of its adjacent sampling points is greater than the peak deviation threshold, and it is determined that this deviation is not caused by normal equipment start-up / shutdown, load surges, or other known and reasonable operating conditions, then the abnormal power data corresponding to that sampling point is determined to be a peak anomaly, and that sampling point is marked as an abnormal sampling point.
[0026] When performing continuous anomaly detection on each power data point, this can be achieved by analyzing whether the power values of multiple consecutive sampling points in the power data sequence deviate from the normal fluctuation range as a whole. First, a continuous anomaly judgment window length and a continuous deviation threshold are set. This threshold can also be set based on the statistical characteristics of historical normal data or equipment operating parameters. For a given continuous sampling point time series, if the power values of all sampling points within the window exceed the aforementioned continuous deviation threshold, and after verification, there are no known reasonable circumstances such as planned long-term equipment debugging or process changes causing the continuous deviation, then the abnormal power data within that window is determined to be of the continuous anomaly type, and all sampling point times within the window are marked as abnormal sampling point times.
[0027] S102: Obtain the target anomaly type to be estimated. For any anomaly sampling point time in the target anomaly type, determine the previous sampling point time and the subsequent sampling point time corresponding to the anomaly sampling point time. The distance between the previous sampling point time and the anomaly sampling point time is the first duration, and the distance between the subsequent sampling point time and the anomaly sampling point time is the second duration. The first duration is greater than the second duration.
[0028] In step 102, the target anomaly type is the anomaly type to be estimated, and the previous sampling point time and the subsequent sampling point time are sampling point times that have a certain duration with the anomaly sampling point time.
[0029] In this embodiment, the preceding and following sampling point times corresponding to the abnormal sampling point time are determined. The preceding sampling point time is the sampling point time before the abnormal sampling point time in the time series, and the time interval between it and the abnormal sampling point time is the first duration. This first duration can be preset or dynamically adjusted according to the data characteristics, abnormal duration patterns, and estimation accuracy requirements in the actual application scenario, for example, it can be set to 15 minutes, 30 minutes, or 1 hour. The following sampling point time is the sampling point time before the abnormal sampling point time in the time series, and the time interval between it and the abnormal sampling point time is the second duration. Similarly, the second duration can also be configured according to a similar principle, for example, it can be set to 5 minutes, 10 minutes, or 15 minutes. The first duration is longer than the second duration. For example, if the first duration is set to 30 minutes and the second duration is set to 10 minutes, then the preceding sampling point time is the sampling point time 30 minutes before the abnormal sampling point time, and the following sampling point time is the sampling point time 10 minutes before the abnormal sampling point time.
[0030] Optionally, determining the preceding and following sampling times corresponding to the abnormal sampling time includes: Based on the time sequence, the time of the abnormal sampling point is calculated backward by the first duration to obtain the time of the previous sampling point; Based on the time sequence, the time of the abnormal sampling point is extrapolated to the next time interval to obtain the time of the subsequent sampling point.
[0031] In this embodiment, this estimation process can be achieved through timestamp calculations. For example, if the timestamp of the abnormal sampling point is T, then the timestamp of the previous sampling point is T minus the time interval corresponding to the first duration, and the timestamp of the subsequent sampling point is T plus the time interval corresponding to the second duration. After obtaining the timestamps of the previous and subsequent sampling points, the power data corresponding to these two sampling points can be accurately extracted from a preset database or data storage module. If there is no directly corresponding sampling record at the calculated timestamp position, interpolation processing, such as linear interpolation, can be performed using sampling data from adjacent timestamps to ensure the validity and accuracy of the power data of the previous and subsequent sampling points, laying a solid data foundation for subsequent power estimation of abnormal sampling points based on these two sampling points.
[0032] It should be noted that, in order to avoid situations where the time of the preceding or following sampling point exceeds the actual time range of the data due to the abnormal sampling point being located at the beginning or end of the time series, thus making it impossible to obtain valid sampling data, the validity of the preceding and following sampling point times can also be judged.
[0033] In this embodiment, the time of the first sampling point can reflect the stable power state over a relatively long period of time before the anomaly occurs, while the time of the second sampling point can reflect the power situation after the anomaly has initially recovered or tended to stabilize. The combination of the two provides a more reliable basis for subsequent power estimation.
[0034] S103: Obtain the freeze type of the power data sequence, determine the target estimation model that matches the freeze type, the target estimation model includes the abnormal sampling point time, the previous sampling point time, the power data before the previous sampling point time, the parameters corresponding to the power data after the subsequent sampling point time and the power data after the subsequent sampling point time, and the target correction term; In step S103, the freeze type represents the power acquisition logic, and the target type is a weighted correction model based on linear interpolation, including the abnormal sampling point time, the previous sampling point time, the power data before the previous sampling point time, the parameters corresponding to the power data after the subsequent sampling point time and the power data after the subsequent sampling point time, and the target correction term. The target correction term includes the average power of the most recent valid day from the abnormal sampling point time and the preset average daily electricity consumption duration.
[0035] In this embodiment, the freeze type of the power data sequence is obtained, and a target estimation model matching the freeze type is determined. The freeze types include daily freeze, monthly freeze, and continuous freeze. The target estimation model, which matches the freeze type, includes parameters corresponding to the abnormal sampling point time, the previous sampling point time, the power data before the previous sampling point time, the power data after the subsequent sampling point time, and the power data after the subsequent sampling point time, as well as a target correction term. The target correction term corrects the power data estimated based on linear interpolation to improve estimation accuracy.
[0036] In this embodiment, the target correction term is introduced to compensate for potential estimation biases in linear interpolation under specific scenarios. The target correction term can be set based on statistical analysis of historical data, power characteristics under similar operating conditions, or specific physical models. This makes the estimation results closer to the actual variation of electrical power, thereby improving the accuracy of electrical power estimation.
[0037] Optionally, the freeze type includes monthly freeze type; Before determining the target estimation model that matches the freeze type, the following steps are also included: Obtain the number of days in the month corresponding to the time of the abnormal sampling point, and the first correction term that matches the monthly freeze type; Based on the number of days, the time of the abnormal sampling point, the time of the previous sampling point, the previous power data, the time of the subsequent sampling point, the subsequent power data, and the first correction term, a first estimation model matching the monthly freeze type is constructed.
[0038] In this embodiment, the freezing type includes the monthly freezing type, which is an operation type that freezes and stores electricity-related data at a specific time point each month (such as the last moment of the month or a designated fixed time). Its core purpose is to accurately record the total electricity consumption and related metering parameters for each natural month.
[0039] Obtain the number of days in the month corresponding to the abnormal sampling point time, and the first correction term matching the monthly freeze type. Based on the number of days, the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, the subsequent power data, and the first correction term, construct a first estimation model matching the monthly freeze type. The formula for the first estimation model is as follows: in, The estimated power output is given by X, where X is the time of the abnormal sampling point. For the previous sampling point, This is the previous power data. For the time of the later sampling point, This is the subsequent power data. For the first correction term, where, This represents the average electrical power of the most recent valid day from the time of the anomaly sampling point, i.e., the average of the instantaneous power data (Inst-Power) within a single day. This represents the average daily electricity consumption duration, configured based on user history or industry characteristics, and indicates the average number of hours of effective daily electricity usage. This represents the number of days in the month corresponding to the time of the abnormal sampling point. For a "day", The cycle length is one month.
[0040] Optionally, the freeze type includes daily freeze type; Before determining the target estimation model that matches the freeze type, the following steps are also included: Obtain the second correction term that matches the daily freeze type; Based on the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, the subsequent power data, and the second correction term, a second estimation model matching the daily freeze type is constructed.
[0041] In this embodiment, the freezing type includes daily freezing type, which is an operation type that freezes and stores power-related data at a specific time point each day (such as a fixed time specified each day of the month). Its core purpose is to accurately record the total power consumption and related metering parameters for each natural day.
[0042] Obtain the second correction term that matches the daily freeze type. Based on the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, the subsequent power data, and the second correction term, construct a second estimation model that matches the daily freeze type. The formula for the second estimation model is as follows: in, The estimated power output is given by X, where X is the time of the abnormal sampling point. For the previous sampling point, This is the previous power data. For the time of the later sampling point, This is the subsequent power data. For the second correction term, where, This represents the average electrical power of the most recent valid day from the time of the anomaly sampling point, i.e., the average of the instantaneous power data (Inst-Power) within a single day. This represents the average daily electricity consumption duration, configured based on user history or industry characteristics, and indicates the average number of hours of effective daily electricity usage. The cycle length of a "day".
[0043] Optionally, the freeze type includes continuous freeze type; Before determining the target estimation model that matches the freeze type, the following steps are also included: Obtain the collection period for the continuous freeze type, and the third correction term that matches the continuous freeze type; Based on the acquisition period, abnormal sampling point time, previous sampling point time, previous power data, subsequent sampling point time, subsequent power data, and the third correction term, a third estimation model matching the continuous freezing type is constructed.
[0044] In this embodiment, the freezing type includes the continuous freezing type, which is an operation type that freezes and stores power-related data based on a preset acquisition cycle. Its core purpose is to accurately record the total power consumption and related metering parameters for each acquisition cycle.
[0045] Obtain the collection period for the continuous freeze type, and the third correction term that matches the continuous freeze type; Based on the data acquisition period, abnormal sampling point time, previous sampling point time, previous power data, subsequent sampling point time, subsequent power data, and a third correction term, a third estimation model matching the continuous freezing type is constructed. The formula for the third estimation model is as follows: in, The estimated power output is given by X, where X is the time of the abnormal sampling point. For the previous sampling point, This is the previous power data. For the time of the later sampling point, This is the subsequent power data. For the third correction term, where, This represents the average electrical power of the most recent valid day from the time of the anomaly sampling point, i.e., the average of the instantaneous power data (Inst-Power) within a single day. This represents the average daily electricity consumption duration, configured based on user history or industry characteristics, and indicates the average number of hours of effective daily electricity usage. The period length of a "curved time interval".
[0046] S104: Calculate the target correction value of the target correction term, input the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, and the subsequent power data into the target estimation model, and output the estimated power data corresponding to the abnormal sampling point time by combining the target correction value.
[0047] In step S104, the estimated power data is the power data obtained by estimating the time of abnormal sampling points.
[0048] In this embodiment, if the target estimation model is the first estimation model, then according to the first correction term... The target correction value is calculated. This is the average power of the most recent valid day after the abnormal sampling point, i.e., the average of the instantaneous power data (Inst-Power) within a single day. This means selecting the most recent valid day after the abnormal sampling point, which must be within a preset time range and have data integrity meeting a set threshold, such as a data missing rate not exceeding 5%. The statistical average of all instantaneous power samples for the corresponding valid day. This represents the average daily electricity consumption duration, configured based on user history or industry characteristics, and indicates the average number of hours of effective daily electricity usage. The target correction value is calculated based on the number of days in the month corresponding to the abnormal sampling point time, the average power consumption of the most recent valid day, the average daily power consumption duration, and the number of days in the corresponding month. The abnormal sampling point time, the previous sampling point time, the previous power consumption data, the subsequent sampling point time, and the subsequent power consumption data are input into the first estimation model, and the estimated power consumption data corresponding to the abnormal sampling point time is output in combination with the target correction value.
[0049] If the target estimation model is the second estimation model, then according to the second correction term... The target correction value is calculated. This is the average power of the most recent valid day after the abnormal sampling point, i.e., the average of the instantaneous power data (Inst-Power) within a single day. This means selecting the most recent valid day after the abnormal sampling point, which must be within a preset time range and have data integrity meeting a set threshold, such as a data missing rate not exceeding 5%. The statistical average of all instantaneous power samples for the corresponding valid day. The average daily electricity consumption duration is configured based on user historical habits or industry characteristics, representing the average number of hours of effective daily electricity use. The target correction value is calculated based on the average power output and average daily electricity consumption duration of the most recent effective day. The abnormal sampling point time, the previous sampling point time, the previous power output data, the subsequent sampling point time, and the subsequent power output data are input into the second estimation model. Combined with the target correction value, the estimated power output data corresponding to the abnormal sampling point time is output.
[0050] If the target estimation model is the third estimation model, then according to the third correction term The target correction value is calculated. This is the average power of the most recent valid day after the abnormal sampling point, i.e., the average of the instantaneous power data (Inst-Power) within a single day. This means selecting the most recent valid day after the abnormal sampling point, which must be within a preset time range and have data integrity meeting a set threshold, such as a data missing rate not exceeding 5%. The statistical average of all instantaneous power samples for the corresponding valid day. The average daily electricity consumption duration is configured based on user historical habits or industry characteristics, representing the average number of hours of effective daily electricity use. The target correction value is calculated based on the average power output and average daily electricity consumption duration of the most recent effective day. The abnormal sampling point time, the previous sampling point time, the previous power output data, the subsequent sampling point time, and the subsequent power output data are input into the third estimation model. Combined with the target correction value, the estimated power output data corresponding to the abnormal sampling point time is output.
[0051] This application enables precise location of abnormal data, their types, and corresponding time points through anomaly detection in power data sequences, laying the foundation for subsequent targeted estimation. After determining the target anomaly type, by setting different sampling time intervals before and after the anomaly sampling point, particularly making the first interval longer than the second, the more stable historical data trends before the anomaly and the more immediate real-time data information after the anomaly can be utilized more fully, improving the accuracy of the estimation. Furthermore, the target estimation model is matched according to the freeze type of the power data sequence, making the model selection more targeted. The target estimation model incorporates parameters corresponding to the anomaly sampling time, the previous sampling time, the previous power data, the subsequent sampling time, and the subsequent power data, as well as a target correction term, achieving the fusion of multi-dimensional information. Finally, by calculating the target correction value of the target correction term and substituting it into the model, the influence of different operating conditions and data fluctuations on the estimation results can be effectively compensated, thereby significantly improving the accuracy of the estimated power data corresponding to the anomaly sampling time.
[0052] Please see Figure 2 , Figure 2 This is a schematic diagram of an electrical power estimation device according to an embodiment of this application. This electrical power estimation device corresponds one-to-one with the electrical power estimation methods described in the above embodiments. Please refer to [link / reference] for details. Figure 2 as well as Figure 2 The relevant descriptions in the corresponding embodiments are shown below. For ease of explanation, only the parts relevant to this embodiment are shown. See also... Figure 2 The power estimation device 20 includes: a detection module 21, a first determination module 22, a second determination module 23, and an output module 24.
[0053] The detection module 21 is used to acquire the power data sequence of multiple sampling points, perform anomaly detection on the power data of each sampling point, and determine the abnormal power data, the anomaly type of the abnormal power data, and the abnormal sampling point time corresponding to the abnormal power data. The first determining module 22 is used to obtain the target anomaly type to be estimated, and for any anomaly sampling point time in the target anomaly type, determine the previous sampling point time and the subsequent sampling point time corresponding to the anomaly sampling point time; the distance between the previous sampling point time and the anomaly sampling point time is the first duration, and the distance between the subsequent sampling point time and the anomaly sampling point time is the second duration, and the first duration is greater than the second duration; The second determining module 23 is used to obtain the freezing type of the power data sequence and determine the target estimation model that matches the freezing type. The target estimation model includes the abnormal sampling point time, the previous sampling point time, the power data before the previous sampling point time, the parameters corresponding to the power data after the subsequent sampling point time and the power data after the subsequent sampling point time, and the target correction term. Output module 24 is used to calculate the target correction value of the target correction term, input the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, and the subsequent power data into the target estimation model, and output the estimated power data corresponding to the abnormal sampling point time in combination with the target correction value.
[0054] Optionally, the detection module 21 includes: The first detection unit is used to perform missing anomaly detection on each power data, and to determine the abnormal power data corresponding to the missing anomaly type and the abnormal sampling point time corresponding to the abnormal power data. The second detection unit is used to perform peak anomaly detection on each power data point and determine the abnormal power data and the abnormal sampling point time corresponding to the peak anomaly type. The third detection unit is used to continuously detect anomalies in each power data point and determine the abnormal power data and the time of the abnormal sampling point corresponding to the continuous anomaly type.
[0055] Optionally, the first determining module 22 includes: The first calculation unit is used to extrapolate the time of the abnormal sampling point forward by a first duration based on the time sequence, so as to obtain the time of the previous sampling point. The second calculation unit is used to extrapolate the time of the abnormal sampling point backward based on the time sequence to obtain the time of the subsequent sampling point.
[0056] Optionally, the estimation device 20 further includes: The first acquisition module is used to acquire the number of days in the month corresponding to the time of the abnormal sampling point, and the first correction term that matches the monthly freeze type; The first construction module is used to construct a first estimation model that matches the monthly freeze type based on the number of days, the time of the abnormal sampling point, the time of the previous sampling point, the previous power data, the time of the subsequent sampling point, the subsequent power data, and the first correction term.
[0057] Optionally, the estimation device 20 further includes: The second acquisition module is used to acquire a second correction item that matches the daily freeze type; The second construction module is used to construct a second estimation model that matches the daily freeze type based on the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, the subsequent power data, and the second correction term.
[0058] Optionally, the estimation device 20 further includes: The third acquisition module is used to acquire the acquisition period of the continuous freeze type and the third correction term that matches the continuous freeze type; The third construction module is used to construct a third estimation model that matches the continuous freezing type based on the acquisition period, abnormal sampling point time, previous sampling point time, previous power data, subsequent sampling point time, subsequent power data, and the third correction term.
[0059] It should be noted that the information interaction and execution process between the above-mentioned units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.
[0060] Figure 3 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. For example... Figure 3 As shown, the computer device of this embodiment includes: at least one processor ( Figure 3 Only one is shown in the diagram), a memory, and a computer program stored in the memory and executable on at least one processor, which, when executing the computer program, implements the steps in any of the above-described embodiments of the power estimation methods.
[0061] This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 3 The examples of computer devices are merely examples and do not constitute a limitation on computer devices. Computer devices may include more or fewer components than shown in the illustration, or combinations of certain components, or different components, such as network interfaces, displays, and input devices.
[0062] The processor referred to can be a CPU, but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0063] Memory includes readable storage media, internal memory, etc., wherein internal memory can be the RAM of a computer device, providing an environment for the operation of the operating system and computer-readable instructions stored in the readable storage media. The readable storage media can be the hard drive of a computer device, or in other embodiments, it can be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, memory can include both internal storage units and external storage devices of the computer device. Memory is used to store the operating system, applications, bootloader, data, and other programs, such as program code for computer programs. Memory can also be used to temporarily store data that has been output or will be output.
[0064] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0065] The implementation of all or part of the processes in the methods of the above embodiments can also be accomplished by a computer program product. When the computer program product is run on a computer device, it enables the computer device to execute the steps in the above method embodiments.
[0066] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0067] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0068] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0069] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0070] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for estimating electrical power, characterized in that, The estimation method includes: Acquire the power data sequence of multiple sampling points, perform anomaly detection on the power data of each sampling point, and determine the abnormal power data, the anomaly type of the abnormal power data, and the abnormal sampling point time corresponding to the abnormal power data. Obtain the target anomaly type to be estimated. For any anomaly sampling point time in the target anomaly type, determine the previous sampling point time and the subsequent sampling point time corresponding to the anomaly sampling point time. The distance between the previous sampling point time and the anomaly sampling point time is a first duration, and the distance between the subsequent sampling point time and the anomaly sampling point time is a second duration. The first duration is greater than the second duration. Obtain the freeze type of the power data sequence, determine the target estimation model that matches the freeze type, the target estimation model includes the abnormal sampling point time, the previous sampling point time, the power data before the previous sampling point time, the parameters corresponding to the power data after the subsequent sampling point time and the power data after the subsequent sampling point time, and the target correction term; The target correction value of the target correction term is calculated, and the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, and the subsequent power data are input into the target estimation model. The estimated power data corresponding to the abnormal sampling point time is output in combination with the target correction value.
2. The estimation method as described in claim 1, characterized in that, The anomaly types include missing anomaly types, cusp anomaly types, and persistent anomaly types; The step of performing anomaly detection on each power data point, determining the abnormal power data, the anomaly type of the abnormal power data, and the time of the abnormal sampling point corresponding to the abnormal power data, includes: For each power data point, a missing anomaly detection is performed to determine the abnormal power data corresponding to the missing anomaly type and the time of the abnormal sampling point corresponding to the abnormal power data. For each power data point, perform peak anomaly detection to determine the abnormal power data corresponding to the peak anomaly type and the time of the abnormal sampling point corresponding to the abnormal power data. For each power data point, continuous anomaly detection is performed to determine the abnormal power data corresponding to the continuous anomaly type and the time of the abnormal sampling point corresponding to the abnormal power data.
3. The estimation method as described in claim 1, characterized in that, Determining the preceding and following sampling point times corresponding to the abnormal sampling point times includes: Based on the time sequence, the time of the abnormal sampling point is extrapolated forward by a first duration to obtain the time of the previous sampling point; Based on the time sequence, the time of the abnormal sampling point is extrapolated forward by a second duration to obtain the time of the subsequent sampling point.
4. The estimation method as described in claim 1, characterized in that, The freeze type includes monthly freeze type; Before determining the target estimation model that matches the freezing type, the method further includes: Obtain the number of days in the month corresponding to the time of the abnormal sampling point, and the first correction term that matches the monthly freeze type; Based on the number of days, the time of the abnormal sampling point, the time of the previous sampling point, the previous power data, the time of the subsequent sampling point, the subsequent power data, and the first correction term, a first estimation model matching the monthly freeze type is constructed.
5. The estimation method as described in claim 1, characterized in that, The freeze types include daily freeze types; Before determining the target estimation model that matches the freezing type, the method further includes: Obtain a second correction term that matches the stated daily freeze type; Based on the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, the subsequent power data, and the second correction term, a second estimation model matching the daily freeze type is constructed.
6. The estimation method as described in claim 1, characterized in that, The freezing type includes continuous freezing; Before determining the target estimation model that matches the freezing type, the method further includes: Obtain the acquisition period of the continuous freeze type, and the third correction term that matches the continuous freeze type; Based on the acquisition period, the time of the abnormal sampling point, the time of the previous sampling point, the previous power data, the time of the subsequent sampling point, the subsequent power data, and the third correction term, a third estimation model matching the continuous freezing type is constructed.
7. A device for estimating electrical energy power, characterized in that, The estimation device includes: The detection module is used to acquire the power data sequence of multiple sampling points, perform anomaly detection on the power data of each sampling point, and determine the abnormal power data, the anomaly type of the abnormal power data, and the abnormal sampling point time corresponding to the abnormal power data. The first determining module is used to obtain the target anomaly type to be estimated, and for any anomaly sampling point time in the target anomaly type, determine the previous sampling point time and the subsequent sampling point time corresponding to the anomaly sampling point time; the distance between the previous sampling point time and the anomaly sampling point time is a first duration, and the distance between the subsequent sampling point time and the anomaly sampling point time is a second duration, wherein the first duration is greater than the second duration. The second determining module is used to obtain the freeze type of the power data sequence, determine the target estimation model that matches the freeze type, and the target estimation model includes the abnormal sampling point time, the previous sampling point time, the power data before the previous sampling point time, the parameters corresponding to the power data after the subsequent sampling point time and the power data after the subsequent sampling point time, and the target correction term. The output module is used to calculate the target correction value of the target correction item, input the abnormal sampling point time, the previous sampling point time, the previous power data, the subsequent sampling point time, and the subsequent power data into the target estimation model, and output the estimated power data corresponding to the abnormal sampling point time in combination with the target correction value.
8. The estimation apparatus as claimed in claim 7, characterized in that, The detection module includes: The first detection unit is used to perform missing anomaly detection on each power data, and determine the abnormal power data corresponding to the missing anomaly type and the abnormal sampling point time corresponding to the abnormal power data. The second detection unit is used to perform peak anomaly detection on each power data, and determine the abnormal power data corresponding to the peak anomaly type and the abnormal sampling point time corresponding to the abnormal power data. The third detection unit is used to perform continuous anomaly detection on each power data, and determine the abnormal power data corresponding to the continuous anomaly type and the time of the abnormal sampling point corresponding to the abnormal power data.
9. A computer device, characterized in that, The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the estimation method as described in any one of claims 1 to 6.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the estimation method as described in any one of claims 1 to 6.