CN111371460A - High-low frequency matching data compression method suitable for intelligent electric meter - Google Patents

High-low frequency matching data compression method suitable for intelligent electric meter Download PDF

Info

Publication number
CN111371460A
CN111371460A CN202010338984.XA CN202010338984A CN111371460A CN 111371460 A CN111371460 A CN 111371460A CN 202010338984 A CN202010338984 A CN 202010338984A CN 111371460 A CN111371460 A CN 111371460A
Authority
CN
China
Prior art keywords
data
low frequency
low
frequency matching
frequency
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
Application number
CN202010338984.XA
Other languages
Chinese (zh)
Other versions
CN111371460B (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 CN202010338984.XA priority Critical patent/CN111371460B/en
Publication of CN111371460A publication Critical patent/CN111371460A/en
Application granted granted Critical
Publication of CN111371460B publication Critical patent/CN111371460B/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)
  • 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 high-low frequency matching data compression method suitable for an intelligent electric meter, which comprises the following steps: 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, and setting a high-low frequency matching information table; replacing the low-frequency data with high-frequency data matched with the low-frequency data; setting a high-low frequency zone bit, wherein the zone bit is 0 if the original data is high-frequency data, and the zone bit is 1 if the original data is low-frequency data; establishing high-low frequency matching flag data according to the high-low frequency matching flag bits in sequence; and finally compressing the modified data. The invention replaces the original low-frequency data by high-frequency data, solves the problem of large data storage capacity and improves the data compression efficiency.

Description

High-low frequency matching 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 high-frequency and low-frequency matching 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 provides a high-frequency and low-frequency matching data compression method suitable for an intelligent electric meter.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
a high-frequency and low-frequency matching data compression method suitable for a smart meter comprises the following steps:
step S1: setting a minimum unit of data to be N bytes, wherein N is an integer greater than or equal to 1;
step S2: carrying out data reproduction frequency analysis on the data, and setting a high-low frequency matching information table;
step S3: replacing the low-frequency data with high-frequency data matched with the low-frequency data; setting a high-low frequency zone bit, wherein the zone bit is 0 if the original data is high-frequency data, and the zone bit is 1 if the original data is low-frequency data;
step S4: establishing high-low frequency matching flag data according to the high-low frequency matching flag bits in sequence;
step S5: and compressing the modified data.
Further, the step of performing data reproduction frequency analysis on the data in step S2 and setting a high and low frequency matching information table includes:
analyzing the original data, counting the repetition frequency of the original data, pairing the highest frequency data with the lowest frequency data, pairing the second highest frequency data with the second lowest frequency data, and establishing a high-low frequency matching information table.
Or pairing the highest frequency data with the second highest frequency data, pairing the lowest frequency data with the second lowest frequency data, and establishing a high-low frequency matching information table.
Further, in the step S3, the low frequency data is replaced by the high frequency data matched with the low frequency data; setting high and low frequency zone bits, the zone bit being 0 if the original data is high frequency data, and the zone bit being 1 if the original data is low frequency data, including:
if the minimum unit data of the current N bytes of data is the high-frequency data of the high-low frequency matching table, setting the corresponding bit of the high-low frequency matching flag bit to be 0, and adopting the original data for the N bytes of data;
if the minimum unit data of the current N bytes of data is the low-frequency data of the high-low frequency matching table, the high-low frequency matching flag bit should be set to 1, and the N bytes of data are replaced by the high-frequency data.
Further, to complete the data compression and data reduction scheme, step S6 is further included: and restoring the compressed data into original data by combining the high-frequency and low-frequency matching mark information.
Further, the data compressed in step S5 is composed of four parts, where the first part is a high/low frequency matching information table, the second part is high/low frequency matching flag data, the third part is compressed data minimum unit N, the fourth part is compressed information data, and each bit in the high/low frequency matching flag data corresponds to N bytes of compressed information data, where the N bytes of original data are high frequency information or low frequency information.
As another possible implementation, the data compressed in step S5 is composed of five parts, where the first part is the high/low frequency matching information table, the second part is the high/low frequency matching flag data, the third part is the minimum unit N of compressed data, the fourth part is the compressed information data, and the fifth 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.
Furthermore, the high-low frequency matching information table and the high-low frequency matching mark data are compressed by adopting a compression algorithm to form high-low frequency matching correlation compressed data.
Compared with the prior art, the invention has the beneficial effects that:
the invention carries out reproduction rate frequency analysis on the original data, sets high and low frequency flag bits, constructs the original data into high and low frequency matching flag data, changes the repetition rule of the original data, changes the situation that the repetition probability of the original data is basically consistent, and improves 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 high-low frequency matching data compression method suitable for an intelligent electric meter comprises the following steps:
step S1: 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 S2: and carrying out data reproduction frequency analysis on the data, and setting a high-low frequency matching information table.
Analyzing the original data, counting the repetition frequency of the original data, matching the highest frequency data with the lowest frequency data, matching the second highest repetition rate data with the second lowest repetition rate data, and so on to construct the repeatHigh and low frequency matching information Watch (A)
Or pairing the highest frequency data with the second highest frequency data, pairing the lowest frequency data with the second lowest frequency data, and so on to construct a high-low frequency matching information table.
Step S3: replacing the low-frequency data with high-frequency data matched with the low-frequency data; and setting a high-frequency zone bit and a low-frequency zone bit, wherein the zone bit is 0 if the original data is high-frequency data, and the zone bit is 1 if the original data is low-frequency data.
If the minimum unit data of the current N bytes of data is the high-frequency data of the high-low frequency matching table, setting the corresponding bit of the high-low frequency matching flag bit to be 0, and adopting the original data for the N bytes of data; if the minimum unit data of the current N bytes of data is the low-frequency data of the high-low frequency matching table, the high-low frequency matching flag bit should be set to 1, and the N bytes of data are replaced by the high-frequency data.
Step S4: and establishing high-low frequency matching flag data according to the high-low frequency matching flag bits in sequence.
Step S5: and compressing the modified data.
The compressed data is composed of four parts, wherein the first part is a high-low frequency matching information table, the second part is high-low frequency matching mark data, the third part is a minimum unit N of the compressed data, the fourth part is compressed information data, and each bit in the high-low frequency matching mark data corresponds to corresponding N bytes of original data of the compressed information data and is high-frequency information or low-frequency information.
As another possible implementation manner, the compressed data may be composed of five parts, where the first part is a high/low frequency matching information table, the second part is high/low frequency matching flag data, the third part is a minimum unit N of compressed data, the fourth part is compressed information data, and the fifth part is a byte number M of original data to be compressed. When M is not the integral multiple of N, the original data supplements K bytes, K is an integer from 1 to N-1, so that the byte number M of the original data is the integral multiple of the minimum unit N of the compressed data, and the compression efficiency is improved. 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 and low frequency matching flag bit is not sufficient and supplements 0 to form a complete byte.
It should be noted that the high and low frequency matching information table and the high and low frequency matching flag data are compressed by a compression algorithm to form high and low frequency matching associated compressed data.
Step S6: and restoring the compressed data into original data by combining the high-frequency and low-frequency matching mark information.
When the compressed data is restored to the original data, the compressed data can be restored to the original data according to the high-low frequency matching information table and the high-low frequency matching flag data, and the scheme changes the repetition rule of the original data when the data is compressed, so that the situation that the repetition probability of the original data is basically consistent is changed, and the efficiency of data compression is improved.
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 high-frequency and low-frequency matching data compression method suitable for an intelligent electric meter is characterized by comprising the following steps: the method comprises the following steps:
step S1: setting a minimum unit of data to be N bytes, wherein N is an integer greater than or equal to 1;
step S2: carrying out data reproduction frequency analysis on the data, and setting a high-low frequency matching information table;
step S3: replacing the low-frequency data with high-frequency data matched with the low-frequency data; setting a high-low frequency zone bit, wherein the zone bit is 0 if the original data is high-frequency data, and the zone bit is 1 if the original data is low-frequency data;
step S4: establishing high-low frequency matching flag data according to the high-low frequency matching flag bits in sequence;
step S5: and compressing the modified data.
2. The high-low frequency matching data compression method suitable for the intelligent electric meter according to claim 1, wherein the method comprises the following steps: the step of carrying out data reproduction frequency analysis on the data and setting a high-low frequency matching information table comprises the following steps:
analyzing the original data, counting the repetition frequency of the original data, pairing the highest frequency data with the lowest frequency data, and establishing a high-low frequency matching information table.
3. The high-low frequency matching data compression method suitable for the intelligent electric meter according to claim 2, wherein the high-low frequency matching data compression method comprises the following steps: replacing the low-frequency data with high-frequency data matched with the low-frequency data; setting high and low frequency zone bits, the zone bit being 0 if the original data is high frequency data, and the zone bit being 1 if the original data is low frequency data, including:
if the minimum unit data of the current N bytes of data is the high-frequency data of the high-low frequency matching table, setting the corresponding bit of the high-low frequency matching flag bit to be 0, and adopting the original data for the N bytes of data;
if the minimum unit data of the current N bytes of data is the low-frequency data of the high-low frequency matching table, the high-low frequency matching flag bit should be set to 1, and the N bytes of data are replaced by the high-frequency data.
4. The high-low frequency matching data compression method suitable for the intelligent electric meter according to any one of claims 1-3, wherein: further comprising step S6: and restoring the compressed data into original data by combining the high-frequency and low-frequency matching mark information.
5. The high-low frequency matching data compression method suitable for the intelligent electric meter according to claim 3, wherein the high-low frequency matching data compression method comprises the following steps: the data compressed in step S5 is composed of four parts, where the first part is a high-low frequency matching information table, the second part is high-low frequency matching flag data, the third part is a minimum unit N of compressed data, the fourth part is compressed information data, and each bit in the high-low frequency matching flag data corresponds to N bytes of compressed information data, and the corresponding N bytes of original data are high-frequency information or low-frequency information.
6. The high-low frequency matching data compression method suitable for the intelligent electric meter according to claim 3, wherein the high-low frequency matching data compression method comprises the following steps: the data compressed in step S5 is composed of five parts, where the first part is a high-low frequency matching information table, the second part is high-low frequency matching flag data, the third part is a minimum unit N of compressed data, the fourth part is compressed information data, and the fifth part is a byte number M of original data to be compressed.
7. The high-low frequency matching data compression method suitable for the intelligent electric meter according to claim 6, wherein the method comprises the following steps: 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 high-low frequency matching data compression method suitable for the intelligent electric meter according to claim 6, wherein the method comprises the following steps: 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 high-low frequency matching data compression method suitable for the intelligent electric meter according to any one of claims 5 to 8, wherein: and the high-low frequency matching information table and the high-low frequency matching mark data are compressed by adopting a compression algorithm to form high-low frequency matching correlation compressed data.
CN202010338984.XA 2020-04-26 2020-04-26 High-low frequency matching data compression method suitable for intelligent ammeter Active CN111371460B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010338984.XA CN111371460B (en) 2020-04-26 2020-04-26 High-low frequency matching data compression method suitable for intelligent ammeter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010338984.XA CN111371460B (en) 2020-04-26 2020-04-26 High-low frequency matching data compression method suitable for intelligent ammeter

Publications (2)

Publication Number Publication Date
CN111371460A true CN111371460A (en) 2020-07-03
CN111371460B CN111371460B (en) 2023-05-02

Family

ID=71212221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010338984.XA Active CN111371460B (en) 2020-04-26 2020-04-26 High-low frequency matching data compression method suitable for intelligent ammeter

Country Status (1)

Country Link
CN (1) CN111371460B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6721456B1 (en) * 2000-02-23 2004-04-13 International Business Machines Corporation Color image data and control bit compression scheme with run length encoding
CN101436407A (en) * 2008-12-22 2009-05-20 西安电子科技大学 Method for encoding and decoding audio
CN102223149A (en) * 2010-04-14 2011-10-19 朱洪波 Arithmetic encoder based on probability polymerization
CN103236847A (en) * 2013-05-06 2013-08-07 西安电子科技大学 Multilayer Hash structure and run coding-based lossless compression method for data
US9503122B1 (en) * 2015-05-11 2016-11-22 Via Alliance Semiconductor Co., Ltd. Hardware data compressor that sorts hash chains based on node string match probabilities
CN108337002A (en) * 2018-02-09 2018-07-27 黄淮学院 A kind of multiple channel acousto signal reconfiguring method
CN110865970A (en) * 2019-10-08 2020-03-06 西安交通大学 Compression flow pattern matching engine and pattern matching method based on FPGA platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6721456B1 (en) * 2000-02-23 2004-04-13 International Business Machines Corporation Color image data and control bit compression scheme with run length encoding
CN101436407A (en) * 2008-12-22 2009-05-20 西安电子科技大学 Method for encoding and decoding audio
CN102223149A (en) * 2010-04-14 2011-10-19 朱洪波 Arithmetic encoder based on probability polymerization
CN103236847A (en) * 2013-05-06 2013-08-07 西安电子科技大学 Multilayer Hash structure and run coding-based lossless compression method for data
US9503122B1 (en) * 2015-05-11 2016-11-22 Via Alliance Semiconductor Co., Ltd. Hardware data compressor that sorts hash chains based on node string match probabilities
CN108337002A (en) * 2018-02-09 2018-07-27 黄淮学院 A kind of multiple channel acousto signal reconfiguring method
CN110865970A (en) * 2019-10-08 2020-03-06 西安交通大学 Compression flow pattern matching engine and pattern matching method based on FPGA platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YUE SHEN等: "A novel method on harmonics detection based on compressive sampling matching pursuit" *
高尚兵: "基于小波零树和分形理论的图像压缩研究" *

Also Published As

Publication number Publication date
CN111371460B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN116192971B (en) Intelligent cloud energy operation and maintenance service platform data management method
CN103858433B (en) Layered entropy encoding and decoding
Ceylan et al. Estimating energy demand of Turkey based on economic indicators using genetic algorithm approach
CN102571966B (en) Network transmission method for large extensible markup language (XML) document
CN110830437B (en) Data compression method, device, equipment and storage medium for high-frequency service data
CN104040899B (en) Generate the code alphabet of symbol to be that the word being used together with program generates code word
CN104579360B (en) A kind of method and apparatus of data processing
CN107590157B (en) Data storage method, data query method and related equipment
CN115730749B (en) Power dispatching risk early warning method and device based on fusion power data
CN109656878A (en) Health account data creation method and device
CN113852379A (en) Data encoding method, system, equipment and computer readable storage medium
CN110198171B (en) Data compression method and device, computer readable medium and electronic equipment
CN117376429A (en) Intelligent data compression method for wireless sensor network
Yan et al. Model-free lossless data compression for real-time low-latency transmission in smart grids
CN115882866A (en) Data compression method based on data difference characteristic
CN111371461B (en) Original code and inverse code mixed data compression method suitable for intelligent electric meter
CN113220651B (en) Method, device, terminal equipment and storage medium for compressing operation data
CN111371460B (en) High-low frequency matching data compression method suitable for intelligent ammeter
CN111371459B (en) Multi-operation high-frequency replacement type data compression method suitable for intelligent electric meter
CN110310361A (en) Buildings model live transmission method, storage medium, equipment and system
CN105376578A (en) Image compression method and device
JP2022048930A (en) Data compression method, data compression device, data compression program, data decompression method, data decompression device, and data decompression program
CN104636377A (en) Data compression method and equipment
CN103746701A (en) Rapid encoding option selecting method applied to Rice lossless data compression
CN115834720B (en) Data compression method for photovoltaic communication data

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