A method for acquiring power consumption data
By constructing a historical power consumption dataset and dynamically adjusting the sampling frequency, the problems of data redundancy and undersampling in power equipment power consumption monitoring are solved, enabling accurate acquisition of power equipment energy consumption and supporting the high efficiency of power grid energy consumption analysis and status assessment.
Patent Information
- Application Number
- CN202510688023.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2026-11-27
AI Technical Summary
In existing technologies, the monitoring of power consumption of electrical equipment suffers from data redundancy or undersampling, resulting in low energy consumption accuracy. This makes it impossible to adapt to real-time changes in the power consumption of electrical equipment, affecting the accuracy of power grid energy consumption analysis and condition assessment.
By constructing a historical power consumption dataset through monitoring equipment, the main frequency range is obtained using Fourier transform, and the sampling frequency of power consumption is dynamically adjusted by combining Pearson correlation coefficient and regression analysis to ensure that data redundancy is avoided when the power consumption of power equipment is stable and undersampling is avoided when the power consumption fluctuates greatly.
It enables accurate data acquisition when the power consumption of electrical equipment changes, balances data accuracy and resource consumption, and supports the high efficiency of power grid energy consumption analysis and status assessment.
Smart Images

Figure CN123176325A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for acquiring power consumption data, which is applied to monitoring the power consumption of power equipment in a power grid. Background Technology
[0002] In power grid systems, energy consumption monitoring of electrical equipment is a fundamental requirement for ensuring efficient energy utilization and operational reliability. During the transmission and distribution of electrical energy, electrical equipment incurs additional energy consumption due to internal losses or external operating conditions. These losses not only reduce overall energy efficiency but may also accelerate equipment aging or even cause malfunctions. By monitoring energy consumption data in real time, the actual operating efficiency of equipment can be quantified, abnormal loss patterns can be identified, and data support can be provided for optimizing equipment operation strategies and preventing potential risks.
[0003] Accurate monitoring of the power consumption of electrical equipment is a core prerequisite for achieving the above objectives. The accuracy of power data directly affects the judgment of equipment energy consumption characteristics. For example, a large measurement error may mask early signs of slight overload or local insulation degradation, leading to delayed operation and maintenance decisions. High-precision power monitoring can accurately reflect the instantaneous load status of equipment, help analyze its deviation from rated parameters, and provide a reliable basis for dynamically adjusting the operating mode, thereby avoiding misjudgments or control failures caused by data distortion.
[0004] Based on this, real-time adjustment of the power consumption sampling frequency of power equipment is a necessary means to adapt to the dynamic operating characteristics of the power grid. The power consumption of power equipment fluctuates rapidly with factors such as renewable energy output; a fixed sampling frequency may result in high-frequency load changes not being captured or data redundancy under low-frequency sampling. By dynamically adjusting the sampling frequency, data acquisition density can be increased during periods of drastic load changes to ensure the integrity of transient characteristics; while the sampling rate can be reduced during stable operation to decrease the pressure on invalid data storage and processing. This adaptive sampling strategy can balance data accuracy and system resource consumption, more efficiently supporting energy consumption analysis and condition assessment.
[0005] In existing technologies, the frequency of power consumption or energy consumption data collection by monitoring equipment is adjusted in real time based on the demand ratio and frequency of power equipment. For example, a remote intelligent monitoring system for power consumption is disclosed on the Chinese Patent Network, application number: 202411240698.4. However, this approach leads to data redundancy when power consumption is relatively stable and undersampling when power consumption fluctuates significantly. This results in low accuracy in obtaining power consumption data. Furthermore, in some cases, user demand is not strongly correlated with the fluctuation of power consumption. Therefore, in certain situations, the method described in this patent can lead to significant errors in statistically analyzing the energy consumption of some power equipment, which is unacceptable for applications involving power grid energy consumption analysis or state assessment. Summary of the Invention
[0006] The purpose of this invention is to provide a method for acquiring power consumption data, which enables monitoring equipment to dynamically adjust the sampling frequency of power consumption according to the real-time situation of the power equipment, so that the power consumption of the power equipment can be acquired based on the sampling frequency, and the acquired power consumption is more accurate.
[0007] Another objective of this invention is to provide a method for acquiring power consumption data, enabling monitoring equipment to dynamically adjust the sampling frequency of power consumption according to the real-time situation of the power equipment. This allows the sampling frequency to adapt to the actual situation of the power equipment, solving the problems of data redundancy when the power consumption of the power equipment tends to be flat, oversampling when the power consumption of the power equipment fluctuates greatly, and undersampling when the power consumption of the power equipment fluctuates greatly.
[0008] To achieve the above objectives, the present invention provides a method for acquiring power consumption data. The method includes the following steps: a monitoring device constructs a historical power consumption dataset based on sampled power consumption; the monitoring device obtains the sampling frequency of the power consumption in the current time period based on the historical power consumption dataset of the power equipment; the monitoring device samples the power consumption of the power equipment based on the sampling frequency to obtain power consumption data of the power equipment in the current time period; and the monitoring device obtains the electricity consumption of the power equipment in the current time period based on the power consumption data.
[0009] Furthermore, the process for obtaining the sampling frequency of the current time period includes: obtaining the historical power consumption dataset of the power equipment for several historical time periods adjacent to the current time period; performing a Fourier transform on the historical power consumption dataset of the power equipment for several historical time periods to obtain the frequency domain data of the historical time periods; obtaining the main frequency interval of the historical time periods based on the frequency domain data; and determining the sampling frequency of the current time period based on the main frequency interval of the several historical time periods.
[0010] Furthermore, the conditions satisfied by the main frequency include: the total energy of the frequency domain data in the main frequency range accounts for a value at least greater than a first threshold of the total energy of the frequency domain data.
[0011] Furthermore, the condition satisfied by the main frequency includes: the difference between the sliding window standard deviation of the frequency domain data and the sliding window standard deviation of the frequency domain data in the main frequency range is the largest.
[0012] Further, the process for obtaining the sampling frequency of the current time period includes: obtaining the frequency difference of the main frequency interval based on the main frequency interval of the historical time period, constructing a frequency difference dataset and a sequence set; if the Pearson correlation coefficient between the frequency difference dataset and the sequence set is greater than a second threshold, performing linear regression on the frequency difference of the historical time period to obtain a linear regression function; and obtaining the sampling frequency of the current interval based on the linear regression function.
[0013] Furthermore, the process for obtaining the sampling frequency of the current time period includes: if the Pearson correlation coefficient between the frequency difference dataset and the sequence set is less than the second threshold, performing nonlinear regression on the frequency difference of the historical time period to obtain a nonlinear regression function; and obtaining the sampling frequency of the current interval based on the nonlinear regression function.
[0014] Furthermore, the process of acquiring the historical dataset includes: the monitoring device collecting the power consumption of the power equipment in real time and storing the power consumption in the storage unit of the monitoring device; constructing the historical dataset based on the data in the storage unit, wherein different historical datasets correspond one-to-one with the corresponding power equipment.
[0015] Furthermore, the monitoring device monitors at least one of the power devices.
[0016] Furthermore, the numerical range of the first threshold is 0.90 to 0.92.
[0017] Furthermore, the second threshold ranges from 0.97 to 0.99.
[0018] The beneficial effect of this invention is that, through this adaptive sampling method, the accuracy of the power consumption data of the monitoring equipment can be balanced with the resource consumption of the monitoring equipment, so that the power consumption data of the monitoring equipment can efficiently support the power grid energy consumption analysis and power grid status assessment. Attached Figure Description
[0019] Figure 1 This invention relates to a flowchart of a method.
[0020] Figure 2 This is a graph showing the power consumption function of electrical equipment.
[0021] Figure 3 This is a graph showing the power consumption function of electrical equipment. Detailed Implementation
[0022] Example 1: This example discloses a specific implementation process of the present invention, which is illegal. (See attached document.) Figure 1 .
[0023] In this embodiment, the specific implementation process of the method involved in this invention is as follows.
[0024] The monitoring equipment samples the power consumption of the power equipment in real time and stores the power consumption data of the power equipment in the storage section of the monitoring equipment.
[0025] It should be noted that the monitoring equipment can sample the power consumption data of multiple electrical devices. For a specific electrical device, the monitoring equipment samples the power consumption data of that device and stores the power consumption data of that device in the storage section of the monitoring equipment.
[0026] When storing the power consumption data of the power equipment, the storage unit of the monitoring equipment allocates a separate storage space based on the power equipment's ID identifier to store the power consumption data, or obtains the power equipment's ID identifier when storing the power consumption data, generates a specific numerical identifier based on the ID identifier, and generates identifier-related data based on the power consumption data and the power equipment's numerical identifier.
[0027] In one implementation of the method involved in this embodiment, the monitoring device divides the storage space of the monitoring device into storage spaces corresponding to different power devices based on the ID identifier of the power device. The power consumption data storage space of the storage space corresponding to different power devices in the current time period is related to the sampling frequency of the power consumption of the power device in the current time period.
[0028] In the current time period, after the monitoring equipment determines the sampling frequency of the power consumption data of each power device to be monitored, it determines the size of the storage space of the monitoring equipment in the current time period based on the length of the current time period, the sampling frequency of the power consumption data of each power device to be monitored, and the storage size occupied by the power consumption data.
[0029] The specific process for determining the storage space allocated to the monitoring equipment in the current time period is as follows: Multiply the length of the current time period by the power consumption sampling frequency of each power device to obtain the storage space value of the first power device. Then multiply the storage space value of the first power device by the storage size occupied by the power consumption data to obtain the storage space of each power device. Finally, add the storage spaces of each power device to obtain the cumulative sum of the storage spaces of each power device, which gives the size of the monitoring equipment's storage space in the current time period.
[0030] Based on the storage space of each power device, the storage space of the monitoring device is divided in the current time period. The division is based on the ID identifier size of the power device. If the ID identifier value of the power device is larger, the priority of dividing the storage space of the power device is higher; if the ID identifier value of the power device is smaller, the priority of dividing the storage space of the power device is lower.
[0031] For example, if the storage space size in the current time period is 2003 units (the storage size of each unit is the storage size required for a single power consumption data point), and the number of monitored power devices is 3, specifically: the storage space of the first power device is 1000 units, and the ID identifier is 256677; the storage space of the second power device is 450 units, and the ID identifier is 267112; and the storage space of the third power device is 550 units, and the ID identifier is 235981.
[0032] The ID identifier size relationship is as follows: the ID identifier of the second power device is greater than the ID identifier of the first power device. The ID identifier of the first power device is greater than the ID identifier of the third power device. That is, the storage space of the monitoring equipment in the current time period is divided in the following order: first, based on the storage space of the second power device; then, based on the storage space of the first power device; and finally, based on the storage space of the third power device.
[0033] The specific partitioning process is as follows: The storage space of the monitoring equipment in the current time period is designated as storage units 1 to 2000 (each storage unit corresponds to one unit). First, storage units 1 to 450 are partitioned to store the power consumption data of the second power device in the current time period. Based on the ID of the second power device and the current time period, storage units 1 to 450 are grouped into one storage space, and the storage information of this space is stored in storage unit 2001. Second, storage units 451 to 1450 are partitioned to store the power consumption data of the first power device in the current time period. Based on the ID of the first power device and the current time period, storage units 451 to 1450 are grouped into one storage space, and the storage information of this space is stored in storage unit 2002. Finally, storage units 1451 to 2000 are divided to store the power consumption data of the third power device in the current time period. Based on the ID of the third power device and the current time period, storage units 1451 to 2000 are divided into a storage space, and the storage information of the storage space is stored.
[0034] It should be noted that the power consumption data includes: the sampling time of the power consumption and the magnitude of the power consumption. The stored information includes: the time period information of the current time period, the ID identifier of the power equipment corresponding to the storage space, and the head and tail storage units of the storage space.
[0035] In one implementation of the method in this embodiment, the monitoring device determines the power consumption sampling frequency of each power device to be monitored and the required storage size of the power consumption data, and determines the storage space size of the monitoring device in the current time period. It should be noted that the specific process of determining the storage space size of the monitoring device in the current time period is the same as the process of determining the storage space size of the monitoring device in the current time period involved in the above implementation process, and will not be repeated here.
[0036] In this implementation process, the monitoring equipment does not need to divide the storage space for the current time period based on the ID of the power equipment, and the information of the storage space is generated based on the current time period. That is, the data of the storage information of the current time period storage space includes: the time period information of the current time period, the head storage unit of the current time period storage space and the tail storage unit of the current time period storage space.
[0037] The monitoring equipment obtains the ID identifier of each power device to be monitored, and maps the ID identifier of the power device to be monitored into a hash value through a hash algorithm. In this implementation process, the hash algorithm used is the SHA256 hash algorithm.
[0038] SHA-256 (Secure Hash Algorithm 256-bit) is a cryptographic hash function belonging to the SHA-2 algorithm family. It can convert input data of arbitrary length into a unique hash value of fixed length 256 bits (32 bytes), typically represented by 64 hexadecimal characters. Its design is based on Merkle... The structure achieves high diffusion and obfuscation through block processing, bit stuffing, and multiple rounds of nonlinear operations (such as cyclic shifting, logical functions, and constant XOR), ensuring that the output hash value is deterministic, collision resistant (it is extremely difficult to find different inputs that generate the same hash), and one-way (it is impossible to deduce the original data from the hash value).
[0039] For example, if the monitoring device monitors three power devices, and the ID of the first power device is 341680, the ID of the second device is 370561, and the ID of the third power device is 312064, then the hash values corresponding to the IDs of the first, second, and third power devices are respectively:
[0040] 9f5ec8d46a35db3f1cb39babe0e1ce4f86514f81c96ef63da86a718d2bef3e35.
[0041] f0d907eeed3c272034aa83970c854e8553dff7011b86ec3ea18e969c3092eeab.
[0042] 4ef00f764413c7c9c0c5d9e20b0b152588fcde9237293e3881f0d16c596276bd.
[0043] After the monitoring equipment obtains the hash value of each power device based on its ID, it obtains the hash value corresponding to the ID of the power device when sampling the power consumption of the power device. It also obtains the hash value corresponding to the ID of the power device corresponding to the power consumption, the power consumption magnitude, and the power consumption sampling time. Therefore, in this implementation process, the power consumption data includes: the hash value corresponding to the ID of the power device, the power consumption magnitude, and the power consumption sampling time.
[0044] In this way, the monitoring equipment can compare the hash value corresponding to the ID of the power equipment with the hash value in the power consumption data, thereby obtaining the power consumption data corresponding to the power equipment.
[0045] The storage method involved in this implementation process is suitable for storing power consumption data of power equipment with high data security requirements. When data leakage occurs in the storage department of the monitoring equipment, it is impossible to determine the power equipment corresponding to the power consumption data based on the leaked data.
[0046] Through the above implementation process, the monitoring equipment can store the power consumption data of power equipment in historical time periods. In this way, the monitoring equipment can obtain the power consumption sampling frequency of power equipment in the current time period based on the historical power consumption data of power equipment.
[0047] It should be noted that if the monitoring device obtains the power consumption sampling frequency of the power equipment in the current period based on the historical power consumption data of the previous M historical periods, then the storage unit of the monitoring device will only store the historical power consumption data of the previous M historical periods.
[0048] For example, if the current time period is t, the monitoring equipment obtains the power consumption sampling frequency of the power equipment in the current time period based on the historical power consumption data of the previous 50 historical time periods. The historical time periods are denoted as t-1 to t-50.
[0049] When the current time period is updated, the current time period t becomes the current time period t+1. Then, the storage unit of the monitoring equipment deletes the historical power consumption data of each power device in the historical time period t-50 and obtains the historical power consumption data of each power device in the historical time period t. That is, the storage unit of the monitoring equipment stores the historical power consumption data from the historical time period t to the historical time period t-49. When determining the power consumption sampling frequency of each power device in the current time period t+1, it is based on the historical time period t to the historical time period t-49.
[0050] The monitoring equipment acquires historical power consumption data from several previous historical periods for the current time period, and determines the power consumption sampling frequency for each power device based on the historical power consumption data from several previous historical periods for the current time period.
[0051] For a specific power device to be monitored, the monitoring device acquires the historical power consumption data of the power device from several previous historical periods of the current time period, and performs a Fourier transform on the historical power consumption data of the power device. It should be noted that the Fourier transform can be either the Discrete Fourier Transform or the Discrete Fast Fourier Transform.
[0052] The Fourier Transform is a core mathematical tool for converting signals from the time domain (or spatial domain) to the frequency domain. It reveals the inherent spectral characteristics of complex signals by decomposing them into a superposition of sine and cosine waves of different frequencies. Its core idea is that any continuous or discrete periodic / aperiodic function can be expressed as the integral or summation of an infinite number of harmonic components.
[0053] After performing a Fourier transform on the historical power consumption data of the power equipment, the frequency domain data of the historical power consumption data of the power equipment is obtained.
[0054] Based on the historical power consumption data of the power equipment, the main frequency interval of the historical period is obtained. The main frequency interval of the historical period should meet the following two conditions. If the obtained main frequency interval does not meet one of the following constraints, the main frequency interval is traversed until the obtained main frequency interval meets one of the following constraints.
[0055] Constraint 1: The total energy of the frequency domain data of the historical power consumption of the power equipment in the main frequency interval of the historical period of the power equipment is at least greater than the first threshold value of the total energy of the frequency domain data of the historical power consumption of the power equipment.
[0056] See Figure 2 , Figure 2 Given frequency domain data of power consumption of a power device during a certain historical period, let w1 be the first frequency and w2 be the last frequency in the main frequency interval. Let W1 be the first frequency and W2 be the last frequency in the frequency interval of this frequency domain data.
[0057] Let F(w) be the frequency domain correlation function of the historical power consumption data of the power equipment. The total energy of the historical power consumption data of the power equipment in a certain frequency interval (the frequency interval is [wl1, wl2]) is defined as: the square of the frequency domain correlation function F(w) of the historical power consumption data of the power equipment, and the integral value of the frequency interval [wl1, wl2].
[0058] The main frequency interval satisfies constraint one specifically: the integral of the square of function F(w) over the frequency interval [w1, w2] is denoted as E1; the integral of the square of function F(w) over the frequency interval [W1, W2] is denoted as E0. The relationship between E0 and E1 is such that the value of E1 divided by E0 is greater than the first threshold.
[0059] In one specific implementation of the method involved in this embodiment, the value of E1 divided by E0 is greater than 0.90.
[0060] In one specific implementation of the method involved in this embodiment, the value of E1 divided by E0 is greater than 0.91.
[0061] In one specific implementation of the method involved in this embodiment, the value of E1 divided by E0 is greater than 0.92.
[0062] Constraint 2: The difference between the sliding window standard deviation of the frequency domain data of the historical power consumption data of the power equipment and the sliding window standard deviation of the frequency domain data of the historical power consumption data of the power equipment is the largest.
[0063] Specifically, the difference is the sliding window standard deviation of the frequency domain data of the historical power consumption data of the power equipment in the main frequency range of the historical period of the power equipment, minus the sliding window standard deviation of the frequency domain data of the historical power consumption data of the power equipment.
[0064] The sliding window standard deviation is specifically defined as follows: within a certain frequency range, a sliding window with a certain frequency length is set and slid, and the standard deviation of the frequency domain data of the historical power consumption data of the power equipment in each frequency range of the sliding window is obtained. After obtaining several standard deviations of the power data, the average of these standard deviations is obtained, which is the sliding window standard deviation of the power equipment in that frequency range.
[0065] For example, see Figure 3If there exists a power device whose historical power consumption data has a frequency range of [1 Hz, 2000 Hz], a sliding window with a frequency range length of 100 Hz and a sliding step size of 2 Hz, and the sliding window is being moved, the standard deviation of the historical power consumption data of the power device within the frequency range of the sliding window is obtained. After execution, 952 standard deviations are obtained. The sum of these 952 standard deviations is then divided by 952 to obtain the sliding window standard deviation of the historical power consumption data of the power device within the main frequency range of the historical period of that power device. If W1 is 1 Hz, W2 is 2000 Hz, w1 is 800 Hz, and w2 is 1200 Hz, then the main frequency interval satisfies constraint one, specifically: the standard deviation of the sliding window of the frequency domain data of the historical power consumption data of the power equipment in the frequency domain data of the main frequency interval [800 Hz, 1200 Hz] is the largest, minus the standard deviation of the sliding window of the frequency domain data of the historical power consumption data of the power equipment in the frequency domain data of the main frequency interval [1 Hz, 2000 Hz]. Under this constraint, the process of traversing the main frequency interval is as follows: two sequences are generated, namely the first traversal sequence and the second traversal sequence. The first traversal sequence is a sequence in which the starting element is the first frequency of the frequency interval (e.g., the starting element is 1 Hz), the ending element is the last frequency of the frequency interval (e.g., the ending element is 2000 Hz), and the difference between adjacent elements is between 0 Hz and 1 Hz. The second traversal sequence is a sequence where the starting element is the last frequency of the frequency range (e.g., the starting element is 2000 Hz), the ending element is the last frequency of the frequency range (e.g., the ending element is 1 Hz), and the difference between adjacent elements is between 0 Hz and 1 Hz. The main frequency range is traversed based on the first and second traversal sequences.
[0066] While satisfying either constraint one or constraint two, the monitoring equipment indirectly denoises the frequency domain data of the power equipment, making the acquisition of the main frequency domain range of the power equipment more accurate. This allows the monitoring equipment to obtain the power consumption sampling frequency of the power equipment in the current period more accurately based on the main frequency range of the power equipment in the previous several historical periods. This greatly reduces the oversampling problem when the power data fluctuation is small and the undersampling problem when the power data fluctuation is large in the current period.
[0067] After the monitoring equipment obtains the main frequency range of the power equipment in each historical period, it obtains the sampling frequency of the power consumption data of the power equipment in the current period based on the main frequency range of the power equipment in each historical period.
[0068] Construct a sequence set with the same number of historical periods. The size of the elements in the ordered sequence can either increase or decrease as the size of the label increases.
[0069] For example, if the number of historical periods is 50, then the number of elements in the constructed ordered sequence is 50.
[0070] The elements of a sequential set can be 1 to 50 with a step size of 1; or 50 to 1 with a step size of -1; or 0 to 100 with a step size of 2; or 100 to 0 with a step size of -2.
[0071] After constructing the sequence set, based on the time sequence of historical periods, construct the frequency length set of the main frequency interval. The length of the main frequency interval is equal to the tail frequency of the main frequency interval minus the head frequency of the main frequency interval.
[0072] For example, if we have the lengths of the main frequency intervals for the previous 50 historical periods (from historical period t-1 to historical period t-50) of the current period t, then we can construct the set of frequency lengths of the main frequency intervals as follows: the first element is the length of the main frequency interval of historical period t-50, the second element is the length of the main frequency interval of historical period t-49, the third element is the length of the main frequency interval of historical period t-48, and so on, with the fiftieth element being the length of the main frequency interval of historical period t-1.
[0073] After constructing the frequency length set of the main frequency interval, the absolute value of the Pearson correlation coefficient between the frequency length set of the main frequency interval and the sequence set is obtained.
[0074] The Pearson correlation coefficient is a statistic that measures the degree of linear correlation between two continuous variables, ranging from -1 to 1. Its core idea is to quantify whether their trends are consistent by calculating the ratio of the product of their covariance and their respective standard deviations: a positive value indicates a positive correlation (both increasing or decreasing), a negative value indicates a negative correlation (one increasing while the other decreases), and the closer the absolute value is to 1, the stronger the linear correlation; a value close to 0 indicates no significant linear association.
[0075] If the absolute value of the Pearson correlation coefficient between the frequency length set of the main frequency interval and the sequence set is greater than the second threshold, it indicates that there is a large linear correlation between the frequency length set of the main frequency interval and the sequence set. Then, using the historical period as the independent variable and the length of the main frequency interval of the historical period as the dependent variable, a linear regression is performed based on the independent variable and the dependent variable to obtain the linear regression function.
[0076] Based on a linear regression function, the sampling frequency of the power consumption of the electrical equipment in the current time period is obtained. Specifically, the time period sequence value corresponding to the current time period is substituted into the linear regression function to obtain the frequency length of the predicted main frequency interval of the electrical equipment in the current time period.
[0077] Accordingly, the sampling frequency of the power consumption of the power equipment in the current time period is the frequency length of the predicted main frequency interval of the power equipment in the current time period.
[0078] In this embodiment, the specific process of performing linear regression based on the independent variable and the dependent variable is as follows.
[0079] Based on the least squares method, the independent variable, and the dependent variable, the slope parameter and intercept parameter in the linear regression function are obtained. Based on the slope parameter and intercept parameter, a linear regression function is constructed, and the frequency length of the predicted main frequency interval of the power equipment in the current time period is obtained.
[0080] If the absolute value of the Pearson correlation coefficient between the frequency length set of the main frequency interval and the sequence set is less than the second threshold, it indicates that the linear correlation between the frequency length set of the main frequency interval and the sequence set is small. Then, the historical period is used as the independent variable and the length of the main frequency interval of the historical period is used as the dependent variable. Based on the independent variable and the dependent variable, a nonlinear regression is performed to obtain the nonlinear regression function.
[0081] Based on a nonlinear regression function, the sampling frequency of the power consumption of the power equipment in the current time period is obtained. Specifically, the time period sequence value corresponding to the current time period is substituted into the nonlinear regression function to obtain the frequency length of the predicted main frequency interval of the power equipment in the current time period.
[0082] Accordingly, the sampling frequency of the power consumption of the power equipment in the current time period is the frequency length of the predicted main frequency interval of the power equipment in the current time period.
[0083] In this embodiment, the specific process of performing nonlinear regression based on the independent variable and the dependent variable is as follows.
[0084] The independent variables are mapped to a high-dimensional feature space through a kernel function. The slope and intercept parameters of the nonlinear regression function in the high-dimensional feature space are obtained by the least squares method. Based on the slope and intercept parameters in the high-dimensional feature space, a nonlinear regression function is constructed to obtain the frequency length of the predicted main frequency interval of the power equipment in the current time period.
[0085] In this embodiment, the kernel function is a Gaussian kernel function. In nonlinear regression, the Gaussian kernel function uses the kernel trick to map low-dimensional input data to a high-dimensional feature space, enabling linearly inseparable data to be effectively fitted by linear models (such as support vector regression and kernel regression). Its core function is to assign higher weights to neighboring points based on the Euclidean distance between samples, and to adjust the sensitivity of local responses according to parameters: smaller values enhance the model's ability to capture data details, while larger values smooth the prediction curve to improve generalization.
[0086] After the monitoring equipment obtains the sampling frequency of the power consumption of the power equipment in the current time period, it samples the power consumption of the power equipment in the current time period based on the sampling frequency. After the current time period ends, it obtains the power consumption of the power equipment in the current time period based on the power consumption data sampled by the monitoring equipment in the current time period.
[0087] The specific process for obtaining the power consumption of this electrical equipment in the current time period is as follows.
[0088] Based on the power consumption data of the power equipment sampled by the monitoring equipment in the current time period, a dataset of power consumption data is constructed, and the average value of the dataset is obtained as the average power consumption of the power equipment in the current time period.
[0089] To obtain the length of the current time period, the specific process is as follows: subtract the beginning time of the current time period from the end time of the current time period to obtain the length of the current time period.
[0090] Multiply the length of the current time period by the average power consumption of the electrical equipment during the current time period to obtain the power consumption of the electrical equipment during the current time period.
[0091] In one specific implementation of the method in this embodiment, the value of the second threshold is 0.972.
[0092] In one specific implementation of the method involved in this embodiment, the value of the second threshold is 0.987.
[0093] In one specific implementation of the method involved in this embodiment, the value of the second threshold is 0.984.
[0094] The method described in this embodiment enables the monitoring device to accurately obtain the power consumption sampling frequency of the power equipment in the current time period using only the power consumption data of the power equipment in a power grid with a relatively simple topology. This solves the problems of oversampling when the power consumption data fluctuates little and undersampling when the power consumption data fluctuates greatly, and ensures the accuracy of obtaining the power consumption of the power equipment in the current time period based on the power consumption data of the sampled power equipment at this sampling frequency.
[0095] The sampling process requires only one type of sensor, eliminating the need for multiple types of sensors. It also involves fewer complex calculation steps and lowers the requirements for computing hardware. Therefore, applying the method of this invention to monitor the power consumption of electrical equipment in the power grid can reduce the deployment cost of monitoring equipment in the power grid and improve the maintainability of the monitoring equipment.
[0096] Example 2: This example discloses a specific implementation process of the method involved in the present invention, based on Example 1.
[0097] The specific implementation process of the method involved in this embodiment is as follows.
[0098] In this embodiment, the process of the monitoring device constructing a historical power consumption dataset based on the power consumption data of the sampled power equipment is the same as the process described in Embodiment 1, and will not be repeated here.
[0099] In this embodiment, the constraints satisfied by the power equipment in the main frequency interval of the historical period are the same as those satisfied by the power equipment in the main frequency interval of the historical period as described in Embodiment 1, and will not be repeated here. Alternatively, the range of the main frequency interval is determined based on the first constraint condition, and within the range of the main frequency interval, the main frequency interval is traversed to ensure that the main frequency interval satisfies the second constraint condition.
[0100] In this embodiment, the process by which the monitoring device obtains the power consumption sampling frequency of the power equipment in the current time period based on the main frequency range of the power equipment in historical time periods is as follows.
[0101] Constructing the sequence set and the frequency length set of the main frequency interval. It should be noted that the sequence set and the frequency length set of the main frequency interval involved in this embodiment are the same as the sequence set and the frequency length set of the main frequency interval involved in Embodiment 1, and will not be repeated here.
[0102] Obtain the absolute value of the Pearson correlation coefficient between the sequential set and the frequency length set of the main frequency interval. Based on the absolute value of the Pearson correlation coefficient between the sequential set and the frequency length set of the main frequency interval, obtain the first weight value and the second weight value.
[0103] The first weight value is specifically defined as follows: the value of the first weight value is equal to the absolute value of the Pearson correlation coefficient between the sequence set and the frequency length set of the main frequency interval.
[0104] The second weight value is specifically defined as follows: the value of the second weight value is equal to the value one minus the absolute value of the Pearson correlation coefficient between the sequence set and the frequency length set of the main frequency interval.
[0105] Using the historical time period of the power equipment as the independent variable and the length of the main frequency interval of the historical time period as the dependent variable, linear regression and nonlinear regression are performed based on the independent variable and the dependent variable to obtain the linear regression function and the nonlinear regression function.
[0106] The specific procedures for linear and nonlinear regression in this embodiment are the same as those in Embodiment 1, and will not be repeated here.
[0107] Based on the linear regression function, the time period sequence corresponding to the current time period is substituted into the linear regression function to obtain the first frequency length of the predicted main frequency interval of the power equipment in the current time period.
[0108] Based on the nonlinear regression function, the time series corresponding to the current time period is substituted into the nonlinear regression function to obtain the second frequency length of the predicted main frequency interval of the power equipment in the current time period.
[0109] Based on the first and second frequency lengths of the power equipment in the current time period, the power consumption sampling frequency of the monitoring equipment in the current time period is obtained. The specific acquisition process is as follows.
[0110] The sampling frequency for the power consumption of electrical equipment in the current time period is: the first frequency length multiplied by the first weight value plus the second frequency length multiplied by the second weight value.
[0111] After obtaining the power consumption sampling frequency of the power equipment in the current time period, the power consumption of the power equipment is sampled based on the sampling frequency to obtain the power consumption data of the power equipment in the current time period.
[0112] Based on the power consumption data of power equipment in the current time period, obtain the power consumption of power equipment in the current time period.
[0113] In this embodiment, the specific process of obtaining the power consumption of the power equipment in the current time period based on the power consumption data of the power equipment in the current time period is the same as the specific process of obtaining the power consumption of the power equipment in the current time period based on the power consumption data of the power equipment in the current time period involved in Embodiment 1, and will not be repeated here.
[0114] The method described in this embodiment enables the monitoring equipment to obtain a more accurate sampling frequency in a power grid with a relatively complex topology by combining linear regression and nonlinear regression to obtain the power consumption sampling frequency of the power equipment in the current time period, thereby ensuring the accuracy of obtaining the power consumption of the power equipment in the current time period.
[0115] This invention has illustrated its purpose, technical solutions, and beneficial effects through specific embodiments. However, these embodiments are merely examples to demonstrate the application of the invention and do not constitute a limitation on the scope of protection of this invention. We explicitly state that any reasonable modifications, equivalent substitutions, or technical improvements guided by the spirit and principles of this invention should be included within the scope of protection of this invention. This means that as long as these changes do not deviate from the core idea and basic function of the invention, they should be protected by patent rights. The scope of protection of this invention should be broad, including all directly obvious variations as well as non-obvious innovations that a technical expert can reasonably deduce from the disclosure of this invention. This broad protection aims to promote further research and development based on this invention, while ensuring that its innovativeness and practicality are fully protected by law.
Claims
1. A method for acquiring power consumption data, characterized in that, The method steps include: The monitoring equipment constructs a historical power consumption dataset based on the sampled power consumption. The monitoring device obtains the sampling frequency of the power consumption in the current time period based on the historical power consumption dataset of the power equipment, and samples the power consumption of the power equipment based on the sampling frequency to obtain the power consumption data of the power equipment in the current time period. The monitoring device obtains the power consumption of the power equipment during the current time period based on the power consumption data.
2. The method for acquiring power consumption data according to claim 1, characterized in that, The process for obtaining the sampling frequency for the current time period includes: Obtain the historical power consumption dataset of the power equipment for several historical time periods adjacent to the current time period; For several historical power consumption datasets of the power equipment, perform Fourier transform to obtain frequency domain data of the historical periods, and obtain the main frequency interval of the historical periods based on the frequency domain data; Based on the main frequency range of the aforementioned historical time periods, the sampling frequency of the current time period is determined.
3. The method for acquiring power consumption data according to claim 2, characterized in that, The conditions that the main frequency range must satisfy include: The total energy of the frequency domain data in the main frequency range accounts for a value at least greater than a first threshold value of the total energy of the frequency domain data.
4. The method for acquiring power consumption data according to claim 2, characterized in that, The conditions that the main frequency range must satisfy include: The difference between the sliding window standard deviation of the frequency domain data and the sliding window standard deviation of the frequency domain data in the main frequency range is the largest.
5. A method for acquiring power consumption data according to any one of claims 2 to 4, characterized in that, The process for obtaining the sampling frequency for the current time period includes: Based on the main frequency interval of the historical period, obtain the frequency difference of the main frequency interval, and construct a frequency difference dataset and a sequence set; If the absolute value of the Pearson correlation coefficient between the frequency difference dataset and the sequence set is greater than the second threshold, linear regression is performed on the frequency difference of the historical period to obtain the linear regression function. Based on the linear regression function, the sampling frequency of the current interval is obtained.
6. The method for acquiring power consumption data according to claim 5, characterized in that, The process for obtaining the sampling frequency for the current time period includes: If the absolute value of the Pearson correlation coefficient between the frequency difference dataset and the sequence set is less than the second threshold, a nonlinear regression is performed on the frequency difference of the historical period to obtain a nonlinear regression function. Based on the nonlinear regression function, the sampling frequency of the current interval is obtained.
7. A method for acquiring power consumption data according to any one of claims 1 to 4, characterized in that, The process of obtaining the historical dataset includes: The monitoring device collects the power consumption of the power equipment in real time and stores the power consumption in the storage unit of the monitoring device; Based on the data in the storage unit, the historical dataset is constructed, wherein different historical datasets correspond one-to-one with the ID identifier of the corresponding power equipment.
8. A method for acquiring power consumption data according to any one of claims 1 to 4, characterized in that, The monitoring device monitors at least one of the power devices.
9. A method for acquiring power consumption data according to claim 3, characterized in that, The first threshold value ranges from 0.90 to 0.
92.
10. A method for acquiring power consumption data according to claim 5 or 6, characterized in that, The second threshold ranges from 0.97 to 0.99.
Citation Information
Patent Citations
A remote intelligent monitoring system for power energy consumption
CN118763810B
