CN111371459B - 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 PDF

Info

Publication number
CN111371459B
CN111371459B CN202010338457.9A CN202010338457A CN111371459B CN 111371459 B CN111371459 B CN 111371459B CN 202010338457 A CN202010338457 A CN 202010338457A CN 111371459 B CN111371459 B CN 111371459B
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.)
Active
Application number
CN202010338457.9A
Other languages
Chinese (zh)
Other versions
CN111371459A (en
Inventor
曹献炜
李建炜
常兴智
王再望
党政军
武晓勇
纳晓文
李晓雄
谭忠
陈良才
马强
屈子旭
杨杰
曹宁
李全堂
王龙龙
刘贵平
张白
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningxia LGG Instrument Co Ltd
Original Assignee
Ningxia LGG Instrument Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ningxia LGG Instrument Co Ltd filed Critical Ningxia LGG Instrument Co Ltd
Priority to CN202010338457.9A priority Critical patent/CN111371459B/en
Publication of CN111371459A publication Critical patent/CN111371459A/en
Application granted granted Critical
Publication of CN111371459B publication Critical patent/CN111371459B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion 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/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R22/00Arrangements for measuring time integral of electric power or current, e.g. electricity meters
    • G01R22/06Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Power Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (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

Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter
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 ammeter.
Background
The intelligent electric meter is one of basic devices for data acquisition of the intelligent power grid, bears 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 meter, the requirements on the data storage space are also continuously increased. However, the storage capacity of the electric 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;
and 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;
and step S4: establishing high-frequency substitution mark data according to the operation mark bits in sequence;
step S5: and compressing the modified data.
Furthermore, the step S1 of copying the original data to be compressed, and performing xor and anticode operations on the copied original data respectively 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 S3 of analyzing data reproduction frequency, replacing low-frequency data with high-frequency data, and setting an operation flag bit 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 flag bit to be 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 comprises the 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 in 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 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 the bit is complemented with 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, as 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 or 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.
And 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.
And 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 the bit is complemented with 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 bit.
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 (7)

1. A multi-operation high-frequency substitution type data compression method suitable for a smart 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;
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 XOR operation on the copied original code data, wherein the first XOR operand is 10101010 with the same N bytes, and the second XOR operand is 01010101 with the same N bytes; performing code reversal operation on the copied original code data to obtain data subjected to code reversal operation;
step S2: setting a minimum unit of data to be N bytes, wherein N is an integer greater than or equal to 1;
and 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;
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;
meanwhile, replacing original data with the highest repetition frequency according to the operation zone bit;
and 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: further comprising step S6: and restoring the compressed data into original data by combining the information of the operation zone bits.
3. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to claim 1, characterized in that: the data compressed in step S5 is composed of three parts, wherein 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 corresponding N bytes of the compressed information data, which are original code data, data after the first exclusive or operation, data after the second exclusive or operation, and data after the inverse code operation.
4. The multi-operation high-frequency substitution data compression method for the smart meter according to claim 1, 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.
5. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to claim 4, 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.
6. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to claim 4, 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.
7. The multi-operation high-frequency substitution data compression method suitable for the smart meter according to any one of claims 3 to 6, wherein: and the operation mark data is compressed by adopting a compression algorithm to form operand compressed data.
CN202010338457.9A 2020-04-26 2020-04-26 Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter Active CN111371459B (en)

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 CN111371459A (en) 2020-07-03
CN111371459B true 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 (6)

* Cited by examiner, † Cited by third party
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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ITUB20153254A1 (en) * 2015-08-27 2017-02-27 St Microelectronics Srl INTELLIGENT RESCUE METHOD OF HIGH DENSITY DATA AND RELATIVE MEMORY DEVICE

Patent Citations (6)

* Cited by examiner, † Cited by third party
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
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)

* Cited by examiner, † Cited by third party
Title
Jarno Mielikainen等.Lossless Compression of Ultraspectral Sounder Data Using Linear Prediction With Constant Coefficients.《IEEE Geoscience and Remote Sensing Letters》.2009,(第undefined期),全文. *
孙家宝 ; 郭峰林 ; 薛伟 ; 赵克威 ; 张新祥 ; .基于小波变换的时空数据压缩方法.武汉工业学院学报.2013,(第03期),全文. *

Also Published As

Publication number Publication date
CN111371459A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN103858433B (en) Layered entropy encoding and decoding
US6122378A (en) Data compression/encryption method and system
CN112953550B (en) Data compression method, electronic device and storage medium
CN111008230B (en) Data storage method, device, computer equipment and storage medium
CN109428603A (en) A kind of data-encoding scheme, device and storage medium
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
CN109428602A (en) A kind of data-encoding scheme, device and storage medium
CN103546161A (en) Lossless compression method based on binary processing
Lu et al. A reliable data compression scheme in sensor-cloud systems based on edge computing
Yan et al. Model-free lossless data compression for real-time low-latency transmission in smart grids
CN105659503A (en) System and method for providing multi-user power saving codebook optimization
CN104125475A (en) Multi-dimensional quantum data compressing and uncompressing method and apparatus
CN113220651B (en) Method, device, terminal equipment and storage medium for compressing operation data
CN111371459B (en) Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter
WO2021120713A8 (en) Data processing method, decoding circuit, and processor
CN113612483A (en) Industrial real-time data lossless coding compression method
CN111371461B (en) Original code and inverse code mixed data compression method suitable for intelligent electric meter
CN116610731B (en) Big data distributed storage method and device, electronic equipment and storage medium
CN111371460B (en) High-low frequency matching data compression method suitable for intelligent ammeter
US6411714B1 (en) Data decompression/decryption method and system
CN104636377A (en) Data compression method and equipment
CN111130558A (en) Coding table compression method based on statistical probability
CN104268034A (en) Data backup method and device and data recovery method and device
CN115955250B (en) College scientific research data acquisition management system

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