Electric energy metering control method and system, storage medium and program product
By collecting the power supply bus and equipment instruction sequence, dividing the metering period and decomposing the power consumption, the problem of accurate metering and dynamic monitoring of electrical equipment in traditional electricity metering methods is solved, and high-accuracy electricity metering is achieved.
Patent Information
- Application Number
- CN202510931011.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-10-17
AI Technical Summary
Traditional electricity metering methods cannot achieve accurate measurement and dynamic monitoring of individual electrical equipment. Especially when multiple machine tools of the same model are running at the same time, deep learning models can easily confuse electricity consumption, reducing the accuracy of electricity consumption decomposition.
By collecting the total power consumption data of the power supply bus and the working instruction sequence of the equipment control system, the time point of the equipment's working mode switching is determined, the total power consumption data is divided into multiple metering periods, and the total power consumption data of each metering period is decomposed based on the power consumption allocation weight. Combined with the power consumption characteristic equation and linear/segmented interpolation method, the accuracy and reliability of metering are improved.
It accurately reflects the actual power consumption of each device under different working conditions, dynamically adjusts the distribution plan, adapts to changes in equipment performance and environment, reduces metering errors, and improves the accuracy and reliability of electricity metering.
Smart Images

Figure CN120801808A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of electric energy metering, and particularly relates to an electric energy metering control method and system, a storage medium and a program product. BACKGROUND
[0002] With the continuous growth of energy demand, the demand for accurate electric energy metering and intelligent control is increasingly urgent. Traditional electric energy metering control methods can usually only obtain total power consumption data of power consumption equipment, and cannot realize accurate metering and dynamic monitoring of power consumption of individual power consumption equipment, which makes it difficult for users to grasp the real-time power consumption of each power consumption equipment, and is not conducive to power consumption management and energy saving and emission reduction.
[0003] In related technologies, a non-intrusive load decomposition technology based on deep learning is usually used. This technology installs high-precision sampling devices on the power supply bus to collect electrical characteristic signals such as voltage and current, and uses a deep neural network to analyze and process these characteristic signals to realize identification of power consumption characteristics and power consumption decomposition of different power consumption equipment. This technology has been applied in the equipment power consumption management of large industrial parks, and can perform sub-item statistics on the power consumption of high-power equipment such as machine tools and air compressors on the production line.
[0004] However, when multiple same model machine tool equipment is running at the same time, the electrical characteristics of these equipment are highly similar, and the work cycles and processed workpieces of each equipment are different, which causes the deep learning model to easily confuse the power consumption of different machine tools when performing power consumption decomposition, thereby reducing the accuracy of power consumption decomposition. SUMMARY
[0005] The application provides an electric energy metering control method, system, storage medium and program product, which can improve the accuracy of power consumption decomposition.
[0006] In a first aspect, the application provides an electric energy metering control method, which collects total power consumption data of a power supply bus and work instruction sequences of each device in a device control system, and the work instruction sequence includes the type and execution time of a machining instruction; determines the work mode switching time points of each device, the work mode being a running state corresponding to the execution of different types of machining instructions by the device; divides the total power consumption data into multiple metering periods according to the work mode switching time points; matches the work mode of each device in each metering period with a standard power consumption ratio in a preset work mode power consumption ratio library to obtain a power consumption allocation weight; decomposes the total power consumption data of each metering period based on the power consumption allocation weight to obtain the power consumption of each device.
[0007] By adopting the technical scheme, the power consumption data of the power supply bus and the working instruction sequence of each device in the device control system are collected, so that the power consumption data of the whole system and the specific working state information of each device are obtained. According to the processing instruction type and the execution time in the working instruction sequence, the working mode switching time point of the device can be accurately judged, so that the power consumption data is divided into multiple measurement time periods. In each measurement time period, by matching the actual working mode of each device with the standard power consumption ratio in the preset working mode power consumption ratio library, the distribution weight reflecting the power consumption contribution degree of each device is obtained. Based on the distribution weight, the power consumption data of each measurement time period is decomposed, so that the actual power consumption of each device can be calculated, the real power consumption of each device under different working states can be more accurately reflected, and the accuracy and reliability of the electric energy measurement are improved.
[0008] In combination with some embodiments of the first aspect, in some embodiments, the working mode switching time point of each device is determined, specifically comprising: obtaining the start execution time and the end execution time of each processing instruction; when the types of the adjacent two processing instructions are different, determining the start execution time of the latter processing instruction as the working mode switching time point; when it is detected that the device is switched from the running state to the idle state, determining the time of the switching as the working mode switching time point.
[0009] By adopting the technical scheme, the start and end execution times of each processing instruction are obtained, and when the types of the adjacent two processing instructions are different, the start execution time of the latter instruction is determined as the working mode switching time point, and the case that the device is switched from the running state to the idle state is also considered. This refined working mode switching time point determination method enables the system to capture all state changes of the device in the actual running process. By accurately identifying the switching time of the working mode, the power consumption data can be more accurately divided into different measurement time periods, and the working state of the device in each measurement time period is stable, which reduces the electric energy distribution error caused by inaccurate working mode switching, improves the accuracy of the power consumption distribution, and makes the finally calculated power consumption of each device closer to the actual value.
[0010] In combination with some embodiments of the first aspect, in some embodiments, after the power consumption of each device is obtained by decomposing the power consumption data of each measurement time period based on the power consumption distribution weight, the method further comprises: determining a single device running time period, the single device running time period being a time period in which only one device switches the working mode in the measurement time period; obtaining the power consumption variation in the single device running time period; establishing an electric energy characteristic equation of the working mode according to the power consumption variation. The standard power consumption ratio is corrected by using the power consumption characteristic equation to obtain a corrected power consumption ratio. The step of decomposing the total power consumption data of each metering period based on the power consumption allocation weight is re-executed using the corrected power consumption ratio to obtain the corrected power consumption of each device.
[0011] By adopting the above technical solution, the power consumption characteristic equation of the working mode is established by identifying the single device running period and obtaining the total power consumption change in these periods, thereby realizing dynamic correction of the standard power consumption ratio. Since only one device undergoes working mode switching in the single device running period, the change in total power consumption can accurately reflect the actual power consumption characteristics of the device under a specific working mode. By re-executing the power allocation calculation using the corrected power consumption ratio, the system can adapt to changes in power consumption characteristics caused by factors such as changes in device performance over time and changes in environmental conditions, dynamically adjust the allocation scheme, and continuously maintain high metering accuracy.
[0012] In combination with some embodiments of the first aspect, in some embodiments, the power consumption characteristic equation is: ; In the above equation, is the total power consumption change in the i-th single device running period, is the reference power consumption characteristic coefficient, is the standard power consumption ratio of the device switching working mode in the i-th single device running period, , , is the preset correction coefficient, is the device running time in the i-th single device running period, is the device load rate in the i-th single device running period, is the device running frequency in the i-th single device running period.
[0013] By adopting the above technical solution, multiple key factors affecting device power consumption are comprehensively considered, including the standard power consumption ratio, running time, load rate, and running frequency. Each parameter term in the equation is combined through multiplication and addition to reflect the comprehensive influence of these factors on power consumption. The establishment of this mathematical model provides a scientific basis for quantitative analysis of power consumption characteristics and improves the accuracy of power consumption allocation.
[0014] In combination with some embodiments of the first aspect, in some embodiments, after the total power consumption data is divided into multiple metering periods according to the working mode switching time point, the method further comprises: obtaining total power consumption data in a first time window at the metering period boundary point, the first time window being a fixed time length extending forward and backward from the metering period boundary point; calculating a change rate of the total power consumption data in the first time window; linearly interpolating the total power consumption data at the metering period boundary point according to the change rate; updating the division result of the metering period using the interpolated total power consumption data.
[0015] By adopting the above technical solution, by obtaining the total power consumption data in the first time window at the metering period boundary point, calculating the change rate of the total power consumption data in the time window, and linearly interpolating the total power consumption data at the metering period boundary point according to the change rate, the discontinuity of the total power consumption data at the metering period boundary point caused by the data sampling interval can be eliminated. This linear interpolation method based on the change rate considers the change trend of the total power consumption in the time dimension, so that the interpolation result is more in line with the actual power consumption change law. By updating the division result of the metering period using the interpolated total power consumption data, the accuracy of the metering period division is improved, and the metering error caused by the data discontinuity is reduced.
[0016] In combination with some embodiments of the first aspect, in some embodiments, after updating the division result of the metering period using the interpolated total power consumption data, the method further comprises: calculating a second-order change rate of the total power consumption data in the first time window; when the absolute value of the second-order change rate is greater than a preset threshold, determining that the total power consumption data at the metering period boundary point has a nonlinear change; recomputing the total power consumption data at the metering period boundary point using a piecewise interpolation method.
[0017] By adopting the above technical solution, by calculating the second-order change rate of the total power consumption data in the first time window and comparing its absolute value with a preset threshold, the nonlinear change characteristics of the total power consumption data at the metering period boundary point can be identified. When the nonlinear change is detected, the total power consumption data at the metering period boundary point is recomputed using a piecewise interpolation method, and the piecewise interpolation method is used to process the nonlinear change data, so that the interpolation result is closer to the actual power consumption change trend, and the restoration accuracy of the total power consumption data at the metering period boundary point is improved.
[0018] In combination with some embodiments of the first aspect, in some embodiments, recomputing the total power consumption data at the metering period boundary point using the piecewise interpolation method specifically comprises: dividing the first time window into a plurality of sub-time windows; respectively calculating the change rate of the total power consumption data in each sub-time window; The total power consumption data at the metering period boundary point is segmented and linearly interpolated based on the change rate of each sub-time window.
[0019] By adopting the technical solution, the first time window is divided into multiple sub-time windows, the change rate of the total power consumption data in each sub-time window is calculated respectively, and the segmented linear interpolation is performed based on the local change rates, so that the interpolation process can more finely depict the change characteristics of the total power consumption on different time scales, and the expression ability of the interpolation result to the local power consumption characteristics is improved by analyzing the change law of the total power consumption on a smaller time scale.
[0020] In a second aspect, the embodiments of the present application provide an electric energy metering control system, comprising: one or more processors and a memory; the memory is coupled with the one or more processors, and the memory is configured to store computer program codes, the computer program codes comprising computer instructions, and the one or more processors invoke the computer instructions to enable the system to perform the method described in the first aspect and any possible implementation manner of the first aspect.
[0021] In a third aspect, the embodiments of the present application provide a computer readable storage medium, comprising instructions, when the instructions run on a system, enable the system to perform the method described in the first aspect and any possible implementation manner of the first aspect.
[0022] In a fourth aspect, the embodiments of the present application provide a computer program product, when the computer program product runs on a system, enable the system to perform the method described in any possible implementation manner of the first aspect.
[0023] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The present application provides an electric energy metering control method, by collecting the total power consumption data of the power supply bus and the working instruction sequence of each device in the device control system, the total power consumption data of the system and the specific working state information of each device can be obtained. According to the processing instruction type and the execution time in the working instruction sequence, the working mode switching time point of the device can be accurately judged, so as to divide the total power consumption data into multiple metering periods. In each metering period, by matching the actual working mode of each device with the standard power consumption ratio in the preset working mode power consumption ratio library, the distribution weight reflecting the power consumption contribution degree of each device is obtained. Based on the distribution weight, the total power consumption data of each metering period is decomposed, the actual power consumption of each device can be calculated, the real power consumption of each device under different working states can be more accurately reflected, and the accuracy and reliability of electric energy metering are improved.
[0024] 2、The application provides an electric energy metering control method, which identifies single device operation time periods and obtains total power consumption changes in the time periods, establishes a power consumption characteristic equation of a working mode, and thus realizes dynamic correction of a standard power consumption ratio. Since only one device undergoes working mode switching in the single device operation time period, the total power consumption change can accurately reflect actual power consumption characteristics of the device in a specific working mode. By using the corrected power consumption ratio to perform electric energy distribution calculation again, the system can adapt to power consumption characteristic changes caused by factors such as changes in device performance over time and changes in environmental conditions, dynamically adjusts the distribution scheme, and continuously maintains high metering accuracy.
[0025] 3、The application provides an electric energy metering control method, which obtains total power consumption data in a first time window at a metering time period boundary point, calculates a change rate of the total power consumption data in the time window, and performs linear interpolation on the total power consumption data at the metering time period boundary point according to the change rate, so as to eliminate discontinuity of the total power consumption data at the metering time period boundary point caused by data sampling intervals. The linear interpolation method based on the change rate considers the change trend of the total power consumption in the time dimension, so that the interpolation result is more in line with the actual power consumption change law. By using the interpolated total power consumption data to update the division result of the metering time period, the accuracy of metering time period division is improved, and metering errors caused by data discontinuity are reduced. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 FIG. 1 is a flowchart of an electric energy metering control method in an embodiment of the application.
[0027] Figure 2 FIG. 2 is a flowchart of an optimization processing method for total power consumption data at a metering time period boundary point in an embodiment of the application.
[0028] Figure 3 FIG. 3 is a schematic diagram of an entity device structure of an electric energy metering control system provided in an embodiment of the application. DETAILED DESCRIPTION
[0029] The terms used in the following embodiments of the application are only for the purpose of describing specific embodiments and are not intended to be limiting on the application. As used in the specification and the appended claims of the application, the singular forms "a," "an," and "the" are intended to include both singular and plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or" used in the application means any or all possible combinations of one or more of the listed items.
[0030] Hereinafter, the terms "first", "second", "third", "fourth", "fifth", "sixth", "seventh" and "eighth" are merely used for descriptive purposes and cannot be understood as indicating or implying relative importance or implying a specific number of the technical features indicated. Therefore, the features defined with "first", "second", "third", "fourth", "fifth", "sixth", "seventh" and "eighth" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.
[0031] The following will be described by using an embodiment and in combination with Figure 1 The present application describes an electric energy metering control method. Please refer to Figure 1 The present application describes an electric energy metering control method.
[0032] S101, collect the total power consumption data of the power supply bus and the working instruction sequence of each device in the device control system; The system collects the total power consumption data of the power supply bus and the working instruction sequence of each device in the device control system. The working instruction sequence includes the type and execution time of the processing instruction.
[0033] In this step, the system acquires the overall power consumption of the entire system by collecting the total power consumption data of the power supply bus. At the same time, the system also collects the working instruction sequence of each device in the device control system to know the specific working state of each device. The working instruction sequence includes the type and execution time of the processing instruction, reflecting the specific tasks executed by the device at different times. The system can collect these data through various sensors, meters, communication interfaces and other ways, which are not limited here.
[0034] The system can install an electric energy metering device on the power supply bus to measure and record the current, voltage and other parameters of the power supply bus in real time, calculate the total power consumption data, and transmit the data to the data processing unit of the system.
[0035] The system can establish a communication connection with the device control system and regularly read the working instruction sequence of each device from the device control system. The working instruction sequence can include the type, start execution time and end execution time of the instruction. The system parses and stores the read instruction sequence for subsequent analysis and use.
[0036] In actual application, the power consumption data of the power supply bus and the working instruction sequence of the device may not be synchronized, that is, the collection frequency and time stamp of the two are not completely consistent, resulting in deviation in subsequent analysis. To solve this problem, the system can perform time alignment processing on the power consumption data and the instruction sequence data. Specifically, the system can select a suitable time window to aggregate the power consumption data and the instruction sequence falling within the same time window, so that their time stamps are consistent.
[0037] S102, determine the working mode switching time point of each device; The system determines the working mode switching time point of each device, and the working mode is the running state corresponding to the device executing different types of processing instructions. Specifically, the system obtains the start execution time and the end execution time of each processing instruction; when the types of two adjacent processing instructions are determined to be different, the start execution time of the latter processing instruction is determined as the working mode switching time point; when it is detected that the device switches from the running state to the idle state, the time of the switching is determined as the working mode switching time point.
[0038] The working mode refers to the running state corresponding to the device executing different types of processing instructions. By analyzing the type difference of adjacent instructions and the switching of the device running and idle, the system can obtain the change time of the device working mode, which provides a basis for subsequent power consumption decomposition. Different working modes may correspond to different power consumption characteristics, so accurately determining the working mode switching time point is one of the key steps of the method, which is not limited here.
[0039] The system sorts the working instruction sequence of the device according to time, and traverses each instruction. The type of the current instruction is compared with the type of the previous instruction, and if the types are different, the start time of the current instruction is marked as a working mode switching time point.
[0040] The system monitors the real-time running state of the device, and when it is detected that the device switches from running to idle or from idle to running, the state switching time is also marked as a working mode switching time point.
[0041] In actual production, the working instructions of the device may have temporary repetition or frequent switching, resulting in too dense working mode switching time points, which is not conducive to subsequent analysis. To solve this problem, the system can introduce a working mode stable time threshold. When the interval between two adjacent switching time points is less than the threshold, the system can combine them into the same working mode. The size of the threshold can be set according to the type of the device and the characteristics of the production process.
[0042] S103, divide the total power consumption data into multiple measurement periods according to the working mode switching time point; The system divides the total power consumption data collected by S101 into multiple measurement periods using the working mode switching time points determined by S102. In each measurement period, the working mode of each device remains unchanged. Through this division, the system can slice the total power consumption according to the change of the device working mode, preparing for the subsequent decomposition of the power consumption of each device. The division granularity of the measurement period can be adjusted according to actual needs, which is not limited here.
[0043] The system sorts the operating mode switching time points chronologically to form a time point sequence. The time interval between two adjacent switching time points is used as a metering period. Within each metering period, the total electricity consumption data is captured as an independent segment.
[0044] When dividing metering periods, the system can set a minimum period length threshold. If the interval between two adjacent working mode switching time points is less than the threshold, the time interval between them will be merged into the previous or next metering period to avoid metering periods that are too short.
[0045] In some cases, the frequency of total electricity consumption data collection may be lower than the frequency of operating mode switching, resulting in multiple operating modes being included in a single metering period. To improve the accuracy of the decomposition, the system can further subdivide such metering periods. For example, the system can assume that the time spent in each operating mode is evenly distributed within the metering period and distribute the total electricity consumption proportionally to each operating mode. Alternatively, the system can fit the electricity consumption based on the typical electricity consumption curve of each operating mode to estimate the time and electricity consumption of each operating mode.
[0046] S104: Match the working mode of each device in each metering period with the standard power consumption ratio in the preset working mode power consumption ratio library to obtain the power consumption allocation weight; In this step, the system matches the actual operating mode of the device during each metering period with a pre-set operating mode power usage ratio database to determine the power usage weight for each device during that period. The operating mode power usage ratio database records the standard power usage ratios for devices under various operating modes and can be obtained through historical data analysis or expert experience. The matching results reflect the contribution of each device to total power consumption, providing a basis for decision-making on the final power consumption breakdown.
[0047] The system traverses each metering period and extracts the operating mode of each device during that period. It then searches the operating mode power usage ratio database for the corresponding standard power usage ratio to form a set of weight vectors. If there is no exact match in the database, the system finds the most similar operating mode combination to approximate the weight vector.
[0048] When matching, the system can consider the impact of factors such as the device's rated power and energy efficiency rating on power usage. The system can establish multiple sets of proportional relationships for devices of different specifications in the power usage ratio database and select the corresponding records during matching. Furthermore, the system can dynamically update the power usage ratio database using an online learning algorithm to adapt to changes in device characteristics.
[0049] In practical applications, the actual power consumption ratio of the equipment may be affected by production process parameters, raw material characteristics, environmental conditions and other factors, and there is a certain deviation from the standard library, which affects the decomposition accuracy. To solve this problem, the system can introduce a power consumption ratio self-adaptive correction mechanism. Specifically, the system can obtain the actual power consumption of the equipment using the shunt metering device, compare it with the decomposition result, and form an error feedback. The system automatically adjusts the matching strategy or updates the ratio library according to the error size, so that the decomposition result continuously approaches the actual power consumption situation.
[0050] S105, based on the power consumption allocation weight, decomposing the total power consumption data of each metering period to obtain the power consumption of each device.
[0051] In this step, the system decomposes the total power consumption of each metering period using the power consumption allocation weight obtained in S104, thereby obtaining the power consumption of each device at different time periods. The decomposition process is realized by weighted allocation, that is, the power consumption of the device is equal to the product of the total power consumption and the weight of the device. The sum of the power consumption of each device is equal to the total power consumption, which embodies the principle of energy conservation. Through decomposition, the system ultimately obtains the cumulative power consumption and power consumption curve of each device within the entire analysis period, providing data support for subsequent energy efficiency management and optimization control.
[0052] The system iterates through each metering period, reads the total power consumption data and the power consumption weight of each device in the period. The total power consumption is multiplied element by element with the weight vector to obtain the power consumption of the device in the period. The power consumption of each device in each period is accumulated to obtain the cumulative power consumption of the device.
[0053] In the calculation process, the system can use matrix operation to process data in batches, improving the calculation efficiency. At the same time, the system can visualize the decomposition results in the form of charts, reports and other forms to help users intuitively understand the energy consumption of the device.
[0054] For some high-power devices, their power consumption may fluctuate or pulse instantaneously, causing the decomposition result to be abnormally high. To improve the robustness of the decomposition result, the system can introduce a smoothing filter mechanism. Specifically, the system can perform sliding average or median filtering on the power consumption curve of the device to remove short-term disturbances and spike noise. At the same time, the system can also set reasonable upper and lower threshold values to truncate or limit the power consumption data that exceeds the threshold value, avoiding the influence of individual outliers on the overall decomposition accuracy.
[0055] In the above embodiment, by collecting the total power consumption data of the power supply bus and the working instruction sequence of each device in the device control system, the overall power consumption data of the system and the specific working state information of each device can be obtained. According to the processing instruction type and the execution time in the working instruction sequence, the working mode switching time point of the device can be accurately judged, so as to divide the total power consumption data into multiple measurement periods. In each measurement period, by matching the actual working mode of each device with the standard power consumption ratio in the preset working mode power consumption ratio library, the distribution weight reflecting the power consumption contribution degree of each device is obtained. Based on the distribution weight, the total power consumption data of each measurement period is decomposed, and the actual power consumption of each device can be calculated, which can more accurately reflect the real power consumption of each device under different working states, and improve the accuracy and reliability of the power measurement.
[0056] Further, in another embodiment, after the total power consumption data of each measurement period is decomposed based on the power consumption distribution weight to obtain the power consumption of each device, the system further determines a single device running period, the single device running period being a period in which only one device switches working mode in the measurement period; obtain the total power consumption change amount in the single device running period; establish a power consumption characteristic equation of the working mode according to the total power consumption change amount; correct the standard power consumption ratio using the power consumption characteristic equation to obtain the corrected power consumption ratio; re-execute the step of decomposing the total power consumption data of each measurement period based on the power consumption distribution weight using the corrected power consumption ratio, to obtain the corrected power consumption of each device.
[0057] wherein the power consumption characteristic equation is: ; In the above equation, is the total power consumption change amount in the i-th single device running period, and is a reference power consumption characteristic coefficient, is the standard power consumption ratio of the device switching working mode in the i-th single device running period, , and is a preset correction coefficient, is the device running time in the i-th single device running period, is the device load rate in the i-th single device running period, is the device running frequency in the i-th single device running period.
[0058] In the metering period, the system further identifies a period in which only one device switches its working mode, and defines it as a single-device running period. In the single-device running period, the total power consumption change can directly reflect the power consumption characteristics of the device in different working modes, providing favorable conditions for establishing the power consumption characteristic equation.
[0059] For each single-device running period, the system calculates the change in the total power consumption in the period, i.e., the difference between the total power consumption at the end of the period and the total power consumption at the beginning of the period. The change reflects the actual power consumption of the single device in the period.
[0060] Using the information of the single-device running period, the system establishes a power consumption characteristic equation of the working mode. The equation introduces parameters such as the standard power consumption ratio of the device, the running time, the load rate, and the running frequency to characterize the quantitative relationship between the power consumption of the device in the working mode and these factors. Meanwhile, the equation also contains a baseline power consumption characteristic coefficient and a preset correction coefficient to adjust the fitting accuracy of the equation.
[0061] Through mathematical tools such as the least squares method, the system solves the power consumption characteristic equation to obtain the optimized values of the baseline power consumption characteristic coefficient and the preset correction coefficient, so that the power consumption change calculated by the equation is as close as possible to the actual value. Then, the system uses the optimized equation to correct the standard power consumption ratio to obtain a more accurate power consumption ratio value.
[0062] The system uses the corrected power consumption ratio to re-execute the step of decomposing the total power consumption data of each metering period based on the power consumption allocation weight to obtain more accurate power consumption estimates of each device.
[0063] In the above embodiment, by identifying the single-device running period and obtaining the total power consumption change in these periods, the method establishes a power consumption characteristic equation of the working mode, thereby realizing dynamic correction of the standard power consumption ratio. Since only one device switches its working mode in the single-device running period, the change in the total power consumption can accurately reflect the actual power consumption characteristics of the device in a specific working mode. By using the corrected power consumption ratio to re-calculate the power allocation, the system can adapt to changes in power consumption characteristics caused by changes in device performance over time, changes in environmental conditions, and other factors, dynamically adjust the allocation scheme, and continuously maintain high metering accuracy.
[0064] On the basis of the above embodiment, in order to further improve the accuracy of power metering, the present application also provides an optimization processing method for the total power consumption data at the metering period boundary. Since the switching of the working state of the device in the actual production process is often accompanied by dynamic changes in power consumption, and such changes may exhibit complex nonlinear characteristics, it is necessary to process the total power consumption data at the metering period boundary more finely. The following will be described in combination withFigure 2 An optimization processing method for total power consumption data at the boundary point of a metering period is described in the embodiments of the present application: Please refer to Figure 2 A flowchart of the optimization processing method for total power consumption data at the boundary point of a metering period is shown in the embodiments of the present application.
[0065] S201, obtaining total power consumption data in a first time window at each boundary point of a metering period; The system obtains total power consumption data in a first time window at each boundary point of a metering period. The first time window is a fixed length of time extending forward and backward from the boundary point of the metering period. In this step, the system first determines the boundary point of each metering period, i.e. the switching time of two adjacent metering periods. Then, a certain length of time is extended forward and backward from each boundary point to form a first time window. The system obtains the total power consumption data in the first time window as the input for subsequent interpolation calculation. The length of the first time window can be set according to factors such as data sampling frequency and device power consumption characteristics to ensure sufficient data samples while avoiding the introduction of too much irrelevant data, which is not limited here.
[0066] The system can set the length of the first time window to a fixed value, such as 1 minute, 5 minutes, etc. According to the preset window length, the system intercepts the total power consumption data before and after the boundary point of the metering period to obtain the data sequence in the first time window.
[0067] The system can also determine the length of the first time window in an adaptive manner. For example, the system can dynamically adjust the length of the time window according to the real-time power consumption of the device, the power consumption rate, and other indicators. When the device is in a low-power, stable operation state, the time window can be appropriately lengthened to obtain more data samples; when the device is in a high-power, rapidly changing state, the time window can be shortened to improve the timeliness of the data.
[0068] S202, calculating the rate of change of total power consumption data in the first time window; In this step, the system calculates the rate of change of total power consumption data in the first time window based on the obtained total power consumption data in the first time window. The rate of change reflects the speed and trend of the change of total power consumption in the time dimension and can be an important reference for subsequent interpolation calculation. By analyzing the size and sign of the rate of change, the system can determine the growth or decline trend of the total power consumption and the degree of change. The calculation of the rate of change can use various numerical methods such as difference method, least squares method, etc., which are not limited here.
[0069] The system can calculate the rate of change using the forward difference method. For each data point within the first time window, the system calculates the difference in total power consumption between it and the previous data point, and then divides by the time interval between the adjacent data points to obtain the rate of change at that data point.
[0070] The system can also fit the rate of change using the least squares method. The system constructs the total power consumption data within the first time window and the corresponding timestamps into a scatter point set, and then fits the scatter point set using a first-order polynomial, and the slope of the fitting function is the estimated value of the rate of change.
[0071] S203, linearly interpolating the total power consumption data at the metering period boundary point according to the rate of change; In this step, the system uses the rate of change of the total power consumption data within the first time window to linearly interpolate the total power consumption data at the metering period boundary point. Since the actual collected total power consumption data is usually discrete, and the interval between data points may not be uniform, resulting in discontinuity of data at the metering period boundary point. Linear interpolation establishes a linear relationship between adjacent data points to estimate the total power consumption value at the boundary point, thereby achieving smooth transition of data. In interpolation calculation, the rate of change serves as the slope parameter, which determines the trend of the interpolation function. By reasonably selecting the position and number of interpolation points, a more accurate interpolation result can be obtained, which is not limited here.
[0072] The system can use a two-point linear interpolation method. For the metering period boundary point, the system first finds the two nearest data points within the first time window, and then constructs a first-order function according to the values of the two data points and the corresponding rate of change. By substituting the timestamp of the boundary point into the function, the estimated value of the total power consumption at the boundary point can be calculated.
[0073] The system can also use a piecewise linear interpolation method. The system divides the first time window into multiple subintervals, and uses a two-point linear interpolation in each subinterval. At the boundary between adjacent subintervals, the system smoothes the interpolation results by weighted averaging or other methods to ensure the continuity of the interpolation function within the entire time window.
[0074] S204, updating the metering period division result using the interpolated total power consumption data; In this step, the system uses the interpolated total power consumption data to update and correct the original metering period division result. Since interpolation data is introduced at the metering period boundary point, the original boundary point position may change, and the corresponding metering period boundary also needs to be adjusted. By updating the metering period division, the data discontinuity at the boundary point can be eliminated, and the consistency and integrity of the data within the metering period can be improved. At the same time, the updated metering period division result also provides a more reliable basis for subsequent power consumption decomposition and analysis, which is not limited here.
[0075] The system can update the metering period division in a sliding window manner. For each interpolation point, the system extends a certain length of time forward and backward to form a sliding window. Then, the system merges the original data points and the interpolation points within the sliding window to re-determine the metering period boundaries within the window. By continuously sliding the window, the entire power consumption data sequence can be updated segment by segment.
[0076] The system can also update the metering period division in an adaptive threshold manner. The system first calculates the residual between the interpolation points and the original data points, i.e., the difference between the interpolation estimates and the actual values. Then, the system adaptively adjusts the boundaries of the metering periods according to the size of the residual. When the residual is large, the system can appropriately extend the boundaries of the metering periods to cover more data points; when the residual is small, the system can shorten the boundaries of the metering periods to improve the fineness of the division.
[0077] In actual applications, due to frequent changes in the working state of the device, the division of the metering period may be too fragmented or unbalanced, affecting the efficiency and accuracy of subsequent analysis. To solve this problem, the system can introduce a metering period merging mechanism. Specifically, the system can set a minimum duration threshold for the metering period. For metering periods with a duration below the threshold, the system can merge them with adjacent metering periods to obtain more stable and balanced division results. At the same time, the system can also predefine some standard metering period templates according to the typical working cycle and task characteristics of the device. When updating the division results, the system can preferentially use these templates and fine-tune the templates according to the actual data to improve the efficiency and accuracy of the division.
[0078] S205, calculating the second-order change rate of the power consumption data in the first time window; In this step, the system further calculates the second-order change rate based on the first-order change rate of the power consumption data in the first time window. The second-order change rate reflects the trend of the first-order change rate and can be used to measure the nonlinearity of the power consumption data. By analyzing the size and sign of the second-order change rate, the system can determine the acceleration or deceleration of the power consumption change, as well as the convexity or concavity of the change. The calculation of the second-order change rate can use various numerical methods such as second-order difference method, second-order least squares method, etc., which are not limited here.
[0079] The system can use the second-order central difference method to calculate the second-order change rate. For each data point in the first time window, the system first calculates the first-order change rate of the two adjacent data points before and after it, and then differentiates the two first-order change rates to obtain the second-order change rate at that data point.
[0080] The system can also use a second-order least square method to fit the second-order change rate. The system constructs the first-order change rate data and the corresponding timestamps in the first time window into a scatter point set, and then uses a quadratic polynomial to fit the scatter point set, and the quadratic term coefficient of the fitting function is the estimated value of the second-order change rate.
[0081] In some cases, due to low data sampling frequency or large noise interference, the directly calculated second-order change rate may have large fluctuations or outliers, affecting subsequent nonlinear judgment and processing. To alleviate this problem, the system can perform smoothing filtering on the second-order change rate. For example, the system can use methods such as weighted moving average or Gaussian filtering to perform sliding window smoothing on the second-order change rate to remove high-frequency noise and short-term disturbances. In addition, the system can also estimate the normal range of the second-order change rate in advance according to the physical characteristics and working mode of the device. When the calculated second-order change rate is significantly outside the normal range, the system can consider it as an invalid value and use the second-order change rate of the adjacent data to replace it to improve the reliability of the calculation result.
[0082] S206, when the absolute value of the second-order change rate is greater than a preset threshold, determining that the total power consumption data at the metering period boundary point has a nonlinear change; In this step, the system compares the absolute value of the second-order change rate with the size of the preset threshold to determine whether the total power consumption data at the metering period boundary point has a significant nonlinear change. When the absolute value of the second-order change rate is large, it means that the first-order change rate is also changing rapidly, and the total power consumption data has a strong nonlinear characteristic, which cannot be simply estimated by linear interpolation. The selection of the preset threshold needs to consider factors such as data sampling frequency, noise level, and device characteristics to balance the detection sensitivity and false alarm rate, which is not limited here.
[0083] The system can use a fixed threshold to determine nonlinear changes. According to experience or statistical analysis, the system pre-sets a fixed second-order change rate threshold. When the absolute value of the calculated second-order change rate exceeds the threshold, the system considers that the total power consumption data has a nonlinear change and needs to be processed using a nonlinear interpolation method.
[0084] The system can also use an adaptive threshold to determine nonlinear changes. The system calculates the mean and standard deviation of the second-order change rate in the first time window in real time, and then adjusts the threshold dynamically according to the mean and standard deviation. For example, the system can set the threshold to be the mean plus or minus several standard deviations. This adaptive threshold can automatically adjust the sensitivity of the detection according to the actual distribution of the data, improving the accuracy of the nonlinear change judgment.
[0085] S207, using a piecewise interpolation method to recalculate the total power consumption data at the metering period boundary point.
[0086] The system re-calculates the total power consumption data at the metering period boundary point by using piecewise interpolation, specifically: dividing the first time window into multiple sub-time windows; calculating the change rate of the total power consumption data in each sub-time window; and performing piecewise linear interpolation on the total power consumption data at the metering period boundary point based on the change rates of the sub-time windows.
[0087] In this step, the system re-estimates the total power consumption data at the metering period boundary point with non-linear change by using piecewise interpolation. Unlike simple linear interpolation, piecewise interpolation divides the first time window into multiple sub-intervals, performs low-order interpolation on each sub-interval, and then splices the interpolation results of the sub-intervals to obtain a non-linear interpolation curve for the entire time window. This piecewise interpolation method can better approximate the local non-linear trend of the total power consumption data and improve the accuracy of interpolation estimation. The division of sub-intervals and the selection of interpolation functions need to be adaptively adjusted according to the degree of non-linearity and the change pattern of the data, to balance the computational complexity and estimation accuracy, which is not limited here.
[0088] The system can use a piecewise interpolation method based on singular points. The system first performs singular point detection on the total power consumption data in the first time window, such as threshold judgment of second-order change rate, to find the inflection points or abrupt points of the data. Then, the system divides the time window into multiple sub-intervals based on these singular points. In each sub-interval, the system uses a simple model such as a low-order polynomial or a spline function for local interpolation. At the boundary of adjacent sub-intervals, the system splices the interpolation functions to ensure the smoothness of the entire interpolation curve.
[0089] The system can also use a piecewise interpolation method based on adaptive division. The system first equally divides the first time window into several initial sub-intervals, then performs local interpolation on each sub-interval and calculates the interpolation error. For sub-intervals with large interpolation errors, the system further subdivides them into smaller sub-intervals and re-performs local interpolation. This process is recursively performed until the interpolation errors of all sub-intervals meet the preset accuracy requirements. Through adaptive division, the system can automatically increase the density of interpolation points in areas with strong non-linear changes, thereby improving the overall interpolation accuracy.
[0090] In the above embodiment, by acquiring the total power consumption data in the first time window at the metering period boundary point, calculating the change rate of the total power consumption data in the time window, and performing linear interpolation on the total power consumption data at the metering period boundary point according to the change rate, the discontinuity of the total power consumption data at the metering period boundary point caused by the data sampling interval can be eliminated. This linear interpolation method based on the change rate considers the change trend of the total power consumption in the time dimension, so that the interpolation result is more in line with the actual power consumption change rule. By updating the division result of the metering period by using the interpolated total power consumption data, the accuracy of the metering period division is improved, and the metering error caused by the data discontinuity is reduced.
[0091] The system in the embodiments of the present application will be described from the perspective of hardware processing. Please refer to Figure 3 FIG. 1 is a schematic diagram of an entity device structure of an electric energy metering control system provided by the embodiments of the present application.
[0092] It should be noted that Figure 3 The structure of the system shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0093] As Figure 3 shown, the system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 302 or programs loaded from a storage portion 308 to a random access memory (RAM) 303, such as performing the method in the above embodiment. In the RAM 303, various programs and data required for system operation are also stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0094] The following components are connected to the I / O interface 305: an input section 306 including a camera, a microphone, and the like; an output section 307 including a liquid crystal display (LCD), a speaker, and the like; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 309 performs a communication process via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as necessary. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 310 as necessary, so that a computer program read out therefrom is installed in the storage section 308 as necessary.
[0095] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing a computer program for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 309, and / or installed from the removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present application are executed.
[0096] It should be noted that the computer-readable medium in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present application, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable computer programs. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above.
[0097] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Each block in the flowcharts or block diagrams can represent a module, a program segment, or a part of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than that shown in the drawings. For example, two blocks that are shown in succession can actually be executed substantially in parallel, and sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and the combination of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0098] As another aspect, the present application also provides a computer readable storage medium, which can be included in the system described in the above embodiments, or can exist independently without being assembled into the system. The above storage medium carries one or more computer programs, which, when executed by a processor of a system, enable the system to implement the method provided in the above embodiments.
[0099] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still make modifications to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0100] In the above embodiments, according to the context, the term "when" can be interpreted as "if" or "after" or "in response to determining" or "in response to detecting". Similarly, according to the context, the phrase "upon determining" or "if detecting (the stated condition or event)" can be interpreted as "if determining" or "in response to determining" or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)".
[0101] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, solid state disk) and the like.
[0102] Those skilled in the art can understand that all or part of the processes in the above-mentioned method embodiments can be implemented by a computer program instructing relevant hardware to complete, the program can be stored in a computer readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The aforementioned storage medium includes ROM or random storage memory RAM, magnetic disc or optical disc and various storage code medium.
Claims
1. A method for controlling electric energy measurement, characterized in that: include: Collecting total power consumption data of the power supply bus and the work instruction sequence of each device in the device control system, wherein the work instruction sequence includes the type and execution time of the processing instruction; Determining a time point for switching the working mode of each device, wherein the working mode is a corresponding operating state of the device when executing different types of processing instructions; Dividing the total power consumption data into multiple metering periods according to the working mode switching time point; Matching the working mode of each device in each metering period with the standard power consumption ratio in the preset working mode power consumption ratio library to obtain the power consumption allocation weight; The total power consumption data of each metering period is decomposed based on the power consumption allocation weight to obtain the power consumption of each device.
2. The method according to claim 1, characterized in that Determining the operating mode switching time point of each device specifically includes: Obtaining the start execution time and the end execution time of each processing instruction; When it is determined that the types of the two adjacent processing instructions are different, the start execution time of the latter processing instruction is determined as the working mode switching time point; When it is detected that the device switches from the running state to the idle state, the switching moment is determined as the working mode switching time point.
3. The method according to claim 1, characterized in that After decomposing the total power consumption data of each metering period based on the power consumption allocation weight to obtain the power consumption of each device, the method further includes: Determine a single device operation time period, where the single device operation time period is a time period during which only one device switches to an operating mode during the metering period; Obtaining a change in total power consumption during the operation period of the single device; Establishing a power consumption characteristic equation of the working mode according to the change in the total power consumption; Correcting the standard electricity consumption ratio using the electricity consumption characteristic equation to obtain a corrected electricity consumption ratio; The step of decomposing the total power consumption data of each metering period based on the power consumption allocation weight is re-executed using the corrected power consumption ratio to obtain the corrected power consumption of each device.
4. The method according to claim 1, wherein The electricity consumption characteristic equation is: ; In the above equation, is the total power consumption change during the operation period of the i-th single device, and stated is the benchmark electricity characteristic coefficient, is the standard power consumption ratio of the device switching working mode during the i-th single device operation period, 、 and stated is the preset correction coefficient, is the device operation time within the i-th single device operation period, is the equipment load rate during the operation period of the i-th single equipment, is the device operation frequency within the i-th single device operation period.
5. The method according to claim 1, wherein After dividing the total power consumption data into a plurality of metering periods according to the working mode switching time points, the method further includes: Obtaining total electricity consumption data within a first time window at each metering period demarcation point, wherein the first time window is a fixed time length extending forward and backward from the metering period demarcation point as a center; Calculating the rate of change of the total electricity consumption data within the first time window; Performing linear interpolation on the total electricity consumption data at the dividing point of the metering period according to the change rate; The interpolated total electricity consumption data is used to update the division result of the metering period.
6. The method according to claim 5, characterized in that In updating the division result of the metering period using the interpolated total electricity consumption data, the method further includes: Calculating the second-order rate of change of the total electricity consumption data within the first time window; When the absolute value of the second-order change rate is greater than a preset threshold, it is determined that the total power consumption data at the dividing point of the metering period has a nonlinear change; The total electricity consumption data at the dividing point of the metering period is recalculated using a segmented interpolation method.
7. The method according to claim 6, characterized in that The step of recalculating the total electricity consumption data at the dividing point of the metering period by using a segmented interpolation method specifically includes: Dividing the first time window into a plurality of sub-time windows; Calculating the rate of change of the total power consumption data within each of the sub-time windows respectively; The total electricity consumption data at the dividing point of the metering period is subjected to piecewise linear interpolation based on the change rate of each of the sub-time windows.
8. An electric energy metering control system, characterized in that: The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method according to any one of claims 1 to 7.
9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a system, the system is caused to perform the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is run on a system, the system is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Numerically controlled lathe processing workpiece energy consumption acquiring method based on NC (numerical control) codes
CN103235554A
Non-invasive load monitoring intelligent electric meter and electric quantity decomposition method
CN111753968A
Method for power load prediction, terminal and storage medium
CN114372360A
Transformer area load decomposition method based on user grouping and related device
CN119128579A
Energy management method and device based on Internet of Things, and electronic equipment
CN119962987A