A High-Frequency Data Compression Acquisition Method for Electric Load Based on Edge Adaptive Pattern Matching
By dividing the power load data into non-stationary and stationary segments, and using edge adaptive pattern matching and differential encoding methods, the problem of high communication bandwidth pressure in power system data compression is solved, and efficient data compression and reconstruction is achieved.
Patent Information
- Application Number
- CN202411687101.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-11-25
AI Technical Summary
The existing power system data compression methods retain key information while maintaining limited compression effects, especially under the influence of sparseness and noise data, resulting in high communication bandwidth pressure.
Based on edge adaptive pattern matching, the power load data is divided into non-stationary and stationary segments, and edge adaptive pattern matching and differential encoding are used for compression, and the pattern matching and update is used for cloud and terminal synchronous databases.
While retaining key information, it significantly reduces communication bandwidth, optimizes data compression effect, and improves compression ratio and reconstruction accuracy.
Smart Images

Figure CN119602805B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of advanced metering infrastructure data compression, and particularly to a method for compressing and collecting high-frequency power load data based on edge adaptive pattern matching. Background Art
[0002] The power system plays a crucial role in the development of modern economic society. At present, with the growth and development of China's productivity, both industrial electricity demand and residential electricity consumption have increased significantly. The power industry has become a basic industry and an important public utility that supports the development of the national economy. With the emergence and popularization of the advanced metering infrastructure, it plays an important role in improving the measurement and transmission of information, facilitating the full analysis and application of user electricity consumption information, and making it possible to realize functions such as user electricity consumption behavior analysis and recognition, load forecasting, and load state estimation. However, the generation of massive data has brought huge pressure to the realization of communication equipment and functional requirements, affecting the efficient and rapid access of data. Conducting relevant research on data compression to save the storage capacity of data as much as possible and reduce the data communication bandwidth while retaining useful information has become an urgent problem to be solved.
[0003] Currently, the mainstream data compression methods are mainly divided into lossy compression and lossless compression. Among them, lossless compression achieves the purpose of data compression by removing some redundant information in the original representation information and reducing the redundancy in the information. This method can retain all the information of the original data and avoid the loss of various information, but the compression ratio is relatively low.
[0004] Lossy compression achieves greater data compression by identifying unnecessary information in the data and removing it, allowing the original information to be lost to a certain extent. This method has many applications in fields such as imaging, video, industry, and medicine. Different fields have corresponding dedicated compression methods for different data characteristics. There are many studies on lossy compression methods. There are some data compression methods based on piecewise function approximation. By dividing the time series according to certain rules and approximating each segment with a corresponding function, the data is compressed. Existing compressed sensing technology can also compress and reconstruct signals at a rate far lower than the rate required by the Nyquist sampling theorem. Existing methods consider and optimize different aspects such as measurement matrices, sparse bases, and reconstruction methods. They have good applications in many fields such as image processing and biomedicine. However, the sparsity of power system data needs to be optimized and adjusted, and large errors may occur in their application. There are also some lossy compression methods that use singular value decomposition technology to transmit the compressed data to the receiving end and reconstruct the transmitted data by matrix multiplication. Existing methods propose corresponding compression based on principal component analysis and iterative principal component analysis methods. However, due to the influence of noisy data, this method has certain limitations and the compression effect is limited. How to compress data according to the characteristics of power system data information while minimizing the loss of its inherent characteristic information and forming an effective compression method for power system load data. Summary of the Invention
[0005] The purpose of the present invention is to propose a method for compressing and collecting high-frequency data of power loads based on edge adaptive pattern matching to solve the problems existing in the above-mentioned prior art, retain key information as much as possible, and at the same time perform data compression, reduce the transmission communication bandwidth, alleviate communication pressure, and obtain good compression effect.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] A method for compressing and collecting high-frequency data of electric loads based on edge adaptive pattern matching, comprising:
[0008] Based on the different characteristics of the information data contained, the load data is divided into non-stationary segment data and stable segment data;
[0009] The non-stationary segment data is compressed using an edge adaptive pattern matching method;
[0010] The stationary segment data is compressed using differential coding.
[0011] Optionally, based on different characteristics of the information data contained, dividing the load data into non-stationary segment data and stationary segment data includes:
[0012] Based on the event detection method, perform event detection on the load data to divide the event segment data and non-event segment data;
[0013] Perform fluctuation detection on the non-event segment data to divide the fluctuation segment data and the stable segment data; wherein, the event segment data and the fluctuation segment data constitute the non-stationary segment data.
[0014] Optionally, for the non-stationary segment data, the method of compression using edge adaptive pattern matching includes:
[0015] Construct a synchronized power load pattern database in the cloud and the terminal;
[0016] Subdivide the non-stationary segment data by clustering and record the class center points to obtain a clustering set with center points;
[0017] Match the center points of the different clustering sets with the patterns in the power load pattern database, calculate the distances between the center points of the clustering sets to be matched and the data samples in the pattern database. If the minimum value of the distances between the center points of the clustering sets to be matched and all patterns in the pattern database is within the set threshold range, the matching is successful, and the pattern of this clustering set is matched to the closest known pattern;
[0018] Compress the successfully matched data.
[0019] Optionally, the clustering of the non-stationary segment data includes:
[0020] Step 1. Randomly select a data sample in the non-stationary segment data sample set as the center point;
[0021] Step 2. Find all the points whose distances from the center point are within the bandwidth, denote them as set Q, and regard these points as belonging to cluster c;
[0022] Step 3. Calculate the distance vectors from the center point to each element in set Q, add these distance vectors to obtain the offset vector;
[0023] Step 4. Move the center point along the direction of the offset vector, where the moving distance is the modulus value of the offset vector;
[0024] Step 5. Repeat steps 2 - 4 until the magnitude of the offset vector meets the set threshold requirement, and record the center point at this time;
[0025] Step 6. Repeat steps 1 - 5 until all the points are classified and all the points have their own clustering centers;
[0026] Step 7. According to each class and the access frequency of each point, select the class with the highest access frequency as the class to which the current point set belongs.
[0027] Optionally, for the non-stationary segment data, the method of compression using edge adaptive pattern matching further includes:
[0028] Regard the patterns corresponding to the clustering sets that have not been successfully matched as new patterns, supplement and update the original power load pattern database based on the new patterns, transmit the original data closest to the center point to the cloud, and synchronously supplement the original data to the power load pattern databases of the terminal and the cloud. Sequentially number the patterns corresponding to the original data, and update the power load pattern database.
[0029] Optionally, for the stationary segment data, the method of compression using differential coding includes:
[0030] Compress the stationary segment data using differential coding, completely record the first data value, and then only record the difference between two consecutive data values, thereby generating a new data sequence, and perform Golomb coding and arithmetic coding on the new data sequence successively.
[0031] Optionally, the method of performing Golomb coding on the new data sequence includes:
[0032] For the value d in the new data sequence to be encoded i , calculate its corresponding unsigned number v according to the formula i , then add 1 to v i and convert it to binary form, the number of bits is s i , then add s i - 1 zeros before the obtained binary form codeword to obtain its Golomb coding.
[0033] Concatenate the Golomb codes of the values in the new data sequence to obtain the corresponding encoded string.
[0034]
[0035] Among them, d i represents the value of the i-th data in the data sequence, and v i represents the unsigned number corresponding to the i-th data in the data sequence.
[0036] Optionally, the method of performing arithmetic coding on the encoded string includes:
[0037] S1. Count the number of occurrences of the two symbols 0 and 1 in the encoding string, and project the probabilities of the occurrence times into the probability intervals within [0, 1). Record the probability of symbol 0 as p, and the corresponding character interval as [0, p). Then the probability of symbol 1 is 1 - p, and the corresponding character interval is [p, 1): Denote the left interval value corresponding to each symbol as l num , and the right interval value as h num , and all the sub-intervals add up to [0, 1);
[0038] S2. Represent the obtained encoding interval each time as [L, H). The initial interval of the encoding is [0, 1). At this time, L = 0, H = 1, and the current order is i = 0. Then L i = 0, H i = 1;
[0039] S3. Read the characters in the encoding string sequentially, increment the current order sequentially, and calculate the L i and H i values corresponding to the encoding interval of the current order through a preset formula;
[0040] S4. Repeat S3 until all the characters in the encoding string have been read;
[0041] S5. Obtain the final encoding interval [L end , H end ). Select the decimal number with the shortest binary representation from the final encoding interval and perform binary encoding, which is the arithmetic coding value of the encoding string.
[0042] Optionally, the preset formula is:
[0043]
[0044] where L i represents the left interval value of the encoding interval corresponding to the i-th time, L i+1 represents the left interval value of the encoding interval corresponding to the (i + 1)-th time, H i represents the right interval value of the encoding interval corresponding to the i-th time, H i+1 represents the right interval value of the encoding interval corresponding to the (i + 1)-th time, l num represents the left interval value of the probability interval corresponding to the symbol, and h num represents the right interval value of the probability interval corresponding to the symbol.
[0045] Optionally, the method further includes respectively reconstructing the compressed non-stationary segment data and stationary segment data, and splicing the reconstruction results.
[0046] Optionally, respectively reconstructing the compressed non-stationary segment data and stationary segment data includes:
[0047] For the compressed non-stationary segment data, according to the compression format and the cloud mode database, perform matching according to the mode and number of the compressed non-stationary segment data, and adjust the sequence length for data reconstruction; decode the compressed stationary segment data according to the encoding method, and perform reconstruction of different segments in chronological order.
[0048] The beneficial effects of the present invention are as follows:
[0049] First, based on the different characteristics of the information data contained, the load data is divided into non-stationary segment data and stationary segment data; secondly, for the non-stationary segment data, a method based on edge adaptive pattern matching is used for compression; for the stationary segment data, differential encoding is used for compression; then, the compressed non-stationary segment data and stationary segment data are respectively reconstructed, and the reconstruction results are spliced. The present invention reduces the communication bandwidth as much as possible while storing key information, and optimizes the data compression effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0051] Figure 1 It is a schematic flow chart of a method for compressing and collecting high-frequency power load data based on edge adaptive pattern matching according to an embodiment of the present invention;
[0052] Figure 2 It is a flow chart for data compression and reconstruction of non-stationary segment data according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0054] In order to make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments.
[0055] As Figure 1 shown, this embodiment proposes a method for compressing and collecting high-frequency power load data based on edge adaptive pattern matching, including:
[0056] Based on the differences in the characteristics of the contained information data, the load data is divided into non-stationary segment data and stationary segment data;
[0057] For the non-stationary segment data, a method based on edge adaptive pattern matching is used for compression;
[0058] For the stationary segment data, differential coding is used for compression;
[0059] The compressed non-stationary segment data and stationary segment data are respectively reconstructed, and the reconstruction results are spliced.
[0060] Specifically, in this embodiment, for the acquired data, according to the differences in the characteristics of the contained information data, it is divided into event segment, fluctuation segment, and stationary segment data. For the event segment and fluctuation segment data, a data compression method based on edge adaptive pattern matching is adopted. A pattern database is synchronously established in the cloud and the terminal, and it is matched with the patterns in the terminal pattern database through a clustering method, and transmitted according to the corresponding compression format. At the same time, for the data that fails to be successfully matched, the pattern database is automatically updated to facilitate the compression of subsequent similar segments, achieving an edge adaptive data compression method; for the stationary segment data, since the data is relatively stable and the change range is small, differential coding is used to compress the data. After the compressed data is transmitted to the cloud, the non-stationary segment data is reconstructed based on the corresponding information and the cloud pattern database; the stationary segment data is decoded and reconstructed to obtain the reconstructed data. This method stores key information while minimizing the communication bandwidth as much as possible and optimizing the data compression effect.
[0061] Further, dividing the load data into non-stationary segment data and stationary segment data based on the differences in the characteristics of the contained information data includes:
[0062] Based on an event detection method, event detection is performed on the load data to divide the event segment data and non-event segment data;
[0063] Fluctuation detection is performed on the non-event segment data to divide the fluctuation segment data and stationary segment data; among them, the event segment data and the fluctuation segment data constitute the non-stationary segment data.
[0064] Specifically, in this embodiment, for the obtained load data, event detection is performed through an event detection algorithm to divide the event segment and non-event segment. On this basis, fluctuation detection is performed on the non-event segment data to divide the fluctuation segment and stationary segment data. The meanings of the event segment, fluctuation segment, and stationary segment data are as follows:
[0065] An event segment refers to the process of the operating state of an electrical appliance changing, including the switching operations of electrical equipment and the switching between different operating state modes. This process is manifested as a change in the power value in terms of power, and its waveform is relatively complex and contains rich and useful information, providing a basis for relevant data analysis and applications;
[0066] The power in the fluctuation segment is usually in an obvious state of change, which is often generated during the operation of some electrical appliances. For example, obvious power fluctuations will occur when washing machines, air conditioners, heat pumps, etc. are working;
[0067] A steady segment refers to the data segment except for the above two types of data segments. The operating state of the electrical appliance remains stable, without obvious power value fluctuations, and is in a steady state. Compressing this part can also have a relatively large compression effect.
[0068] Furthermore, for the non-steady segment data, the method of compression using edge adaptive pattern matching includes:
[0069] Construct a synchronized power load pattern database in the cloud and at the terminal;
[0070] Subdivide the non-steady segment data by clustering and record the center points to obtain a clustering set with center points;
[0071] Match the center points of the different clustering sets with the patterns in the power load pattern database, calculate the distance between the center point of the clustering set to be matched and the data samples in the pattern database. If the minimum value of the distances between the center point of the clustering set to be matched and all patterns in the pattern database is within the set threshold range, the matching is successful, and the pattern of this clustering set is matched to the nearest known pattern;
[0072] Compress the successfully matched data.
[0073] Furthermore, in this embodiment, as Figure 2 shown, a synchronized power load pattern database is established in the cloud and at the terminal for storing different categories of power load patterns. For the non-steady segments divided in step 1, namely the event segment and the fluctuation segment, a data compression method based on edge adaptive pattern matching is adopted. The present invention uses the form of clustering to subdivide the patterns:
[0074] There are also different ways of clustering algorithms. In this embodiment, considering that the time series of event segments is usually relatively short, while the time series of fluctuation segments is relatively long and will last for a certain period of time and usually has a certain regularity. Therefore, a shape-based method is used for clustering event segments, and the Euclidean distance between different sequences is calculated as the similarity metric standard. At the same time, the dynamic time warping algorithm is used to handle the calculation between sequences of different lengths. For fluctuation segments, a feature-based method is used for clustering, and the distance between feature vectors of different sequences is calculated as the similarity metric. Taking this as the discrimination criterion, the data variance, the average value of the data, and the range of the data are selected as feature quantities in the present invention. On this basis, the clustering algorithm idea of mean shift is used to cluster the data of event segments and fluctuation segments, and the specific steps are as follows:
[0075] Step 1. First, randomly select a data sample from the pattern data samples to be matched as the center point;
[0076] Step 2. Find all the points whose distances from the center point are within the bandwidth, denoted as set Q, and consider these points to belong to cluster c;
[0077] Step 3. Calculate the distance vectors from the center point to each element in set Q, and add these distance vectors to obtain the offset vector;
[0078] Step 4. The center point moves along the direction of the offset vector, and the moving distance is the modulus value of the offset vector;
[0079] Step 5. Repeat steps 2 - 4 until the magnitude of the offset vector meets the set threshold requirement, and record the center point at this time;
[0080] Step 6. Repeat steps 1 - 5 until all points are classified and all points have their own clustering centers;
[0081] Step 7. According to each class, for the access frequency of each point, select the class with the maximum access frequency as the class to which the current point set belongs.
[0082] Match the center points of the obtained different clustering sets with the patterns in the pattern database, calculate the distances between the center points of the clustering sets to be matched and the data samples in the pattern database. If the minimum value of the distances between the center points of the clustering sets to be matched and all patterns in the pattern database is within the set threshold range, it indicates a successful match, and the pattern of this clustering set is matched to the known pattern closest to it.
[0083] Compress and store the successfully matched data, compress it according to the corresponding compression format and transmit it to the cloud. The specific compression format is as follows:
[0084] The event segment is stored in the format of {1, record1, length1}, where 1 represents that this sequence is an event segment, corresponding to the pattern in the event pattern database; record1 represents the category of this event sequence corresponding to the pattern number in the pattern database; length1 represents the length of the data time series of this event segment. The fluctuation segment is stored in the compressed format of {0, record0, length0}, where 0 represents that this sequence is a fluctuation segment, corresponding to the pattern in the fluctuation pattern database; record0 represents the category of this fluctuation sequence corresponding to the pattern number in the pattern database; length0 represents the length of the data time series of this fluctuation segment. During reconstruction, the corresponding pattern needs to be supplemented or truncated to the actual duration of this fluctuation.
[0085] For the clustering sets that fail to match successfully, it indicates that their corresponding patterns are new patterns. It is necessary to supplement and update the original pattern database. Transmit the original data closest to the center point in the clustering set to the cloud, and synchronously supplement it to the pattern databases of the terminal and the cloud. Sequentially number this pattern, update the original pattern database, and perform edge adaptive adjustment and update on the pattern matching database for subsequent data compression.
[0086] Furthermore, for the stationary segment data, the compression method using differential coding includes:
[0087] Use differential coding to compress the stationary segment data. Completely record the first data value, and then only record the difference between two consecutive data values to generate a new data sequence, and perform Golomb coding and arithmetic coding on the new data sequence successively.
[0088] Specifically, in this embodiment, for the stationary segment data, since its change amplitude is small, differential coding is used to compress it. Completely record the first data value, and then only record the difference between two consecutive data values to generate a new data sequence, and perform Golomb coding and arithmetic coding on the new data sequence successively. Golomb coding can compress smaller values into shorter codewords, and has a high compression efficiency for the differential sequence of the stationary segment data. Further eliminate redundancy through arithmetic coding, and then use less space to store the corresponding data.
[0089] In the specific implementation process, a rounding strategy can be adopted for the data in the power load stable section. Since the data in the stable section changes relatively smoothly, rounding basically does not damage the key information in use. Then, differential coding is performed on the obtained rounded data to generate a new data sequence. After that, Golomb coding is performed on the obtained new data sequence. Using the variable-length coding form in Golomb coding, the numerical value is converted into a shorter codeword. Subsequently, each codeword is concatenated together to obtain the corresponding coded string. Arithmetic coding is performed on the obtained coded string to obtain the final compressed representation. The specific steps of Golomb coding are as follows:
[0090] For the numerical value d in the new data sequence to be coded i , calculate its corresponding unsigned number v according to formula (1) i , and then convert v i after adding 1 into binary form, and the number of bits is s i , then add s i - 1 zeros before the obtained binary form codeword to obtain its Golomb coding.
[0091] Concatenate the Golomb codings of the numerical values in the new data sequence to obtain the corresponding coded string.
[0092]
[0093] Among them, d i represents the numerical value of the i-th data in the data sequence, and v i represents the unsigned number corresponding to the i-th data in the data sequence.
[0094] For the obtained coded string, perform arithmetic coding. The specific steps are as follows:
[0095] S1. The obtained coded string is composed of two symbols, 0 and 1. First, count the number of times 0 and 1 appear, and project their probabilities into the probability intervals within [0,1). Here, the corresponding probability intervals are called character intervals. Record the probability of symbol 0 as p, and the corresponding character interval is [0,p). Then the probability of symbol 1 is 1 - p, and the corresponding character interval is [p,1). Denote the left interval value of each symbol as l num , and the right interval value as h num , and all the sub-intervals add up to exactly [0,1);
[0096] S2. Represent the coding interval obtained each time as [L,H). The initial interval of coding is [0,1). At this time, L = 0, H = 1, and the current order is i = 0. Then L i = 0, H i = 1;
[0097] S3. Read the characters in the encoding string in sequence, increment the current order by one each time, and calculate the L corresponding to the encoding interval of the current order through formula (2). i and H i values;
[0098] S4. Repeat S3 until all characters in the encoding string have been read;
[0099] S5. Obtain the final encoding interval [L end , H end ), select the decimal number with the shortest binary representation from this interval, and perform binary encoding on it. This encoding is the arithmetic encoding value of the encoding string;
[0100]
[0101] Furthermore, reconstructing the compressed non-stationary segment data and stationary segment data respectively includes:
[0102] For the compressed non-stationary segment data, according to the compression format and the cloud mode database, match according to the mode and number of the compressed non-stationary segment data, and adjust the sequence length for data reconstruction; decode the compressed stationary segment data and reconstruct different segments in chronological order.
[0103] Specifically, in this embodiment, reconstruct the compressed data uploaded to the cloud. For the non-stationary segment data, match according to its mode and number according to the compression format, and reconstruct according to the data in the corresponding cloud mode database, but it needs to be adjusted according to its sequence length to correspond to the length of the original data; for the stationary segment data, decode it, and the decoding process is the opposite of the encoding process:
[0104] First, perform entropy decoding on the compressed encoding. Starting from the decimal number obtained by encoding, continuously find which probability interval the decimal number falls into to find out the original character; then split the concatenated encoding string into multiple groups of variable-length codewords. First, scan the symbols of the codewords from left to right, and first find the first non-zero bit, that is, the delimiter bit. Calculate the number of bits equal to 0 before the delimiter bit and record it as t. Then, the codeword with a length of 2t + 1, including the first t bits and the last t bits before and after the delimiter bit, is the first exponential Golomb codeword obtained by splitting. Then this encoding is removed from the codewords to be scanned, and the above scanning continues until all codewords have been split. Decode each of the split exponential Golomb codewords to obtain its corresponding differential data. Finally, keep the first value of the sequence unchanged, and each subsequent value is added to its respective previous value to restore the data after rounding processing.
[0105] Reconstructing non-stationary segments of data primarily relies on information transmitted to the cloud: the compressed structured data corresponding to this segment and the original cloud-based data pattern library. The encoding within the compressed structured data identifies the corresponding event or fluctuation pattern library, as well as the corresponding pattern type within that library. The cloud-based data pattern library stores the original data corresponding to that pattern. The original data in the corresponding pattern is then adjusted to the original length of the compressed data, and the adjusted data segment serves as the reconstructed data.
[0106] Reconstruct different fragments of data in different ways, and stitch the reconstruction results together in chronological order to obtain complete reconstructed data.
[0107] The following experiment uses publicly available REDD data from US households. This data includes various electrical appliances, including ovens, refrigerators, dishwashers, lighting fixtures, dryers, microwave ovens, and electric heaters. The data is sampled at a 1Hz frequency. This experiment uses daily electricity consumption data from each household to test and analyze the effectiveness of data compression. The data compression results are evaluated based on both reconstruction accuracy and compression ratio. The compression ratio (CR) is used to evaluate the amount of data reduction, while the RMSE (Real Value Sequence Error) metric is used to measure reconstruction accuracy. The compression method FLDC is used as a comparison method for the method proposed in this example.
[0108] Table 1 Comparison of RMSE and CR of different methods
[0109]
[0110] Table 1 shows a comparison of the two methods in terms of reconstruction accuracy and compression ratio. RMSE, or root mean square error, represents the difference between the reconstructed data and the original data under different calculation methods. This shows that the method proposed in this embodiment achieves lower reconstruction error and higher reconstruction accuracy. Using RMSE as an indicator, the reconstruction accuracy of this embodiment reaches 99.8%. During the reconstruction process, the FLDC method uses GVE to distinguish between the ground state and the excited state, which can easily lead to the classification of low-amplitude fluctuations as the ground state and the use of the same value for reconstruction. The method proposed in this embodiment, however, allows for reasonable data compression across different states, mitigating this problem. The average compression ratio of the method proposed in this embodiment is 40.895, surpassing the average compression ratio of 12.19 of the FLDC method. Therefore, this embodiment achieves excellent compression results while preserving critical information as much as possible, improving compression, reducing communication bandwidth, and alleviating communication pressure.
[0111] The embodiments described above are only descriptions of the preferred embodiments of the present invention and do not limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. A high-frequency data compression acquisition method for electric power load based on edge adaptive pattern matching, characterized in that, Including: Based on the different characteristics of the contained information data, the load data is divided into non-stationary segment data and stationary segment data; For the non-stationary segment data, a method based on edge adaptive pattern matching is used for compression; For the stationary segment data, differential coding is used for compression; Using the method based on edge adaptive pattern matching to compress the non-stationary segment data includes: Constructing a synchronized power load pattern database in the cloud and the terminal; wherein, the power load pattern database includes: an event pattern library and a fluctuation pattern library; Clustering the non-stationary segment data to obtain a clustering set with center points; Matching the center points with the power load pattern database of different patterns, calculating the distance between the center point of the clustering set to be matched and the data samples in the pattern database, if the minimum value of the distances between the center point of the clustering set to be matched and all patterns in the pattern database is within the set threshold range, the matching is successful, and the pattern of the clustering set is matched to the nearest known pattern; Compressing the successfully matched data; Clustering the non-stationary segment data includes: Step 1. Randomly select a data sample in the non-stationary segment data sample set as the center point; Step 2. Find all points whose distances from the center point are within the bandwidth, denoted as set Q, and regard these points as belonging to cluster c; Step 3. Calculate the distance vectors from the center point to each element in set Q, and add these distance vectors to obtain an offset vector; Step 4. Move the center point along the direction of the offset vector, where the moving distance is the modulus value of the offset vector; Step 5. Repeat steps 2 - 4 until the magnitude of the offset vector meets the set threshold requirement, and record the center point at this time; Step 6. Repeat steps 1 - 5 until all points are classified and all points have their own clustering centers; Step 7. According to each class, for the access frequency of each point, select the class with the maximum access frequency as the class to which the current point set belongs; Using the method based on edge adaptive pattern matching to compress the non-stationary segment data further includes: Regarding the patterns corresponding to the clustering sets that are not successfully matched as new patterns, supplementing and updating the original power load pattern database based on the new patterns, transmitting the original data closest to the center point to the cloud, and synchronously supplementing the original data to the power load pattern databases in the terminal and the cloud, sequentially numbering the patterns corresponding to the original data, and updating the power load pattern database; wherein, the original data refers to the initial data collected from the collector without compression processing.
2. The method for high-frequency data compression acquisition of electric power load based on edge adaptive pattern matching according to claim 1, characterized in that Based on the different characteristics of the contained information data, dividing the load data into non-stationary segment data and stationary segment data includes: Based on the event detection method, performing event detection on the load data to divide the event segment data and non-event segment data; Performing fluctuation detection on the non-event segment data to divide the fluctuation segment data and the stationary segment data; wherein, the event segment data and the fluctuation segment data constitute the non-stationary segment data.
3. The power load high-frequency data compression acquisition method based on edge adaptive pattern matching according to claim 1, characterized in that Compressing the stationary segment data by using differential coding includes: Compressing the stationary segment data by using differential coding, completely recording the first data value, and then only recording the difference between two consecutive data values, thereby generating a new data sequence, and performing Golomb coding and arithmetic coding on the new data sequence successively.
4. The method for high-frequency data compression acquisition of electric power load based on edge adaptive pattern matching according to claim 1, characterized in that Performing Golomb coding on the new data sequence includes: The value d in the new data sequence to be encoded i , calculate its corresponding unsigned number v according to the formula i , then add 1 to v i and convert it to binary form, the number of bits is s i , then add s i -1 zeros in front of the obtained binary form codeword to get its Golomb code; Concatenating the Golomb codes of the values in the new data sequence to obtain a corresponding coding string; where d i represents the value of the i-th data in the data sequence, and v i represents the unsigned number corresponding to the i-th data in the data sequence.
5. The method for high-frequency data compression acquisition of electric power load based on edge adaptive pattern matching according to claim 4, characterized in that, Performing arithmetic coding on the coding string includes: S1. Count the occurrences of the two symbols 0 and 1 in the encoded string, and project the probabilities of the occurrence times into the probability intervals within [0, 1). Record the probability of symbol 0 as p, and the corresponding character interval as [0, p). Then the probability of symbol 1 is 1 - p, and the corresponding character interval is [p, 1): Denote the left interval value corresponding to each symbol as l num , and denote the right interval value as h num , and all the sub-intervals add up to [0, 1); S2. Represent each obtained coding interval as [L, H). The initial coding interval is [0, 1). At this time, L = 0, H = 1, and the current order is i = 0, then L i = 0, H i = 1; S3. Read the characters in the encoded string in sequence, increment the current order by one in sequence, and calculate the L i and H i values corresponding to the encoding interval of the current order through a preset formula; S4. Repeat S3 until all characters in the coding string have been read; S5. Obtain the final coding interval [L end , H end ), select the decimal number with the shortest binary representation from the final coding interval, and perform binary coding, which is the arithmetic coding value of the coding string.
6. The method for high-frequency data compression acquisition of electric power load based on edge adaptive pattern matching according to claim 5, wherein The preset formula is: Among them, L i represents the left interval value of the coding interval corresponding to the i-th time, and L i+1 represents the left interval value of the coding interval corresponding to the (i + 1)-th time, and H i represents the right interval value of the coding interval corresponding to the i-th time, and H i+1 represents the right interval value of the coding interval corresponding to the (i + 1)-th time, and l num represents the left interval value of the probability interval corresponding to the symbol, and h num represents the right interval value of the probability interval corresponding to the symbol.
7. The method for high-frequency data compression acquisition of electric power load based on edge adaptive pattern matching according to claim 1, characterized in that The method further includes: respectively reconstructing the compressed non-stationary segment data and stationary segment data, and splicing the reconstruction results; Respectively reconstructing the compressed non-stationary segment data and stationary segment data includes: For the compressed non-stationary segment data, according to the compression format and the cloud mode database, matching according to the mode and number of the compressed non-stationary segment data, and adjusting the sequence length for data reconstruction; for the compressed stationary segment data, decoding according to the coding method and reconstructing different segments in chronological order.
Citation Information
Patent Citations
Cloud collaborative self-adaptive dividing and conquering method for high-frequency data compression and reconstruction of intelligent electric meter
CN115827577A