A device cumulative energy consumption data processing method, device, equipment and storage medium

CN122926141APending Publication Date: 2026-10-16GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611424198.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

插值补全过程普遍采用线性插值、拉格朗日插值或样条插值等纯数学方法,导致插值结果产生误差,经长周期累积后导致累计电量统计值显著偏离真实值,难以反映真实能耗

Benefits of technology

本发明实施例公开了一种设备累计能耗数据处理方法、装置、设备和存储介质,方法包括:获取设备上报的功率时序数据,并对功率时序数据按预设时间窗口划分,生成多个时间窗口的功率数据;检测每个时间窗口内存在缺失功率数据的时间片段,确定设备在时间片段的设备工况类型;从预设的设备类型工况特征库中获取与设备工况类型匹配的功率变化曲线模板;设备类型工况特征库中存储有与不同设备工况类型对应的功率变化曲线模板;对于存在缺失功率数据的时间片段,根据对应的所述功率变化曲线模板对所述时间片段内缺失的功率数据进行曲线拟合补全;确定每个时间窗口对应的权重因子,根据权重因子和每个时间窗口内的功率数据确定每个时间窗口内设备的能耗,并根据每个时间窗口内设备的能耗确定设备的累计能耗。对功率时序数据进行时间窗口划分并计算各窗口的变异系数,据此生成多维质量评价指标,实现对数据质量的精细化感知;在此基础上,检测各窗口内的数据缺失区间,通过识别缺失区间前后的功率变化特征判定设备在缺失时间段内处于启动工况、停机工况还是稳态工况,从而从预设的设备类型工况特征库中调用与该工况类型匹配的功率变化曲线模板,对缺失数据进行曲线拟合补全,使得补全后的功率数据能够真实反映设备在启动冲击、停机惯性等物理过程中的实际功率轨迹,避免了线性插值等方法对启动能耗的低估和对停机能耗的高估,从而消除了因插值误差在长周期积分中反复累积所导致的系统性统计偏差。同时,基于多维质量评价指标动态确定各时间窗口的权重因子,使数据质量较差的窗口在最终能耗计算中贡献度降低,进一步保障了累计能耗结果的准确性与可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122926141A_ABST
    Figure CN122926141A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a device cumulative energy consumption data processing method and device, equipment and storage medium, the method comprises: obtaining the power time series data reported by the device to generate power data of multiple time windows; determining the device working condition type of the device in the time segment matches the power change curve template; for the time segment with missing power data, the missing power data in the time segment is fitted and completed according to the corresponding power change curve template; determine the weight factor corresponding to each time window, determine the energy consumption of the device in each time window according to the weight factor and the power data in each time window, and determine the cumulative energy consumption of the device according to the energy consumption of the device in each time window. In the scene of unstable network data loss and noise interference, high statistical accuracy and long-term stability can still be maintained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of equipment energy consumption monitoring technology, and in particular to a method for processing cumulative energy consumption data of equipment, a device for processing cumulative energy consumption data of equipment, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Existing technology involves collecting power data at fixed intervals and reporting it to a cloud server. The cloud server then calculates the device's cumulative power consumption by integrating the received power time-series data over time. However, when network signals are unstable, frequent packet loss, transmission delays, and message corruption occur, resulting in a large number of missing intervals in the time-series data received by the cloud server, directly affecting the energy consumption calculation.

[0003] Existing improvement schemes perform missing data identification, mathematical interpolation completion, and filtering and noise reduction on the received data. The interpolation completion process generally uses purely mathematical methods such as linear interpolation, Lagrange interpolation, or spline interpolation, which leads to errors in the interpolation results. After long-term accumulation, the cumulative electricity consumption statistics deviate significantly from the true value, making it difficult to reflect the true energy consumption. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide a method for processing device cumulative energy consumption data, a device for processing device cumulative energy consumption data, an electronic device, and a computer-readable storage medium to overcome or at least partially solve the above problems.

[0005] To address the above problems, a first aspect of the present invention provides a method for processing device cumulative energy consumption data, the method comprising: Acquire the power timing data reported by the device, and divide the power timing data into multiple time windows according to a preset time window to generate power data for multiple time windows; Detect time segments within each time window that contain missing power data, and determine the device operating condition type of the device in those time segments; Obtain a power change curve template that matches the equipment operating condition type from a preset equipment type operating condition feature library; the equipment type operating condition feature library stores power change curve templates corresponding to different equipment operating condition types; For time segments with missing power data, curve fitting is performed to complete the missing power data within the time segment based on the corresponding power change curve template; Determine the weighting factor corresponding to each time window, determine the energy consumption of the device within each time window based on the weighting factor and the power data within each time window, and determine the cumulative energy consumption of the device based on the energy consumption of the device within each time window.

[0006] According to a second aspect of the present invention, a device for processing cumulative energy consumption data is provided, the device comprising: The power data acquisition module is used to acquire the power time-series data reported by the device, and divide the power time-series data into multiple time windows according to a preset time window to generate power data for multiple time windows. The equipment condition determination module is used to detect time segments with missing power data within each time window and determine the equipment condition type of the equipment in the time segment. The power template acquisition module is used to acquire a power change curve template that matches the equipment operating condition type from a preset equipment type operating condition feature library; the equipment type operating condition feature library stores power change curve templates corresponding to different equipment operating condition types; The power data completion module is used to perform curve fitting to complete the missing power data in a time segment with missing power data, based on the corresponding power change curve template. The cumulative energy consumption determination module is used to determine the weight factor corresponding to each time window, determine the energy consumption of the device in each time window based on the weight factor and the power data in each time window, and determine the cumulative energy consumption of the device based on the energy consumption of the device in each time window.

[0007] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the device cumulative energy consumption data processing method as described in any of the preceding embodiments.

[0008] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, wherein when executed by a processor, the computer program implements the steps of the device cumulative energy consumption data processing method as described in any of the preceding embodiments.

[0009] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses a method, apparatus, device, and storage medium for processing cumulative energy consumption data of equipment. The method includes: acquiring power time-series data reported by the device, and dividing the power time-series data into multiple time windows according to a preset time window to generate power data for multiple time windows; detecting time segments with missing power data within each time window and determining the device operating condition type of the device in the time segment; acquiring a power change curve template matching the device operating condition type from a preset device type operating condition feature library; the device type operating condition feature library stores power change curve templates corresponding to different device operating condition types; for time segments with missing power data, performing curve fitting to complete the missing power data in the time segment according to the corresponding power change curve template; determining a weight factor corresponding to each time window, determining the energy consumption of the device in each time window according to the weight factor and the power data in each time window, and determining the cumulative energy consumption of the device according to the energy consumption of the device in each time window. Power time-series data is divided into time windows, and the coefficient of variation for each window is calculated. Based on this, multi-dimensional quality evaluation indicators are generated, enabling refined perception of data quality. Furthermore, missing data intervals within each window are detected. By identifying power change characteristics before and after the missing intervals, it is determined whether the equipment is in startup, shutdown, or steady-state operation during the missing time period. A power change curve template matching the corresponding operating condition type is retrieved from a pre-set equipment type operating condition feature library to perform curve fitting and completion of the missing data. This ensures that the completed power data accurately reflects the actual power trajectory of the equipment during physical processes such as startup impact and shutdown inertia, avoiding the underestimation of startup energy consumption and the overestimation of shutdown energy consumption caused by linear interpolation methods. This eliminates systematic statistical bias caused by the repeated accumulation of interpolation errors during long-cycle integration. Simultaneously, the weighting factors for each time window are dynamically determined based on the multi-dimensional quality evaluation indicators, reducing the contribution of windows with poor data quality to the final energy consumption calculation, further ensuring the accuracy and reliability of the cumulative energy consumption results. Attached Figure Description

[0010] Figure 1 This is a flowchart of the steps of a method for processing cumulative energy consumption data of a device provided in an embodiment of the present invention; Figure 2 This is a flowchart of another method for processing cumulative energy consumption data of a device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the startup transient model of a device cumulative energy consumption data processing method provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the shutdown attenuation model of a method for processing cumulative energy consumption data of equipment provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a steady-state filling model for a method for processing cumulative energy consumption data of equipment provided in an embodiment of the present invention; Figure 6 This is a flowchart illustrating a method for processing cumulative energy consumption data of a device according to an embodiment of the present invention; Figure 7 This is a structural block diagram of a device for processing cumulative energy consumption data of an instrument provided in an embodiment of the present invention. Detailed Implementation

[0011] To make the above-mentioned objects, features and advantages of the present invention more readily understood, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0012] Existing solutions perform missing data identification, mathematical interpolation completion, and filtering and noise reduction on the received data. The interpolation completion process generally uses purely mathematical methods such as linear interpolation, Lagrange interpolation, or spline interpolation, which only focus on the numerical smoothness of the data and do not consider the operating status of the equipment. This leads to errors in the interpolation results, which, after long-term accumulation, cause the cumulative power consumption statistics to deviate significantly from the true value, making it difficult to reflect the true energy consumption.

[0013] One of the core concepts of this invention is to divide the power time-series data into time windows and calculate the coefficient of variation for each window. Based on this, missing data intervals within each window are detected. By identifying the power change characteristics before and after the missing intervals, it is determined whether the equipment is in startup, shutdown, or steady-state operation during the missing time period. Then, a power change curve template matching the corresponding operating condition type is retrieved from a pre-set equipment type operating condition feature library to perform curve fitting and completion of the missing data. This ensures that the completed power data accurately reflects the actual power trajectory of the equipment during physical processes such as startup impact and shutdown inertia, avoiding the underestimation of startup energy consumption and the overestimation of shutdown energy consumption caused by linear interpolation methods. This eliminates the systematic statistical bias caused by the repeated accumulation of interpolation errors in long-cycle integration. Simultaneously, the weighting factors for each time window are dynamically determined based on multi-dimensional quality evaluation indicators, reducing the contribution of windows with poor data quality to the final energy consumption calculation, further ensuring the accuracy and reliability of the cumulative energy consumption results.

[0014] Reference Figure 1 The diagram illustrates a flowchart of a method for processing cumulative energy consumption data of a device according to an embodiment of the present invention. The method specifically includes the following steps: Step 101: Obtain the power timing data reported by the device, and divide the power timing data into multiple time windows according to a preset time window to generate power data for multiple time windows; In this embodiment of the invention, power time-series data reported by the device is acquired. This data is collected by a DTU (Data Transfer Unit) deployed on the device side at a fixed sampling period (typically 1 minute, 5 minutes, or 15 minutes) and reported to the cloud. Each data point includes at least the sampling time and the corresponding power value. After receiving the data, the cloud divides the raw time-series data into multiple consecutive and non-overlapping time windows according to a preset time window. The length of the time window can be dynamically configured according to the device type. For devices with frequent power fluctuations, such as motors and compressors, a smaller window is used to capture their rapidly changing operating characteristics; for steady-state operating devices, such as lighting and air conditioning, a larger window is used to reduce computational overhead.

[0015] By dividing the data into time windows, the originally continuous power data stream is segmented into several independent data analysis units. Each time window contains multiple power sampling points, which together constitute the power change trajectory within that window. Windowing provides clear boundaries for subsequent data quality assessment and missing data completion. Operations such as multi-dimensional quality evaluation indicators, missing interval detection, operating condition type identification, and weight factor determination are all completed independently within their respective time windows, avoiding data confusion across windows. On the other hand, windowing decomposes long-cycle energy consumption calculations into the accumulation of energy consumption in multiple short-cycle windows. This allows the energy consumption calculation for each window to be differentiated based on the independent data quality assessment results and weight factors of that window, achieving refined energy consumption statistics with "one weight per window." This approach can flexibly address the actual situation of inconsistent data quality within different time windows. The energy consumption of each device within each time window is calculated independently based on its own data quality and operating conditions. The cumulative energy consumption of each window is obtained after accumulating the energy consumption of the device over the complete statistical period, ensuring both the continuity of long-cycle statistics and achieving accuracy optimization under data quality fluctuations within short cycles.

[0016] Step 102: Detect time segments within each time window where power data is missing, and determine the device operating condition type of the device in the time segment; By identifying the power change characteristics before and after the missing interval, the operating condition of the equipment during the missing period can be determined, including start-up, shutdown, and steady-state conditions. Start-up condition represents the equipment switching from a shutdown or standby state to an operating state; shutdown condition represents the equipment switching from an operating state to a shutdown or standby state; steady-state condition represents the equipment maintaining a stable operating state within the missing interval (without start-stop switching or significant load fluctuations). The power changes of the equipment under different operating conditions follow different physical laws. Under start-up conditions, the power of inductive loads such as motors and compressors does not rise uniformly from zero, but first surges sharply to a peak value (several times the rated value), and then gradually falls back to the steady-state operating value, with the entire process following an exponential function. Under shutdown conditions, the power does not decrease uniformly, but first drops rapidly and then slowly approaches zero, also following an exponential decay law. Under steady-state conditions, the power fluctuates within a relatively small range, with relatively gentle changes.

[0017] In this embodiment of the invention, after generating the multidimensional quality evaluation index for each time window, the system first determines whether there are time segments with missing power data within the current time window based on the integrity index. When the integrity index is 1, it indicates that the data within the window is continuous and complete, and no further completion operation is required; the system directly proceeds to the energy consumption calculation stage. When the integrity index is 0, it indicates that there are consecutive missing data intervals within the window. In this case, it is necessary to detect and locate the missing time segment (i.e., the time period between two valid power sampling points where power sampling values ​​are missing), thereby triggering the subsequent operating condition identification and completion process, as follows: After detecting a missing time segment, the power change characteristics before and after the missing interval are identified. These characteristics include the power value and its trend at at least one power sampling point before the start of the missing interval, and the power value and its trend at at least one power sampling point after the end of the missing interval. Based on these characteristics, the operating condition of the device within the missing interval is determined: when the power sampling value before the start of the missing interval is less than or equal to the standby power threshold (P_standby), and the power sampling value after the end of the missing interval is greater than or equal to the running power threshold (P_run), it indicates that the device has completed the switch from shutdown to operation within this time period, and is determined to be in startup mode; conversely, when the power sampling value before the start of the missing interval is greater than or equal to the running power threshold (P_run), and the power sampling value after the end of the missing interval is less than or equal to the standby power threshold (P_standby), it indicates that the device has completed the switch from operation to shutdown within this time period, and is determined to be in shutdown mode; when the power sampling values ​​before and after the start and end of the missing interval are at similar levels and the difference is less than or equal to a preset fluctuation threshold, it is determined to be in steady-state mode. Among them, the standby power threshold (P_standby) is lower than the running power threshold (P_run), and the two form a transition zone to avoid misjudgment of the operating condition due to small power fluctuations.

[0018] Step 103: Obtain a power change curve template that matches the equipment operating condition type from a preset equipment type operating condition feature library; the equipment type operating condition feature library stores power change curve templates corresponding to different equipment operating condition types; The power change curve template is a standard curve shape pre-constructed based on the physical characteristics of the equipment, used to describe the power change over time under specific operating conditions. Essentially, it is a mathematical expression template with a known function form and substituted parameters, stored in the equipment type operating condition feature library, rather than being generated through temporary fitting. This feature library is initialized during the equipment registration phase, inputting parameters such as equipment type (e.g., three-phase asynchronous motor, variable frequency air conditioning compressor), rated power (P_rated), starting current multiple (K_start, typical value 5-7), thermal time constant during startup (τ_start), and thermal time constant during shutdown (τ_stop), ensuring that each equipment type has a curve template matching its physical characteristics available for use.

[0019] The power change curve template includes at least three types: the start-up transient model, which describes the exponential increase of power over time under start-up conditions. Its function is P(t)=P_steady+(P_peak-P_steady)·(1-exp(-(t-t1) / τ_start)), where P(t) is the fitted power value at time t, P_steady is the steady-state power value, P_peak is the peak power value (P_peak=P_rated×K_start), t1 is the start time of the missing interval, and τ_start is the thermal time constant of the start-up stage. This model can accurately reflect the physical process of power first rising sharply and then gradually falling back to steady state when an inductive load starts up. The shutdown decay model describes the exponential decay of power over time during shutdown. Its function is P(t) = P_initial·exp(-(t-t1) / τ_stop), where P_initial is the initial power value at the start of shutdown, and τ_stop is the thermal time constant during shutdown. This model accurately reflects the physical process of power rapidly decreasing and then slowly approaching zero during shutdown. The steady-state model describes the constant or slowly varying power of equipment during steady-state operation or standby. It is typically completed using mean preservation or zero-value padding.

[0020] The physical origin of the above template lies in the fact that the starting and stopping processes of inductive loads such as motors and compressors are essentially processes of establishing and releasing electromagnetic and mechanical energy. Their power changes obey the laws of thermodynamics and electrodynamics, and are not random or linear variations. For example, when an asynchronous motor starts, as the rotor accelerates from rest to synchronous speed, the stator current first increases sharply and then gradually decreases, exhibiting a significant exponential shape in power change. The initial inrush current can reach 5-7 times the rated current, and then gradually decays to a steady-state value under the constraint of the thermal time constant τ_start (usually several seconds to tens of seconds, depending on the motor rotor time constant and load inertia). When stopping, after the power is cut off, the rotor continues to rotate due to inertia, and the residual power decays exponentially with decreasing speed, the decay rate determined by τ_stop. Traditional linear interpolation simplifies this physical process into a diagonal line, completely ignoring the above physical laws, resulting in numerically continuous interpolation results. The starting impact energy consumption is significantly underestimated, while the residual energy consumption during shutdown is significantly overestimated.

[0021] In this embodiment of the invention, after determining the operating condition type of the device within the missing time segment, a power change curve template matching the device type and the current operating condition is obtained from a preset device type operating condition feature library. The device type operating condition feature library is a pre-built structured database stored in the cloud, initialized during the device registration phase to ensure that each device type has a curve template corresponding to its physical characteristics available for subsequent use. The power change curve templates stored in the feature library include three categories: a startup transient model to describe the exponential increase in power over time under startup conditions; a shutdown decay model to describe the exponential decrease in power over time under shutdown conditions; and a steady-state model to describe the constant or slowly changing power under steady-state conditions, typically using mean preservation or zero-value filling.

[0022] The equipment type and operating condition feature library adopts an index structure of "equipment type and operating condition type". First, it filters the template set corresponding to the current equipment based on its type identifier (e.g., "three-phase asynchronous motor"). Then, based on the determined operating condition type (start-up, shutdown, or steady state), it indexes the specific template matching that condition. This indexing mechanism ensures the efficiency and accuracy of template retrieval while supporting dynamic expansion of the feature library. When new equipment is added or the physical parameters of existing equipment (e.g., changes in τ_start due to aging) need to be updated, only the corresponding record needs to be added or modified in the feature library; no changes to the core algorithm logic are required, demonstrating good scalability and maintainability.

[0023] Step 104: For time segments with missing power data, curve fitting is performed to complete the missing power data in the time segment according to the corresponding power change curve template. In this embodiment of the invention, after obtaining a power change curve template matching the current equipment type and operating condition from the equipment type and operating condition feature library, a specific curve fitting and completion operation is performed. This operation is only performed on time segments with missing power data. For time windows with a completeness index of 1 (data complete), no completion is required, and the original reported power data is directly used for subsequent energy consumption calculations.

[0024] When a missing interval is determined within the current time window, the start time (t1) and end time (t2) of the missing interval are first located, and the most recent effective power sample value before time t1 (as the fitting start point) and the most recent effective power sample value after time t2 (as the fitting end point) are obtained. Then, based on the determined operating condition type (start-up, shutdown, or steady-state), the corresponding power change curve template is substituted into the specific values ​​for fitting. During startup, the transient startup model is invoked, using the power value at time t1 (usually close to 0 or standby power) as the starting point and the power value at time t2 (close to steady-state operating power) as the ending point. This generates an exponentially rising curve from the starting point to the ending point, filling the missing interval. The curve rapidly climbs to near its peak in the initial segment (reflecting the startup impact) and then gradually slows down (reflecting the current falling back to steady state), fully reproducing the physical process of inductive load startup. For example, for a motor with a rated power of 10kW, a startup current multiple of 6, and a thermal time constant of 8 seconds, if the missing interval is 5 seconds long, the fitted curve will rapidly climb from a power value close to 0 at startup to approximately 50kW (the peak occurs within 2 seconds), and then gradually fall back to approximately 30kW. This contrasts with the uniform sloping line from 0 to 30kW given by nonlinear interpolation—the former accurately captures the startup impact energy consumption, while the latter severely underestimates it.

[0025] Under shutdown conditions, the shutdown decay model is invoked, with the power value (operating power) at time t1 as the fitting starting point and the power value at time t2 (approaching 0 or standby power) as the fitting ending point, generating an exponential decay curve from the starting point to the ending point, filling the missing interval. The curve drops rapidly in the initial segment (reflecting the rapid decrease in power after the power is cut off), and then gradually slows down (reflecting the slow decay of residual power during rotor inertial rotation), completely reproducing the physical process of inductive load shutdown.

[0026] Under steady-state conditions, the steady-state model is invoked, and the average of the effective power samples before and after the missing interval is used as the constant power value to generate a horizontal straight line to fill the missing interval; or when there is a shutdown signal, standby signal or power rapid drop-off characteristic before the missing interval, zero-value filling or state-preserving model is used to complete the missing interval.

[0027] After completion, a rated power constraint is applied to each completion point. The power value at any completion point must be greater than or equal to a preset lower power limit (the larger of standby power and historical minimum operating power) and less than or equal to a preset multiple of the rated power (1.5 times for motor loads and 1.1 times for resistive loads). If the fitted value at a completion point exceeds this constraint range, an alarm is triggered and the system reverts to a conservative strategy (zero-filling or state hold) to ensure that any completion data entering the integration path is within a physically reasonable range. Finally, all completed power values ​​and the original effective power values ​​together constitute the complete power time-series data for that time window, used for subsequent energy consumption calculations.

[0028] Step 105: Determine the weighting factor corresponding to each time window, determine the energy consumption of the device in each time window based on the weighting factor and the power data in each time window, and determine the cumulative energy consumption of the device based on the energy consumption of the device in each time window.

[0029] In this embodiment of the invention, after completing the curve fitting and completion of missing power data, the weighting factor corresponding to each time window is determined based on the multi-dimensional quality evaluation index of each time window. After determining the weighting factor, the energy consumption of the device within each time window is calculated. The calculation adopts a dual-path fusion method: the first path is the integral path, which performs time accumulation and summation on the completed power data within the window (i.e., the power value of each sampling point is multiplied by the sampling period and then accumulated) to obtain the integral path energy consumption value E_integ, which directly reflects the integral result of the measured power; the second path is the model path, which calculates the theoretical energy consumption E_model=P_rated_avg×T_run based on the average rated power of the device P_rated_avg and the running time T_run within the window. The running time is determined by comparing the filtered power value with the running power threshold one by one and summing the time slices corresponding to all sampling points marked as running. This path does not depend on the completeness of real-time power data and can still provide a stable estimate when data is missing. Finally, the actual energy consumption E_window of the window is calculated according to the following weighted fusion formula: E_window = α × E_integ + (1-α) × E_model, where the weight factor α determines the proportion of the integration path and the model path in the final result. After completing the energy consumption calculation for all time windows in sequence, the energy consumption values ​​of all windows are summed, i.e., E_total = ΣE_window(k), to obtain the cumulative energy consumption of the device over the entire statistical period.

[0030] Reference Figure 2 The diagram illustrates a flowchart of another method for processing cumulative energy consumption data of a device provided by an embodiment of the present invention. The method specifically includes the following steps: Step 201: Obtain the power timing data reported by the device, and divide the power timing data into multiple time windows according to a preset time window to generate power data for multiple time windows; In this embodiment of the invention, power time-series data reported by the device is acquired. This data is collected by a DTU device deployed on the power-consuming equipment side at a fixed sampling period and reported to the cloud. Each data point includes at least the sampling time and the corresponding power value. After receiving the data, the cloud divides the original time-series data into multiple continuous and non-overlapping time windows according to a preset time window. Through the division of time windows, the originally continuous power data stream is divided into several independent data analysis units. Each time window contains multiple power sampling points, and these sampling points together constitute the power change trajectory within that window.

[0031] Step 202: Detect time segments within each time window where power data is missing, and determine the device operating condition type of the device in the time segment; In this embodiment of the invention, after generating the multidimensional quality evaluation index for each time window, the integrity index is used to determine whether there is a time segment with missing power data in the current time window. When the integrity index is 0, it indicates that there is a continuous missing data interval in the window. At this time, it is necessary to detect and locate the missing time segment (i.e., the time period between two valid power sampling points where power sampling values ​​are missing). After detecting the missing time segment, the power change characteristics before and after the missing interval are identified. Based on the power change characteristics, it is determined what kind of operating condition the device is in within the missing interval.

[0032] In some embodiments, step 202 may include the following sub-steps: Sub-step S11: Identify the power change characteristics before and after the time segment; the power change characteristics include the power value and corresponding change trend of at least one power sampling point before the start time of the time segment, and the power value and corresponding change trend of at least one power sampling point after the end time of the time segment. Sub-step S12: Determine the device operating condition type of the device in the time segment based on the power values ​​of the power sampling points before the start time of the time segment and the power values ​​of the power sampling points after the end time of the time segment.

[0033] In this embodiment of the invention, power change characteristics before and after a time segment are identified. When the integrity index is 0 (i.e., there are continuous gaps within the current time window), the start and end times of the missing time segment are first located. Then, at least one valid power sampling point before the start time (i.e., the last few reported power values ​​before the gap) and at least one valid power sampling point after the end time (i.e., the first few reported power values ​​after the gap) are extracted. Based on this, the value levels and trends of these sampling points are further analyzed. For example, whether the power sampling value before the gap is near standby power or near operating power, whether it is rising, falling, or remaining stable; whether the power sampling value after the gap suddenly rises to operating power, suddenly drops to standby power, or remains at a similar level to before the gap. This information together constitutes the complete power change characteristics before and after the missing time segment. Based on the power values ​​of the power sampling points before the start time of the time segment and the power sampling points after the end time of the time segment, and based on the comparison results of the power sampling values ​​before and after the missing time segment with a preset threshold, the operating condition type of the device during the gap period is determined.

[0034] By determining what kind of operating state change the equipment has experienced during the missing period through the power characteristics before and after the missing interval, it is possible to accurately infer the working condition type of the equipment within that time period even without knowing the actual power values inside the missing interval, thereby providing a reliable judgment basis for the subsequent invocation of the power change curve template that matches the physical law of the working condition, and ensuring that the completion result conforms to the actual physical operation trajectory of the equipment.

[0035] In some embodiments, the step S12 may include the following sub-steps: In sub-step S121, when the power value of the power sampling point before the start time of the time segment is less than or equal to the standby power threshold, and the power value of the power sampling point after the end time of the time segment is greater than or equal to the operating power threshold, it is determined that the equipment working condition type of the equipment in the time segment is a start-up working condition; the standby power threshold is less than the operating power threshold; when the power value of the power sampling point before the start time of the time segment is greater than or equal to the operating power threshold, and the power value of the power sampling point after the end time of the time segment is less than or equal to the standby power threshold, it is determined that the equipment working condition type of the equipment in the time segment is a shutdown working condition; when the difference between the power value of the power sampling point before the start time of the time segment and the power value of the power sampling point after the end time of the time segment is less than or equal to the preset fluctuation threshold, it is determined that the equipment working condition type of the equipment in the time segment is a steady-state working condition.

[0036] In the embodiment of the present invention, the working condition type of the equipment during the missing period is determined based on the comparison result between the power sampling values before and after the missing time segment and the preset thresholds. Two core threshold parameters are preset: a standby power threshold (P_standby) and an operating power threshold (P_run), both of which are positive numbers and satisfy P_standby < P_run. The standby power threshold is used to determine whether the equipment is in a shutdown or standby state (power lower than this value is regarded as not running), and the operating power threshold is used to determine whether the equipment is in a normal operating state (power higher than this value is regarded as running). The interval between the two constitutes a transition zone, which functions to avoid frequent misjudgment of working conditions caused by small fluctuations of power near the thresholds.

[0037] Start-up condition determination: When the power sample value before the start time of the missing interval is less than or equal to the standby power threshold (P_before≤P_standby), and the power sample value after the end time of the missing interval is greater than or equal to the running power threshold (P_after≥P_run), it indicates that the equipment was still in a stopped or standby state at the start time of the missing period, but had entered the running state by the end time. That is, the equipment completed the state switch from "stopped" to "running" during the missing period. Therefore, the equipment condition type corresponding to the missing interval is determined to be a start-up condition.

[0038] Shutdown Condition Determination: When the power sample value before the start of the missing interval is greater than or equal to the operating power threshold (P_before≥P_run), and the power sample value after the end of the missing interval is less than or equal to the standby power threshold (P_after≤P_standby), it indicates that the equipment was still in the running state at the start of the missing time period, but had entered the shutdown or standby state by the end of the time period. That is, the equipment completed the state switch from "running" to "shutdown" during the missing period. Therefore, the equipment condition type corresponding to the missing interval is determined to be a shutdown condition.

[0039] Steady-state condition determination: When the difference between the power sample value before the start time and the power sample value after the end time of the missing interval is less than or equal to the preset fluctuation threshold (|P_before-P_after|≤ΔP_threshold), it indicates that the power level of the equipment has not changed significantly before and after the missing interval. That is, the equipment has not experienced a start-up or shutdown state switch during the missing period. Therefore, the equipment operating condition type corresponding to the missing interval is determined to be a steady-state condition. Steady-state conditions can be further subdivided into operating steady state (power values ​​before and after are both higher than the operating power threshold), standby steady state (power values ​​before and after are both lower than the standby power threshold), and transition steady state (power values ​​before and after are both in the transition zone). However, the steady-state model (constant value filling) is applicable to the completion processing of all three subtypes.

[0040] If none of the above three judgment conditions are met (e.g., the power was in the transition zone before the missing value, the power suddenly increased to above the operating power after the missing value, or the power difference before and after the missing value exceeded the fluctuation threshold but did not meet the complete conditions for start-up / shutdown), the missing interval is marked as "uncertain operating condition" and an alarm is triggered to prompt manual review. At the same time, a conservative zero-value filling strategy is adopted by default to ensure that unreliable physical model fitting results are not introduced when the operating condition cannot be accurately determined. By inferring the physical process occurring within the missing interval through the power state change before and after the missing value, it is determined whether the equipment was starting up, shutting down, or in a steady state during the missing period, thus providing an accurate judgment basis for subsequent use of curve templates that match the physical laws of the operating condition for completion.

[0041] Step 203: Obtain a power change curve template that matches the equipment operating condition type from a preset equipment type operating condition feature library; the equipment type operating condition feature library stores power change curve templates corresponding to different equipment operating condition types; In this embodiment of the invention, after determining the operating condition type of the equipment within the missing time segment, a power change curve template matching the equipment type and the current operating condition is obtained from a preset equipment type operating condition feature library. The power change curve templates stored in the feature library include three categories: a startup transient model to describe the exponential increase of power over time under startup conditions, a shutdown decay model to describe the exponential decrease of power over time under shutdown conditions, and a steady-state model to describe the constant or slowly changing power under steady-state conditions, typically using mean preservation or zero-value filling. First, the template set corresponding to the current equipment is filtered out based on the current equipment type identifier; then, a specific template matching the determined operating condition is indexed from this set.

[0042] The startup transient model is used to describe the power change of inductive load equipment under startup conditions. For example, during the startup of equipment such as motors and compressors, as the rotor accelerates from rest to synchronous speed, the stator current first increases sharply to a peak value (which can reach 5-7 times the rated current), and then gradually falls back to the steady-state operating value. The power change throughout the process exhibits a significant exponential shape, rather than the uniform increase assumed by nonlinear interpolation.

[0043] The expression for initiating the transient model is: P(t)=P_steady+(P_peak-P_steady)·(1-exp(-(t-t1) / τ_start)) The parameters are defined as follows: P(t) is the fitted power value at time t; P_steady is the power value during steady-state operation (i.e., the power level that tends to stabilize after startup); P_peak is the peak power value during startup (determined by the product of rated power and startup current multiple, i.e., P_peak = P_rated × K_start, where K_start typically has a value of 5-7); t1 is the starting time of the missing interval; and τ_start is the thermal time constant during startup (reflecting the speed at which power drops from peak to steady state, typically ranging from several seconds to tens of seconds, depending on the motor rotor time constant and load inertia). The curve generated by this model rapidly climbs to near the peak value during the initial startup phase, reflecting the instantaneous burst of current surge; subsequently, the rate of increase gradually slows down, approaching the steady-state power value, reflecting the gradual drop of current to the rated level during rotor acceleration.

[0044] The shutdown decay model is used to describe the power change law of inductive load equipment under shutdown conditions. When the power supply is cut off, the rotor continues to rotate due to inertia. The residual power induced in the stator gradually decays as the speed decreases. The power does not decrease linearly to zero, but first drops rapidly and then slowly approaches zero, exhibiting an exponential decay pattern.

[0045] The expression for the shutdown attenuation model is: P(t)=P_initial·exp(-(t-t1) / τ_stop) Where P(t) is the fitted power value at time t, P_initial is the initial power value at the start of shutdown (i.e., the most recent effective power sample value before the start of the missing interval, usually the power level during equipment operation), t1 is the start of the missing interval, and τ_stop is the thermal time constant during shutdown (reflecting the rate of power decay, which depends on the rotational inertia and mechanical loss characteristics of the equipment). The curve generated by this model shows a rapid drop in power at the start of shutdown, reflecting the physical process of the disappearance of electromagnetic torque and rapid decrease in speed after the power is cut off; subsequently, the decay rate gradually slows down, and the curve slowly approaches zero, reflecting the slow release of residual power during rotor inertial rotation.

[0046] Steady-state models are used to describe the power variation of equipment under steady-state operating conditions. When the equipment has neither started up nor stopped, and the operating load has not changed significantly, the power value fluctuates within a small range and the change is relatively gentle, which can be described by a constant value or a very slowly changing curve.

[0047] The specific implementation of the steady-state model depends on the characteristics of the power data before and after the missing interval: when the power sample values ​​before and after the missing interval are at similar levels (i.e., the difference between them is less than or equal to a preset fluctuation threshold), the system uses the arithmetic mean of the power values ​​at the beginning and end of the missing interval as a constant power value, generating a horizontal straight line to fill the missing interval. For example, if the power before the missing interval is 10.2kW and the power after the missing interval is 9.8kW, then the steady-state filling value is (10.2+9.8) / 2=10.0kW. Furthermore, when there are shutdown signals, standby signals, or rapid power drop characteristics before the missing interval, zero-value filling (power value is 0kW) or a state-preserving model (preserving the last valid power value before the missing interval) is used for completion. The steady-state model is suitable for scenarios with no drastic power changes, such as steady-state operation, brief standby, or normal shutdown.

[0048] Each model corresponds to a specific equipment operating state, and its function shape (exponential increase, exponential decrease, constant level) is derived from the actual physical behavior of the inductive load under that state. By first identifying the operating condition type corresponding to the missing interval, and then calling the corresponding model for curve fitting, the completed power data is ensured to be true and interpretable, thereby solving the fundamental defect of traditional pure mathematical interpolation that is "mathematically smooth but physically distorted".

[0049] Reference Figure 3 This diagram illustrates a startup transient model of a device cumulative energy consumption data processing method provided in an embodiment of the present invention; refer to Figure 4 This diagram illustrates a shutdown attenuation model for a method for processing cumulative energy consumption data of equipment according to an embodiment of the present invention; refer to Figure 5 The diagram shows a steady-state filling model of a device cumulative energy consumption data processing method provided by an embodiment of the present invention. like Figure 3 The figure illustrates the actual physical law of power change over time during equipment startup. The vertical axis represents power P (kW), and the horizontal axis represents time t (s). Before time t1, the equipment is in a stopped or standby state, with power values ​​remaining close to zero. When the equipment starts at time t1, the stator current increases sharply as the motor rotor accelerates from rest to synchronous speed. Therefore, the power does not rise uniformly from zero; instead, it first surges rapidly to a peak power far exceeding the rated value (typically 5-7 times the rated power). Subsequently, as the rotor gradually accelerates and the current gradually decreases, the rate of power increase gradually slows down, eventually reaching a steady-state operating power value at time t2. The overall curve exhibits an exponential upward trend with a "steep at first, then gentle" pattern. The figure contains two curves: the solid line represents the exponential upward curve generated by the startup transient model in this embodiment of the invention, accurately reflecting the startup impact energy consumption; the dashed line represents the uniformly rising slope generated by traditional linear interpolation, which completely ignores the current surge phenomenon at startup, resulting in a significantly smaller integral area below the curve than the actual curve, thus severely underestimating the energy consumption contribution during the startup phase. t1 and t2 are marked at the start and end points of the curve, respectively, marking the start and end times of the missing interval.

[0050] like Figure 4The figure illustrates the actual physical law of power change over time under shutdown conditions. The vertical axis represents power P (kW), and the horizontal axis represents time t (s). Before time t1, the equipment is in normal operation, and the power is maintained at the operating power level. When the power is cut off at time t1, the residual power induced in the stator does not uniformly decrease to zero due to the rotor continuing to rotate due to inertia. Instead, it drops rapidly at first, and then gradually slows down as the rotational speed decreases and the residual power release rate slows down, eventually approaching zero slowly at time t2. The overall curve shows an exponential decay pattern of "steep at first, then gentle". The figure contains two curves: the solid line represents the exponential decay curve generated by this scheme based on the shutdown decay model, which accurately reflects the decay process of residual power during shutdown; the dashed line represents the uniformly decreasing slope generated by traditional linear interpolation, which overestimates the power as a slow decrease at the beginning of shutdown, resulting in a significantly larger integral area below it than the true curve, i.e., overestimating the residual energy consumption during shutdown. t1 and t2 are marked at the start and end points of the curves, respectively, indicating the start and end times of the missing interval.

[0051] like Figure 5 The figure illustrates how missing data is filled in when the power remains constant under steady-state conditions. The vertical axis represents power P (kW), and the horizontal axis represents time t (s). Missing intervals are marked with gray blocks. There is an original sampling point (marked with a black dot) before and after the missing interval, with power values ​​at similar levels, indicating that the equipment did not experience any start-up or shutdown transitions during that time period and was in a stable operating state. The power values ​​before and after the missing interval are averaged, and this average is used as the constant power value. A horizontal straight line is then generated within the missing interval to fill the data gaps, ensuring that the complete sequence retains the original sampling points while smoothly filling the missing intervals. Furthermore, zero-value filling can be used when the equipment is in standby mode; and when the equipment is operating normally and the power changes gradually, a very gradually changing linear transition can be used based on the trend of adjacent sampling points.

[0052] Step 204: For time segments with missing power data, curve fitting is performed to complete the missing power data in the time segment according to the corresponding power change curve template. In this embodiment of the invention, after obtaining a power change curve template matching the current equipment type and operating condition from the equipment type and operating condition feature library, a specific curve fitting and completion operation is performed. When it is determined that there is a missing interval within the current time window, the start and end times of the missing interval are first located, and the most recent effective power sample value before the start time (as the fitting start point) and the most recent effective power sample value after the end time (as the fitting end point) are obtained. Subsequently, according to the determined operating condition type (start-up condition, shutdown condition, or steady-state condition), the obtained corresponding power change curve template is substituted with specific values ​​for fitting. In some embodiments, step 204 may include the following steps: Sub-step S21: Obtain the corresponding power change curve template according to the equipment operating condition type corresponding to the time segment; Sub-step S22: Based on the power change curve template, generate continuous power values ​​from the power value at the beginning of the time segment to the power value at the end of the time segment and fill them into the time segment; each power value in the continuous power values ​​is greater than or equal to a preset lower power limit and less than or equal to a preset multiple of the rated power.

[0053] In this embodiment of the invention, a corresponding power change curve template is obtained based on the equipment operating condition type corresponding to the time segment. Specifically, using the determined operating condition type (start-up, shutdown, or steady-state) as an index, a power change curve template matching the equipment type and the current operating condition is retrieved from the equipment type operating condition feature library. The template set corresponding to the current equipment is filtered based on the equipment type identifier, and then the specific template is indexed from the set based on the operating condition type. If it is a start-up condition, a start-up transient model (exponential rise pattern) is obtained; if it is a shutdown condition, a shutdown decay model (exponential decay pattern) is obtained; and if it is a steady-state condition, a steady-state model (constant value pattern) is obtained. This retrieval process is completed in real time in the cloud, ensuring that each completion operation obtains a curve template that accurately matches the physical characteristics of the equipment.

[0054] Based on the power change curve template, continuous supplementary power values ​​are generated and filled into the time segment, starting with the power value at the beginning of the time segment and ending with the power value at the end of the time segment. The specific fitting method is as follows: the effective power sample value at the beginning of the missing interval (t1) is used as the fitting start point P_start, and the effective power sample value at the end of the missing interval (t2) is used as the fitting end point P_end. These values ​​are substituted into the template function. Under the startup condition, the startup transient model P(t)=P_steady+(P_peak-P_steady)·(1-exp(-(t2-t1) / τ_start)) is used, and the curve is generated with P_start as the initial value and P_end as the target steady-state value. Under the shutdown condition, the shutdown attenuation model P(t)=P_initial·exp(-(t2-t1) / τ_stop) is used, and the curve is generated with P_start as the initial value and P_end as the attenuation end point. Under the steady-state condition, the average value of P_start and P_end is directly used as a constant value to generate a horizontal straight line. The generated curve produces corresponding power values ​​at each sampling point within the missing interval, forming a continuous, smooth, and physically consistent power change trajectory from P_start to P_end, completely filling the missing interval and restoring the power time series data of that time window into a continuous and complete sequence.

[0055] After fitting, the physical rationality of each generated completed power value is verified: the power value at any completed point must be greater than or equal to the preset lower power limit (the larger of the equipment's standby power and the historical minimum operating power), and less than or equal to a preset multiple of the rated power (1.5 times for motor loads and 1.1 times for resistive loads). If a completed value generated by fitting is lower than the lower limit, it indicates that the fitting result has suppressed the equipment's power during operation to a physically unreasonable level below the standby power, and the point is corrected to the lower limit value; if a completed value is higher than the upper limit, it indicates that the fitting result has exceeded the equipment's allowable overload limit, triggering an alarm and correcting the point to the upper limit value, while reverting to a conservative zero-value filling strategy. By accurately matching the power change curve template corresponding to the current equipment's physical characteristics from the feature library through "equipment type and operating condition type", it is ensured that the completion operation is always based on a physical model consistent with the actual operating law of the equipment. Based on this template, using the actual power sampling values ​​at the start and end times of the missing interval as boundaries, a continuous, smooth, and physically self-consistent completion curve is generated from the start to the end. This allows the completed power data to fully reproduce the actual power trajectory of the equipment during startup impact, shutdown inertia, or steady-state maintenance on the time axis, and enables the cumulative power consumption results to truly reflect the actual energy consumption level of the equipment.

[0056] Step 205: Determine the weighting factor for each time window; In this embodiment of the invention, after completing the curve fitting and completion of missing power data within each time window, the system needs to determine a weighting factor α for each time window. This weighting factor is used to balance the contribution ratio of the "measured integration path" and the "model estimation path" in the final energy consumption calculation. The value range of the weighting factor is 0 to 1. When α approaches 1, the energy consumption result is mainly based on the measured power integration path; when α approaches 0, the energy consumption result is mainly based on the rated power model estimation path.

[0057] In some embodiments, step 205 may include the following steps: Sub-step S31: Determine the coefficient of variation of the power data within each time window; the coefficient of variation is the ratio of the standard deviation to the mean of the power data within the time window; Sub-step S32: Based on the coefficient of variation, generate a multidimensional quality evaluation index for each time window; Sub-step S33: Determine the weight factor corresponding to each time window based on the multi-dimensional quality evaluation index of each time window.

[0058] After dividing the time window, each time window contains multiple power sampling points, but these sampling points may exhibit different fluctuation characteristics due to differences in the equipment's operating state. For example, the power values ​​during steady-state operation are relatively concentrated and fluctuate gently, while the power values ​​during startup or shutdown oscillate significantly and have a high degree of dispersion. To quantify this degree of fluctuation and provide a basis for subsequent multi-dimensional quality evaluation indicators, the coefficient of variation (CV) is introduced.

[0059] The coefficient of variation (CV) is defined as the ratio of the standard deviation to the mean of power data within the same time window, i.e., CV = σ / μ, where σ is the standard deviation of all power sampling points within the window, and μ is the arithmetic mean of all power sampling points within the window. Unlike simply using the standard deviation, the core advantage of the CV lies in its dimensionless nature, eliminating the influence of power magnitude on the evaluation of fluctuation. This allows devices with different rated power to be compared horizontally using a uniform threshold standard for fluctuation. For example, a 100kW large motor with a standard deviation of 5kW and a 1kW small motor with a standard deviation of 0.5kW have a 10 times greater absolute fluctuation than the latter, but both have a CV of 0.05, indicating that their relative fluctuation is the same and both should be judged as operating in a stable state.

[0060] In this embodiment of the invention, the coefficient of variation is the ratio of the standard deviation to the mean of all power sampling points within the current time window. The standard deviation reflects the dispersion of each power sampling value relative to the window mean; the larger the value, the greater the absolute fluctuation of power within the window. However, the magnitude of the standard deviation is directly affected by the power magnitude. A 100kW device with a fluctuation of 5kW has a standard deviation 10 times greater than a 1kW device with a fluctuation of 0.5kW, but their relative fluctuation (i.e., the fluctuation ratio relative to their own mean) is exactly the same. The coefficient of variation normalizes the power by dividing the standard deviation by the mean, eliminating the influence of the power magnitude, allowing devices with different rated power and different load levels to be compared using a unified threshold standard for fluctuation.

[0061] A multidimensional quality evaluation index is a structured set of information used to quantitatively describe the quality of power data within the current time window from multiple dimensions, rather than a single comprehensive score. It includes at least three dimensions: completeness index, stationarity index, and reliability index, which evaluate the power data within the window from the perspectives of data continuity and completeness, volatility, and overall reliability, respectively. The completeness index characterizes whether there are consecutive missing power data points within the current time window. It is determined by scanning the window for consecutive missing power data points, and its value is either 0 or 1; 0 indicates consecutive missing data points within the window, and 1 indicates continuous and complete data within the window. The stability index characterizes the degree of fluctuation in power data within the current time window. Its value is rated as high, medium, or low, determined by comparing the coefficient of variation (CV) with a preset threshold. When the CV is less than the first preset threshold (e.g., 0.05), it indicates that the power data within the window is highly concentrated, and the equipment is in a stable operating state; the stability is rated as "high." When the CV is between the first and second preset thresholds (e.g., 0.15), it indicates that the power fluctuates to some extent; the stability is rated as "medium." When the CV is greater than or equal to the second preset threshold, it indicates that the power is oscillating violently, and the equipment is undergoing transient processes such as startup, shutdown, or sudden load changes; the stability is rated as "low." The reliability index characterizes the overall reliability of the power data within the current time window. Its value is a continuous value from 0 to 1, calculated by considering multiple factors such as the coefficient of variation and the proportion of abnormal data. The smaller the coefficient of variation and the lower the proportion of abnormal data, the higher the reliability; conversely, the higher the coefficient of variation and the lower the proportion of abnormal data, the lower the reliability.

[0062] In this embodiment of the invention, after determining the coefficient of variation of power data within each time window, a multidimensional quality evaluation index belonging to each time window is generated based on the coefficient of variation. In the missing data completion stage, the interpolation strategy is determined based on the stationarity dimension. When the stationarity is "high" and the operating condition is steady-state, linear interpolation is used. When the stationarity is "low," physical models such as the start-up transient model or shutdown attenuation model from the equipment type operating condition feature library must be called for constraint fitting completion to ensure that the completed data conforms to the physical operating laws of the equipment. In the weight factor determination stage, the fusion ratio of the integral path energy consumption value and the model path energy consumption value is determined based on the credibility dimension. The higher the credibility, the greater the weight of the integral path; the lower the credibility, the greater the weight of the model path. The completeness index is used to determine whether the current window needs to perform a completion operation. When the completeness is 1, no completion is needed; when the completeness is 0, the missing interval is located and the subsequent operating condition identification and completion process is triggered. The three dimensions do not interfere with each other and each performs its own function, ensuring that every decision point in the entire data processing chain obtains the most relevant and accurate quality information as support.

[0063] In some embodiments, step S33 may include the following steps: Sub-step S331: Obtain communication link quality data of the power timing data reported by the device; the communication link quality data includes at least one of received signal strength, signal-to-noise ratio, and current session retransmission rate; Sub-step S332: Determine a channel health score based on at least one of the received signal strength, the signal-to-noise ratio, and the current session retransmission rate; Sub-step S333: When the channel health score is lower than the preset score threshold, the data in the current time window is marked as low confidence data, and the weight factor is set to a preset value; Sub-step S334: When the channel health score is higher than or equal to the preset score threshold, the weight factor is obtained according to the multi-dimensional quality evaluation index of each time window.

[0064] In this embodiment of the invention, communication link quality data is acquired from the power timing data reported by the device. In each reporting message, the DTU device carries, or separately sends, a set of link quality metadata (LQM). The communication link quality data includes at least one of the following: Received Signal Strength Indicator (RSSI), Signal-to-Noise Ratio (SNR), and Retrans_Rate (the ratio of the number of retransmissions in the current session to the total number of transmissions). RSSI reflects the strength level of the wireless signal; a higher value indicates a stronger signal. SNR reflects the power ratio of the useful signal to the background noise; a higher value indicates a cleaner signal. The retransmission rate reflects the reliability of data transmission; a lower value indicates a more stable channel. These indicators are directly measured and recorded at the physical layer by the wireless communication module of the DTU device and reported to the cloud along with the power data, providing the cloud with raw, perceived data on the communication link quality within the current time window.

[0065] A channel health score is determined based on at least one of the following: received signal strength (RSSI), signal-to-noise ratio (SNR), and current session retransmission rate. The acquired link quality indicators (RSSI, SNR, and retransmission rate) are mapped to the interval 0 to 1 using a normalized mapping function. RSSI and SNR are positive indicators; higher mapped scores indicate better channel quality. The retransmission rate is a negative indicator; higher mapped scores indicate worse channel quality. Subsequently, the scores of each indicator are weighted and combined: the signal strength score is multiplied by a first weighting coefficient, the SNR score is multiplied by a second weighting coefficient, and the sum is obtained. Then, the product of the retransmission rate penalty score and a third weighting coefficient is subtracted to obtain the channel health score H(t). This score comprehensively reflects the overall quality of the wireless communication link within the current time window, with a value ranging from 0 to 1. Higher values ​​indicate better channel quality and more reliable data transmission, while lower values ​​indicate poorer channel quality and a higher risk of data distortion due to transmission errors. Taking RSSI and SNR as examples, when the DTU is at the edge of the base station coverage, and RSSI is below -100dBm and SNR is below 10dB, H(t) will decrease significantly, thus indicating that the current link is in a weak signal state.

[0066] When the channel health score is lower than a preset score threshold, the data in the current time window is marked as low-confidence data, and the weighting factor is set to a preset value. When H(t) is lower than the preset score threshold θ_low (e.g., 0.3), the current wireless communication link quality is determined to be extremely poor. The power data reported within this time window has a very high probability of being distorted due to transmission errors. Before the data enters the integration path, all data in this window is marked as "low-confidence stream," and the weighting factor α is forcibly preset to a low preset value (e.g., 0.3). At this time, even if the data in this window appears numerically complete, its accuracy is no longer trusted. Instead, the weight of the integration path is directly reduced, and energy consumption estimation is instead based on the model path.

[0067] When the channel health score is higher than or equal to the preset score threshold, the weighting factor is obtained based on the multi-dimensional quality evaluation index for each time window. When H(t)≥θ_low, it indicates that the current communication link quality is within an acceptable range, and the transmission reliability of the reported data is basically guaranteed. At this time, the weighting factor is determined based on the multi-dimensional quality evaluation index. By advancing the decision-making time of the weighting factor from "after data reception" to "before data reception," the reliability of the link quality index directly reported by the DTU physical layer can be predicted before the data enters the integration engine, and the weighting factor can be preset accordingly. This effectively avoids the passive situation where data errors caused by weak signals are only discovered and corrected after entering the integration path. In the face of drastic fluctuations in communication quality, the trust strategy can be adjusted in advance, suppressing the impact of erroneous data on the cumulative power consumption.

[0068] In some embodiments, step S334 may include the following steps: Sub-step S3341: Obtain the values ​​of each dimension in the multidimensional quality evaluation index for each time window, wherein each dimension includes at least one of the credibility dimension, stationarity dimension, and integrity dimension; Sub-step S3342: Determine the weighting factor based on the value of at least one of the credibility dimension, the stability dimension, and the integrity dimension.

[0069] In this embodiment of the invention, the values ​​of each dimension in the multidimensional quality evaluation index are obtained for each time window. The multidimensional quality evaluation index corresponds to a set of independent evaluation results for each time window, including at least a reliability dimension, a stationarity dimension, and a completeness dimension. The values ​​of each dimension are read from the evaluation records corresponding to the current time window. The reliability dimension is a continuous value from 0 to 1, comprehensively reflecting the reliability of the power data within the window; the stationarity dimension is a discrete value of high, medium, or low, characterizing the fluctuation of the power data within the window; the completeness dimension is a Boolean value of 0 or 1, characterizing whether there are consecutive missing data points within the window.

[0070] The weighting factor is determined based on the value of at least one of the following dimensions: credibility, stationarity, and integrity. The method for determining the weighting factor can be flexibly chosen according to the actual application scenario. One method is based on a single dimension: the value of the credibility dimension is directly used as the weighting factor (α = credibility). In this case, the weighting factor depends entirely on the overall data quality score, making it the simplest approach. Another method is based on multi-dimensional linear weighting: after normalizing the values ​​of each dimension to the range of 0 to 1, each value is multiplied by its corresponding preset weight coefficient and then summed, i.e., α = w_a·S_credibility + w_b·S_stability + w_c·S_integrity, where S_credibility, S_stability, and S_integrity are the normalized scores of the credibility, stationarity, and integrity dimensions, respectively, and w_a, w_b, and w_c are preset weight coefficients, and their sum equals 1. Under the multi-dimensional weighting method, even if one dimension performs poorly (e.g., low stationarity), if other dimensions perform well (e.g., high credibility and high integrity), the weighting factor can still be maintained at a reasonable level. The determination of weighting factors is no longer a simple mapping of a single indicator, but can flexibly integrate multi-dimensional quality evaluation information. Through the fine-tuning of weights by multi-dimensional quality evaluation indicators, the optimal accuracy of cumulative energy consumption statistics can be maintained in actual operating environments where data quality varies.

[0071] Step 206: Detect whether the weight factor of each time window meets the preset weight rationality conditions; the weight rationality conditions include at least one of the following: the deviation between the integral path energy consumption value and the model path energy consumption value in each time window is less than a preset deviation threshold; the proportion of sampling points with power exceeding the rated power in each time window is less than a preset proportion threshold; and the jump amplitude of the device energy consumption in each time window relative to the device energy consumption in the previous time window is less than a preset amplitude threshold.

[0072] In this embodiment of the invention, after determining the weight factor for each time window, the rationality of the weight factor is checked. Although the weight factor is determined based on multi-dimensional quality evaluation indicators or communication link quality, unreasonable values ​​may still occur in some cases. For example, the credibility dimension of a certain window may be misjudged as extremely low due to occasional sensor noise, resulting in an excessively low weight factor. This causes high-quality data windows that should mainly rely on measured integration paths to be incorrectly assigned excessively high model path weights, resulting in energy consumption values ​​deviating from the actual situation. Conversely, the credibility of a certain window may be overestimated due to a brief recovery of communication, while the actual power data still has hysteresis errors, leading to an excessively high weight factor and poor-quality data contaminating the integration results. To identify and correct the above situations, a preset weight rationality condition is introduced to verify the determined weight factor and ensure that it is reasonable in actual physical logic.

[0073] The weighting rationality conditions include: the deviation condition between the energy consumption value of the integral path and the energy consumption value of the model path, that is, the relative deviation between the energy consumption value E_integ of the integral path and the energy consumption value E_model of the model path within the current time window should be less than a preset deviation threshold (e.g., 30%). The two paths use completely different input data and calculation logic (the integral path is based on the time accumulation of measured power data, and the model path is based on the product of rated power and runtime). If the deviation between the two calculation results is too large, it indicates that there is a significant problem with the data quality of the integral path or the rated parameters of the model path. In this case, the trust ratio of the current weight factor allocation lacks reasonable support. The sampling point percentage condition for power exceeding the rated power, that is, in the power data corresponding to the energy consumption value calculated based on this weight factor within the current time window, the percentage of sampling points exceeding the rated power by a preset multiple (e.g., 1.5 times) should be less than a preset percentage threshold (e.g., 5%). Physically, the power of the equipment should not frequently exceed the allowable overload range of the rated power during normal operation. If the percentage of exceeding this range is too high, it indicates that the weight factor allocation has failed to effectively suppress data anomalies. The condition for the jump amplitude of equipment energy consumption is that the jump amplitude of the final energy consumption value of the equipment in the current time window relative to the energy consumption value in the previous time window should be less than a preset amplitude threshold (such as 15%). Equipment load usually has inertial characteristics, and the energy consumption of adjacent time windows will not change drastically. If the jump amplitude exceeds the threshold, it indicates that the weighting factor changes too drastically between different windows, resulting in artificial discontinuous jumps in the energy consumption curve.

[0074] The three rationality conditions mentioned above verify the rationality of the weighting factor from the perspectives of "path consistency," "physical boundary compliance," and "temporal continuity," respectively. These three conditions can be used independently or in combination (meeting at least one condition is considered reasonable, or multiple conditions must be met simultaneously for it to be considered reasonable). Specific strategies can be configured according to the actual application scenario. When all selected rationality conditions are met, it indicates that the current weighting factor is reasonable and can be directly used in subsequent steps; when any condition is not met, the weight adjustment mechanism of subsequent steps is triggered to correct the current weighting factor. This prevents improper weight allocation caused by misjudgment of data quality labels or communication quality perception bias, ensuring that measured data can be promptly identified and trigger subsequent step-by-step adjustment strategies (step-by-step fine-tuning, conservative backoff, and mandatory minimum protection) when severely distorted. This avoids the cumulative error expansion caused by unreasonable weights entering energy consumption calculations, significantly improving robustness and statistical accuracy under complex operating conditions such as communication quality fluctuations and equipment anomalies.

[0075] Step 207: If the weight factor does not meet the weight rationality condition, starting from the weight factor, the weight factor is reduced successively. After each reduction, the weight factor is re-checked to see if the weight rationality condition is met, until the weight rationality condition is met or the preset maximum number of adjustments is reached. In this embodiment of the invention, after determining that the current weight factor does not meet the weight rationality condition, a weight adjustment mechanism is initiated. The adjustment starts with the currently unreasonable weight factor α_current and gradually reduces the weight factor according to a preset step size δ (e.g., 0.05), i.e., α_new = α_current - δ. After each reduction, the integral path energy consumption value and model path energy consumption value of the current time window are recalculated using the new weight factor, and a rationality check is performed again, i.e., checking whether the new weight factor meets the three conditions of path consistency deviation, power over-limit ratio, and energy consumption jump magnitude. If these conditions are met, the adjustment stops, and the reduced weight factor is used as the valid weight factor for the current window; if not, the weight factor continues to be reduced step by step at the same step size until the rationality condition is met or the preset maximum number of adjustments is reached (e.g., 3 or 5 times).

[0076] The adjustment direction is "gradually reducing the weight factor." Physically, this means that when the weight factor is unreasonable, it indicates that the current weight relies too heavily on the integral path (measured data path) while neglecting the model path (theoretical estimation path), causing the fusion result to deviate from the physically reasonable range. Gradually reducing the weight factor means gradually increasing the proportion of the model path in the fusion process. For example, if α decreases from 0.8 to 0.7, the model path weight increases from 0.2 to 0.3. The model path is calculated based on the device's rated power and operating time, and is not affected by missing real-time data or noise. Therefore, when the measured data path and the model path deviate significantly, or when the fusion result frequently touches the physical boundary, gradually reducing α and increasing the proportion of the model path is an effective way to bring the fusion result back to the physically reasonable range. Each time, only one step is reduced and the reasonableness is re-verified, rather than directly reducing the weight factor to a preset fixed value. By gradually approximating the minimum adjustment range that just meets the reasonableness conditions, we avoid underestimating the contribution of reasonable measured data due to excessive one-time adjustment. When the adjustment direction fails to meet the conditions, we stop after reaching the maximum number of adjustments to prevent the algorithm from going out of control due to unlimited adjustment. At the same time, we trigger a more aggressive correction strategy, so that the weight adjustment process is both adaptive and maintains the ability to cover extreme cases.

[0077] Step 208: If the weight rationality condition is still not met after reaching the preset maximum number of adjustments, then revert to the conservative weight factor; if the weight factor of a preset number of consecutive time windows still does not meet the weight rationality condition after reverting to the conservative weight factor, then set the weight factor of the preset number of time windows to a preset extremely low value.

[0078] In this embodiment of the invention, the weight factor is gradually reduced with a preset step size, and a rationality check is performed again after each reduction. If, after a preset maximum number of adjustments (e.g., 3 or 5 times), the weight factor still fails to meet the weight rationality condition, it indicates that simply fine-tuning the step size cannot solve the problem of improper weight allocation. This may be caused by various reasons: the measured power data in the current window is severely distorted, the deviation between the integration path and the model path is too large, and the adjustment step size is insufficient to overcome the deviation; or the equipment is under special operating conditions (such as faults or abnormal loads), and the conventional linear adjustment logic cannot find a reasonable weight within a limited number of steps. In this case, a rollback strategy is executed to directly roll back the weight factor of the current window to a preset conservative weight factor (e.g., 0.3), and no further step-by-step adjustments are made in the original direction. The physical meaning of the conservative weight factor is to significantly reduce the weight of the integration path, making the model path (calculated based on rated power and operating time) the main basis for energy consumption estimation.

[0079] If, after reverting to a conservative weighting factor, the weighting factor is still deemed unsuitable during the rationality check of a preset number of time windows (e.g., three consecutive windows), it indicates a persistent problem with the current communication link or equipment operation. For example, the DTU equipment may be in a weak signal coverage area for an extended period, resulting in continuously distorted power data; or the equipment itself may be experiencing abnormal operating conditions, with power values ​​deviating from the reasonable range of rated parameters for a prolonged period. In this case, simply reverting to a conservative weighting factor is insufficient to resolve the issue. The weighting factor for the preset number of time windows (e.g., three consecutive windows) must be forcibly set to a preset extremely low value (e.g., 0.1). This extremely low value almost completely abandons trust in the measured integration path, with energy consumption estimation dominated by the model path (accounting for over 90%), retaining only a very small amount of measured data correction (accounting for less than 10%). This "model path-dominated" strategy is the ultimate safeguard under extremely poor data quality conditions, ensuring that the cumulative energy consumption results will not suffer catastrophic deviations due to contamination by inferior data. When temporary communication fluctuations cause single-window data distortion, conservative weights are sufficient to correct the issue, and the system automatically restores normal weights after the window expires. However, when persistent weak signals or equipment malfunctions cause continuous multi-window data distortion, a more aggressive extremely low-value strategy is triggered through continuous tracking and detection, avoiding energy consumption curve oscillations caused by repeated weight jumps between windows. Once the channel health score for several consecutive windows returns to normal and the weight factors meet the rationality conditions again, the system automatically exits the forced state and gradually returns to the normal weight determination process based on multi-dimensional quality evaluation indicators. This ensures stable operation and physical reliability of energy consumption statistics even under extreme conditions such as drastic fluctuations in communication quality or long-term equipment malfunctions.

[0080] Step 209: Determine the energy consumption of the device within each time window based on the weighting factor and the power data within each time window, and determine the cumulative energy consumption of the device based on the energy consumption of the device within each time window.

[0081] In this embodiment of the invention, after determining the weighting factor, the energy consumption of the device within each time window is calculated. The calculation adopts a dual-path fusion method: the power data after completion within the window is summed over time to obtain the energy consumption value of the integral path; the theoretical energy consumption is calculated based on the average rated power of the device and the running time within the window. Finally, the actual energy consumption E_window of the window is calculated according to the following weighted fusion formula: E_window=α×E_integ+(1-α)×E_model, where the weighting factor α determines the proportion of the integral path and the model path in the final result. After completing the energy consumption calculation for all time windows in sequence, the energy consumption values ​​of all windows are summed, i.e., E_total=ΣE_window(k), to obtain the cumulative energy consumption of the device over the entire statistical period.

[0082] In some embodiments, step 209 may include the following sub-steps: Sub-step S41: Filter the power data within each time window to generate filtered power data; Sub-step S42: Based on the filtered power data, calculate the integral path energy consumption value and the model path energy consumption value respectively; the integral path energy consumption value is obtained by performing time accumulation summation on the filtered power data, and the model path energy consumption value is determined according to the average rated power of the equipment and the operating time of the equipment; Sub-step S43: Multiply the integral path energy consumption value by the weight factor, multiply the model path energy consumption value by one minus the weight factor, and then sum them to obtain the energy consumption of the device within the current time window.

[0083] In this embodiment of the invention, although the completed power time-series data fills in the missing intervals, it may still contain abnormal spikes or random fluctuations introduced by factors such as sensor noise, instantaneous voltage fluctuations, or electromagnetic interference. Therefore, a sliding window method is used to filter the power data within each time window. The window size is dynamically adjusted according to the data volatility; when the volatility is high, the window length is increased to enhance the smoothing effect, and when the volatility is low, the window length is decreased to retain the detailed features of the true power changes. Simultaneously, the window size is also differentiated according to the source type of the data within the window. A smaller window (e.g., a 3-point sliding window) is used for the original reported data to retain the true power fluctuation characteristics, while a larger window (e.g., a 5-7 point sliding window) is used for the interpolated and completed data to suppress steps or spikes. For mixed windows, the window size increases linearly according to the proportion of interpolated data. Within each sliding window, the maximum and minimum values ​​are first removed to eliminate instantaneous pulse interference, and then the remaining data is averaged, or a combination of "median filtering followed by mean filtering" is used to finally generate smooth, continuous, and filtered power data that retains the main physical characteristics.

[0084] The integral path energy consumption value is calculated by summing the filtered power data over time, i.e., E_integ=Σ(P_i×Δt), where P_i is the power value of the i-th sampling point after filtering, and Δt is the sampling period. This path directly reflects the actual cumulative power consumption of the device within this time window based on the measured power data (after filtering). The higher the data quality and the better the filtering effect, the closer the result is to the true value. The model path energy consumption value is determined based on the device's average rated power P_rated_avg and the device's operating time T_run within this window, i.e., E_model=P_rated_avg×T_run. The operating time is determined by comparing the filtered power value with a preset operating power threshold one by one. This path does not depend on the completeness of real-time power data and can still provide a stable estimate based on rated parameters and operating status when data is missing or the signal deteriorates.

[0085] The energy consumption of the device within the current time window is obtained by multiplying the energy consumption value of the integral path by the weighting factor, and the energy consumption value of the model path by one minus the weighting factor. Filtering and denoising, parallel computation of dual paths, and weighted fusion output provide an optimal energy consumption value for each time window, calculated independently based on the data quality and operating status of that window, thus fundamentally ensuring the accuracy of the final cumulative energy consumption.

[0086] In some embodiments, step S42 may include the following sub-steps: Sub-step S421: Obtain the average rated power and operating power threshold of the device. The operating power threshold is a preset percentage of the average rated power, or the sum of the standby power of the device and a preset margin value. Sub-step S422: Compare each power value in the filtered power data with the operating power threshold one by one; Sub-step S423: When the filtered power value is greater than the operating power threshold, the corresponding time is marked as the operating state; when the filtered power value is less than or equal to the operating power threshold, the corresponding time is marked as the non-operating state. Sub-step S424: Calculate the sum of all time slices marked as running within the current time window, and determine the sum of the time slices as the device running time; Sub-step S425: Determine the model path energy consumption value based on the average rated power and the equipment operating time.

[0087] In this embodiment of the invention, the average rated power P_rated_avg (i.e., the standard power value of the device under rated operating conditions) of the device is read from the device database, and an operating power threshold P_th is set. There are two options for setting the operating power threshold: a preset percentage of the average rated power (e.g., 10%~15% of the rated power), suitable for device types with low standby power and clear boundaries between start-up and shutdown power; or the sum of the device's standby power and a preset margin value (e.g., standby power + 5W or standby power × 1.2), suitable for devices where standby power consumption cannot be ignored. By adding the margin to the standby power, it ensures that the operation judgment will not be misjudged due to normal fluctuations in standby power. Both options can be flexibly selected according to the device type and on-site operating conditions.

[0088] Each power value in the filtered power data is compared with the operating power threshold. For each power sampling point within the current time window, the power value P_filter(t) of each sampling point is compared with the operating power threshold P_th to determine whether the device's power level at that moment meets the criteria for operating status. The operating status is marked based on the comparison result. When the filtered power value is greater than the operating power threshold (P_filter>P_th), the corresponding moment is marked as operating; when the filtered power value is less than or equal to the operating power threshold (P_filter≤P_th), the corresponding moment is marked as non-operating. If the original message reported by the DTU contains a device switch status bit (StatusFlag), the actual value of the switch status bit is used for status marking. The power threshold determination is only a backup plan when the status bit is missing, to ensure the accuracy of the operating status determination.

[0089] The sum of all time slices marked as "operating" within the current time window is calculated, and this sum is determined as the device runtime T_run. All continuous or discontinuous time segments marked as "operating" within the current time window are accumulated. For example, if the sampling period is 1 minute, there are 60 sampling points in the window, and 45 of them are marked as "operating," then T_run = 45 minutes. The model path energy consumption value is determined based on the average rated power and the device runtime, i.e., E_model = P_rated_avg × T_run. The calculation of the model path energy consumption value does not depend on the completeness or accuracy of the power data; it only needs to determine whether the device is "operating" at each moment. Even if the power value at that moment is interpolated and completed due to communication gaps, as long as the completed power value is higher than the operating power threshold, it can still be determined as being in an operating state. This allows the model path to provide stable energy consumption estimation results even under extreme conditions of severe data gaps or high noise, effectively complementing the integral path and thus ensuring the accuracy of the model path energy consumption value calculation.

[0090] Sub-step S426: For each sampling point within the current time window, multiply the power value of the sampling point by the sampling period to obtain the unit energy consumption corresponding to the sampling point; the sampling period is the time interval between adjacent sampling points. Sub-step S427: Sum the unit energy consumption corresponding to all sampling points within the current time window to obtain the integral path energy consumption value of the current time window.

[0091] In this embodiment of the invention, the filtered power time-series data contains multiple sampling points arranged at fixed time intervals, and the time interval between adjacent sampling points is the sampling period Δt. For each sampling point i within the window, the system multiplies its filtered power value P_i by the sampling period Δt to obtain the unit energy consumption E_unit_i = P_i × Δt within that time interval. For example, if the filtered power value of a sampling point is 10kW and the sampling period is 1 minute (i.e., 1 / 60 hour), then the unit energy consumption corresponding to that sampling point is 10kW × (1 / 60)h = 0.1667kWh. The meaning of this unit energy consumption is the amount of electricity consumed by the device continuously operating at that power value within the time period represented by the sampling period. Since the power is assumed to be constant (equal to the power value of the sampling point) within the time interval between adjacent sampling points, the power value of each sampling point multiplied by the length of its corresponding time interval is the energy consumption contribution within that time slice.

[0092] The integral path energy consumption value for the current time window is obtained by summing the unit energy consumption corresponding to all sampling points within the current time window. This is done by iterating through all sampling points within the current time window and summing the unit energy consumption corresponding to each sampling point, i.e., E_integ=Σ(P_i×Δt). The summation result is the integral path energy consumption value. For example, a 1-hour time window contains 60 sampling points (sampling period of 1 minute), and the summation of the unit energy consumption of each sampling point yields the total integral energy consumption within that window. Based on the power time-series data actually reported by the DTU equipment and processed by filtering, the measured cumulative power consumption is obtained by numerically integrating the power-time curve (summing the discrete sampling points). The integral path directly reflects the actual electrical energy consumed by the equipment during operation, and its accuracy directly depends on the accuracy and completeness of the reported data and the effectiveness of the filtering process. When communication quality is good, data is complete, and noise is effectively suppressed, the energy consumption value of the integral path can very accurately approximate the actual energy consumption of the device. When data is missing or contaminated, the accuracy of the integral path decreases. In this case, the proportion of the integral path in the final energy consumption is reduced by a weighting factor, and the model path compensates for this. The two paths complement each other through dynamic weight adjustment, ensuring that the optimal energy consumption estimation result can be obtained under any data quality conditions.

[0093] Reference Figure 6 The diagram shows a flowchart of a method for processing cumulative energy consumption data of a device according to an embodiment of the present invention. Figure 6 This document illustrates the complete process of an embodiment of the present invention. It involves acquiring power time-series data reported by the device and dividing it into multiple time windows according to a preset time window structure. Then, it determines the coefficient of variation of the power data within each window, generating a multi-dimensional quality evaluation index for each window. Next, it checks whether there are time segments with missing power data within each window. If no missing data is found, the original power data is used directly in subsequent steps. If missing data is found, the device's operating condition type (start-up, shutdown, or steady state) for that time segment is determined, and a power change curve template matching that operating condition is obtained from the device type operating condition feature library to perform curve fitting and completion of the missing data. Afterward, the weighting factor corresponding to each window is determined based on the multi-dimensional quality evaluation index. The energy consumption of the device within each window is calculated by combining the weighting factor with the power data within the window. Finally, the energy consumption of all windows is summed to obtain the cumulative energy consumption of the device.

[0094] In the current field of equipment energy consumption monitoring, DTU devices are widely deployed in remote metering scenarios for various electrical devices. Existing technologies typically involve DTU devices collecting power data at fixed intervals and reporting it to the cloud. The cloud then calculates cumulative power consumption by integrating the received power time-series data over time. However, because DTU devices are often deployed in industrial sites or remote areas with unstable network signals, packet loss, transmission delays, and message corruption occur frequently. This results in a large number of missing intervals in the time-series data received by the cloud, directly affecting the continuity of energy consumption integration and causing statistical results to deviate from the true value.

[0095] To address the issue of missing data, existing improvement schemes employ interpolation to fill in the missing data. The core logic is to use known data points at both ends of the missing interval as constraints, generating a numerically continuous transition curve through purely mathematical functions such as linear interpolation, Lagrange interpolation, or spline interpolation. However, these schemes only focus on the numerical smoothness of the data, ignoring the physical operating characteristics of the equipment itself. For example, when inductive loads such as motors and compressors start up, their power increases exponentially, while linear interpolation increases at a uniform slope, inevitably underestimating the starting impact energy consumption. Conversely, when shutting down, the power decreases exponentially, while linear interpolation still decreases at a uniform slope, inevitably overestimating the residual energy consumption during shutdown. After long-period integration, the interpolation results cause the cumulative power statistics to deviate significantly from the true value, and this deviation is permanently retained once included in the integration calculation, making it impossible to eliminate through subsequent filtering or smoothing. Meanwhile, existing solutions assess data quality primarily after data has been received and interpolation has been completed. They passively adjust subsequent processing strategies by statistically analyzing missing rates or noise levels. This lacks real-time perception of wireless transmission link quality and makes it impossible to predict data reliability while it is still in transit. Consequently, in weak signal environments, erroneous data is only corrected after it has already entered the integration path, resulting in high repair costs and limited effectiveness.

[0096] To address the aforementioned issues, this invention no longer employs generic pure mathematical interpolation. Instead, it introduces a "device type operating condition feature library." When data is missing, it first identifies the operating condition (start-up, shutdown, or steady state) of the equipment during the missing period. Then, it uses a power change curve template matching the physical laws of that operating condition for fitting and completion: for the start-up condition, it uses an exponentially increasing start-up transient model to accurately capture impact energy consumption; for the shutdown condition, it uses an exponentially decaying shutdown decay model to accurately reflect residual power changes; and for the steady-state condition, it uses a constant model to maintain a smooth power transition. A rated power constraint is applied to each completion point, not lower than the standby power and not higher than the allowable overload multiple of the rated power, ensuring that the interpolation result is always within the physically achievable range of the equipment. This solves the systematic cumulative bias caused by pure mathematical interpolation neglecting physical characteristics. Furthermore, by using link quality indicators such as RSSI / SNR / retransmission rate reported by the DTU physical layer, its reliability is predicted and weighting factors are proactively pre-set before the data enters the integration engine, achieving a shift from reactive post-event repair to proactive pre-event defense. By employing multi-dimensional quality evaluation indicators (completeness, stability, and reliability), the data quality of each time window is precisely assessed, ensuring that the selection of interpolation strategies and the determination of weighting factors are based on sound principles. Finally, a dual-path weighted fusion method, combining the integral path (accumulated measured data) and the model path (rated power × runtime), is used to calculate and accumulate the energy consumption for each window. This ensures that even under extreme conditions of frequent communication interruptions and significant data loss, the accumulated energy consumption results maintain high accuracy and strong robustness.

[0097] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0098] Reference Figure 7 The diagram shows a structural block diagram of a device for processing cumulative energy consumption data of an equipment according to an embodiment of the present invention. The device specifically includes the following modules: The power data acquisition module 301 is used to acquire the power time-series data reported by the device, and divide the power time-series data into multiple time windows according to a preset time window to generate power data for multiple time windows. The equipment condition determination module 302 is used to detect time segments with missing power data within each time window and determine the equipment condition type of the equipment in the time segment. The power template acquisition module 303 is used to acquire a power change curve template that matches the equipment operating condition type from a preset equipment type operating condition feature library; the equipment type operating condition feature library stores power change curve templates corresponding to different equipment operating condition types; The power data completion module 304 is used to perform curve fitting to complete the missing power data in the time segment with missing power data according to the corresponding power change curve template. The cumulative energy consumption determination module 305 is used to determine the weight factor corresponding to each time window, determine the energy consumption of the device in each time window based on the weight factor and the power data in each time window, and determine the cumulative energy consumption of the device based on the energy consumption of the device in each time window.

[0099] In some embodiments, the equipment operating condition determination module 302 includes: The power change feature determination submodule is used to identify the power change features before and after the time segment; the power change features include the power value and corresponding change trend of at least one power sampling point before the start time of the time segment, and the power value and corresponding change trend of at least one power sampling point after the end time of the time segment. The equipment operating condition type determination submodule is used to determine the equipment operating condition type of the equipment in the time segment based on the power values ​​of the power sampling points before the start time of the time segment and the power values ​​of the power sampling points after the end time of the time segment.

[0100] In some embodiments, the equipment operating condition type determination submodule includes: The operating condition type determination unit is configured to determine the device operating condition type of the device in the time segment as startup operating condition when the power value of the power sampling points before the start time of the time segment is less than or equal to the standby power threshold and the power value of the power sampling points after the end time of the time segment is greater than or equal to the operating power threshold; the standby power threshold is less than the operating power threshold; when the power value of the power sampling points before the start time of the time segment is greater than or equal to the operating power threshold and the power value of the power sampling points after the end time of the time segment is less than or equal to the standby power threshold, the device operating condition type of the device in the time segment is determined as shutdown operating condition; when the difference between the power value of the power sampling points before the start time of the time segment and the power value of the power sampling points after the end time of the time segment is less than or equal to a preset fluctuation threshold, the device operating condition type of the device in the time segment is determined as steady-state operating condition.

[0101] In some embodiments, the power data completion module 304 includes: The power curve template acquisition submodule is used to acquire the corresponding power change curve template according to the equipment operating condition type corresponding to the time segment. The power filling and completion submodule is used to generate continuous completed power values ​​and fill them into the time segment based on the power change curve template, starting from the power value at the beginning of the time segment and ending from the power value at the end of the time segment; each power value in the continuous completed power values ​​is greater than or equal to a preset power lower limit and less than or equal to a preset multiple of the rated power.

[0102] In some embodiments, the cumulative energy consumption determination module 305 includes: The coefficient of variation determination submodule is used to determine the coefficient of variation of power data within each time window; the coefficient of variation is the ratio of the standard deviation to the mean of the power data within the time window. The quality index determination submodule is used to generate multidimensional quality evaluation indicators for each time window based on the coefficient of variation. The weighting factor determination submodule is used to determine the weighting factor corresponding to each time window based on the multidimensional quality evaluation index of each time window.

[0103] In some embodiments, the weighting factor determination submodule includes: A communication quality data acquisition unit is used to acquire communication link quality data of the power timing data reported by the device; the communication link quality data includes at least one of received signal strength, signal-to-noise ratio, and current session retransmission rate. The channel health score determination unit is used to determine a channel health score based on at least one of the received signal strength, the signal-to-noise ratio, and the current session retransmission rate. The weighting factor setting unit is used to mark the data in the current time window as low-confidence data and set the weighting factor to a preset value when the channel health score is lower than a preset score threshold. The weighting factor determination unit is used to obtain the weighting factor based on the multidimensional quality evaluation index of each time window when the channel health score is higher than or equal to the preset score threshold.

[0104] In some embodiments, the weighting factor determination unit includes: The evaluation dimension value acquisition subunit is used to acquire the values ​​of each dimension in the multidimensional quality evaluation index for each time window. Each dimension includes at least one of the credibility dimension, stationarity dimension, and integrity dimension. The weighting factor determination subunit is used to determine the weighting factor based on the value of at least one of the credibility dimension, the stability dimension, and the integrity dimension.

[0105] In some embodiments, after determining the weighting factor corresponding to each time window based on the multidimensional quality evaluation index of each time window, the apparatus further includes: The weight factor detection module is used to detect whether the weight factors of each time window meet the preset weight rationality conditions; The weight factor reduction module is used to, when the weight factor does not meet the weight rationality condition, reduce the weight factor successively from the weight factor as the starting point, and re-check whether the weight rationality condition is met after each reduction, until the weight rationality condition is met or the preset maximum number of adjustments is reached. The weight factor rollback module is used to roll back to a conservative weight factor if the weight rationality condition is still not met after reaching the preset maximum number of adjustments. The weight factor preset module is used to set the weight factor of the preset number of time windows to a preset extremely low value if, after reverting to the conservative weight factor, the weight factor of the preset number of consecutive time windows still does not meet the weight rationality condition.

[0106] In some embodiments, the weight rationality conditions include at least one of the following: the deviation between the integral path energy consumption value and the model path energy consumption value within each time window is less than a preset deviation threshold; the proportion of sampling points with power exceeding the rated power within each time window is less than a preset proportion threshold; and the jump amplitude of the device energy consumption in each time window relative to the device energy consumption in the previous time window is less than a preset amplitude threshold.

[0107] In some embodiments, the cumulative energy consumption determination module 305 includes: The power data filtering submodule is used to filter the power data within each time window and generate filtered power data. The energy consumption value determination submodule is used to calculate the integral path energy consumption value and the model path energy consumption value based on the filtered power data. The integral path energy consumption value is obtained by summing the filtered power data over time, and the model path energy consumption value is determined based on the average rated power of the equipment and the operating time of the equipment. The device energy consumption determination submodule is used to multiply the integral path energy consumption value by the weight factor, and the model path energy consumption value by one minus the weight factor, and then sum them to obtain the device energy consumption within the current time window.

[0108] In some embodiments, the energy consumption value determination submodule includes: An average rated power acquisition unit is used to acquire the average rated power and operating power threshold of the device, wherein the operating power threshold is a preset percentage of the average rated power, or the sum of the standby power of the device and a preset margin value; A power data comparison unit is used to compare each power value in the filtered power data with the operating power threshold one by one. The operation status marking unit is used to mark the corresponding time as the operation status when the filtered power value is greater than the operation power threshold, and to mark the corresponding time as the non-operation status when the filtered power value is less than or equal to the operation power threshold. The device runtime determination unit is used to calculate the sum of all time slices marked as running status within the current time window and determine the sum of the time slices as the device runtime. The model path energy consumption value determination unit is used to determine the model path energy consumption value based on the average rated power and the equipment operating time.

[0109] In some embodiments, the energy consumption value determination submodule includes: The unit energy consumption determination unit multiplies the power value of each sampling point within the current time window by the sampling period to obtain the unit energy consumption corresponding to the sampling point; the sampling period is the time interval between adjacent sampling points. The integral path energy consumption value determination unit is used to sum the unit energy consumption corresponding to all sampling points within the current time window to obtain the integral path energy consumption value of the current time window.

[0110] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.

[0111] This invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the device cumulative energy consumption data processing method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0112] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described embodiments of the device cumulative energy consumption data processing method and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0113] It should be noted that, in this document, 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. Unless otherwise specified, 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 that element.

[0114] Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present invention is not limited to performing functions in the order shown or discussed. It may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0116] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. A method for processing cumulative energy consumption data of equipment, characterized in that, The method includes: Acquire the power timing data reported by the device, and divide the power timing data into multiple time windows according to a preset time window to generate power data for multiple time windows; Detect time segments within each time window that contain missing power data, and determine the device operating condition type of the device in those time segments; Obtain a power change curve template that matches the equipment operating condition type from a preset equipment type operating condition feature library; the equipment type operating condition feature library stores power change curve templates corresponding to different equipment operating condition types; For time segments with missing power data, curve fitting is performed to complete the missing power data within the time segment based on the corresponding power change curve template; Determine the weighting factor corresponding to each time window, determine the energy consumption of the device within each time window based on the weighting factor and the power data within each time window, and determine the cumulative energy consumption of the device based on the energy consumption of the device within each time window.

2. The method for processing cumulative energy consumption data of equipment according to claim 1, characterized in that, Determining the device operating condition type of the device during the time segment includes: Identify the power change characteristics before and after the time segment; the power change characteristics include the power value and corresponding change trend of at least one power sampling point before the start time of the time segment, and the power value and corresponding change trend of at least one power sampling point after the end time of the time segment; Based on the power values ​​of the power sampling points before the start time of the time segment and the power values ​​of the power sampling points after the end time of the time segment, the device operating condition type of the device in the time segment is determined.

3. The method for processing cumulative energy consumption data of equipment according to claim 2, characterized in that, Determining the device operating condition type for the time segment based on the power values ​​of power sampling points before the start time of the time segment and the power values ​​of power sampling points after the end time of the time segment includes: If the power value of the power sampling points before the start time of the time segment is less than or equal to the standby power threshold, and the power value of the power sampling points after the end time of the time segment is greater than or equal to the operating power threshold, the device operating condition type of the device in the time segment is determined to be the startup condition; the standby power threshold is less than the operating power threshold. If the power value of the power sampling point before the start time of the time segment is greater than or equal to the operating power threshold, and the power value of the power sampling point after the end time of the time segment is less than or equal to the standby power threshold, the device operating condition type of the device in the time segment is determined to be a shutdown condition. If the difference between the power value of the power sampling point before the start time of the time segment and the power value of the power sampling point after the end time of the time segment is less than or equal to a preset fluctuation threshold, the device operating condition type of the device in the time segment is determined to be a steady-state operating condition.

4. The method for processing cumulative energy consumption data of equipment according to claim 1, characterized in that, The step of curve fitting and completion of missing power data within the time segment based on the corresponding power change curve template includes: Obtain the corresponding power change curve template based on the equipment operating condition type corresponding to the time segment; Based on the power change curve template, continuous power values ​​are generated and filled into the time segment, starting from the power value at the beginning of the time segment and ending from the power value at the end of the time segment; each power value in the continuous power values ​​is greater than or equal to a preset power lower limit and less than or equal to a preset multiple of the rated power.

5. The method for processing cumulative energy consumption data of equipment according to claim 1, characterized in that, The determination of the weighting factor corresponding to each time window includes: Determine the coefficient of variation of the power data within each time window; the coefficient of variation is the ratio of the standard deviation to the mean of the power data within the time window. Based on the coefficient of variation, generate multidimensional quality evaluation indicators for each time window; The weighting factor for each time window is determined based on the multidimensional quality evaluation index for each time window.

6. The method for processing cumulative energy consumption data of equipment according to claim 5, characterized in that, The step of determining the weighting factor corresponding to each time window based on the multidimensional quality evaluation index of each time window includes: Acquire communication link quality data from the power timing data reported by the device; the communication link quality data includes at least one of received signal strength, signal-to-noise ratio, and current session retransmission rate. A channel health score is determined based on at least one of the received signal strength, the signal-to-noise ratio, and the current session retransmission rate; When the channel health score is lower than the preset score threshold, the data in the current time window is marked as low confidence data, and the weight factor is set to a preset value; When the channel health score is higher than or equal to the preset score threshold, the weighting factor is obtained according to the multidimensional quality evaluation index of each time window.

7. The method for processing cumulative energy consumption data of equipment according to claim 6, characterized in that, The step of obtaining the weighting factor based on the multidimensional quality evaluation index for each time window includes: Obtain the values ​​of each dimension in the multidimensional quality evaluation index for each time window, wherein each dimension includes at least one of the credibility dimension, stationarity dimension, and integrity dimension; The weighting factor is determined based on the value of at least one of the credibility dimension, the stability dimension, and the integrity dimension.

8. The method for processing cumulative energy consumption data of equipment according to claim 5, characterized in that, After determining the weighting factor corresponding to each time window based on the multidimensional quality evaluation index for each time window, the method further includes: Check whether the weight factors for each time window meet the preset weight rationality conditions; If the weight factor does not meet the weight rationality condition, starting from the weight factor, the weight factor is reduced successively. After each reduction, the weight factor is re-checked to see if the weight rationality condition is met, until the weight rationality condition is met or the preset maximum number of adjustments is reached. If the weight rationality condition is still not met after reaching the preset maximum number of adjustments, then it will revert to the conservative weight factor. If, after reverting to the conservative weighting factor, the weighting factor for a consecutive preset number of time windows still does not meet the weighting rationality condition, then the weighting factor for the preset number of time windows is set to a preset extremely low value.

9. The method for processing cumulative energy consumption data of equipment according to claim 8, characterized in that, The weighting rationality conditions include at least one of the following: the deviation between the integral path energy consumption value and the model path energy consumption value within each time window is less than a preset deviation threshold; the proportion of sampling points with power exceeding the rated power within each time window is less than a preset proportion threshold; and the jump amplitude of the device energy consumption in each time window relative to the device energy consumption in the previous time window is less than a preset amplitude threshold.

10. The method for processing cumulative energy consumption data of equipment according to claim 1, characterized in that, The step of determining the energy consumption of the device within each time window based on the weighting factor and the power data within each time window includes: The power data within each time window is filtered to generate filtered power data. Based on the filtered power data, the integral path energy consumption value and the model path energy consumption value are calculated respectively. The integral path energy consumption value is obtained by summing the filtered power data over time, and the model path energy consumption value is determined based on the average rated power of the equipment and the operating time of the equipment. The energy consumption of the device within the current time window is obtained by multiplying the integral path energy consumption value by the weight factor, multiplying the model path energy consumption value by one and subtracting the weight factor, and then summing the results.

11. The method for processing cumulative energy consumption data of equipment according to claim 10, characterized in that, The calculation of the model path energy consumption value includes: The average rated power and operating power threshold of the device are obtained, wherein the operating power threshold is a preset percentage of the average rated power, or the sum of the standby power of the device and a preset margin value; Each power value in the filtered power data is compared with the operating power threshold one by one; When the filtered power value is greater than the operating power threshold, the corresponding time is marked as the operating state; when the filtered power value is less than or equal to the operating power threshold, the corresponding time is marked as the non-operating state. The sum of all time slices marked as running within the current time window is calculated, and the sum of the time slices is determined as the device runtime. The model path energy consumption value is determined based on the average rated power and the equipment operating time.

12. The method for processing cumulative energy consumption data of equipment according to claim 10, characterized in that, The calculation of the energy consumption value of the integration path includes: For each sampling point within the current time window, the power value of the sampling point is multiplied by the sampling period to obtain the unit energy consumption corresponding to the sampling point; the sampling period is the time interval between adjacent sampling points. The integral path energy consumption value for the current time window is obtained by summing the unit energy consumption of all sampling points within the current time window.

13. A device for processing cumulative energy consumption data of equipment, characterized in that, The device includes: The power data acquisition module is used to acquire the power time-series data reported by the device, and divide the power time-series data into multiple time windows according to a preset time window to generate power data for multiple time windows. The equipment condition determination module is used to detect time segments with missing power data within each time window and determine the equipment condition type of the equipment in the time segment. The power template acquisition module is used to acquire a power change curve template that matches the equipment operating condition type from a preset equipment type operating condition feature library; the equipment type operating condition feature library stores power change curve templates corresponding to different equipment operating condition types; The power data completion module is used to perform curve fitting to complete the missing power data in a time segment with missing power data, based on the corresponding power change curve template. The cumulative energy consumption determination module is used to determine the weight factor corresponding to each time window, determine the energy consumption of the device in each time window based on the weight factor and the power data in each time window, and determine the cumulative energy consumption of the device based on the energy consumption of the device in each time window.

14. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the device cumulative energy consumption data processing method as described in any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the device cumulative energy consumption data processing method as described in any one of claims 1-12.