An electric energy error correction method for an electric energy metering box based on an internet of things
By analyzing IoT sensor data, the fuzzy and non-fuzzy characteristic ranges of the power metering box are separated, the probability of error is calculated and corrected, the problem of error accumulation in the power metering box is solved, and the accuracy of power metering is improved.
Patent Information
- Application Number
- CN202511657339.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-11-13
AI Technical Summary
In existing technologies, the power error correction model of power metering boxes cannot be accurately adjusted to the influence of different environmental factors, resulting in a large cumulative error.
By acquiring environmental time-series data and user power data from IoT sensors, Fourier transform and peak detection algorithms are used to separate fuzzy regularity feature intervals and non-fuzzy regularity feature intervals, calculate the error probability of each interval, and perform error correction based on the degree of environmental contribution.
It enables error correction of the electricity metering box based on different environmental factors, improves the accuracy of electricity metering, and reduces cumulative errors.
Smart Images

Figure CN121114910B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical energy data measurement, and more specifically to a method for correcting electrical energy errors in an Internet of Things-based electrical energy metering box. Background Technology
[0002] An electricity metering box is a specialized device used to measure, record, and control users' electrical energy. It typically includes various modules such as an electricity meter and current transformers. However, components like current transformers can experience electrical energy errors due to environmental influences, requiring correction.
[0003] In the existing technology, the same model is often used to process the power error correction of power metering boxes for environmental factors such as temperature and humidity. However, the sensitivity of different environmental factors to the components in the power metering box is often different. Therefore, using the same error correction model to correct the power error of the power metering box is not accurate enough and will generate a large cumulative error over a long period of time. Summary of the Invention
[0004] This invention provides a method for correcting power error in power metering boxes based on the Internet of Things (IoT) to solve existing problems.
[0005] The present invention provides a method for correcting power error in an Internet of Things-based power metering box, which adopts the following technical solution:
[0006] One embodiment of the present invention provides a method for correcting power error in an Internet of Things-based power metering box, the method comprising the following steps:
[0007] Acquire environmental time-series data from IoT sensors in the target energy metering box and user energy data from the target energy metering box;
[0008] The user's power data is fitted to obtain continuous power data, and fuzzy regularity feature intervals and non-fuzzy regularity feature intervals are determined from the continuous power data respectively;
[0009] Calculate the probability of the first data error for each fuzzy pattern feature interval and the probability of the second data error for each non-fuzzy pattern feature interval;
[0010] By defining fuzzy and non-fuzzy pattern characteristic intervals as separate intervals, the continuous electrical energy data is re-partitioned to obtain independent characteristic intervals.
[0011] Based on the first data error probability and the second data error probability, obtain the comprehensive error probability for each independent feature interval;
[0012] Obtain the environmental contribution of each IoT sensor to each independent feature range;
[0013] Independent feature intervals where the overall probability of error exceeds a preset error threshold are identified as abnormal intervals. Based on the environmental contribution of each IoT sensor to each independent feature interval, the continuous power data in the abnormal intervals are corrected to obtain the corrected power data.
[0014] Optionally, fuzzy pattern characteristic intervals and non-fuzzy pattern characteristic intervals are determined separately from continuous electrical energy data, specifically including:
[0015] Perform a Fourier transform on the continuous electrical energy data to obtain the frequency domain signal;
[0016] The peak detection algorithm is used to detect the frequency domain signal to obtain the peak value and the frequency component corresponding to each peak value;
[0017] Perform inverse Fourier transform on each frequency component to obtain the fuzzy pattern characteristic interval of each peak in the continuous power data.
[0018] The fuzzy pattern feature intervals are removed from the continuous electrical energy data to obtain the non-fuzzy pattern feature intervals.
[0019] Optionally, the first data error probability of each fuzzy pattern feature interval and the second data error probability of each non-fuzzy pattern feature interval are calculated, specifically including:
[0020] Each peak value is identified as a fuzzy pattern feature, and the consistency of the power data for each fuzzy pattern feature is obtained.
[0021] In the fuzzy pattern feature interval of the nth fuzzy pattern feature, the mean and variance of the continuous electrical energy data at time i in each interval;
[0022] Based on the mean and variance of the continuous energy data at time i in each interval of the fuzzy regularity feature interval of the nth fuzzy regularity feature, calculate the cumulative difference of the interval energy data in the mth fuzzy regularity feature interval of the nth fuzzy regularity feature.
[0023] Based on the consistency of the power data of the nth fuzzy regularity feature and the cumulative difference of the power data of the interval of the mth fuzzy regularity feature, calculate the probability of the first data error in the interval of the mth fuzzy regularity feature in the nth fuzzy regularity feature.
[0024] Obtain the first data error probability of each fuzzy pattern feature interval in the nth fuzzy pattern feature;
[0025] Obtain the first data error probability for each fuzzy regularity feature interval within each fuzzy regularity feature;
[0026] According to the The nth non-fuzzy regularity feature interval is calculated. The second data error probability of a non-fuzzy regularity feature interval;
[0027] Obtain the second data error probability for each non-fuzzy regularity feature interval.
[0028] Optionally, the consistency of electrical energy data for each fuzzy pattern feature is obtained, specifically including:
[0029] From the fuzzy pattern feature interval, obtain the fuzzy pattern feature interval of the nth fuzzy pattern feature;
[0030] Based on the m-th fuzzy rule feature interval of the n-th fuzzy rule feature, determine the expansion vector of the m-th fuzzy rule feature interval of the n-th fuzzy rule feature;
[0031] Obtain the expanded vector of each fuzzy regularity feature interval of the nth fuzzy regularity feature;
[0032] The consistency of electrical energy data for the nth fuzzy regularity feature is calculated based on the expanded vector of each fuzzy regularity feature interval of the nth fuzzy regularity feature.
[0033] Obtain the consistency of electrical energy data for each fuzzy pattern feature.
[0034] Optionally, based on the first data error probability and the second data error probability, the comprehensive error probability of each independent feature interval is obtained, specifically including:
[0035] Obtain the error confidence level for each independent feature interval;
[0036] The product of the error confidence level of the h-th independent feature interval and the data error probability of the h-th independent feature interval is determined as the comprehensive error probability of the h-th independent feature interval. Specifically, when the h-th independent feature interval is a fuzzy regularity feature interval, the first data error probability of the fuzzy regularity feature interval is determined as the data error probability of the h-th independent feature interval. When the h-th independent feature interval is a non-fuzzy regularity feature interval, the second data error probability of the non-fuzzy regularity feature interval is determined as the data error probability of the h-th independent feature interval.
[0037] Obtain the combined probability of error for each independent feature interval.
[0038] Optionally, the error confidence level for each independent feature interval is obtained, specifically including:
[0039] The time interval of the h-th independent feature interval is determined as the target time interval;
[0040] Obtain the environmental time series data of the j-th IoT sensor from the environmental time series data;
[0041] Obtain the environmental time series data within the target time interval from the environmental time series data of the j-th IoT sensor to obtain the target environmental time series data;
[0042] Based on the target environment time series data and the environment time series data of the j-th IoT sensor in each of the other independent feature intervals, calculate the confidence level of the h-th independent feature interval in the j-th IoT sensor. Here, each of the other independent feature intervals is the independent feature interval that does not include the h-th independent feature interval.
[0043] Obtain the confidence level of the h-th independent feature interval for each IoT sensor;
[0044] The confidence scores of the h-th independent feature interval for each IoT sensor are summed to obtain the error confidence score of the h-th independent feature interval.
[0045] Obtain the error confidence level for each independent feature interval.
[0046] Optionally, the environmental contribution of each IoT sensor to each independent feature range is obtained, specifically including:
[0047] Acquire continuous power data for the h-th independent feature interval, and target environmental time-series data for the j-th IoT sensor within the target time interval;
[0048] The continuous energy data at time z in the continuous energy data of the h-th independent feature interval and the target environment time series data at time z in the target environment time series data are determined as the data pair at time z.
[0049] Obtain the adjoint probability of the data pair at time z;
[0050] Obtain the adjoint probability of each data pair at each time step in the h-th independent feature interval;
[0051] Based on the adjoint probability of each data pair in the h-th independent feature interval, calculate the environmental contribution of the j-th IoT sensor to the h-th independent feature interval.
[0052] Obtain the environmental contribution of each IoT sensor to the h-th independent feature interval;
[0053] Obtain the environmental contribution of each IoT sensor to each independent feature range.
[0054] Optionally, the adjoint probability of the data pair at time z is obtained, specifically including:
[0055] The continuous energy data at time c in the continuous energy data and the environmental time series data at time c in the j-th IoT sensor in the environmental time series data are determined as the initial data pair;
[0056] The number of data pairs at time z in the initial data pairs is determined as the number of data pairs at time z.
[0057] The ratio of the number of data pairs at time z to the number of initial data pairs is determined as the adjoint probability of the data pair at time z.
[0058] Optionally, based on the environmental contribution of each IoT sensor to each independent characteristic interval, error correction is performed on the continuous power data in the abnormal interval, specifically including:
[0059] The IoT sensor that contributes the most to the environment in the a-th abnormal interval is identified as the target sensor.
[0060] The continuous electrical energy data in the a-th abnormal interval is corrected using the error correction model corresponding to the type of target sensor.
[0061] This invention proposes an energy error correction system for an IoT-based energy metering box, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the energy error correction method for an IoT-based energy metering box.
[0062] The beneficial effects of the technical solution of the present invention are:
[0063] In this embodiment of the invention, by analyzing the relationship between different environmental factors and the power error of the power metering box, the main factors causing the power error of the power metering box at different time points are analyzed, and the power error of the power metering box is corrected by using different error correction models for different environmental factors. Attached Figure Description
[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 A flowchart illustrating an energy error correction method for an IoT-based energy metering box, as provided in one embodiment of the present invention;
[0066] Figure 2This is a structural diagram of an energy error correction system for an IoT-based energy metering box, provided as an embodiment of the present invention. Detailed Implementation
[0067] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a power error correction method for an Internet of Things-based power metering box proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0069] The following describes in detail, with reference to the accompanying drawings, a specific scheme for a power error correction method for an Internet of Things-based power metering box provided by the present invention.
[0070] This invention provides a method for correcting energy error in an IoT-based energy metering box. Please refer to [link / reference]. Figure 1 The diagram illustrates a flowchart of an energy error correction method for an IoT-based energy metering box according to an embodiment of the present invention. The method includes the following steps:
[0071] S101. Obtain environmental time-series data of the IoT sensor in the target power metering box and user power data of the target power metering box.
[0072] For example, to facilitate the description of environmental time-series data and user power data, this embodiment uses fixed time periods. Taking the environmental time series data and user power data obtained internally as an example, that is, the environmental time series data and user power data below are collected in the same time period, and the sampling frequency and time calibration unit are also the same.
[0073] First, while the target power metering box is in operation, IoT sensors are deployed and used to collect environmental time-series data, as detailed below:
[0074] By statistically labeling the different IoT sensors inside the target power metering box, we can obtain... One IoT sensor;
[0075] The time-series data collected by each IoT sensor is recorded at a fixed sampling interval, with the data collected at the first sampling interval being... Taking an IoT sensor as an example, the environmental time-series data it collects is .in Indicates the first The moment of the first Data on environmental factors.
[0076] The environmental time-series data acquisition methods for other IoT sensors, as well as the format of the acquired environmental time-series data, are the same as above and will not be elaborated here.
[0077] Secondly, the target power metering box was sampled. The specific format of the user's electricity data recording is as follows:
[0078]
[0079] in, Indicates the first User power consumption data at any given time.
[0080] S102. Fit the user's power data to obtain continuous power data, and determine the fuzzy regularity feature interval and the non-fuzzy regularity feature interval from the continuous power data.
[0081] In this embodiment, determining fuzzy pattern feature intervals and non-fuzzy pattern feature intervals from continuous electrical energy data specifically includes:
[0082] Perform a Fourier transform on the continuous electrical energy data to obtain the frequency domain signal;
[0083] The peak detection algorithm is used to detect the frequency domain signal to obtain the peak value and the frequency component corresponding to each peak value;
[0084] Perform inverse Fourier transform on each frequency component to obtain the fuzzy pattern characteristic interval of each peak in the continuous power data.
[0085] The fuzzy pattern feature intervals are removed from the continuous electrical energy data to obtain the non-fuzzy pattern feature intervals.
[0086] For example, during the process of recording user electricity data in the target electricity metering box, the user's daily electricity consumption habits will inevitably lead to the user's electricity data having both fuzzy regularity and fuzzy irregularity characteristics (for example, the same user's electricity consumption in the evening under normal circumstances has a relatively similar pattern, while daytime electricity consumption does not have a relatively similar pattern). In this embodiment, when identifying electricity errors, user electricity data with fuzzy regularity characteristics and user electricity data with fuzzy irregularity characteristics need to be analyzed under different conditions. Therefore, it is necessary to distinguish them first. The specific analysis process is as follows:
[0087] For the discrete user electricity data already collected by the target electricity metering box, a multinomial fitting algorithm is used to perform continuous fitting to obtain... Continuous power data over a period of time ( ).
[0088] Secondly, regarding continuous power data Continuous electrical energy data is obtained using Fourier transform. Frequency domain signal in the frequency domain .
[0089] Next, in the frequency domain signal The peak detection algorithm is used to detect and obtain Each peak corresponds to a frequency component, where each peak corresponds to a fuzzy pattern feature. For example, the first peak represents the position of the first occurrence of a peak in the frequency domain signal. Each peak corresponds to There are several fuzzy regularity features, and different peak values correspond to different fuzzy regularity features.
[0090] Finally, regarding the obtained By performing inverse Fourier transforms on the frequency components corresponding to each peak, the different fuzzy pattern feature intervals corresponding to the continuous electrical energy data can be obtained.
[0091] It should be noted that the fuzzy pattern here is not a period in a strict mathematical function, but only that the trend of change in electricity data is relatively similar in time intervals of approximately equal intervals. In the frequency domain, each peak is an electricity consumption data that appears frequently in the time domain and has a similar amount of electricity consumption. Therefore, the fuzzy pattern of users can be determined by the frequency domain peak.
[0092] For example, in the frequency domain, the first Taking the first peak as an example, the first peak Performing an inverse Fourier transform on the frequency components corresponding to each peak value yields multiple electricity consumption intervals in the continuous energy data. These intervals occur frequently and exhibit similar electricity consumption characteristics. A preferred embodiment is provided for illustration:
[0093] The first Performing an inverse Fourier transform on the frequency components corresponding to each peak value yields multiple electricity consumption intervals in the continuous energy data, as follows: , ..., , ..., (in ; ).
[0094] Each of these power consumption zones can be defined as the first... The peak (i.e., the first peak) The fuzzy regularity feature interval of the fuzzy regularity feature (the fuzzy regularity feature) can be obtained in total. All the features contained in a fuzzy regularity A fuzzy pattern characteristic interval.
[0095] Similarly, the fuzzy pattern feature intervals of each peak can be obtained, and the overall time axis can be derived using all the fuzzy pattern feature intervals. Divided into different segments.
[0096] By removing the fuzzy pattern characteristic intervals of all peaks from continuous electrical energy data, we can obtain... The non-fuzzy regularity feature intervals are labeled in ascending order of time, and denoted as the nth interval. A non-fuzzy regularity feature interval.
[0097] S103. Calculate the first data error probability of each fuzzy pattern feature interval and the second data error probability of each non-fuzzy pattern feature interval.
[0098] In this embodiment, calculating the first data error probability of each fuzzy pattern feature interval and the second data error probability of each non-fuzzy pattern feature interval specifically includes:
[0099] Each peak value is identified as a fuzzy pattern feature, and the consistency of the power data for each fuzzy pattern feature is obtained.
[0100] In the fuzzy pattern feature interval of the nth fuzzy pattern feature, the mean and variance of the continuous electrical energy data at time i in each interval;
[0101] Based on the mean and variance of the continuous energy data at time i in each interval of the fuzzy regularity feature interval of the nth fuzzy regularity feature, calculate the cumulative difference of the interval energy data in the mth fuzzy regularity feature interval of the nth fuzzy regularity feature.
[0102] Based on the consistency of the power data of the nth fuzzy regularity feature and the cumulative difference of the power data of the interval of the mth fuzzy regularity feature, calculate the probability of the first data error in the interval of the mth fuzzy regularity feature in the nth fuzzy regularity feature.
[0103] Obtain the first data error probability of each fuzzy pattern feature interval in the nth fuzzy pattern feature;
[0104] Obtain the first data error probability for each fuzzy regularity feature interval within each fuzzy regularity feature;
[0105] According to the The nth non-fuzzy regularity feature interval is calculated. The second data error probability of a non-fuzzy regularity feature interval;
[0106] Obtain the second data error probability for each non-fuzzy regularity feature interval.
[0107] To obtain the consistency of electrical energy data for each fuzzy pattern feature, specifically including:
[0108] From the fuzzy pattern feature interval, obtain the fuzzy pattern feature interval of the nth fuzzy pattern feature;
[0109] Based on the m-th fuzzy rule feature interval of the n-th fuzzy rule feature, determine the expansion vector of the m-th fuzzy rule feature interval of the n-th fuzzy rule feature;
[0110] Obtain the expanded vector of each fuzzy regularity feature interval of the nth fuzzy regularity feature;
[0111] The consistency of electrical energy data for the nth fuzzy regularity feature is calculated based on the expanded vector of each fuzzy regularity feature interval of the nth fuzzy regularity feature.
[0112] Obtain the consistency of electrical energy data for each fuzzy pattern feature.
[0113] For example, the frequency domain analysis of the collected power data from the power metering box was performed above to obtain power data with different fuzzy patterns and power data without fuzzy patterns. These are now analyzed separately to obtain the intervals where power errors may exist in the different fuzzy patterns and the intervals where power errors may exist in the non-fuzzy patterns, as detailed below:
[0114] The probability of electrical energy error existing in the fuzzy feature intervals corresponding to different fuzzy feature characteristics is calculated, taking the first... Taking a fuzzy regularity feature as an example, the specific calculation method is as follows:
[0115] First, regarding the first The fuzzy regularity features correspond to The consistency of power data is calculated for each fuzzy pattern feature interval. The formula for calculating the consistency of power data for each fuzzy pattern feature interval is as follows:
[0116]
[0117] in, Indicates the first Consistency of power data with fuzzy regularity characteristics Indicates the first The expanded vector of continuous electrical energy data corresponding to a fuzzy regularity feature interval.
[0118] In the formula, the acquisition of the expansion vector of the continuous curve or the curve composed of discrete points is a well-known existing technique, which will not be elaborated here. This means calculating the cosine similarity of the expanded vectors of all fuzzy regularity feature intervals. Calculating the cosine similarity of multiple vectors is also a well-known technique, which will not be elaborated on here.
[0119] Consistency of power data In the calculation formula, the first All fuzzy regularity features corresponding to each The fuzzy regularity feature intervals indicate that users exhibit high repeatability in their electricity consumption across different time periods. Therefore, if the first... When all the fuzzy feature intervals corresponding to a given fuzzy feature do not contain environmental factors or are minimally affected by them... The electrical energy data within the fuzzy pattern feature intervals exhibit high consistency. Therefore, in this embodiment, by analyzing... The cosine similarity of continuous electrical energy data within the fuzzy regularity feature interval is calculated. The higher the cosine similarity, the stronger the fuzzy regularity feature interval. All fuzzy regularity features corresponding to each The higher the consistency of continuous electrical energy data within a fuzzy pattern feature interval, the better; conversely, the lower the consistency, the worse the consistency.
[0120] Secondly, with the first The first fuzzy regularity feature corresponds to the first Taking the fuzzy regularity feature interval as an example, calculate the fuzzy regularity feature interval. The first fuzzy regularity feature corresponds to the first The cumulative difference in interval electrical energy data for a given fuzzy regularity feature interval can be calculated using the following formula:
[0121]
[0122] in, Indicates the first The first fuzzy regularity feature corresponds to the first Cumulative differences in interval electrical energy data within a fuzzy regularity characteristic interval. Indicates the first The first fuzzy regularity feature corresponds to the first The fuzzy regularity feature interval of the first The size of continuous electrical energy data at each moment. Indicates the first All fuzzy regularity features corresponding to each The fuzzy pattern feature interval, the first interval of each interval The average value of continuous electrical energy data at each time point. Indicates the first All fuzzy regularity features corresponding to each The fuzzy pattern feature interval, the first interval of each interval The variance of continuous electrical energy data at each time point. Indicates the first The first fuzzy regularity feature corresponds to the first The number of time points within a fuzzy pattern feature interval.
[0123] In the formula, the calculation of the first... The continuous electrical energy data at each moment of the fuzzy regularity feature interval, and the fuzzy regularity feature interval. All of the fuzzy regularity features To analyze the difference in the mean of continuous electrical energy data at corresponding times in each interval. The continuous electrical energy data of the first fuzzy regularity feature interval and the first The fuzzy regularity characteristic is the difference in continuous electrical energy data across all intervals; the greater the difference, the more it indicates the fuzzy regularity characteristic. The continuous power data of the first interval and the first interval The more inconsistent the characteristics of a fuzzy pattern, the more likely it is to be inconsistent, and vice versa. The reciprocal of the variance ( The weights are used to adjust each... and The accuracy, if the first All corresponding to a fuzzy regularity feature The first interval The variance of all continuous electrical energy data at any given time point is large, so even if A larger difference does not necessarily indicate a strong difference.
[0124] Finally, using the consistency of the energy data of the nth fuzzy regularity feature and the cumulative difference of the energy data in the interval of the mth fuzzy regularity feature, the formula for calculating the probability of the first data error in the mth fuzzy regularity feature interval of the nth fuzzy regularity feature can be:
[0125]
[0126] in, This represents the probability of the first data error in the interval of the m-th fuzzy regularity feature within the n-th fuzzy regularity feature. This represents the normalization function.
[0127] In the formula, The smaller, The smaller the value, the more likely it is to be the first... All fuzzy regularity features corresponding to each The more regular the data in each interval, and the more regular the data in the first interval, the more regular the data in the second interval. The trend of electricity data in the first interval and the first interval The more consistent the characteristics of the fuzzy regularity, the more it indicates that the fuzzy regularity is consistent. The possibility of data error is relatively small for continuous electrical energy data within a given interval, and vice versa.
[0128] According to the above calculation formula, the first data error probability of each fuzzy regularity feature interval can be obtained in each fuzzy regularity feature.
[0129] In addition, it is necessary to analyze the possibility of electrical energy errors existing in the non-fuzzy regularity characteristic interval, specifically taking the first... Taking a non-fuzzy regularity feature interval as an example, the specific calculation method can be as follows:
[0130] In actual electricity consumption habits, the non-fuzzy regularity characteristic interval can be regarded as reflecting the electricity consumption data during most of the user's off-peak hours, or as reflecting the user's temporary electricity consumption data. The difference between these two forms of representation, in continuous electricity consumption data, is that the data shows a clear and stable trend. When users are at leisure, their electricity consumption data is stable, but when users suddenly use electrical appliances temporarily, it leads to a stable upward or downward trend in electricity consumption data. Therefore, based on this logic, the first... The formula for calculating the probability of electrical energy error (i.e., the probability of second data error) existing in a non-fuzzy regularity feature interval can be:
[0131]
[0132] in, Indicates the first The second data error probability of a non-fuzzy regularity feature interval , as well as They represent the first Within the first non-fuzzy regularity feature interval , as well as Continuous electrical energy data at each moment. Indicates the first The variance of all continuous electrical energy data within a non-fuzzy regularity characteristic interval Indicates the first The number of time points in a non-fuzzy regularity feature interval.
[0133] In the formula, the first Taking a specific moment as an example express The rate of change of continuous electrical energy data at time n, i.e. the nth The electricity trend at any given moment. Indicates the first The energy trend at time step n. The difference in energy trends between adjacent time steps is used to obtain the energy trend at time step n. Whether the energy trend at time t is consistent with that at adjacent time t; the greater the difference, the more consistent the trend at time t. The trend of electrical energy change is unstable at a given point in time, and vice versa. Furthermore, variance is used as a weight to amplify or limit the trend of electrical energy change, primarily to constrain situations where the electrical energy trend is stable locally rather than across the entire interval. Using the above logic, we can obtain the... There is a second data error possibility in the non-fuzzy regularity feature intervals regarding electrical energy error. The larger this value, the better. If the trend of continuous electrical energy data within a non-fuzzy regularity characteristic interval is unstable, then there is a high probability that there is an initial electrical energy error, and vice versa.
[0134] S104. Determine the fuzzy regularity feature interval and the non-fuzzy regularity feature interval as separate intervals, and re-partition the continuous electrical energy data to obtain independent feature intervals.
[0135] For example, the fuzzy and non-fuzzy regularity features are electricity consumption characteristics formed solely by users' electricity usage habits, for the convenience of calculating the possibility of initial errors. The impact of the environment on the electricity meter box is merely the influence of environmental parameters on the internal components of the meter box, and is an independent factor from the users' electricity usage habits. Therefore, when conducting confidence analyses of the probability of different intervals and analyses of the main influencing environmental factors, the fuzzy regularity feature intervals and the non-fuzzy regularity feature intervals are not calculated separately. For ease of demonstration, each interval is now re-statistically analyzed, and denoted as... The time period contains a total of Each independent feature interval (the sum of all fuzzy regularity feature intervals and non-fuzzy regularity feature intervals).
[0136] Specifically, neither the fuzzy regularity feature interval nor the non-fuzzy regularity feature interval changes the interval length or the data in the interval. Each interval is simply regarded as a separate interval, rather than distinguishing between the fuzzy regularity feature interval and the non-fuzzy regularity feature interval.
[0137] S105. Based on the first data error probability and the second data error probability, obtain the comprehensive error probability of each independent feature interval.
[0138] In this embodiment, the combined error probability of each independent feature interval is obtained based on the first data error probability and the second data error probability, specifically including:
[0139] Obtain the error confidence level for each independent feature interval;
[0140] The product of the error confidence level of the h-th independent feature interval and the data error probability of the h-th independent feature interval is determined as the comprehensive error probability of the h-th independent feature interval. Specifically, when the h-th independent feature interval is a fuzzy regularity feature interval, the first data error probability of the fuzzy regularity feature interval is determined as the data error probability of the h-th independent feature interval. When the h-th independent feature interval is a non-fuzzy regularity feature interval, the second data error probability of the non-fuzzy regularity feature interval is determined as the data error probability of the h-th independent feature interval.
[0141] Obtain the combined probability of error for each independent feature interval.
[0142] Obtain the error confidence score for each independent feature interval, specifically including:
[0143] The time interval of the h-th independent feature interval is determined as the target time interval;
[0144] Obtain the environmental time series data of the j-th IoT sensor from the environmental time series data;
[0145] Obtain the environmental time series data within the target time interval from the environmental time series data of the j-th IoT sensor to obtain the target environmental time series data;
[0146] Based on the target environment time series data and the environment time series data of the j-th IoT sensor in each of the other independent feature intervals, calculate the confidence level of the h-th independent feature interval in the j-th IoT sensor. Here, each of the other independent feature intervals is the independent feature interval that does not include the h-th independent feature interval.
[0147] Obtain the confidence level of the h-th independent feature interval for each IoT sensor;
[0148] The confidence scores of the h-th independent feature interval for each IoT sensor are summed to obtain the error confidence score of the h-th independent feature interval.
[0149] Obtain the error confidence level for each independent feature interval.
[0150] For example, with The time period contains a total of Taking an independent feature interval as an example. The formula for calculating the error confidence level of each interval can be:
[0151]
[0152] in, Indicates the first Error confidence level for each interval, Indicates the first All times within the interval are in the th... Environmental time series data under various environmental factors The mean, Indicates the first Within the interval, the first Time series data of environmental factors The mean. , No. The interval is the th interval The environmental time series data under each environmental factor does not include the first environmental factor. Any independent characteristic interval of the intervals.
[0153] In the formula, the first step is to calculate the... The first time interval within each interval The mean of environmental time series data corresponding to each environmental factor, and the mean of the first time series data at any other time within any independent characteristic interval. The difference in the mean of environmental time series data for each environmental factor, and for all The differences in environmental time-series data corresponding to each environmental factor are statistically summed. The larger the sum, the more significant the difference in the environmental factor's time-series data. Within each interval, some environmental factors differ significantly from those in other intervals. Therefore, the first interval... The higher the confidence level of the preliminary probability of the power error corresponding to each interval, the lower the confidence level, and vice versa.
[0154] Then obtain the first The probability of data error in each interval is determined as follows: when the h-th independent feature interval is a fuzzy regularity feature interval, the first probability of data error in the fuzzy regularity feature interval is determined as the probability of data error in the h-th independent feature interval; when the h-th independent feature interval is a non-fuzzy regularity feature interval, the second probability of data error in the non-fuzzy regularity feature interval is determined as the probability of data error in the h-th independent feature interval.
[0155] Finally, the The formula for calculating the combined probability of errors in each interval can be:
[0156]
[0157] in, Indicates the first The combined probability of error across all intervals. Indicates the first The probability of data error in each interval.
[0158] In the formula, the first The higher the probability of data error in the energy data of each interval, and the greater the confidence level, the more likely the data is to contain energy errors. There is a high probability that there will be power errors due to environmental factors in certain intervals, and vice versa.
[0159] S106. Obtain the environmental contribution of each IoT sensor to each independent feature range.
[0160] In this embodiment, obtaining the environmental contribution of each IoT sensor to each independent feature range specifically includes:
[0161] Acquire continuous power data for the h-th independent feature interval, and target environmental time-series data for the j-th IoT sensor within the target time interval;
[0162] The continuous energy data at time z in the continuous energy data of the h-th independent feature interval and the target environment time series data at time z in the target environment time series data are determined as the data pair at time z.
[0163] Obtain the adjoint probability of the data pair at time z;
[0164] Obtain the adjoint probability of each data pair at each time step in the h-th independent feature interval;
[0165] Based on the adjoint probability of each data pair in the h-th independent feature interval, calculate the environmental contribution of the j-th IoT sensor to the h-th independent feature interval.
[0166] Obtain the environmental contribution of each IoT sensor to the h-th independent feature interval;
[0167] Obtain the environmental contribution of each IoT sensor to each independent feature range.
[0168] Obtain the adjoint probability of the data pair at time z, specifically including:
[0169] The continuous energy data at time c in the continuous energy data and the environmental time series data at time c in the j-th IoT sensor in the environmental time series data are determined as the initial data pair;
[0170] The number of data pairs at time z in the initial data pairs is determined as the number of data pairs at time z.
[0171] The ratio of the number of data pairs at time z to the number of initial data pairs is determined as the adjoint probability of the data pair at time z.
[0172] For example, the first Taking the interval as an example, the first... The formula for calculating the environmental contribution of an IoT sensor to its error can be:
[0173]
[0174] in, Indicates the first The first IoT sensor for the first The degree of environmental contribution to the error in each interval Indicates the first Within the interval, the first Continuous electrical energy data at each moment and the The first IoT sensor in the Environmental time series data at time 1 The resulting data pairs are in The accompanying probability within, Indicates the first The number of time points in each interval.
[0175] In the formula, at the th Within each interval, the continuous electrical energy data that coexist at the same moment can be first compared with the data of the first interval. The environmental time-series data corresponding to each IoT sensor are combined into data pairs, and the data pairs are acquired in... The accompanying probability within. With the first... Within the interval, the first Continuous electrical energy data at each moment and the The first IoT sensor in the Environmental time series data at time 1 The resulting data pairs are in Taking the accompanying probability within a certain range as an example, the larger the value, the stronger the probability within the range. Within, the continuous electrical energy data size at the same moment is At that time, the corresponding number Environmental time-series data from one IoT sensor is Such data pairs appear frequently. This indicates that the first... The first interval The continuous electrical energy data at the i-th moment is affected by the first The less likely the environmental time-series data corresponds to the first IoT sensor, the less likely it is to be true, and vice versa. Therefore, in this embodiment, for the first... The continuous electrical energy data at each moment in each interval and the first interval The environmental time-series data from several IoT sensors are used to calculate the associated probability, and the reciprocal of the sum is used for the... The first IoT sensor for the first The calculation of the contribution of continuous electrical energy data in each interval to the error; the larger the value, the more significant the error. The first IoT sensor for the first The greater the contribution of continuous electrical energy data in a given interval to the error, the greater the contribution, and vice versa.
[0176] Similarly, the environmental contribution of each IoT sensor to each independent feature range can be obtained.
[0177] S107. Determine the independent feature intervals where the overall error probability is greater than the preset error threshold as abnormal intervals, and perform error correction on the continuous power data of the abnormal intervals according to the degree of environmental contribution of each IoT sensor to each independent feature interval, so as to obtain the corrected power data.
[0178] In this embodiment, based on the contribution of each IoT sensor to the environment of each independent feature range, error correction is performed on the continuous power data in the abnormal range, specifically including:
[0179] The IoT sensor that contributes the most to the environment in the a-th abnormal interval is identified as the target sensor.
[0180] The continuous electrical energy data in the a-th abnormal interval is corrected using the error correction model corresponding to the type of target sensor.
[0181] For example, the error correction model corresponding to the type of the target sensor can be the error correction model corresponding to the data type acquired by the target sensor. For instance, if the type of the target sensor is a temperature sensor and the data it acquires is temperature data, then the error correction model corresponding to the type of the target sensor is a temperature data error correction model; if the type of the target sensor is a humidity sensor and the data it acquires is humidity data, then the error correction model corresponding to the type of the target sensor is a humidity data error correction model.
[0182] In the process of processing electrical energy data, error correction models for different types of sensors are existing known technologies. Any error correction model can be selected for use, or a suitable error correction model can be selected based on practical experience to correct continuous electrical energy data. The types of error correction models will not be listed here.
[0183] In summary, in this embodiment of the invention, by analyzing the relationship between different environmental factors and the power error of the power metering box, the main factors causing the power error of the power metering box at different time points are analyzed, and the power error of the power metering box is corrected by using different error correction models for different environmental factors.
[0184] This invention also proposes an energy error correction system for an energy metering box based on the Internet of Things (IoT). Please refer to [link / reference]. Figure 2 The diagram shows a structural diagram of an energy error correction system for an IoT-based energy metering box provided by an embodiment of the present invention. The system includes: a data acquisition module 101, a data processing module 102, and an error correction module 103.
[0185] The data acquisition module 101 is used to acquire environmental time-series data of the IoT sensor in the target power metering box and user power data of the target power metering box;
[0186] The data processing module 102 is used to fit user power data to obtain continuous power data, and to determine fuzzy regularity feature intervals and non-fuzzy regularity feature intervals from the continuous power data; calculate the first data error probability of each fuzzy regularity feature interval and the second data error probability of each non-fuzzy regularity feature interval; determine the fuzzy regularity feature interval and the non-fuzzy regularity feature interval as separate intervals, and re-partition the continuous power data to obtain independent feature intervals; obtain the comprehensive error probability of each independent feature interval based on the first data error probability and the second data error probability; and obtain the environmental contribution of each IoT sensor to each independent feature interval.
[0187] The error correction module 103 is used to identify independent feature intervals where the overall probability of error is greater than a preset error threshold as abnormal intervals, and to perform error correction on the continuous power data in the abnormal intervals based on the degree of environmental contribution of each IoT sensor to each independent feature interval, so as to obtain the corrected power data.
[0188] It should be noted that the system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the power error correction system for an IoT-based power metering box and the power error correction method for an IoT-based power metering box provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0189] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0190] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0191] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for correcting energy error in an IoT-based energy metering box, characterized in that, include: Acquire environmental time-series data from IoT sensors in the target energy metering box and user energy data from the target energy metering box; The user's power data is fitted to obtain continuous power data, and fuzzy regularity feature intervals and non-fuzzy regularity feature intervals are determined from the continuous power data respectively; Calculate the probability of the first data error for each fuzzy pattern feature interval and the probability of the second data error for each non-fuzzy pattern feature interval; By defining fuzzy and non-fuzzy pattern characteristic intervals as separate intervals, the continuous electrical energy data is re-partitioned to obtain independent characteristic intervals. Based on the first data error probability and the second data error probability, obtain the comprehensive error probability for each independent feature interval; Obtain the environmental contribution of each IoT sensor to each independent feature range; Independent feature intervals where the overall probability of error exceeds a preset error threshold are identified as abnormal intervals. Based on the environmental contribution of each IoT sensor to each independent feature interval, the continuous power data in the abnormal intervals are corrected to obtain the corrected power data.
2. The method for correcting power error in an IoT-based power metering box according to claim 1, characterized in that, The step of determining fuzzy pattern feature intervals and non-fuzzy pattern feature intervals from continuous electrical energy data specifically includes: Perform a Fourier transform on the continuous electrical energy data to obtain the frequency domain signal; The peak detection algorithm is used to detect the frequency domain signal to obtain the peak value and the frequency component corresponding to each peak value. Each frequency component is subjected to an inverse Fourier transform to obtain the fuzzy pattern characteristic interval of each peak in the continuous power data. The fuzzy pattern feature intervals are removed from the continuous electrical energy data to obtain the non-fuzzy pattern feature intervals.
3. The method for correcting power error in an IoT-based power metering box according to claim 1, characterized in that, The calculation of the first data error probability for each fuzzy pattern feature interval and the second data error probability for each non-fuzzy pattern feature interval specifically includes: Each peak value is identified as a fuzzy pattern feature, and the consistency of the power data for each fuzzy pattern feature is obtained. In the fuzzy feature interval of the nth fuzzy feature, the mean and variance of the continuous electrical energy data at time i in each interval are obtained; Based on the mean and variance of the continuous energy data at time i in each interval of the fuzzy regularity feature interval of the nth fuzzy regularity feature, calculate the cumulative difference of the interval energy data in the mth fuzzy regularity feature interval of the nth fuzzy regularity feature. Based on the consistency of the power data of the nth fuzzy regularity feature and the cumulative difference of the power data of the interval of the mth fuzzy regularity feature, calculate the probability of the first data error in the interval of the mth fuzzy regularity feature in the nth fuzzy regularity feature. Obtain the first data error probability of each fuzzy pattern feature interval in the nth fuzzy pattern feature; Obtain the first data error probability for each fuzzy regularity feature interval within each fuzzy regularity feature; According to the The nth non-fuzzy regularity feature interval is calculated. The second data error probability of a non-fuzzy regularity feature interval; Obtain the second data error probability for each non-fuzzy regularity feature interval.
4. The method for correcting power error in an IoT-based power metering box according to claim 3, characterized in that, The process of obtaining the consistency of electrical energy data for each fuzzy pattern feature specifically includes: From the fuzzy pattern feature interval, obtain the fuzzy pattern feature interval of the nth fuzzy pattern feature; Based on the m-th fuzzy rule feature interval of the n-th fuzzy rule feature, determine the expansion vector of the m-th fuzzy rule feature interval of the n-th fuzzy rule feature; Obtain the expanded vector of each fuzzy regularity feature interval of the nth fuzzy regularity feature; The consistency of electrical energy data for the nth fuzzy regularity feature is calculated based on the expanded vector of each fuzzy regularity feature interval of the nth fuzzy regularity feature. Obtain the consistency of electrical energy data for each fuzzy pattern feature.
5. The method for correcting power error in an IoT-based power metering box according to claim 1, characterized in that, The step of obtaining the comprehensive error probability for each independent feature interval based on the first data error probability and the second data error probability specifically includes: Obtain the error confidence level for each independent feature interval; The product of the error confidence level of the h-th independent feature interval and the data error probability of the h-th independent feature interval is determined as the comprehensive error probability of the h-th independent feature interval. Specifically, when the h-th independent feature interval is a fuzzy regularity feature interval, the first data error probability of the fuzzy regularity feature interval is determined as the data error probability of the h-th independent feature interval. When the h-th independent feature interval is a non-fuzzy regularity feature interval, the second data error probability of the non-fuzzy regularity feature interval is determined as the data error probability of the h-th independent feature interval. Obtain the combined probability of error for each independent feature interval.
6. The method for correcting power error in an IoT-based power metering box according to claim 5, characterized in that, The process of obtaining the error confidence level for each independent feature interval specifically includes: The time interval of the h-th independent feature interval is determined as the target time interval; Obtain the environmental time series data of the j-th IoT sensor from the environmental time series data; Obtain the environmental time series data within the target time interval from the environmental time series data of the j-th IoT sensor to obtain the target environmental time series data; Based on the target environment time series data and the environment time series data of the j-th IoT sensor in each of the other independent feature intervals, calculate the confidence level of the h-th independent feature interval in the j-th IoT sensor. Here, each of the other independent feature intervals is the independent feature interval that does not include the h-th independent feature interval. Obtain the confidence level of the h-th independent feature interval for each IoT sensor; The confidence scores of the h-th independent feature interval for each IoT sensor are summed to obtain the error confidence score of the h-th independent feature interval. Obtain the error confidence level for each independent feature interval.
7. The method for correcting power error in an IoT-based power metering box according to claim 1, characterized in that, The acquisition of the environmental contribution of each IoT sensor to each independent feature range specifically includes: Acquire continuous power data for the h-th independent feature interval, and target environmental time-series data for the j-th IoT sensor within the target time interval; The continuous energy data at time z in the continuous energy data of the h-th independent feature interval and the target environment time series data at time z in the target environment time series data are determined as the data pair at time z. Obtain the adjoint probability of the data pair at time z; Obtain the adjoint probability of each data pair at each time step in the h-th independent feature interval; Based on the adjoint probability of each data pair in the h-th independent feature interval, calculate the environmental contribution of the j-th IoT sensor to the h-th independent feature interval. Obtain the environmental contribution of each IoT sensor to the h-th independent feature interval; Obtain the environmental contribution of each IoT sensor to each independent feature range.
8. The method for correcting power error in an IoT-based power metering box according to claim 7, characterized in that, The acquisition of the association probability of the data pair at time z specifically includes: The continuous energy data at time c in the continuous energy data and the environmental time series data at time c in the j-th IoT sensor in the environmental time series data are determined as the initial data pair; The number of data pairs at time z in the initial data pairs is determined as the number of data pairs at time z. The ratio of the number of data pairs at time z to the number of initial data pairs is determined as the adjoint probability of the data pair at time z.
9. The method for correcting power error in an IoT-based power metering box according to claim 1, characterized in that, The step of correcting the continuous power data in abnormal intervals based on the environmental contribution of each IoT sensor to each independent feature interval specifically includes: The IoT sensor that contributes the most to the environment in the a-th abnormal interval is identified as the target sensor. The continuous electrical energy data in the a-th abnormal interval is corrected using the error correction model corresponding to the type of target sensor.
10. An energy error correction system for an energy metering box based on the Internet of Things, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the power error correction method for an Internet of Things-based power metering box as described in any one of claims 1-9.
Citation Information
Patent Citations
Intelligent electric energy metering box adaptive calibration method and system based on Internet of Things
CN119959856A
Electric energy metering error correction method and system based on data fusion
CN120234767A