CN111371459A - Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter - Google Patents
Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter Download PDFInfo
- Publication number
- CN111371459A CN111371459A CN202010338457.9A CN202010338457A CN111371459A CN 111371459 A CN111371459 A CN 111371459A CN 202010338457 A CN202010338457 A CN 202010338457A CN 111371459 A CN111371459 A CN 111371459A
- Authority
- CN
- China
- Prior art keywords
- data
- frequency
- compressed
- original
- code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R22/00—Arrangements for measuring time integral of electric power or current, e.g. electricity meters
- G01R22/06—Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The invention relates to a multi-operation high-frequency substitution type data compression method suitable for an intelligent electric meter, which comprises the following steps of: copying original data to be compressed, and respectively carrying out exclusive or and anti-code operations on the copied original code data; setting a minimum unit of data to be N bytes, wherein N is an integer greater than or equal to 1; carrying out data reproduction frequency analysis on the data, replacing low-frequency data with high-frequency data, and setting an operation flag bit; establishing high-frequency substitution mark data according to the operation mark bits in sequence; and compressing the modified data. The invention carries out XOR operation and anticode operation on the original data to be compressed, and carries out data repetition frequency statistics on the original code, the XOR data and the anticode data uniformly, thereby realizing the improvement of the repetition frequency of the original data, reducing the occurrence of low-frequency data, solving the problem of large data storage capacity and improving the data compression efficiency.
Description
Technical Field
The invention relates to the technical field of data compression processing, in particular to a multi-operation high-frequency substitution type data compression method suitable for an intelligent electric meter.
Background
The intelligent electric meter is one of basic devices for data acquisition of the intelligent power grid, undertakes the tasks of data acquisition, metering and transmission of an original electric meter, and is the basis for realizing information integration, analysis optimization and information display. Besides the basic power consumption metering function of the traditional electric energy meter, the intelligent electric meter also has various intelligentized functions such as bidirectional multi-rate metering function, user side control function, bidirectional data communication function of various data transmission modes, electricity larceny prevention function and the like in order to adapt to the use of an intelligent power grid and new energy. Currently, with the continuous extension of the functions of the smart meters, the requirements on data storage space are also continuously increased. However, the storage capacity of the electricity meter is proportional to the price, and as the storage capacity increases, the cost thereof also increases.
In order to solve the contradiction between the storage capacity and the cost, a data compression method is developed to solve the contradiction between the storage capacity and the cost, but the conventional data compression mainly carries out statistical analysis on original data, namely compression coding is carried out on the distribution of original code data, and when the data regularity is poor, the data compression efficiency is lowered. Particularly for the collection of electric energy data in the smart meter, the data regularity is poor, even irregular, so that the compression efficiency of the traditional compression method becomes very limited.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provide a multi-operation high-frequency replacement type data compression method suitable for a smart meter.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
a multi-operation high-frequency replacement type data compression method suitable for a smart electric meter comprises the following steps:
step S1: copying original data to be compressed, and respectively carrying out exclusive or and anti-code operations on the copied original code data;
step S2: setting a minimum unit of data to be N bytes, wherein N is an integer greater than or equal to 1;
step S3: carrying out data reproduction frequency analysis on the data, replacing low-frequency data with high-frequency data, and setting an operation flag bit;
step S4: establishing high-frequency substitution mark data according to the operation mark bits in sequence;
step S5: and compressing the modified data.
Further, the step S1 of copying the original data to be compressed and performing an exclusive or and an inverse operation on the copied original data includes:
respectively carrying out exclusive-OR operation on the copied original code data, wherein the first exclusive-OR operand is 10101010 with the same N bytes, and the second exclusive-OR operand is 01010101 with the same N bytes; and performing code reversal operation on the copied original code data to obtain the data subjected to code reversal operation.
Further, the step of performing data reproduction frequency analysis on the data, replacing low-frequency data with high-frequency data, and setting an operation flag in step S3 includes:
analyzing the original code data, the data after the first exclusive-or operation, the data after the second exclusive-or operation and the data after the inverse code operation, and if the repetition frequency of the original code data is the highest, setting the corresponding bit of the operation flag bit to 00; if the data repetition frequency after the first exclusive-or operation is the highest, setting the corresponding bit of the operation zone bit as 01; if the data repetition frequency after the second exclusive-or operation is the highest, setting the corresponding bit of the operation zone bit as 10; if the data repetition frequency after the code reversal operation is the highest, setting the corresponding bit of the operation zone bit as 11; and meanwhile, replacing original data with the highest repetition frequency according to the operation zone bit.
Further, in order to complete the scheme of data compression and data reduction, the method further includes step S6: and restoring the compressed data into original data by combining the information of the operation zone bits.
Furthermore, the data compressed in step S5 is composed of three parts, where the first part is operation flag data, the second part is compressed data minimum unit N, the third part is compressed information data, and each two bits of the operation flag data correspond to N bytes of compressed information data, which are original code data, data after the first xor operation, data after the second xor operation, and data after the inverse code operation.
As another possible implementation manner, the data compressed in step S5 is composed of four parts, where the first part is the operation flag data, the second part is the minimum unit N of the compressed data, the third part is the compressed information data, and the fourth part is the number M of bytes of the original data to be compressed. When M is not an integer multiple of N, the original data supplements K bytes, K being an integer within 1 to N-1. Or when M is not an integral multiple of 8N, the original data supplements L bytes, L is an integer from 1 to 8N-1, and the high-low frequency matching mark data bit is insufficient and supplements 0 to form a complete byte.
And the operation mark data is compressed by adopting a compression algorithm to form operand compressed data.
Compared with the prior art, the invention has the beneficial effects that:
the invention carries out XOR operation and anticode operation on the original data to be compressed, and carries out data repetition frequency statistics on the original code, the XOR data and the anticode data uniformly, thereby realizing the improvement of the repetition frequency of the original data, reducing the occurrence of low-frequency data, solving the problem of large data storage capacity and improving the data compression efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a data compression method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Example 1:
the invention is realized by the following technical scheme, as shown in fig. 1, a multi-operation high-frequency substitution data compression method suitable for an intelligent electric meter comprises the following steps:
step S1: copying the original data to be compressed, and respectively carrying out exclusive OR and anti-code operations on the copied original code data.
Respectively carrying out exclusive-OR operation on the copied original code data, wherein the first exclusive-OR operand is 10101010 with the same N bytes, and the second exclusive-OR operand is 01010101 with the same N bytes; and performing an anti-code operation on the copied original code data to obtain the data after the first exclusive-or operation, the data after the second exclusive-or operation and the data after the anti-code operation.
Step S2: setting a minimum unit of data to be N bytes, wherein N is an integer greater than or equal to 1.
The minimum unit of the data is set to be byte, and the minimum unit of the data is at least 1 byte, so that the data can have N bytes, wherein N is an integer which is greater than or equal to 1.
Step S3: and carrying out data reproduction frequency analysis on the data, replacing low-frequency data with high-frequency data, and setting an operation flag bit.
Analyzing the original code data, the data after the first exclusive-or operation, the data after the second exclusive-or operation and the data after the inverse code operation, and if the repetition frequency of the original code data is the highest, setting the corresponding bit of the operation flag bit to 00; if the data repetition frequency after the first exclusive-or operation is the highest, setting the corresponding bit of the operation zone bit as 01; if the data repetition frequency after the second exclusive-or operation is the highest, setting the corresponding bit of the operation zone bit as 10; and if the data repetition frequency after the code decoding operation is the highest, setting the bit corresponding to the operation flag bit to be 11.
And meanwhile, replacing original data with the highest repetition frequency according to the operation zone bit.
Step S4: and establishing high-frequency substitution mark data according to the operation mark bits in sequence.
Such as: the operation flag bit of the first N-byte data is 00, the operation flag bit of the second N-byte data is 01, the operation flag bit of the third N-byte data is 10, and the operation flag bit of the fourth N-byte data is 00. The constructed high frequency substitution flag data of one byte is 00011000, and the high frequency substitution flag data is established according to the operation flag in turn.
Step S5: and compressing the modified data.
The compressed data is composed of three parts, wherein the first part is operation mark data, the second part is compressed data minimum unit N, the third part is compressed information data, and each two bits in the operation mark data correspond to corresponding N bytes of the compressed information data and are original code data, data after first exclusive-or operation, data after second exclusive-or operation and data after inverse code operation.
As another possible implementation manner, the compressed data is composed of four parts, where the first part is operation flag data, the second part is minimum unit N of compressed data, the third part is compressed information data, and the fourth part is byte number M of original data to be compressed. When M is not an integer multiple of N, the original data supplements K bytes, K being an integer within 1 to N-1. Or when M is not an integral multiple of 8N, the original data supplements L bytes, L is an integer from 1 to 8N-1, and the high-low frequency matching mark data bit is insufficient and supplements 0 to form a complete byte.
When the operation flag data is compressed, a compression algorithm is used for compression to form operand compressed data.
Step S6: and restoring the compressed data into original data by combining the information of the operation zone bits.
When the compressed data is restored, the compressed data can be restored into the original data by combining the operation zone bit information.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (9)
1. A multi-operation high-frequency substitution type data compression method suitable for an intelligent electric meter is characterized by comprising the following steps: the method comprises the following steps:
step S1: copying original data to be compressed, and respectively carrying out exclusive or and anti-code operations on the copied original code data;
step S2: setting a minimum unit of data to be N bytes, wherein N is an integer greater than or equal to 1;
step S3: carrying out data reproduction frequency analysis on the data, replacing low-frequency data with high-frequency data, and setting an operation flag bit;
step S4: establishing high-frequency substitution mark data according to the operation mark bits in sequence;
step S5: and compressing the modified data.
2. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to claim 1, characterized in that: copying original data to be compressed, and respectively performing exclusive OR and anti-code operations on the copied original code data, wherein the steps comprise:
respectively carrying out exclusive-OR operation on the copied original code data, wherein the first exclusive-OR operand is 10101010 with the same N bytes, and the second exclusive-OR operand is 01010101 with the same N bytes;
and performing code reversal operation on the copied original code data to obtain the data subjected to code reversal operation.
3. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to claim 2, characterized in that: the method comprises the steps of analyzing data reproduction frequency, replacing low-frequency data with high-frequency data, and setting an operation flag bit, and comprises the following steps:
analyzing the original code data, the data after the first exclusive-or operation, the data after the second exclusive-or operation and the data after the inverse code operation, and if the repetition frequency of the original code data is the highest, setting the corresponding bit of the operation flag bit to 00; if the data repetition frequency after the first exclusive-or operation is the highest, setting the corresponding bit of the operation zone bit as 01; if the data repetition frequency after the second exclusive-or operation is the highest, setting the corresponding bit of the operation zone bit as 10; if the data repetition frequency after the code reversal operation is the highest, setting the corresponding bit of the operation zone bit as 11;
and meanwhile, replacing original data with the highest repetition frequency according to the operation zone bit.
4. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to any one of claims 1 to 3, characterized in that: further comprising step S6: and restoring the compressed data into original data by combining the information of the operation zone bits.
5. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to claim 3, characterized in that: the data compressed in step S5 is composed of three parts, where the first part is operation flag data, the second part is compressed data minimum unit N, the third part is compressed information data, and the corresponding N bytes of data corresponding to the compressed information data for each two bits in the operation flag data are original code data, data after the first xor operation, data after the second xor operation, and data after the inverse code operation.
6. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to claim 3, characterized in that: the data compressed in step S5 is composed of four parts, where the first part is operation flag data, the second part is minimum unit N of compressed data, the third part is compressed information data, and the fourth part is byte number M of original data to be compressed.
7. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to claim 6, wherein: when M is not an integer multiple of N, the original data supplements K bytes, K being an integer within 1 to N-1.
8. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to claim 6, wherein: and when M is not an integral multiple of 8N, the original data supplements L bytes, L is an integer from 1 to 8N-1, and the high-low frequency matching mark data bit is insufficient and supplemented with 0 to form a complete byte.
9. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to any one of claims 5 to 8, wherein: and the operation mark data is compressed by adopting a compression algorithm to form operand compressed data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010338457.9A CN111371459B (en) | 2020-04-26 | 2020-04-26 | Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010338457.9A CN111371459B (en) | 2020-04-26 | 2020-04-26 | Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111371459A true CN111371459A (en) | 2020-07-03 |
CN111371459B CN111371459B (en) | 2023-04-18 |
Family
ID=71212170
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010338457.9A Active CN111371459B (en) | 2020-04-26 | 2020-04-26 | Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111371459B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002044607A (en) * | 2000-07-31 | 2002-02-08 | New Japan Radio Co Ltd | Signal processor and method for subsampling |
TW200623657A (en) * | 2004-12-30 | 2006-07-01 | Inventec Besta Co Ltd | Compressing method for statistical data characteristics by finite exhaustive optimization |
CN103607207A (en) * | 2013-11-11 | 2014-02-26 | 大连理工大学 | Plug-and-play multi-interface data compression apparatus |
CN105518776A (en) * | 2013-07-22 | 2016-04-20 | 弗劳恩霍夫应用研究促进协会 | Apparatus and method for decoding or encoding an audio signal using energy information values for a reconstruction band |
US20170060467A1 (en) * | 2015-08-27 | 2017-03-02 | Stmicroelectronics S.R.L. | Method of smart saving high-density data and memory device |
CN109088851A (en) * | 2018-06-22 | 2018-12-25 | 杭州海兴电力科技股份有限公司 | The data compression method of power information acquisition |
CN109697277A (en) * | 2017-10-20 | 2019-04-30 | 北京京东尚科信息技术有限公司 | The method and apparatus of Text compression |
-
2020
- 2020-04-26 CN CN202010338457.9A patent/CN111371459B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002044607A (en) * | 2000-07-31 | 2002-02-08 | New Japan Radio Co Ltd | Signal processor and method for subsampling |
TW200623657A (en) * | 2004-12-30 | 2006-07-01 | Inventec Besta Co Ltd | Compressing method for statistical data characteristics by finite exhaustive optimization |
CN105518776A (en) * | 2013-07-22 | 2016-04-20 | 弗劳恩霍夫应用研究促进协会 | Apparatus and method for decoding or encoding an audio signal using energy information values for a reconstruction band |
CN103607207A (en) * | 2013-11-11 | 2014-02-26 | 大连理工大学 | Plug-and-play multi-interface data compression apparatus |
US20170060467A1 (en) * | 2015-08-27 | 2017-03-02 | Stmicroelectronics S.R.L. | Method of smart saving high-density data and memory device |
CN109697277A (en) * | 2017-10-20 | 2019-04-30 | 北京京东尚科信息技术有限公司 | The method and apparatus of Text compression |
CN109088851A (en) * | 2018-06-22 | 2018-12-25 | 杭州海兴电力科技股份有限公司 | The data compression method of power information acquisition |
Non-Patent Citations (2)
Title |
---|
JARNO MIELIKAINEN等: "Lossless Compression of Ultraspectral Sounder Data Using Linear Prediction With Constant Coefficients" * |
孙家宝;郭峰林;薛伟;赵克威;张新祥;: "基于小波变换的时空数据压缩方法" * |
Also Published As
Publication number | Publication date |
---|---|
CN111371459B (en) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112953550B (en) | Data compression method, electronic device and storage medium | |
CN103858433B (en) | Layered entropy encoding and decoding | |
CN104040899B (en) | Generate the code alphabet of symbol to be that the word being used together with program generates code word | |
CN110825323B (en) | Storage and reading method of floating point number data and computer readable storage medium | |
CN116016606B (en) | Sewage treatment operation and maintenance data efficient management system based on intelligent cloud | |
CN103368582A (en) | Data coding and decoding method and device | |
CN115730749B (en) | Power dispatching risk early warning method and device based on fusion power data | |
Yan et al. | Model-free lossless data compression for real-time low-latency transmission in smart grids | |
CN111371461B (en) | Original code and inverse code mixed data compression method suitable for intelligent electric meter | |
CN115882866A (en) | Data compression method based on data difference characteristic | |
Yan et al. | LIFTED: Household appliance-level load dataset and data compression with lossless coding considering precision | |
CN111371459B (en) | Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter | |
US20140160241A1 (en) | System and method for encoding and decoding a bitstream for a 3d model having repetitive structure | |
AU2012283580A1 (en) | System and method for encoding and decoding a bitstream for a 3D model having repetitive structure | |
CN116610731B (en) | Big data distributed storage method and device, electronic equipment and storage medium | |
CN105376578A (en) | Image compression method and device | |
CN113612483A (en) | Industrial real-time data lossless coding compression method | |
CN104636377A (en) | Data compression method and equipment | |
CN111371460B (en) | High-low frequency matching data compression method suitable for intelligent ammeter | |
CN103210590B (en) | Compression method and equipment | |
CN108235019A (en) | A kind of storage method and device for compressing image | |
JP2022048930A (en) | Data compression method, data compression device, data compression program, data decompression method, data decompression device, and data decompression program | |
CN116980491A (en) | Frequency domain transformation-based data compression transmission method and device for low-voltage power network | |
EP4354872A1 (en) | Point cloud attribute information encoding and decoding method and apparatus, and related device | |
CN111130558A (en) | Coding table compression method based on statistical probability |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |