A method for data collection and processing of smart meters
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2026-08-14
AI Technical Summary
[0006]有鉴于此,本发明实施例提供了一种智能电表采集数据处理方法,以解决如何提高利用DTW算法对智能电表采集数据进行相似性分析的效率,以增强实时分析能力的问题
本发明通过两个待分析用电时序数据之间的差异性和波动性,在利用快速DTW算法对两个用电时序数据进行相似性分析时,自适应获取FastDTW的最优窗口约束方式以及最优窗口约束方式下的最优参数设定,减少了根据经验设置的窗口约束的相似性分析误差,在提高计算效率的同时,最大程度保证相似性分析的准确性。
Smart Images

Figure CN120596941B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for processing data collected by a smart meter. Background Technology
[0002] Against the backdrop of refined energy management and stable power supply, smart meters act as "intelligent sentinels" of the power system, collecting massive amounts of electricity consumption data in a comprehensive and real-time manner. This data contains crucial information such as user electricity consumption behavior and grid operation status, serving as an important basis for identifying potential anomalies and optimizing power services. Through the analysis of data collected by smart meters, power companies can accurately plan power production and transmission, achieving efficient energy allocation, while gaining a deeper understanding of each user's electricity consumption habits and providing personalized electricity consumption suggestions and services. In the current scenario, the most critical operation in the analysis of smart meter data is similarity analysis. This analysis can be applied to various needs and purposes, such as: accurately identifying and locating electricity theft (by comparing the similarity between electricity consumption curves and normal patterns, theft can be identified more accurately); timely detecting equipment faults (analyzing the similarity between real-time collected motor electricity consumption data and historical normal data to identify faults); and optimizing energy management load forecasting (analyzing the similarity of historical electricity consumption data from different regions during the same period to predict future electricity load, thereby rationally arranging power generation plans and transmission dispatch to improve energy utilization efficiency), etc. Therefore, similarity analysis of smart meter data is of great significance at all stages and in all directions of the scenario.
[0003] Because different electrical appliances have different power consumption patterns, and the power consumption patterns of the same device can also change under different operating conditions—for example, the power consumption curves of an air conditioner differ between cooling and heating modes, and the power may be adjusted due to changes in ambient temperature during operation—the power consumption curves may exhibit temporal stretching or distortion. Therefore, in existing technologies, the DTW algorithm is typically chosen for similarity analysis, as it can effectively handle the temporal distortion problem and accurately compare the similarity of power consumption patterns between different devices or under different conditions of the same device.
[0004] Although the DTW algorithm has advantages in handling time series of different lengths and misalignment, time distortion, and capturing dynamic changes in time series in smart meter data collection and analysis scenarios, its computational complexity is too high. When processing large-scale data, the computation time of the algorithm will increase significantly, which cannot meet the real-time requirements.
[0005] Therefore, improving the efficiency of using the DTW algorithm to perform similarity analysis on smart meter data, in order to enhance real-time analysis capabilities, has become an urgent problem to be solved. Summary of the Invention
[0006] In view of this, embodiments of the present invention provide a method for processing data collected by smart meters to address the problem of how to improve the efficiency of similarity analysis of smart meter data collected using the DTW algorithm, thereby enhancing real-time analysis capabilities.
[0007] This invention provides a method for processing data collected by a smart meter, the method comprising the following steps: Acquire the electricity consumption time-series data to be analyzed collected by the smart meter in two time periods; Relative error analysis and data change difference analysis are performed on two power consumption time series data to be analyzed to obtain the difference feature values of the two power consumption time series data. Based on the difference feature values, the optimal window constraint method of the fast DTW algorithm is obtained. The optimal window constraint method includes Sakoe-Chiba strip or Itakura parallelogram. Two power consumption time series data to be analyzed are divided side by side using a local window of a preset length to obtain at least two local partition windows. Each local partition window contains data from both power consumption time series data to be analyzed. For any local partition window, the window data fluctuation characteristic value is obtained based on the data difference in any local partition window. Based on the window data fluctuation characteristic value, the optimal parameters corresponding to any local partition window under the optimal window constraint method are obtained. The optimal parameters include: the window width of the Sakoe-Chiba band or the slope of the Itakura parallelogram. The optimal parameters corresponding to each local partition window under the optimal window constraint method are obtained. Based on the optimal parameters corresponding to each local partition window under the optimal window constraint method, the fast DTW algorithm is used to perform similarity analysis on two electricity consumption time series data to be analyzed, and the corresponding similarity analysis results are obtained. These results are used to carry out different monitoring purposes under different electricity consumption scenarios.
[0008] Preferably, the step of performing relative error analysis and data change difference analysis on the two electricity consumption time series data to be analyzed, and obtaining the difference feature values of the two electricity consumption time series data to be analyzed, includes: The data length of each electricity consumption time series data to be analyzed is obtained, the absolute value of the data length difference and the minimum data length are obtained, and the ratio of the absolute value of the data length difference to the minimum data length is calculated and recorded as the relative error between the two electricity consumption time series data to be analyzed. The range, mean, and standard deviation of each electricity consumption time series data to be analyzed are obtained respectively. The absolute values of the differences in the range, mean, and standard deviation between two electricity consumption time series data to be analyzed are obtained. The absolute values of the differences in the range, mean, and standard deviation are normalized respectively to obtain the normalized values of the range difference, mean difference, and standard deviation. The mean of the normalized values of the mean difference and standard deviation is calculated. The normalized values of the range difference and the mean are weighted and summed to obtain the change rate characteristic value of the two electricity consumption time series data to be analyzed. By combining the relative error and rate of change characteristic values of the two electricity consumption time series data to be analyzed, the difference characteristic values of the two electricity consumption time series data to be analyzed are obtained.
[0009] Preferably, the step of combining the relative error and rate of change characteristic values of the two electricity consumption time series data to be analyzed to obtain the difference characteristic values of the two electricity consumption time series data includes: The relative error is normalized to obtain a normalized relative error value. Based on the mean of the normalized relative error value and the rate of change characteristic value, the difference characteristic value of the two electricity consumption time series data to be analyzed is obtained.
[0010] Preferably, obtaining the optimal window constraint method for the fast DTW algorithm based on the difference feature values includes: Obtain a preset threshold for difference feature values. If the difference feature value is less than the threshold, the optimal window constraint method for the fast DTW algorithm is the Sakoe-Chiba band. If the difference feature value is greater than or equal to the threshold, the optimal window constraint method for the fast DTW algorithm is the Itakura parallelogram.
[0011] Preferably, obtaining the window data fluctuation characteristic value based on the data differences in any of the local partitioned windows includes: Calculate the mean, standard deviation, and range of all data in any local partition window. Calculate the ratio of the mean to the standard deviation. Normalize the ratio and the range to obtain the normalized ratio value and the normalized range value. Weight the normalized ratio value and the normalized range value to obtain the window data fluctuation characteristic value of any local partition window.
[0012] Preferably, obtaining the optimal parameters corresponding to any local partitioning window under the optimal window constraint method based on the window data fluctuation characteristic value includes: If the optimal window constraint method is Sakoe-Chiba band, then obtain the maximum and minimum theoretical values of the window width of Sakoe-Chiba band, calculate the difference between the maximum and minimum theoretical values, use the product of the difference and the window data fluctuation characteristic value as the width adjustment value, and record the sum of the minimum theoretical value and the width adjustment value as the optimal window width of Sakoe-Chiba band.
[0013] Preferably, the step of obtaining the optimal parameters corresponding to any local partitioning window under the optimal window constraint method based on the window data fluctuation characteristic value further includes: If the optimal window constraint is an Itakura parallelogram, then obtain the maximum and minimum theoretical values of the slope of the Itakura parallelogram, calculate the difference between the maximum and minimum theoretical values, use the product of the difference and the window data fluctuation characteristic value as the slope adjustment value, and record the sum of the minimum theoretical value and the slope adjustment value as the optimal slope of the Itakura parallelogram.
[0014] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: This invention, by leveraging the differences and fluctuations between two electricity consumption time-series data sets to be analyzed, adaptively obtains the optimal window constraint method and the optimal parameter settings under the optimal window constraint method when performing similarity analysis on the two electricity consumption time-series data sets using the Fast DTW algorithm. This reduces the similarity analysis error of window constraints set based on experience, improving computational efficiency while maximizing the accuracy of similarity analysis. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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.
[0016] Figure 1 This is a flowchart of a smart meter data acquisition and processing method provided in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of a Sakoe-Chiba belt provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of an Itakura parallelogram provided in an embodiment of the present invention. Detailed Implementation
[0017] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.
[0018] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.
[0019] To illustrate the technical solution of the present invention, specific embodiments are described below.
[0020] See Figure 1 This is a flowchart of a smart meter data acquisition and processing method provided in Embodiment 1 of the present invention, as shown below. Figure 1 As shown, the method may include: Step S101: Obtain the electricity consumption time series data to be analyzed collected by the smart meter in two time periods; In this embodiment of the invention, two electricity consumption time-series data points can be selected for similarity analysis based on different scenario requirements. These are recorded as the electricity consumption time-series data to be analyzed. The electricity consumption data includes, but is not limited to, voltage, current, and power. Different scenario requirements include: electricity theft, equipment failure, energy management load forecasting, and user behavior analysis. Taking electricity theft as an example, the user's real-time electricity consumption curve is compared with historical normal electricity consumption curves. The greater the similarity, the more stable the user's electricity consumption is, indicating no electricity theft. Conversely, the smaller the similarity, the more likely the user is experiencing sudden large fluctuations in electricity consumption, suggesting a high probability of electricity theft.
[0021] Similarity analysis typically utilizes the Time-to-Wave (DTW) algorithm, but its computational complexity is excessively high. When processing large-scale data, the computation time increases significantly, failing to meet real-time requirements. Therefore, this invention employs the more robust Fast DTW algorithm. Fast DTW significantly reduces the computational complexity of the original DTW algorithm through a series of optimization strategies, making it more suitable for processing large-scale time-series data such as that collected by smart meters. Fast DTW is an existing technology and will not be elaborated upon here. Furthermore, considering that the Fast DTW algorithm generally directly limits the search path range by introducing window constraints, and that the specific window constraint method and parameter selection are based on prior knowledge or data experimentation, the accuracy, efficiency, and stability of the similarity analysis results obtained by this method are low, failing to reflect the actual analysis scenario and thus unable to guarantee the final analysis results. Therefore, this invention proposes an adaptive setting of the window constraint method and parameters for the Fast DTW algorithm for similarity analysis of electricity consumption data collected by smart meters, achieving both improved computational efficiency and maximum accuracy in similarity analysis during data processing.
[0022] First, in this embodiment of the invention, electricity consumption time-series data collected by the smart meter in two time periods are obtained respectively. Then, data preprocessing is performed on each electricity consumption time-series data to obtain two electricity consumption time-series data to be analyzed. The data preprocessing steps are as follows: 1. Data Cleaning: Time series data may be subject to various noise interferences during acquisition, such as sensor errors and environmental interference. These noises can affect the accuracy of the calculation results of the Fast DTW algorithm. Using moving average filtering, median filtering, etc., to remove noise can make the time series data smoother and highlight the true time series characteristics. In addition, time series data may contain missing values, which can affect the calculation of alignment paths in the Fast DTW algorithm. Therefore, interpolation methods (such as linear interpolation, spline interpolation, etc.) are used to fill missing values in the time series data to ensure the integrity and continuity of the time series data.
[0023] 2. Data Normalization: The dimensions and numerical ranges of different time series data may vary greatly. This can lead to a situation where, in the distance analysis of the Fast DTW algorithm, features with larger numerical values have an excessive impact on the distance, while features with smaller numerical values are ignored. Normalization can map the data to a specific range (such as [0, 1] or [-1, 1]), making different features comparable in similarity analysis.
[0024] 3. Data smoothing: Even after the above denoising process, time series data may still have some minor fluctuations. These fluctuations may affect the performance of the fast DTW algorithm. Data smoothing can further reduce high-frequency noise in time series data and make the data trend more obvious.
[0025] Thus, two sets of electricity consumption time series data were obtained for subsequent analysis of their similarity.
[0026] Step S102: Perform relative error analysis and data change difference analysis on the two power consumption time series data to be analyzed to obtain the difference feature values of the two power consumption time series data to be analyzed. Based on the difference feature values, obtain the optimal window constraint method of the fast DTW algorithm.
[0027] The fast DTW algorithm is known to reduce computational complexity by introducing window constraints to limit the range of the search path. The fast DTW algorithm typically employs two window constraint methods: Sakoe-Chiba bands (…). Figure 2 (as shown) and Itakura parallelogram ( Figure 3 (As shown). For the Sakoe-Chiba band, its main function is to limit the maximum offset during time series alignment. The basic operation is to define a window with a width of r, so that when calculating the DTW path, only alignment methods differing by no more than r time points on the time axis are considered. The effect is that by introducing the Sakoe-Chiba band, the fast DTW algorithm restricts the search path to a smaller region, significantly reducing the number of distances that need to be calculated, thus reducing computational complexity while maintaining algorithm accuracy to some extent. For the Itakura parallelogram, the basic operation is to define a parallelogram region with a slope of v, so that when calculating the DTW path, only alignment methods within this region are considered, thereby reducing computational complexity.
[0028] However, the two window constraint methods mentioned above differ in their robustness and advantages for different types of data feature analysis. For the Sakoe-Chiba band, since it limits the maximum offset r of the alignment path on the time axis (i.e., the window width), it only allows alignment within the range of r time points above and below the main diagonal. Therefore, it has strong symmetry and is suitable for situations where time series are of similar length and have relatively uniform rates of change. For the Itakura parallelogram, since it allows the alignment path to vary within a larger range, especially at the beginning and end of the time series, the offset can be larger. Therefore, it is more suitable for processing time series data with different time scales or rates of change and can capture more flexible alignment methods.
[0029] Based on the above analysis, in this embodiment of the invention, the optimal window constraint method is adaptively obtained when using the fast DTW algorithm to analyze the similarity between two power consumption time series data to be analyzed, according to the data difference characteristics between the two power consumption time series data to be analyzed.
[0030] First, relative error analysis and data variation difference analysis were performed on the two electricity consumption time series data to be analyzed, and the difference characteristic values of the two electricity consumption time series data were obtained. Specifically: (1) Obtain the data length of each electricity consumption time series data to be analyzed, obtain the absolute value of the data length difference and the minimum data length, calculate the ratio of the absolute value of the data length difference to the minimum data length, and record it as the relative error between the two electricity consumption time series data to be analyzed.
[0031] Specifically, the formula for calculating the relative error between the two sets of electricity consumption time-series data to be analyzed is as follows: in, This represents the relative error between two sets of electricity consumption time-series data to be analyzed. This indicates the length of a set of electricity consumption time-series data to be analyzed. This indicates the length of another set of electricity consumption time-series data to be analyzed; | represents the absolute value sign. This represents the function that takes the minimum value.
[0032] It should be noted that, The smaller the value, the more similar the scales of the two electricity consumption time series data to be analyzed, and the smaller the corresponding relative error. For example, if the electricity consumption time series data A to be analyzed has 100 points and the electricity consumption time series data B to be analyzed has 102 points, the difference in the number of points is 2, and the relative error is about 0.02.
[0033] (2) Obtain the data range of each electricity consumption time series data to be analyzed. Data mean and data standard deviation The absolute value of the difference between the ranges of the two electricity consumption time series data to be analyzed is obtained. The absolute value of the difference between the data means and the absolute value of the difference in standard deviation of the data Normalize the absolute values of the differences in the range, mean, and standard deviation of the data, respectively, to obtain the normalized range difference values. Normalized value of mean difference and the normalized value of the difference in standard deviation The mean of the normalized difference of the mean and the mean of the normalized difference of the standard deviation are calculated. The normalized difference of the range and the mean are then weighted and summed to obtain the rate of change characteristic values of the two electricity consumption time series data to be analyzed.
[0034] Specifically, the formula for calculating the rate of change characteristic values of the two electricity consumption time-series data to be analyzed is as follows: in, This represents the characteristic value of the rate of change of two electricity consumption time-series data to be analyzed. Indicates the first weight. Indicates the second weight. This represents the normalization function.
[0035] It should be noted that the data range is used to reflect the range of data variation for each electricity consumption time-series data to be analyzed, and the absolute value of the difference in the data range is... This can intuitively reflect the difference in the range of change of two sets of electricity consumption time-series data to be analyzed. Similarly, the absolute value of the difference between the data means can be used. and the absolute value of the difference in standard deviation of the data This visually reflects the differences in the central tendency and the degree of dispersion between two sets of electricity consumption time-series data to be analyzed. The larger the value, the more different the rates of change of the two electricity consumption time series data to be analyzed, and the larger the corresponding rate of change characteristic value.
[0036] Preferably, the rate of change feature value is evaluated from two dimensions with equal influence, and is set as follows: There are no restrictions here; you can set them according to the scenario.
[0037] (3) Normalize the relative error to obtain the normalized value of the relative error. Based on the mean of the normalized value of the relative error and the characteristic value of the rate of change, obtain the difference characteristic value of the two electricity time series data to be analyzed.
[0038] Specifically, the formula for calculating the difference characteristic value between the two electricity consumption time series data to be analyzed is as follows: in, This represents the difference characteristic value between two sets of electricity consumption time series data to be analyzed. This represents the characteristic value of the rate of change of two electricity consumption time-series data to be analyzed. This represents the relative error between two sets of electricity consumption time-series data to be analyzed. This represents the normalization function.
[0039] It should be noted that, The larger the value, the less similar the scales of the two electricity consumption time series data to be analyzed. The larger the value of H, the more different the rates of change of the two electricity time series data to be analyzed, and the larger the value of H, the more appropriate it is to choose the Itakura parallelogram window constraint method.
[0040] Therefore, after obtaining the difference feature values of the two electricity consumption time series data to be analyzed, a preset difference feature value threshold is obtained. If the difference feature value is less than the difference feature value threshold, the optimal window constraint method of the fast DTW algorithm is the Sakoe-Chiba band; if the difference feature value is greater than or equal to the difference feature value threshold, the optimal window constraint method of the fast DTW algorithm is the Itakura parallelogram.
[0041] It should be noted that the preferred configuration in the embodiments of the present invention is... There are no restrictions here; the setting can be adjusted according to the implementation scenario. Since a setting of 0.5 is more common, this setting can better cover most data feature scenarios when the characteristics of the scenario data are diverse. If the time-series data in the scenario has complex and significantly different changing characteristics, it can be appropriately increased. This allows for the selection of relatively uniform and consistent time-series data; if the time-series data in the scenario has complex variation characteristics and weak differences, the value can be appropriately reduced. This allows the algorithm to extract data with relatively complex and inconsistent changing characteristics.
[0042] Step S103: Use a local window of preset length to divide the two power consumption time series data to be analyzed in parallel to obtain at least two local partition windows. The local partition windows contain the data of the two power consumption time series data to be analyzed. For any local partition window, obtain the window data fluctuation characteristic value according to the data difference in any local partition window. Based on the window data fluctuation characteristic value, obtain the optimal parameter corresponding to any local partition window under the optimal window constraint method.
[0043] Since the selection of the optimal window constraint method is based on the overall variation characteristics of the two power consumption time series data to be analyzed, when using the fast DTW algorithm to perform similarity analysis on the two power consumption time series data to be analyzed, more attention should be paid to the setting of relevant parameters under the optimal window constraint method, that is, the window width r of the Sakoe-Chiba band or the slope v of the Itakura parallelogram. In this embodiment of the invention, firstly, the minimum data length is selected from the data lengths of the two power consumption time series data to be analyzed, and one-tenth of the minimum data length is used as the preset length of the local window, which is used to divide the two power consumption time series data to be analyzed into windows of fixed lengths side by side. The preset length of the local window is not limited and can be set according to the requirements. Then, the two power consumption time series data to be analyzed are divided side by side using the local window of the preset length, resulting in at least two local partition windows, each containing the data of both power consumption time series data to be analyzed. Finally, the optimal parameters corresponding to the optimal window constraint method are set for each local partition window.
[0044] For any local partitioning window, the method for obtaining the optimal parameters of that local partitioning window under the optimal window constraint method is as follows: (1) Obtain the window data fluctuation characteristic value based on the data difference in any local partition window.
[0045] Calculate the mean, standard deviation, and range of all data in any local partition window. Calculate the ratio of the mean to the standard deviation. Normalize the ratio and the range to obtain the normalized ratio value and the normalized range value. Weight the normalized ratio value and the normalized range value to obtain the window data fluctuation characteristic value of any local partition window.
[0046] Preferably, the formula for calculating the window data fluctuation characteristic value of any locally partitioned window is: in, This represents the window data fluctuation characteristic value of any locally partitioned window. This represents the first weighting coefficient. This represents the standard deviation of all data within any local partition window. This represents the mean of all data within any local partition window. This represents a hyperparameter, a very small positive number (0.001), used to ensure the denominator is not zero. The maximum data within any local partition window. The minimum data within any local partition window. This represents the second weighting coefficient. This represents the normalization function.
[0047] It should be noted that the standard deviation of the data within any local partition window reflects the degree of data dispersion within the window, and the mean of the data within any local partition window reflects the average level of the data within the window. The coefficient of variation, which characterizes any local partitioning window, has the advantage of providing a dimensionless index for comparing the dispersion of datasets with different units or different mean levels, thus offering greater applicability. The larger the value, the more dispersed the data points are relative to the mean within any local partition window, and the greater the fluctuation. Conversely, the smaller the value, the more concentrated the data points are, and the less the fluctuation. The value is used to characterize the degree of fluctuation of data points within the window. The larger the value, the greater the fluctuation characteristic value of the window data in any local partition window.
[0048] Due to this item ( This method considers more comprehensive factors, overcomes interference from abnormal factors, and has strong universality in the field of mathematics, resulting in more stable results. Therefore, setting a larger first weight coefficient is preferred. There are no restrictions here; you can set them according to the specific scenario.
[0049] (2) Based on the fluctuation characteristics of the window data, obtain the optimal parameters corresponding to any local partition window under the optimal window constraint method.
[0050] Specifically, if the optimal window constraint method is the Sakoe-Chiba band, then the maximum and minimum theoretical values of the Sakoe-Chiba band window width are obtained, the difference between the maximum and minimum theoretical values is calculated, and the product of the difference and the window data fluctuation characteristic value is used as the width adjustment value. The sum of the minimum theoretical value and the width adjustment value is recorded as the optimal window width of the Sakoe-Chiba band. The formula for calculating the optimal window width is: in, This represents the optimal window width corresponding to any local partitioning window. This represents the minimum theoretical value of the window width for the Sakoe-Chiba band. This represents the maximum theoretical value of the window width for the Sakoe-Chiba band. This represents the window data fluctuation characteristic value of any local partitioned window.
[0051] It should be noted that the theoretical value of the window width of the Sakoe-Chiba band is usually a non-negative integer, i.e. However, in practical applications, It is usually determined by the length T of the time series data, because The window width of the Sakoe-Chiba band cannot exceed half the length of the time-series data; otherwise, the constraint will be meaningless. In most applications, the window width ranges from 0 to a small integer (such as 5, 10, 20, etc.), depending on the data characteristics and alignment requirements. For example, if the data length T=100, the theoretical range of the Sakoe-Chiba band window width is 0 to 20; if the data length T=1000, the theoretical range of the Sakoe-Chiba band window width is 0 to 50. Therefore, in this embodiment of the invention, the data lengths of two power consumption time-series data to be analyzed are obtained, the maximum data length T is obtained, and the window width is set... , No restrictions are imposed here.
[0052] If the optimal window constraint is an Itakura parallelogram, then the maximum and minimum theoretical values of the slope of the Itakura parallelogram are obtained. The difference between the maximum and minimum theoretical values is calculated, and the product of this difference and the window data fluctuation characteristic value is used as the slope adjustment value. The sum of the minimum theoretical value and the slope adjustment value is recorded as the optimal slope of the Itakura parallelogram, where the slope of the Itakura parallelogram refers to its aspect ratio. The formula for calculating the optimal slope is: in, This represents the optimal slope corresponding to any local partitioning window. This represents the minimum theoretical value of the slope of an Itakura parallelogram. This represents the maximum theoretical value of the slope of the Itakura parallelogram. This represents the window data fluctuation characteristic value of any local partitioned window.
[0053] It should be noted that the theoretical range of slope values for Itakura parallelograms is as follows: The minimum possible value is 1, but in practical applications, It will be slightly greater than 1 to ensure a certain constraint effect; There is no strict theoretical upper limit, but it is too large. This could lead to overly lenient constraints, rendering them meaningless. The common default range is (1 to 3), when When the line is close to the diagonal, the constraints are strict; when... At this time, larger deviations are allowed, and the constraints are loose. Special case: If the data fluctuates significantly, a larger... (e.g., from 2.0 to 3.0) to allow for more flexible alignment; if the data fluctuation is small, a smaller setting can be used. (e.g., 1.0 to 2.0) to limit path deviation, therefore, preferably, embodiments of the present invention are configured as follows: No restrictions are imposed here.
[0054] Based on the above method for obtaining the optimal parameters, the optimal parameters corresponding to any local partitioning window under the optimal window constraint method can be obtained. Similarly, the optimal parameters corresponding to each local partitioning window under the optimal window constraint method can be obtained.
[0055] Step S104: Obtain the optimal parameters corresponding to each local partition window under the optimal window constraint method. Based on the optimal parameters corresponding to each local partition window under the optimal window constraint method, use the fast DTW algorithm to perform similarity analysis on the two electricity consumption time series data to be analyzed, and obtain the corresponding similarity analysis results. These results are used to perform different monitoring purposes under different electricity consumption scenarios.
[0056] In the similarity analysis of two electricity consumption time-series data sets using the fast DTW algorithm, adjusting the optimal window constraint method (such as Itakura parallelogram or Sakoe-Chiba band) and the optimal parameters within the local partitioned window (slope of Itakura parallelogram or window width of Sakoe-Chiba band) can significantly improve the processing efficiency of smart meter data and the accuracy of similarity analysis. Therefore, based on the optimal parameters corresponding to each local partitioned window under the optimal window constraint method, the fast DTW algorithm is used to perform similarity analysis on two electricity consumption time-series data sets, obtaining corresponding similarity analysis results. These results can then be used for different monitoring purposes under different electricity consumption scenarios, such as locating electricity theft, monitoring equipment faults, and predicting energy management loads. The fast DTW algorithm is existing technology and will not be elaborated upon here, nor will the different monitoring purposes under different electricity consumption scenarios based on the similarity analysis results be elaborated upon here.
[0057] It should be noted that the Fast DTW algorithm, by recursively compressing time series and progressively refining paths, combined with dynamic window constraints, can quickly narrow the search range and avoid the high complexity of global traversal. Specifically, window constraints limit the degree to which the path deviates from the diagonal, ensuring that the alignment process is within a reasonable range, reducing computation while preserving key matching features. By reducing computational complexity, the Fast DTW algorithm can efficiently process large-scale, high-frequency acquired data (such as voltage and current sequences once per second or minute), improving real-time analysis capabilities. Window constraints effectively filter noise interference by focusing on key alignment paths, improving the accuracy of anomaly detection (such as voltage surges and current overloads). Dynamic parameter adjustment (the slope of the Itakura parallelogram changes with the degree of fluctuation) allows the Fast DTW algorithm to adapt to different power consumption scenarios (such as high-frequency fluctuations in industrial equipment or stable cycles in residential electricity consumption), enhancing the model's generalization ability. These advantages collectively promote intelligent management of power systems, including accurate load forecasting, rapid fault location, and energy efficiency optimization, providing reliable technical support for fair competition and stable operation of the electricity market.
[0058] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for processing data collected by a smart meter, characterized in that, The method includes: Acquire the electricity consumption time-series data to be analyzed collected by the smart meter in two time periods; Relative error analysis and data change difference analysis are performed on two power consumption time series data to be analyzed to obtain the difference feature values of the two power consumption time series data. Based on the difference feature values, the optimal window constraint method of the fast DTW algorithm is obtained. The optimal window constraint method includes Sakoe-Chiba strip or Itakura parallelogram. Two power consumption time series data to be analyzed are divided side by side using a local window of a preset length to obtain at least two local partition windows. Each local partition window contains data from both power consumption time series data to be analyzed. For any local partition window, the window data fluctuation characteristic value is obtained based on the data difference in any local partition window. Based on the window data fluctuation characteristic value, the optimal parameters corresponding to any local partition window under the optimal window constraint method are obtained. The optimal parameters include: the window width of the Sakoe-Chiba band or the slope of the Itakura parallelogram. The optimal parameters corresponding to each local partition window under the optimal window constraint method are obtained. Based on the optimal parameters corresponding to each local partition window under the optimal window constraint method, the fast DTW algorithm is used to perform similarity analysis on two electricity consumption time series data to be analyzed, and the corresponding similarity analysis results are obtained. These results are used to carry out different monitoring purposes under different electricity consumption scenarios. The process involves performing relative error analysis and data variation difference analysis on two sets of electricity consumption time-series data to obtain the difference characteristic values of the two sets of electricity consumption time-series data, including: The data length of each electricity consumption time series data to be analyzed is obtained, the absolute value of the data length difference and the minimum data length are obtained, and the ratio of the absolute value of the data length difference to the minimum data length is calculated and recorded as the relative error between the two electricity consumption time series data to be analyzed. The range, mean, and standard deviation of each electricity consumption time series data to be analyzed are obtained respectively. The absolute values of the differences in the range, mean, and standard deviation between two electricity consumption time series data to be analyzed are obtained. The absolute values of the differences in the range, mean, and standard deviation are normalized respectively to obtain the normalized values of the range difference, mean difference, and standard deviation. The mean of the normalized values of the mean difference and standard deviation is calculated. The normalized values of the range difference and the mean are weighted and summed to obtain the change rate characteristic value of the two electricity consumption time series data to be analyzed. By combining the relative error and rate of change characteristic values of the two electricity consumption time series data to be analyzed, the difference characteristic values of the two electricity consumption time series data to be analyzed are obtained.
2. The smart meter data acquisition and processing method according to claim 1, characterized in that, The method combines the relative error and rate of change characteristic values of the two electricity consumption time series data to be analyzed, and obtains the difference characteristic values of the two electricity consumption time series data to be analyzed, including: The relative error is normalized to obtain a normalized relative error value. Based on the mean of the normalized relative error value and the rate of change characteristic value, the difference characteristic value of the two electricity consumption time series data to be analyzed is obtained.
3. The smart meter data acquisition and processing method according to claim 1, characterized in that, The step of obtaining the optimal window constraint method for the fast DTW algorithm based on the difference feature values includes: Obtain a preset threshold for difference feature values. If the difference feature value is less than the threshold, the optimal window constraint method for the fast DTW algorithm is the Sakoe-Chiba band. If the difference feature value is greater than or equal to the threshold, the optimal window constraint method for the fast DTW algorithm is the Itakura parallelogram.
4. The smart meter data acquisition and processing method according to claim 1, characterized in that, The step of obtaining window data fluctuation characteristic values based on the data differences in any of the local partitioned windows includes: Calculate the mean, standard deviation, and range of all data in any local partition window. Calculate the ratio of the mean to the standard deviation. Normalize the ratio and the range to obtain the normalized ratio value and the normalized range value. Weight the normalized ratio value and the normalized range value to obtain the window data fluctuation characteristic value of any local partition window.
5. The method for processing data collected by a smart meter according to claim 1, characterized in that, The step of obtaining the optimal parameters corresponding to any local partitioning window under the optimal window constraint method based on the window data fluctuation characteristic value includes: If the optimal window constraint method is Sakoe-Chiba band, then obtain the maximum and minimum theoretical values of the window width of Sakoe-Chiba band, calculate the difference between the maximum and minimum theoretical values, use the product of the difference and the window data fluctuation characteristic value as the width adjustment value, and record the sum of the minimum theoretical value and the width adjustment value as the optimal window width of Sakoe-Chiba band.
6. The method for processing data collected by a smart meter according to claim 1, characterized in that, The step of obtaining the optimal parameters corresponding to any local partitioning window under the optimal window constraint method based on the window data fluctuation characteristic value further includes: If the optimal window constraint is an Itakura parallelogram, then obtain the maximum and minimum theoretical values of the slope of the Itakura parallelogram, calculate the difference between the maximum and minimum theoretical values, use the product of the difference and the window data fluctuation characteristic value as the slope adjustment value, and record the sum of the minimum theoretical value and the slope adjustment value as the optimal slope of the Itakura parallelogram.
Citation Information
Patent Citations
Method and device for predicting residual life of intelligent electric energy meter
CN118707433A
KR20220080520A