Power load high-frequency data compression and acquisition method based on edge adaptive mode matching
By using a combination of edge adaptive pattern matching and differential encoding in the power system, the power load data is compressed and reconstructed, and the problems of limited data compression effect and noise in the prior art are solved, and efficient data compression and reconstruction are achieved.
Patent Information
- Application Number
- CN202411687101.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-25
AI Technical Summary
In the prior art, when the power system data is compressed, it is difficult to effectively retain the characteristic information of the data, resulting in limited compression effect and greater influence from noise.
The power load data is divided based on edge adaptive pattern matching. The non-stationary segment data is compressed by edge adaptive pattern matching. The smooth segment data is compressed by differential encoding, and the compressed data is reconstructed.
While retaining key information, it significantly reduces communication bandwidth, optimizes data compression effect, and improves reconstruction accuracy.
Smart Images

Figure CN119602805A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data compression of advanced measurement systems, and in particular to a method for compressing and collecting high-frequency data of electric loads based on edge adaptive pattern matching. Background Art
[0002] The power system plays a vital role in the development of modern economy and society. At present, with the growth and development of my country's productivity, the demand for industrial electricity and residential electricity consumption have increased significantly. The power industry has become a basic industry and an important public utility supporting the development of the national economy. With the emergence and popularization of advanced measurement systems, the measurement and transmission of information have played an important role in promoting the full analysis and application of user electricity information, making it possible to realize functions such as user electricity behavior analysis and identification, load forecasting, and load state estimation. However, the generation of massive data has brought tremendous pressure to the realization of communication equipment and functional requirements, affecting the efficient and fast access of data. It has become an urgent problem to conduct relevant research on data compression, save data storage capacity as much as possible and reduce data communication bandwidth while retaining useful information.
[0003] At present, the mainstream data compression methods are mainly divided into lossy compression and lossless compression. Among them, lossless compression is to achieve 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 types of information, but the compression ratio is relatively low.
[0004] Lossy compression is achieved by identifying unnecessary information in the data and removing it, allowing the original information to be lost to a certain extent, thereby achieving the purpose of greater data compression. This method has many applications in the fields of images, videos, industry, and medicine. Different fields have corresponding special 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, each section is approximated by a corresponding function to compress the data. The existing compressed sensing technology can also compress and reconstruct the signal at a rate far lower than the rate required by the Nyquist sampling theorem. The existing methods consider and optimize the measurement matrix, sparse basis, reconstruction method, etc. in different aspects. They have good applications in many fields such as image processing and biomedicine, but the sparsity of power system data needs to be optimized and adjusted. In application, there may be large errors. 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. The existing method proposes corresponding compression based on principal component analysis method and iterative principal component analysis method, but affected by noise data, this method has certain limitations and limited compression effect. How to compress data according to the characteristics of power system data information while minimizing the loss of its inherent characteristic information to form an effective compression method for load data suitable for power system. 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 compress data at the same time, 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 load 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 data and stable data;
[0009] The non-stationary segment data is compressed by using an edge adaptive pattern matching method;
[0010] The stable segment data is compressed by differential coding.
[0011] Optionally, based on different characteristics of the information data contained, the load data is divided into non-stationary segment data and stationary segment data including:
[0012] Based on the event detection method, event detection is performed on the load data to divide the event segment data and the non-event segment data;
[0013] Fluctuation detection is performed 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-steady segment data.
[0014] Optionally, compressing the non-stationary segment data by using an edge adaptive pattern matching method includes:
[0015] Build a synchronized power load pattern database in the cloud and on the terminal;
[0016] The non-stationary segment data is subdivided by clustering and the cluster center points are recorded to obtain a cluster set with a center point;
[0017] Match the center points of the different cluster sets with the patterns in the power load pattern database, calculate the distance between the center point of the cluster set to be matched and the data sample in the pattern database, if the minimum value of the distance between the center point of the cluster set to be matched and all the patterns in the pattern database is within a set threshold range, the match is successful, and the pattern of the cluster set is matched to the known pattern closest to it;
[0018] Compress the successfully matched data.
[0019] Optionally, clustering the non-stationary segment data includes:
[0020] Step 1. Randomly select a data sample from the non-stationary segment data sample set as the center point;
[0021] Step 2. Find all points within the bandwidth from the center point, record them as set Q, and regard these points as belonging to cluster c;
[0022] Step 3. Calculate the distance vector from the center point to each element in the set Q, add these distance vectors together to get the offset vector;
[0023] Step 4. Move the center point along the direction of the offset vector, wherein the moving distance is the modulus of the offset vector;
[0024] Step 5. Repeat steps 2 to 4 until the size of the offset vector meets the set threshold requirement, and record the center point at this time;
[0025] Step 6. Repeat steps 1 to 5 until all points are classified and all points have their own cluster centers;
[0026] Step 7. According to the access frequency of each point in each class, take the class with the highest access frequency as the class to which the current point set belongs.
[0027] Optionally, compressing the non-stationary segment data by using a method based on edge adaptive pattern matching further includes:
[0028] The pattern corresponding to the cluster set that has not been successfully matched is regarded as a new pattern, and the original power load pattern database is supplemented and updated based on the new pattern. The original data closest to the center point is transmitted to the cloud, and the original data is synchronously supplemented to the power load pattern database on the terminal and the cloud. The patterns corresponding to the original data are numbered in sequence, and the power load pattern database is updated.
[0029] Optionally, compressing the stationary segment data by differential coding includes:
[0030] The stable segment data is compressed by differential coding, the first data value is completely recorded, and then only the difference between two consecutive data values is recorded, so as to generate a new data sequence, and the new data sequence is successively subjected to Golomb coding and arithmetic coding.
[0031] Optionally, performing Golomb encoding on the new data sequence includes:
[0032] The value d in the new data sequence to be encoded i , calculate the corresponding unsigned number v according to the formula i , then v i After adding one, it is converted to binary form, and the number of bits is s i , then add s before the binary codeword obtained i -1 0, get its Columbus code.
[0033] The Golomb codes of the values in the new data sequence are concatenated to obtain a corresponding code string.
[0034]
[0035] Among them, d i Represents the value of the i-th data in the data sequence, v i Represents the unsigned number corresponding to the i-th data in the data sequence.
[0036] Optionally, performing arithmetic coding on the code string includes:
[0037] S1. Count the number of occurrences of the two symbols 0 and 1 in the code string, and project the probability of the number of occurrences to the probability interval within [0,1). The probability of symbol 0 is recorded as p, and the corresponding character interval is [0,p). The probability of symbol 1 is 1-p, and the corresponding character interval is [p,1). The left interval value corresponding to each symbol is recorded as l num , the right interval value is recorded as h num , all subintervals add up to [0,1);
[0038] S2. The encoding interval obtained each time is represented as [L,H), the initial encoding interval is [0,1), at this time L = 0, H = 1, the current order is i = 0, then L i =0,H i =1;
[0039] S3. Read the characters in the code string in sequence, add one to the current sequence, and calculate the L corresponding to the current sequence of code intervals by a preset formula. i and H i value;
[0040] S4. Repeat S3 until all characters in the code string are read;
[0041] S5. Get the final coding interval [L end ,H end ), select the shortest decimal in binary representation from the final coding interval and perform binary coding, which is the arithmetic coding value of the corresponding coding string.
[0042] Optionally, the preset formula is:
[0043]
[0044] Among them, L i Indicates the left interval value of the i-th corresponding coding interval, L i+1 Indicates the left interval value of the encoding interval corresponding to the i+1th time, H i Indicates the right interval value of the i-th corresponding coding interval, H i+1 Indicates the right interval value of the encoding interval corresponding to the i+1th time, l num Indicates the left interval value of the probability interval corresponding to the symbol, h num Indicates the right interval value of the probability interval corresponding to the symbol.
[0045] Optionally, the method further comprises reconstructing the compressed non-stationary segment data and the stationary segment data respectively, and splicing the reconstruction results.
[0046] Optionally, respectively reconstructing the compressed non-stationary segment data and the stationary segment data includes:
[0047] The compressed non-stationary segment data is matched according to the compression format and the cloud pattern database, and the pattern and number of the compressed non-stationary segment data are adjusted to reconstruct the data; the compressed stationary segment data is decoded according to the encoding method, and different segments are reconstructed in chronological order.
[0048] The beneficial effects of the present invention are:
[0049] The present invention first divides the load data into non-stationary segment data and stationary segment data based on the different characteristics of the information data contained; secondly, the non-stationary segment data is compressed by an edge adaptive pattern matching method; the stationary segment data is compressed by differential coding; then the compressed non-stationary segment data and stationary segment data are reconstructed respectively, and the reconstructed results are spliced. While storing key information, the present invention reduces the communication bandwidth as much as possible and optimizes the data compression effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0051] Figure 1 A schematic flow chart of a method for compressing and collecting high-frequency data of electric loads based on edge adaptive pattern matching according to an embodiment of the present invention;
[0052] Figure 2 The present invention is a flowchart of performing data compression and reconstruction on non-stationary segment data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] like Figure 1 As shown, this embodiment proposes a method for compressing and collecting high-frequency data of electric loads based on edge adaptive pattern matching, including:
[0056] Based on the different characteristics of the information data contained, the load data is divided into non-stationary data and stable data;
[0057] For non-stationary segment data, edge adaptive pattern matching based method is used for compression;
[0058] For the stable segment data, differential coding is used for compression;
[0059] The compressed non-stationary segment data and the stationary segment data are reconstructed respectively, and the reconstructed results are spliced.
[0060] Specifically, this embodiment divides the acquired data into event segments, fluctuation segments, and stable segments according to the different characteristics of the information data contained therein. For the event segment and fluctuation segment data, a data compression method based on edge adaptive pattern matching is adopted. A pattern database is established synchronously in the cloud and the terminal. The pattern is matched with the pattern 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 failed to match successfully, the pattern database is automatically updated to facilitate the compression of subsequent similar segments, thereby achieving edge adaptive data compression. For the stable segment data, the data is relatively stable and the variation is small, so differential coding is used to compress the data. After the compressed data is transmitted to the cloud, the non-stable segment data is reconstructed based on the corresponding information and the cloud pattern database; the stable segment data is decoded and reconstructed to obtain the reconstructed data. While storing key information, this method reduces the communication bandwidth as much as possible and optimizes the data compression effect.
[0061] Furthermore, based on the different characteristics of the information data contained, the load data is divided into non-stationary data and stationary data, including:
[0062] Based on the 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 the stable segment data; wherein the event segment data and the fluctuation segment data constitute the non-steady segment data.
[0064] Specifically, in this embodiment, the obtained load data is subjected to event detection by using an event detection algorithm to divide the event segment and the non-event segment. On this basis, the non-event segment data is subjected to fluctuation detection to divide the fluctuation segment and the stable segment data. The meanings of the event segment, fluctuation segment, and stable segment data are as follows:
[0065] The event segment refers to the process of the electrical equipment's operating state changing, including the on / off operation of the electrical equipment and the switching between different operating state modes. This process is manifested in the change of power value in terms of power. Its waveform is relatively complex and contains rich and useful information, providing a basis for related data analysis and application.
[0066] The power in the fluctuation range is usually in obvious changes, which is often caused by the operation of some electrical appliances, such as washing machines, air conditioners, heat pumps, etc., which will have obvious power fluctuations when working;
[0067] The stable segment refers to the data segment excluding the above two data segments, in which the electrical operation state remains stable, there is no obvious power value fluctuation, and it is in a stable state. Compressing this part can also have a greater compression effect.
[0068] Furthermore, for the non-stationary segment data, the edge adaptive pattern matching-based method is used for compression, including:
[0069] Build a synchronized power load pattern database in the cloud and on the terminal;
[0070] The non-stationary segment data is subdivided by clustering and the center point is recorded to obtain a cluster set with a center point;
[0071] Match the center points of the different cluster sets with the patterns in the power load pattern database, calculate the distance between the center point of the cluster set to be matched and the data sample in the pattern database, if the minimum value of the distance between the center point of the cluster set to be matched and all the patterns in the pattern database is within a set threshold range, the match is successful, and the pattern of the cluster set is matched to the known pattern closest to it;
[0072] Compress the successfully matched data.
[0073] Furthermore, in this embodiment, if Figure 2 As shown, a synchronous power load pattern database is established in the cloud and the terminal to store different types of power load patterns. For the non-stationary segments, i.e., event segments and fluctuation segments, divided in step 1, a data compression method based on edge adaptive pattern matching is performed. The present invention adopts clustering to subdivide the pattern:
[0074] There are also different ways of clustering algorithms. This embodiment takes into account that the time series of event segments are usually short, while the time series of fluctuation segments are relatively long, will last for a certain period of time, and usually have a certain regularity. Therefore, a shape-based method is used for clustering event segments, and the Euclidean distance between different sequences is calculated as a similarity metric. At the same time, a dynamic time warping algorithm is used to process the calculation between sequences of different lengths. A feature-based method is used for clustering fluctuation segments, and the distance between feature vectors between different sequences is calculated as a similarity metric. This is used as a discrimination criterion. In the present invention, data variance, data mean, and data range are selected as feature quantities. On this basis, the idea of a mean shift clustering algorithm is used to cluster the data of event segments and fluctuation segments. The specific steps are as follows:
[0075] Step 1. First, randomly select a data sample from the pattern data sample to be matched as the center point;
[0076] Step 2. Find all points within the bandwidth from the center point, record them as set Q, and consider these points to belong to cluster c;
[0077] Step 3. Calculate the distance vector from the center point to each element in the set Q, add these distance vectors together to get 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 to 4 until the size of the offset vector meets the set threshold requirement, and record the center point at this time;
[0080] Step 6. Repeat steps 1 to 5 until all points are classified and all points have their own cluster centers;
[0081] Step 7. According to the access frequency of each point in each class, take the class with the highest access frequency as the class to which the current point set belongs.
[0082] The center points of the different cluster sets obtained are matched with the patterns in the pattern database, and the distance between the center point of the cluster set to be matched and the data samples in the pattern database is calculated. If the minimum value of the distance between the center point of the cluster set to be matched and all the patterns in the pattern database is within the set threshold range, it means that the match is successful, and the pattern of the cluster set is matched to the known pattern closest to it.
[0083] The successfully matched data is compressed and stored, compressed according to the corresponding compression format and transmitted to the cloud. The specific compression format is as follows:
[0084] The event segment follows {1, record 1, length 1}, where 1 represents that the sequence is an event segment, corresponding to the pattern in the event pattern database; record 1 The category representing the event sequence corresponds to the pattern number in the pattern database; length 1 Represents the length of the event segment data time series; the fluctuation segment is in the order of {0, record 0 , length 0}, where 0 represents the sequence as a fluctuation segment, corresponding to the pattern in the fluctuation pattern database; record 0 The category of the fluctuation sequence corresponds to the pattern number in the pattern database; length 0 Represents the length of the time series of the fluctuation data. During reconstruction, the corresponding pattern needs to be supplemented or truncated to the actual duration of the fluctuation.
[0085] For cluster sets that have not been successfully matched, it means that the corresponding pattern is a new pattern. The original pattern database needs to be supplemented and updated. The original data closest to the center point in the cluster set is transmitted to the cloud, and it is synchronously added to the pattern database of the terminal and the cloud. The pattern is numbered in sequence, the original pattern database is updated, and the edge adaptive adjustment and update of the pattern matching database is performed to facilitate subsequent data compression.
[0086] Furthermore, the differential coding method is used to compress the stable segment data, including:
[0087] The stable segment data is compressed by differential coding, the first data value is completely recorded, and then only the difference between two consecutive data values is recorded to generate a new data sequence, and the new data sequence is successively subjected to Golomb coding and arithmetic coding.
[0088] Specifically, in this embodiment, for the stable segment data, since its variation is small, differential coding is used to compress it, the first data value is fully recorded, and then only the difference between two consecutive data values is recorded to generate a new data sequence, and the new data sequence is successively subjected to Golomb coding and arithmetic coding. Golomb coding can compress smaller values into shorter codewords, has a higher compression efficiency for the differential sequence of stable segment data, and further eliminates redundancy through arithmetic coding, thereby using less space to store the corresponding data.
[0089] In the specific implementation process, a rounding strategy can be adopted for the data in the stable section of the power load, because the data in the stable section itself changes relatively smoothly, and rounding basically does not destroy the key information in use. Then, the obtained rounded data is differentially encoded to generate a new data sequence, and then the obtained new data sequence is Columbus encoded. The variable-length encoding form in Columbus encoding is used to convert the numerical value into a shorter code word, and then the code words are concatenated together to obtain the corresponding code string. The obtained code string is arithmetic encoded to obtain the final compressed representation. The specific Columbus encoding steps are as follows:
[0090] The value d in the new data sequence to be encoded i , calculate the corresponding unsigned number v according to formula (1) i , then v i After adding one, it is converted to binary form, and the number of bits is s i , then add s before the binary codeword obtained i -1 0, get its Columbus code.
[0091] The Golomb codes of the values in the new data sequence are concatenated to obtain a corresponding code string.
[0092]
[0093] Among them, d i Represents the value of the i-th data in the data sequence, v i Represents the unsigned number corresponding to the i-th data in the data sequence.
[0094] Perform arithmetic encoding on the obtained code string. The specific steps are as follows:
[0095] S1. The obtained code string is composed of two symbols, 0 and 1. First, count the number of times 0 and 1 appear, and project their probabilities to the probability interval within [0,1). Here, their corresponding probability intervals are called character intervals. The probability of symbol 0 is recorded as p, and the corresponding character interval is [0,p). The probability of symbol 1 is 1-p, and the corresponding character interval is [p,1). The left interval value corresponding to each symbol is recorded as l num , the right interval value is recorded as h num , all subintervals add up to exactly [0,1);
[0096] S2. The encoding interval obtained each time is represented as [L,H), the initial encoding interval is [0,1), at this time L = 0, H = 1, the current order is i = 0, then L i =0,H i =1;
[0097] S3. Read the characters in the code string in sequence, add one to the current sequence, and calculate the L corresponding to the code interval of the current sequence by formula (2) i and H i value;
[0098] S4. Repeat S3 until all characters in the encoded string are read;
[0099] S5. Get the final coding interval [L end ,H end ), select the shortest decimal in binary representation from the interval, and perform binary encoding on it, and the encoding is the arithmetic encoding value of the encoding string;
[0100]
[0101] Furthermore, reconstructing the compressed non-stationary segment data and the stationary segment data respectively includes:
[0102] For the compressed non-stationary segment data, according to the compression format and the cloud model database, the pattern and number of the compressed non-stationary segment data are matched, and the sequence length is adjusted to reconstruct the data; the compressed stationary segment data is decoded and different segments are reconstructed in chronological order.
[0103] Specifically, in this embodiment, the compressed data uploaded to the cloud is reconstructed. For the non-stationary segment data, it is matched according to the compression format, the mode and the number, and reconstructed 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 original data length; for the stationary segment data, it is decoded, and the decoding process is the opposite of the encoding process:
[0104] First, entropy decoding is performed on the compressed code. Starting from the decimal obtained by the code, the probability interval of the decimal is continuously searched to find the original character. Then the serialized code string is split into multiple groups of variable-length codewords. First, the codeword symbols are scanned from left to right to find the first bit that is not 0, that is, the separator bit. The number of bits equal to 0 before the separator bit is calculated and counted as t. The codeword containing the first t bits and the last t bits of the separator bit and the length of 2t+1 is the first exponential Golomb codeword obtained by the split. Then the code is removed from the codeword to be scanned, and the above scanning is continued until all codewords are split. Each exponential Golomb codeword obtained by the split is decoded to obtain its corresponding differential data. Finally, the first value of the sequence is kept at the original value, and each subsequent value is added to their respective previous values to restore the data after rounding.
[0105] The reconstruction of non-stationary segment data is mainly based on the information transmitted to the cloud: the compressed structure data corresponding to this data and the data pattern library originally established in the cloud. Through the encoding in the compressed structure data, it is possible to determine the corresponding event pattern library or fluctuation pattern library, as well as which type of pattern in the corresponding library, and the original data corresponding to this type of pattern is stored in the pattern of the cloud data pattern library. The original data in the corresponding pattern is adjusted according to the original length of the data in the compressed format, and the adjusted data segment is used as the reconstructed data.
[0106] The data of different fragments are reconstructed in different ways, and the reconstruction results are spliced together in chronological order to obtain the complete reconstructed data.
[0107] The following experiment uses REDD public data from American households, involving multiple types of electrical appliances such as ovens, refrigerators, dishwashers, lighting equipment, spin dryers, microwave ovens, electric heaters, etc. The data sampling frequency is 1Hz. This experiment selects the daily electricity consumption data of each household to test and analyze the data compression effect. In terms of judging the data compression results, we start from the two aspects of reconstruction accuracy and compression rate. On the one hand, the compression ratio CR is used to evaluate the amount of data reduction, and on the other hand, the RMSE indicator is used to measure the reconstruction accuracy. The compression method FLDC is used as a comparison method for the method proposed in this embodiment.
[0108] Table 1 Comparison of RMSE and CR of different methods
[0109]
[0110] As shown in Table 1, the two methods are compared in terms of reconstruction accuracy and compression ratio. RMSE is the root mean square error, which indicates the error between the reconstructed data and the original data under different calculation methods. It can be seen that the method proposed in this embodiment has a smaller reconstruction error and a higher reconstruction accuracy. Taking RMSE as an indicator, the reconstruction accuracy of this embodiment can reach 99.8%. In the reconstruction process, the FLDC method uses GVE to divide the ground state and the excitation state, which easily divides the low-amplitude fluctuation segment into the ground state and uses the same value for reconstruction. The method used in this embodiment can reasonably compress data in different states and reduce the occurrence of such problems. The compression ratio of the method proposed in this embodiment is 40.895 on average, which is better than the average compression ratio of 12.19 of the FLDC method. Therefore, while retaining key information as much as possible, this embodiment improves the degree of compression, reduces communication bandwidth, and alleviates communication pressure, achieving good compression effects.
[0111] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for compressing and collecting high-frequency data of electric load based on edge adaptive pattern matching, characterized in that: include: Based on the different characteristics of the information data contained, the load data is divided into non-stationary segment data and stable segment data; The non-stationary segment data is compressed by using an edge adaptive pattern matching method; The stable segment data is compressed by differential coding.
2. The power load high-frequency data compression and acquisition method based on edge adaptive pattern matching according to claim 1 is characterized in that: Based on the different characteristics of the information data contained, the load data is divided into non-stationary data and stable data, including: Based on the event detection method, event detection is performed on the load data to divide the event segment data and the non-event segment data; Fluctuation detection is performed 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-steady segment data.
3. The power load high-frequency data compression and acquisition method based on edge adaptive pattern matching according to claim 1 is characterized in that: The non-stationary segment data is compressed by using an edge adaptive pattern matching method, including: A synchronous power load pattern database is constructed 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 cluster set with a center point; Match the center point with the power load pattern database of different patterns, calculate the distance between the center point of the cluster set to be matched and the data sample in the pattern database, if the minimum value of the distance between the center point of the cluster set to be matched and all patterns in the pattern database is within a set threshold range, the match is successful, and the pattern of the cluster set is matched to the known pattern closest to it; Compress the successfully matched data.
4. The power load high-frequency data compression and acquisition method based on edge adaptive pattern matching according to claim 3 is characterized in that: Clustering the non-stationary segment data includes: Step 1. Randomly select a data sample from the non-stationary segment data sample set as the center point; Step 2. Find all points within the bandwidth from the center point, record them as set Q, and regard these points as belonging to cluster c; Step 3. Calculate the distance vector from the center point to each element in the set Q, add these distance vectors together to get the offset vector; Step 4. Move the center point along the direction of the offset vector, wherein the moving distance is the modulus value of the offset vector; Step 5. Repeat steps 2 to 4 until the size of the offset vector meets the set threshold requirement, and record the center point at this time; Step 6. Repeat steps 1 to 5 until all points are classified and all points have their own cluster centers; Step 7. According to the access frequency of each point in each class, take the class with the highest access frequency as the class to which the current point set belongs.
5. The power load high-frequency data compression and acquisition method based on edge adaptive pattern matching according to claim 3 is characterized in that: The method of compressing the non-stationary segment data by using an edge adaptive pattern matching method also includes: The pattern corresponding to the cluster set that has not been successfully matched is regarded as a new pattern, and the original power load pattern database is supplemented and updated based on the new pattern, the original data closest to the center point is transmitted to the cloud, and the original data is synchronously supplemented to the power load pattern database on the terminal and the cloud, and the patterns corresponding to the original data are numbered in sequence, and the power load pattern database is updated; wherein, the original data refers to the initial data collected from the collector without compression processing.
6. The power load high-frequency data compression and acquisition method based on edge adaptive pattern matching according to claim 1 is characterized in that: The differential coding method is used to compress the stable segment data, including: The stable segment data is compressed by differential coding, the first data value is completely recorded, and then only the difference between two consecutive data values is recorded, so as to generate a new data sequence, and the new data sequence is successively subjected to Golomb coding and arithmetic coding.
7. The power load high-frequency data compression and acquisition method based on edge adaptive pattern matching according to claim 1 is characterized in that: Golomb encoding of a new data sequence includes: The value d in the new data sequence to be encoded i , calculate the corresponding unsigned number v according to the formula i , then v i After adding one, it is converted to binary form, and the number of bits is s i , then add s before the binary codeword obtained i -1 0, get its Columbus code; Concatenate the Golomb codes of the values in the new data sequence into code words to obtain a corresponding code string; Among them, d i Represents the value of the i-th data in the data sequence, v i Represents the unsigned number corresponding to the i-th data in the data sequence.
8. The power load high-frequency data compression and acquisition method based on edge adaptive pattern matching according to claim 7 is characterized in that: Performing arithmetic coding on the code string includes: S1. Count the number of occurrences of the two symbols 0 and 1 in the code string, and project the probability of the number of occurrences to the probability interval within [0,1). The probability of symbol 0 is recorded as p, and the corresponding character interval is [0,p). The probability of symbol 1 is 1-p, and the corresponding character interval is [p,1). The left interval value corresponding to each symbol is recorded as l num , the right interval value is recorded as h num , all subintervals add up to [0,1); S2. The encoding interval obtained each time is represented as [L,H), the initial encoding interval is [0,1), at this time L = 0, H = 1, the current order is i = 0, then L i =0,H i =1; S3. Read the characters in the code string in sequence, add one to the current sequence, and calculate the L corresponding to the current sequence of code intervals by a preset formula. i and H i value; S4. Repeat S3 until all characters in the encoded string are read; S5. Get the final coding interval [L end ,H end ), select the shortest decimal in binary representation from the final coding interval and perform binary coding, which is the arithmetic coding value of the coding string.
9. The power load high-frequency data compression and acquisition method based on edge adaptive pattern matching according to claim 8 is characterized in that: The preset formula is: Among them, L i Indicates the left interval value of the i-th corresponding coding interval, L i+1 Indicates the left interval value of the encoding interval corresponding to the i+1th time, H i Indicates the right interval value of the i-th corresponding coding interval, H i+1 Indicates the right interval value of the encoding interval corresponding to the i+1th time, l num Indicates the left interval value of the probability interval corresponding to the symbol, h num Indicates the right interval value of the probability interval corresponding to the symbol.
10. The power load high-frequency data compression and acquisition method based on edge adaptive pattern matching according to claim 1 is characterized in that: The method further comprises: reconstructing the compressed non-stationary segment data and the stationary segment data respectively, and splicing the reconstructed results; Reconstructing the compressed non-stationary segment data and the stationary segment data respectively includes: The compressed non-stationary segment data is matched according to the compression format and the cloud pattern database, and the pattern and number of the compressed non-stationary segment data are adjusted to reconstruct the data; the compressed stationary segment data is decoded according to the encoding method, and different segments are reconstructed in chronological order.
Citation Information
Patent Citations
Load estimation method and device based on user portrait, and terminal equipment
CN114418173A
PMU data compression and reconstruction method for power distribution network edge computing device
CN114826277A
Cloud collaborative self-adaptive dividing and conquering method for high-frequency data compression and reconstruction of intelligent electric meter
CN115827577A
Terminal control method and system based on SDWAN networking
CN118337336A
Adaptive analysis of signals
US20140114609A1
Cited By
Differential coding compression method for electroencephalogram data
CN120811393A
A differential coding compression method for EEG data
CN120811393B
Adaptive data compression method and system for controller area network (CAN)
CN121125015A
Segmented transmission system for data acquired by force sensor
CN121462671A