Electric energy meter data compression method and system, electronic device, and storage medium

By generating residual coding sequences through first-order differential processing and coding recombination, and combining them with the Deflate algorithm, the problem of low data transmission efficiency in electricity meters is solved, achieving efficient data compression and communication.

CN120825182BActive Publication Date: 2026-03-10BEIJING TENGINEER AIOT TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Given the limited capacity of high-speed power line carrier communication channels, how can we improve the transmission efficiency of electricity meter data, especially in the cloud, edge, and terminal architecture of power company data acquisition systems? How can we design application-layer compression algorithms to adapt to the electricity meters on the terminal side and solve the computing power bottleneck?

Method used

First-order differential processing and encoding are used to generate residual coded sequences. These sequences are then reassembled into a continuous data stream using bit or byte columns. Data compression algorithms, including a combination of symbol-amplitude encoding and the Deflate algorithm, are used to compress the data and optimize data transmission.

Benefits of technology

It significantly improves the compression ratio of electricity meter data, reduces the computational complexity during decoding, fits the computing power and RAM constraints of the electricity meter MCU, and enhances the reliability and efficiency of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120825182B_ABST
    Figure CN120825182B_ABST
Patent Text Reader

Abstract

The application discloses an electric energy meter data compression method and system, an electronic device and a storage medium. The method first performs first-order difference processing on an electric quantity measurement data sequence to obtain a residual data sequence. The value range of the residual data sequence is greatly reduced, the repetition degree is greatly increased, and the statistical entropy is significantly reduced, thus creating an ideal input with low entropy and high redundancy for subsequent coding, and improving the compression ratio as a whole. The residual data sequence is then coded, the positive and negative information is retained, and the problem of equivalent entropy not being reduced due to complement storage is avoided. The residual coded sequence is then subjected to bit column reorganization processing or byte column reorganization processing, and a continuous data stream with a large number of locally repeated segments is generated, so that in the subsequent electric energy meter environment with limited MCU computing power and RAM, a lightweight compression algorithm can also quickly find and reuse redundancy in a very short window, and the overall compression efficiency is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data compression processing technology, and in particular to a method and system for compressing electricity meter data, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Building a new power system dominated by clean and low-carbon energy places higher demands on digitalization. In the time dimension, the data acquisition frequency needs to be significantly increased, from the traditional 15-minute intervals to the minute level, and in control scenarios such as photovoltaic energy storage, even down to the second level. In the spatial dimension, more data variables need to be added, such as power quality and load identification results, to meet the high-precision sensing requirements. In actual digital transformation of distribution areas, intelligent applications such as meter error calculation, distribution area topology identification, and impedance analysis rely on the collaborative processing of massive load data from the cloud, edge, and terminal. However, high-speed power line carrier (HPLC), as a local communication link connecting the edge and terminal sides, has insufficient bandwidth, and with the significant increase in power electronic devices, its communication performance and reliability further decline, making it difficult to support the real-time transmission requirements of high-frequency, multi-dimensional data. Therefore, given the limited capacity of HPLC channels, how to improve transmission efficiency through application-layer compression algorithm optimization has become a key breakthrough in opening up the power data "acquisition-transmission-computation" link. In the cloud-edge-device architecture of the power company's data acquisition system, the computing power bottleneck lies in the electricity meters on the device side. Therefore, how to design application-layer compression algorithms to adapt to the electricity meters on the device side has become a key research topic. Summary of the Invention

[0003] This invention provides a method and system for compressing electricity meter data, an electronic device, and a computer-readable storage medium, which can significantly improve the data compression effect of electricity meters under the limitation of low computing power.

[0004] According to one aspect of the present invention, a method for compressing electricity meter data is provided, comprising the following:

[0005] Collect the electrical quantity measurement data sequence from the electricity meter;

[0006] The electrical quantity measurement data sequence is subjected to first-order difference processing and encoding processing in sequence to obtain the residual encoding sequence;

[0007] Perform bit-column reassembly or byte-column reassembly on the residual encoded sequence to generate a continuous data stream;

[0008] Continuous data streams are compressed using data compression algorithms.

[0009] Furthermore, the process of performing first-order difference processing on the electrical quantity metering data sequence includes the following:

[0010] Using the first frame of data in the electrical quantity measurement data sequence as the anchor point, the data of the next frame is subtracted from the data of the previous frame to obtain the difference between the two adjacent frames. Based on the difference between the first frame data and the two adjacent frames, a residual data sequence is generated.

[0011] Furthermore, the encoding process includes the following:

[0012] The residual data sequence is encoded using a sign-amplitude encoding method to obtain the residual coded sequence.

[0013] Furthermore, the encoding process employs either a method where the most significant bit stores the sign and the remaining bits store the absolute value of the residual, or a method where the least significant bit stores the sign and the remaining bits store the absolute value of the residual.

[0014] Furthermore, the process of performing bit-column recombination on the residual coded sequence includes the following:

[0015] First, using the data units in the residual coding sequence as the granularity, each byte is expanded bit by bit, and then split into 8 independent bits from the most significant bit to the least significant bit. Then, they are re-concatenated according to the bit depth priority principle to generate a reconstructed continuous data stream.

[0016] Furthermore, the process of recombining the byte sequences of the residual encoded sequence includes the following:

[0017] First, the residual coding sequence is converted into an N×M matrix, where N represents the number of time points and M represents the number of bytes contained in the data unit of electrical quantity metering data. Then, the matrix is ​​expanded in column-major order to generate a continuous data stream.

[0018] Furthermore, the electrical quantity measurement data of the electricity meter includes any one of power data, voltage data, and current data.

[0019] In addition, the present invention also provides an energy meter data compression system, comprising:

[0020] The data acquisition module is used to collect the electrical quantity measurement data sequence of the electricity meter;

[0021] The first preprocessing module is used to perform first-order difference processing and encoding processing on the electrical quantity metering data sequence in sequence to obtain the residual encoding sequence.

[0022] The second preprocessing module is used to perform bit column recombination or byte column recombination on the residual coded sequence to generate a continuous data stream.

[0023] The data compression module is used to compress continuous data streams using data compression algorithms.

[0024] In addition, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.

[0025] In addition, the present invention provides a computer-readable storage medium for storing a computer program for compressing electricity meter data, wherein the computer program executes the steps of the method described above when run on a computer.

[0026] The present invention has the following beneficial effects:

[0027] The energy meter data compression method of this invention first performs first-order differential processing on the collected electrical quantity metering data sequence to obtain a residual data sequence. This significantly reduces the value range, increases the repetition rate, and reduces the statistical entropy of the residual data sequence, creating an ideal "low-entropy, high-redundancy" input for subsequent encoding, thereby improving the overall compression ratio. Then, the residual data sequence is encoded, converting each residual into at least one codeword in the non-negative integer field. This preserves both positive and negative information while avoiding two's complement storage, greatly reducing the computational complexity during decoding and perfectly suited to the computing power and RAM constraints of the energy meter MCU. Next, the residual encoded sequence undergoes bit-column reassembly or byte-column reassembly processing to generate a continuous data stream with numerous locally repeating segments. This allows subsequent data compression algorithms to detect and reuse redundancy within a very short window, significantly improving the overall compression effect.

[0028] In addition, the electricity meter data compression system of the present invention also has the above-mentioned advantages.

[0029] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description

[0030] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0031] Figure 1 This is a flowchart illustrating a preferred embodiment of the electricity meter data compression method of this application;

[0032] Figure 2 This is a schematic diagram of the power data sequence in a preferred embodiment of this application;

[0033] Figure 3 This is a schematic diagram of the voltage data sequence in a preferred embodiment of this application;

[0034] Figure 4This is a schematic diagram of the current data sequence in a preferred embodiment of this application;

[0035] Figure 5 This is a schematic diagram of the residual coding sequence generated in a preferred embodiment of this application;

[0036] Figure 6 These are schematic diagrams of four compression structures designed for comparative testing in the preferred embodiments of this application;

[0037] Figure 7 This is a schematic diagram of the module structure of an electricity meter data compression system according to another embodiment of this application. Detailed Implementation

[0038] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0039] Reference Figure 1 A preferred embodiment of this application provides a method for compressing electricity meter data, including the following:

[0040] Step S1: Collect the electrical quantity measurement data sequence from the electricity meter;

[0041] Step S2: Perform first-order difference processing and encoding processing on the electrical quantity measurement data sequence in sequence to obtain the residual encoding sequence;

[0042] Step S3: Perform bit column reassembly or byte column reassembly on the residual encoded sequence to generate a continuous data stream;

[0043] Step S4: Compress the continuous data stream using a data compression algorithm.

[0044] As can be understood, the electricity meter data compression method in this embodiment first performs first-order differential processing on the collected electrical quantity metering data sequence to obtain a residual data sequence. The value range of the residual data sequence is significantly reduced, the repetition is significantly increased, and the statistical entropy is significantly reduced, creating an ideal input of "low entropy and high redundancy" for subsequent encoding, thereby improving the overall compression ratio. Then, the residual data sequence is encoded, converting each residual into at least one codeword in the non-negative integer field. This preserves both positive and negative information and avoids the need for complement code storage, greatly reducing the computational complexity during decoding, which is very suitable for the computing power and RAM constraints of the electricity meter MCU. Next, the residual encoded sequence is subjected to bit column reassembly or byte column reassembly processing to generate a continuous data stream with a large number of locally repeating segments. This allows the subsequent data compression algorithm to discover and reuse redundancy within a very short window, thereby significantly improving the overall compression effect.

[0045] In step S1, the electrical quantity measurement data sequence of the electricity meter consists of a certain number of data units arranged in chronological order. The electrical quantity measurement data type includes any one of power data, voltage data, and current data. Specifically, for power data, its data unit consists of four bytes, and its value is amplified tenfold and stored as an integer, with the unit being W. For example, ... Figure 2 The power data sequence shown contains 16 data units in little-endian byte order. The first active power data unit, field 0x00005250, corresponds to an actual value of 2107.2W, calculated as: 0x5250 / 10 = 2107.2W. The power data sequence is composed of these four-byte data units. For voltage data, each data unit consists of two bytes. The value is amplified tenfold and stored as an integer, with the unit being V. The voltage data sequence is composed of these two-byte data units. For example... Figure 3 The voltage data sequence shown contains 16 data units in little-endian byte order. The first voltage data unit, 0x08BF, corresponds to an actual value of 223.9V, calculated as: 0x08BF / 10 = 223.9V. For current data, each data unit consists of four bytes. The value is amplified 1000 times and stored as an integer in amperes (A). The current data sequence is composed of these four-byte data units. For example... Figure 4 The current sequence shown contains 16 data units in little-endian byte order. The first current data unit, field 0x00003833, corresponds to an actual value of 14.387A. The calculation process is 0x00003833 / 1000=14.387A.

[0046] In addition, in step S2, the electrical quantity metering data sequence is first subjected to first-order difference processing, wherein the process of performing first-order difference processing on the electrical quantity metering data sequence includes the following:

[0047] Using the first frame of data in the electrical quantity metering data sequence as the anchor point, the next frame of data x i Subtract the data from the previous frame x i-1 The difference r between two adjacent frames of data is obtained. i =x i - x i-1 And based on the difference r between the first frame data x0 and the data of the two adjacent frames. i The generated residual data sequence can be represented as [x0, r1, ..., r]. n-1In the residual data sequence, the first frame of data is the original data, and the data in the second and subsequent frames are the differences between the two frames. For example, assuming the original data sequence is [100, 101, 102, 103, 104], the residual data sequence generated after first-order differencing is: [100, +1, +1, +1, +1].

[0048] It is understandable that electricity meter data exhibits highly continuous and stable changes at the second level or even higher frequencies, with adjacent sampling points often differing by only a few units of measurement. Therefore, based on the high sampling continuity of the metering data, after first-order difference processing, the original data can be converted into a residual data sequence. Except for the first data point, the remaining residuals in the generated residual data sequence are concentrated in extremely small value ranges. The value range of the residual data sequence is significantly reduced, the repetition is significantly increased, and the statistical entropy is significantly reduced. The generated residual data sequence has the characteristics of small value range, concentrated distribution, and lower entropy, creating an ideal input with low entropy and high redundancy for subsequent entropy coding or variable-length coding, thereby improving the overall compression ratio.

[0049] In addition, in step S2, the residual data sequence obtained from the differential processing is further encoded using an encoding process to generate a residual encoded sequence. The encoding process includes the following:

[0050] The residual data sequence is encoded using a sign-amplitude encoding method to obtain the residual coded sequence.

[0051] Preferably, the encoding process uses a method where the most significant bit (MSB) stores the sign, and the remaining bits store the absolute value of the residual. Specifically, the MSB is used as the sign bit, storing the sign (0 for non-negative, 1 for negative), and the remaining bits store the absolute value of the residual |rᵢ|. For example, for... Figure 2 In the power data sequence, the first frame power data P0=0x00005250, the second frame power data P1=0x00005269, then the first residual data r1= P1- P0=0x00000019, the MSB sign bit is 0, the amplitude height is 0x19, which corresponds to Figure 5 The value is 19 00 00 00; Additionally, the third frame power data P2=0x00005263, then the second residual data r2= P2- P1=-0x00000006, so the MSB sign bit is 1, and the amplitude height is 0x00000006, which corresponds to... Figure 5 06 00 00 80; Additionally, in Figure 5 In the data unit, when the last byte of each data unit is 00, it indicates that the sign bit is non-negative; when it is 80, it indicates that the sign bit is negative. Apart from the sign bit of the MSB and the absolute value of the residual, there are a large number of repetitions (0) in the vertical bit column.

[0052] It is understood that this invention uses an encoding method that stores the symbol in the most significant bit and the absolute value of the residual in the remaining bits. This method converts each residual data into at least one codeword in the non-negative integer field. For example, when the difference between two adjacent frames of data is small, such as less than or equal to 255, each residual data is converted into one codeword. When the difference between two adjacent frames of data is large, such as greater than 255, each residual data is converted into two codewords. This preserves both positive and negative information and avoids the need for two's complement storage. The high bits remain 0xFF or 0x00 for a long time, and the equivalent entropy does not actually decrease. At the same time, this symbol-amplitude format only requires one bit operation to recover the original symbol during decoding, resulting in extremely low computational complexity. This is very suitable for the computing power and RAM constraints of the energy meter MCU.

[0053] Optionally, the encoding process can also employ an encoding method where the least significant bit stores the sign and the remaining bits store the absolute value of the residual. For example, the ZigZag encoding method can be used, which is characterized by storing the sign in the least significant bit and the magnitude in the most significant bit. Alternatively, a signed integer with a small absolute value can be remapped to an equally small, non-negative integer field. The ZigZag encoding method is an existing technology, and its specific principles will not be elaborated here.

[0054] In addition, in step S3, the bit-column recombination process of the residual coded sequence includes the following:

[0055] First, using the data units in the residual coding sequence as the granularity, each byte is expanded bit by bit, and then split into 8 independent bits from the most significant bit to the least significant bit. Then, they are re-concatenated according to the bit depth priority principle to generate a reconstructed continuous data stream.

[0056] Specifically, each byte is first expanded bit by bit at the data unit level, from the most significant bit (MSB) to the least significant bit (LSB) into 8 independent bits, which can be represented as: ,in, b t,i Indicates the first t The first time point i The value of each byte. Then, the residual encoded sequence is no longer arranged in chronological order, but is re-concatenated according to the bit depth first principle, that is, the 7th bit of all data units is written first, then the 6th bit, ..., until the 0th bit, which can be represented as: N represents the number of time points, and M represents the number of bytes contained in the data unit. For example, taking a 4-byte power sample as an example, the reconstructed data stream is: {7th bit of column 0, 7th bit of column 1, ..., 7th bit of column 3; 6th bit of column 0, 6th bit of column 1, ..., 6th bit of column 3; ...; 0th bit of column 0, 0th bit of column 1, ..., 0th bit of column 3}.

[0057] It is understandable that, since the residual coding sequence has already transformed the original power value into a residual where "the MSB bit is the sign and the remaining bits are extremely small absolute values," the residual exhibits extremely strong stability in the vertical bit dimension: the high bits are almost always 0, and the low bits often repeat between adjacent samples. Therefore, this invention, through bit column recombination, utilizes a vertical to horizontal mapping to squeeze highly stable bit columns into adjacent positions, instantly constructing a large number of locally repeating segments. This allows subsequent data compression algorithms such as dictionary / LZ series algorithms based on sliding windows to discover and reuse redundancy within an extremely short window, thereby significantly improving the overall compression efficiency.

[0058] Optionally, the process of performing byte column reassembly on the residual encoded sequence includes the following:

[0059] First, the residual coding sequence is converted into an N×M matrix, where N represents the number of time points and M represents the number of bytes contained in the data unit of electrical quantity metering data. Then, the matrix is ​​expanded in column-major order to generate a continuous data stream.

[0060] Specifically, if the residual coding sequence includes records at N time points, it can be converted into an N×M matrix, where N represents the number of time points and M represents the number of bytes contained in the data unit of the electrical quantity metering data. For example, for power data, M is 4, and the matrix can be represented as follows: , b t,i Indicates the first t The first time point i A value of byte, 0≤ t ≤ N -1, 0≤ i ≤ M-1 Expanding the matrix into a continuous data stream in column-major order, it can be represented as: It's understandable that byte-level reassembly produces fewer locally repeating segments compared to bit-level reassembly, resulting in relatively lower compression efficiency.

[0061] Furthermore, in step S4, after differential, encoding, and reassembly processing, the generated continuous data stream exhibits a large amount of local repetition and a low-entropy distribution dominated by low values ​​such as 0x00 and 0x01. This is precisely the scenario where the sliding window-based dictionary algorithm excels. Therefore, this invention preferably uses the Deflate algorithm as the final compressor. The Deflate algorithm combines LZ77 and Huffman coding, enabling fast decompression while maintaining high compression efficiency. The Deflate algorithm is an existing data compression algorithm; its specific compression principle and process will not be elaborated here.

[0062] Furthermore, the runtime memory of the Deflate algorithm consists of a sliding window buffer and a hash index, which can be estimated using the formula: Memory = (1<<(windowBits + 2)) + (1<<(memLevel + 9)). If the default configuration of the data compression library zlib is maintained: windowBits=15 (32 KB window) and memLevel=8, approximately 256 KB of RAM is required at the meter. However, for smart meters with a main frequency of tens of MHz and RAM in the hundreds of KB range, these two parameters must be reduced to keep the algorithm lightweight. A typical approach is to adjust windowBits to 12-13 and memLevel to 5-6, simultaneously shrinking the window and hash table. This can reduce the total memory usage to 40-60 KB and significantly reduce the MCU's memory access and arithmetic load, ensuring real-time performance. It is understandable that the cost of reducing the window size and hash table is a decrease in historical backtracking depth and index capacity, making it difficult to detect repeated segments across long intervals, and theoretically the compression ratio will be compromised. However, this invention can compress homogeneous bit blocks to nearest neighbor positions through first-order differential processing and bit column reorganization / byte column reorganization, significantly enhancing local repeatability. Therefore, even if the window is only a dozen KB, the algorithm can still frequently hit high-value matching points within a limited field of view, thereby compensating for the compression ratio loss caused by parameter reduction.

[0063] Additionally, when decompression is required on the edge / cloud side, the Deflate algorithm can be used for decompression to restore the bit-column reconstructed data or byte-column reconstructed data. Further restoration of the bit-column reconstructed data or byte-column reconstructed data can then recover the complete data unit sequence. For example, taking the decompressed bit-column reconstructed data as an example, the bit-column reconstructed sequence is first divided into 8 bit layers (bit 7 → bit 0), each layer containing N×M consecutive bits. Each layer is read sequentially, and the k-th bit in each bit layer is written back to the corresponding bit of the k-th byte in the output buffer. After all 8 layers are filled, the buffer obtains a residual sequence arranged in time. Finally, the residual data is subjected to inverse first-order difference processing. The first value of the residual, r0, is the first value of the original sequence, x0. For i≥1, let the sign bit sgn be... The highest bit is given (0 for positive, 1 for negative), and the difference magnitude diff is the remaining bits, calculated according to the formula. By recursively applying this process, the complete sequence of data units can be recovered.

[0064] In addition, to verify the effectiveness and superiority of the data compression algorithm of this invention, comparative experiments were conducted, and the following were designed: Figure 6 The four compression architectures shown are as follows: the first architecture directly applies Deflate compression to the original data sequence; the second architecture performs first-order differential processing on the original data sequence before Deflate compression; the third architecture performs bit-column reassembly processing on the original data sequence before Deflate compression; and the fourth architecture, which is the compression algorithm of this invention, first performs first-order differential processing on the original data sequence, then encodes it, performs bit-column reassembly, and finally performs Deflate compression. Furthermore, for these four compression architectures, measured power load data from phase A of a power supply area were collected, and compression verification was performed on power sequence, voltage sequence, and current sequence, respectively. In addition, the evaluation indicators used in this invention are compression ratio and improvement percentage, where compression ratio = original size / compressed size, and improvement percentage = [(preprocessed compression ratio - original data compression ratio) / original data compression ratio] × 100%.

[0065] The continuous power data was divided into 40KB (40960 bytes) segments, and each segment was compressed according to the four compression architectures mentioned above. The results are shown in Table 1.

[0066] Table 1. Comparison Results of Power Data Compression

[0067]

[0068] In addition, the continuous voltage data was divided into 20KB (20480 bytes) segments, and each segment was compressed according to the four compression architectures mentioned above. The results are shown in Table 2.

[0069] Table 2. Comparison Results of Voltage Data Compression

[0070]

[0071] In addition, the continuous current data was divided into 40KB (40960 bytes) segments, and each segment was compressed according to the four compression architectures mentioned above. The results are shown in Table 3.

[0072] Table 3. Comparison Results of Current Data Compression

[0073]

[0074] As can be seen from the three comparison results tables above, among the four compression architectures, the data compression algorithm of this invention (method four) has the best compression ratio, achieving a huge improvement in compression ratio compared to direct compression of the original data, and showing good consistency for power, voltage, and current sequences.

[0075] In addition, such as Figure 7 As shown, another embodiment of the present invention also provides an energy meter data compression system, preferably employing the energy meter data compression method described above, comprising:

[0076] The data acquisition module is used to collect the electrical quantity measurement data sequence of the electricity meter;

[0077] The first preprocessing module is used to perform first-order difference processing and encoding processing on the electrical quantity metering data sequence in sequence to obtain the residual encoding sequence.

[0078] The second preprocessing module is used to perform bit column recombination or byte column recombination on the residual coded sequence to generate a continuous data stream.

[0079] The data compression module is used to compress continuous data streams using data compression algorithms.

[0080] As can be understood, the electricity meter data compression system in this embodiment first performs first-order differential processing on the collected electrical quantity metering data sequence to obtain a residual data sequence. The value range of the residual data sequence is significantly reduced, the repetition is significantly increased, and the statistical entropy is significantly reduced, creating an ideal input of "low entropy and high redundancy" for subsequent encoding, thereby improving the overall compression ratio. Then, the residual data sequence is encoded, converting each residual into at least one codeword in the non-negative integer field. This preserves both positive and negative information and avoids the need for complement code storage, greatly reducing the computational complexity during decoding, which is very suitable for the computing power and RAM constraints of the electricity meter MCU. Next, the residual encoded sequence is subjected to bit column reassembly or byte column reassembly processing to generate a continuous data stream with a large number of locally repeating segments. This allows the subsequent data compression algorithm to discover and reuse redundancy within a very short window, thereby significantly improving the overall compression effect.

[0081] In addition, another embodiment of the present invention provides an electronic device including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.

[0082] In addition, another embodiment of the present invention provides a computer-readable storage medium for storing a computer program for compressing electricity meter data, wherein the computer program executes the steps of the method described above when run on a computer.

[0083] Common computer-readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punch cards, paper tape, any other physical media with perforated patterns, random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), flash erasable programmable read-only memory (FLASH-EPROM), any other memory chips or cartridges, or any other media readable by a computer. Instructions may further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium used to store, encode, or carry instructions for execution by a machine, and includes digital or analog carrier communication signals or intangible media that facilitate communication of such instructions. Transmission media include coaxial cables, copper wires, and optical fibers, which contain conductors for transmitting a bus of computer data signals.

[0084] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0085] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0086] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0087] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0088] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0089] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

[0090] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for compressing data of an electric energy meter, characterized by, The method comprises the following steps: collecting an electrical quantity measurement data sequence of an electric energy meter; performing first-order difference processing and encoding processing on the electrical quantity measurement data sequence in sequence to obtain a residual error encoding sequence; performing bit column reorganization processing on the residual error encoding sequence to generate a continuous data stream; performing compression processing on the continuous data stream by using a data compression algorithm; the first-order difference processing on the electrical quantity measurement data sequence comprises the following steps: taking the first frame data in the electrical quantity measurement data sequence as an anchor point, subtracting the previous frame data from the next frame data to obtain the difference value of the adjacent two frame data, and generating a residual error data sequence based on the difference value between the first frame data and the adjacent two frame data, wherein the first frame data in the residual error data sequence is the original data, and the data of the second frame and the subsequent frames is the difference value of the previous and subsequent two frame data; the bit column reorganization processing on the residual error encoding sequence comprises the following steps: firstly, expand each byte by bit from the most significant bit to the least significant bit to form eight independent bits, and then re-serialize according to the bit depth-first principle to generate a reorganized continuous data stream, wherein the bit depth-first principle means writing the 7th bit of all data units first, then the 6th bit, and so on until the 0th bit.

2. The electric energy meter data compression method of claim 1, wherein, the encoding processing comprises the following steps: performing encoding processing on the residual error data sequence by using a sign-magnitude encoding method to obtain a residual error encoding sequence.

3. The method of claim 2, wherein, The encoding process adopts an encoding method of storing the sign in the most significant bit and storing the residual absolute value in the remaining bits, or an encoding method of storing the sign in the least significant bit and storing the residual absolute value in the remaining bits.

4. The method of claim 1, wherein, The electrical quantity measurement data of the electric energy meter includes any one of power data, voltage data and current data.

5. An electric energy meter data compression system employing the electric energy meter data compression method according to any one of claims 1 to 4, characterized by, The method comprises the following steps: a data collection module for collecting an electrical quantity measurement data sequence of an electric energy meter; a first preprocessing module for performing first-order difference processing and encoding processing on the electrical quantity measurement data sequence in sequence to obtain a residual error encoding sequence; a second preprocessing module for performing bit column reorganization processing on the residual error encoding sequence to generate a continuous data stream; a data compression module for performing compression processing on the continuous data stream by using a data compression algorithm.

6. An electronic device, comprising: The computer program runs on a computer to perform the steps of the method of any one of claims 1-4.

7. A computer readable storage medium for storing a computer program for performing data compression of an electric energy meter, characterized in that, The computer program runs on a computer to perform the steps of the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Electric power measurement data compression and decompression method and device and electronic equipment

    CN112054802A

  • FPGA-based unmanned aerial vehicle image processing method and device, and computer equipment

    CN118354086A

Cited By

  • A power meter frozen data compression storage method based on incremental sequence

    CN122339485A