An efficient compression method for neuronal membrane potential data

Through the double-byte and single-byte compression methods, the neuron membrane potential data is efficiently compressed, solving the problems of low floating-point number compression efficiency and large calculation overhead in the prior art, and achieving efficient and low-overhead data compression effect.

CN119766251APending Publication Date: 2025-04-04CHINA NANHU ACAD OF ELECTRONICS & INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411803274.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

While ensuring computing accuracy, existing floating-point number compression technology brings high costs of storage and bandwidth, and there are problems of trade-offs between accuracy and efficiency, computing overhead and implementation complexity.

Method used

The double-byte and single-byte compression method is used to efficiently compress the neuronal membrane potential data. The specific steps include double-byte compression or single-byte compression of the data, deciding which compression method to use according to the range of the data difference value, and performing corresponding decompression processing during the decompression process.

Benefits of technology

High-efficiency compression of neuronal membrane potential data with definite accuracy is achieved, with compression rates within the range of (25%, 50%], reducing calculation overhead and implementation complexity while maintaining the ideal accuracy of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766251A_ABST
    Figure CN119766251A_ABST
Patent Text Reader

Abstract

The present invention provides an efficient compression method for neuron membrane potential data, specifically comprising: using double-byte compression for the first data; for subsequent data, if the difference with the previous data is in the range of [-0.64, 0.63], single-byte compression is used, otherwise double-byte compression is used. The decompression process is the opposite, and the original data is reversely restored according to the compression method. The method utilizes the characteristics of the data, adopts two compression methods of double-byte compression and single-byte compression, and corresponding double-byte decompression and single-byte decompression methods, to achieve efficient compression of target data. The present invention can achieve efficient compression of data of a certain precision, and theoretical analysis shows that the compression rate can reach (25%, 50%).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer technology, and in particular relates to a high-efficiency compression method for neuron membrane potential data. Background Art

[0002] With the advent of the big data era, the storage and transmission of large amounts of data is one of the core challenges. Floating-point numbers, as the main way to represent real numbers, are widely used in scientific and engineering calculations. However, due to their high precision and large space occupation, they have become a bottleneck for storage and transmission efficiency in data-intensive applications. Traditional floating-point compression methods, while ensuring calculation accuracy, also bring high costs for storage and bandwidth.

[0003] Existing floating point compression technologies mainly focus on the following core strategies:

[0004] Approximate compression method: Reduce storage space by reducing the precision of floating-point numbers. For example, using half-precision floating-point numbers (16 bits) or custom precision formats, sacrificing a certain amount of numerical accuracy to obtain storage and transmission efficiency, is still feasible for applications with a high fault tolerance rate.

[0005] Dictionary encoding: Using the characteristics of repeated data sets, a dictionary table is established to map floating point numbers to indexes for storage. This technology reduces redundancy and improves compression ratio, but has limited effect in floating point number sets with wide dynamic range and uneven distribution.

[0006] Differential encoding and incremental encoding: Utilize the correlation between adjacent values ​​in the data sequence and only store the difference or increment between the previous and next values. It is suitable for time series data or continuously changing data and can effectively reduce the amount of data. However, the compression ratio cannot be guaranteed and additional processing is required to restore the original data.

[0007] Entropy coding: such as Huffman coding and arithmetic coding, by analyzing the probability distribution of data, using shorter codes for frequently occurring values ​​and longer codes for less frequently occurring values, thus achieving the purpose of compression. This type of method performs well when the data distribution characteristics are clear.

[0008] Although the existing technology has alleviated the burden of floating-point storage and transmission to a certain extent, there are still the following problems:

[0009] Trade-off between accuracy and efficiency: Compression methods often require a compromise between data accuracy and compression efficiency. Excessive compression may lead to unacceptable errors in the calculation results, while retaining too much accuracy will limit the compression efficiency.

[0010] Computational overhead: The data compression and decompression process itself introduces additional computational burden, which may become a performance bottleneck, especially in real-time processing or high-performance computing scenarios.

[0011] Implementation complexity: Although some advanced compression technologies, such as entropy coding, can achieve efficient compression in theory, their implementation is complex, which increases the difficulty of software and hardware design.

[0012] In summary, developing a new technology that can efficiently compress floating-point numbers while maintaining ideal accuracy and having low computational overhead and implementation complexity has become an important direction of current research. Summary of the invention

[0013] In view of the problems existing in the prior art, the present invention efficiently compresses neuronal membrane potential data with a certain accuracy to meet the accuracy requirements of the data, with the compression efficiency as high as possible, and the computational overhead caused by the data compression and decompression process as small as possible, thereby ensuring that the technology is feasible and easy to implement.

[0014] The present invention is a highly efficient compression method for neuron membrane potential data, comprising:

[0015] Step 1: Input the original data set to be processed and record it as A;

[0016] Step 2: compress the data in A in turn, and put the processed results into a new data set denoted as B. This step also includes:

[0017] Step 2.1, process the first data in A, obtain the first data in A and record it as a1, use double-byte compression on a1, the compressed result b1=DBCompress(a1), put b1 into the compressed data set B;

[0018] Step 2.2: Process the remaining data in turn, and obtain the i-th (i=2,3...) data in A in turn, record it as a i , a i With the previous data a i-1 The difference is recorded as t = a i -a i-1 , if t≥-0.64 and t≤0.63, then for a i Using single-byte compression, the compressed result is b i =SBCompress(t); otherwise, for a i Double-byte compression is used, and the compressed result is b i =DBCompress(a i ); i Put it into the compressed data set B;

[0019] Step 3: Output data set B is the compressed result.

[0020] Preferably, according to the compression process of steps 1 to 3, the data in B are decompressed in sequence, and the processed results are put into a new data set denoted as C, which is completely consistent with A, including:

[0021] Step 1, process the first two bytes in B, obtain the first two bytes b1 and b2 in B, use double-byte decompression on b1 and b2, the decompression result c1 = DBDecompress (b1, b2), put c1 into the decompressed data set C, and initialize the variable b = c1 representing the previous data;

[0022] Step 2: Process the remaining bytes in turn, and obtain the i-th (i=3,4...) byte in B in turn, record it as b i , if b i The highest bit of b is 1, continue to get b i The next byte b i+1 , for b i and b i+1 Use double-byte decompression, the decompression result c = DBDecompress (b i ,b i+1 ); otherwise, for b i Use single-byte decompression, the decompression result c = SBDecompress(b,b i ); put c into the decompressed data set C and update b=c.

[0023] Preferably, the double-byte compression includes:

[0024] Step 1, obtain a data that needs double-byte compression and record it as x;

[0025] Step 2: Use one byte as x1 to represent the integer part of x. Since the integer part of x is a negative integer (-127, 0), one byte is sufficient to represent the value. And the highest bit of x1 is 1;

[0026] Step 3: Use one byte as x2 to represent the decimal part of x. Since only two digits are retained after the decimal point of x, the decimal part is enlarged 100 times. At this time, the decimal part is converted into a positive integer in the range of [0,99], which is sufficient to be represented by one byte, that is, x2 = (x|-[x])*100.

[0027] Step 4: Return two bytes x1 and x2, which are the result of the compression of x.

[0028] Preferably, the single-byte compression comprises:

[0029] Step 1: Get the difference between the data to be compressed by single byte and the previous data, record it as y, and y is in [-0.64, 0.63];

[0030] Step 2: Use one byte to represent y as y1, mark the highest bit of y1 as 0, and use single-byte compression for the data; expand y by 100 times, and the value range is now [-64, 63]. Use the remaining 7 bits of y1 to represent the value range, that is, y1 = y*100;

[0031] Step 3: Return a byte y1, which is the result of single-byte compression of the data.

[0032] Preferably, the double-byte decompression includes:

[0033] Step 1, obtain two bytes that need double-byte decompression and record them as x1 and x2, where x1 is the integer part and x2 is the decimal part, and record the decompressed data as d;

[0034] Step 2: process x1. Since x1 is a negative number rounded up, the result after decompression of x1 is recorded as d1=x1.

[0035] Step 3: Process x2. Since x2 is the value of the original data with the decimal part enlarged 100 times, the result after decompression of x2 is recorded as d2=x2 / 100.

[0036] Step 4: Because the original data is a negative number and x1 is rounded up, d=d1-d2; return the decompressed original data d.

[0037] Preferably, the single-byte decompression includes:

[0038] Step 1, obtain a byte that needs to be decompressed by single byte and record it as y, the previous data is recorded as t; the decompressed data is recorded as p;

[0039] Step 2: Decompress the data. Since y is the difference between the current data to be decompressed and t multiplied by 100, p = y / 100 + t.

[0040] Step 3: Return the decompressed original data p.

[0041] The invention provides an efficient compression method for neuron membrane potential data, which has the following beneficial effects compared with the prior art:

[0042] (1) The present invention mainly realizes efficient compression of data with a certain precision. The numerical range of such data is (-127, 0), and the data is accurate to 2 decimal places. If the most common floating point number is used for representation, each data needs to occupy at least 4 bytes. Assuming that N (N>0) such data are represented, 4N bytes of space are required.

[0043] (2) The present invention is used to compress data sequentially. Double-byte compression of one data requires 2 bytes, and single-byte compression of one data requires 1 byte. The first data must be double-byte compressed. Assuming that N (N>0) such data are represented, a space of [N+1, 2N] bytes is required.

[0044] (3) The compression rate of the present invention can reach (25%, 50%], because the processed data is neuronal membrane potential data, the difference between adjacent data point values ​​of such data is small, and most of the differences are distributed in the range of [-0.64, 0.63], so the sampling ratio is close to 25%.

[0045] The present invention provides an efficient compression system for neuron membrane potential data, comprising a processor and a memory storing a plurality of computer instructions, wherein the computer instructions, when executed by the processor, implement the steps of the efficient compression method for neuron membrane potential data. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 The flowchart of the neuron membrane potential data compression process of the present invention is as follows;

[0047] Figure 2 The flowchart of the neuron membrane potential data decompression process of the present invention;

[0048] Figure 3 It is a double-byte compression DBCompress process flow chart of the present invention;

[0049] Figure 4 It is a flow chart of the single-byte compression SBCompress process of the present invention;

[0050] Figure 5 It is a flow chart of the double-byte decompression DBDecompress process of the present invention;

[0051] Figure 6 It is a flow chart of the single-byte decompression SBDecompress process of the present invention;

[0052] Figure 7 It is a schematic diagram of the neuron membrane potential data efficient compression method of the present invention;

[0053] Figure 8 It is a line graph of the compression result of the embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0056] Example 1

[0057] This embodiment mainly realizes the efficient compression of neuron membrane potential data. This type of data has a certain precision, the value range is (-127, 0), the data is accurate to 2 decimal places, and the value change between adjacent data is small. In view of the characteristics of this type of data, the technical solution of the present invention is as follows: Steps 1 to 3 are the data compression process, such as Figure 1 As shown; Step 4 is the data decompression process, such as Figure 2 As shown, the specific steps are as follows:

[0058] 1. Input the original data set to be processed and denote it as A.

[0059] 2. Compress the data in A in turn, and put the results into a new data set recorded as B.

[0060] 2.1 Process the first data in A. Obtain the first data in A and record it as a1. Apply double-byte compression to a1. The compressed result is b1=DBCompress(a1). Put b1 into the compressed data set B.

[0061] 2.2 Process the remaining data in turn. Get the i-th (i=2,3...) data in A in turn and record it as a i , a i With the previous data a i-1 The difference is recorded as t = a i -a i-1 , if t≥-0.64 and t≤0.63, then for a i Using single-byte compression, the compressed result is b i =SBCompress(t); otherwise, for a i Double-byte compression is used, and the compressed result is b i =DBCompress(a i ). i Put it into the compressed data set B.

[0062] 3. The output data set B is the compressed result.

[0063] 4. According to the compression process of steps 1 to 3, the data in B is decompressed in turn, and the processed results are put into a new data set recorded as C. C is completely consistent with A. Figure 2 As shown, the decompression process steps are as follows:

[0064] 4.1 Process the first two bytes in B. Get the first two bytes b1 and b2 in B, decompress b1 and b2 using double bytes, and the decompressed result c1 = DBDecompress (b1, b2), and put c1 into the decompressed data set C. Initialize the variable b = c1 representing the previous data.

[0065] 4.2 Process the remaining bytes in turn. Get the i-th (i=3,4...) byte in B in turn and record it as b i , if b i The highest bit of b is 1, continue to get b i The next byte b i+1 , for b i and b i+1 Use double-byte decompression, the decompression result c = DBDecompress (b i ,b i+1 ); otherwise, for b i Use single-byte decompression, the decompression result c = SBDecompress(b,b i ). Put c into the decompressed data set C and update b=c.

[0066] 4.3 After decompression, data sets C and A are exactly the same.

[0067] The steps of double-byte compression DBCompress(x) in this embodiment are as follows: Figure 3 As shown:

[0068] 1. Get a piece of data that needs double-byte compression and record it as x.

[0069] 2. Use one byte as x1 to represent the integer part of x. Because the integer part of x is a negative integer (-127, 0), one byte is sufficient to represent the value. And the highest bit of x1 is 1.

[0070] 3. Use one byte as x2 to represent the decimal part of x. Because only two digits are retained after the decimal point of x, the decimal part is enlarged 100 times. At this time, the decimal part is converted into a positive integer in the range of [0,99], which can be represented by one byte, that is, x2 = (|x|-[|x|])*100.

[0071] 4. Return two bytes x1 and x2, which are the result of x compression.

[0072] The steps of the single-byte compression SBCompress(y) of this embodiment are as follows: Figure 4 As shown:

[0073] 1. Get the difference between the data that needs to be compressed in single byte and the previous data, record it as y, and y is located in [-0.64, 0.63].

[0074] 2. Use one byte to represent y, recorded as y1. Mark the highest bit of y1 as 0, and the data is compressed in a single byte; expand y by 100 times, and the value range is now [-64, 63]. Use the remaining 7 bits of y1 to represent the value range, that is, y1 = y*100.

[0075] 3. Return a byte y1, which is the result of single-byte compression of the data.

[0076] The steps of double-byte decompression DBDecompress(x1, x2) in this embodiment are as follows: Figure 5 As shown:

[0077] 1. Get the two bytes that need to be decompressed by double bytes and record them as x1 and x2, where x1 is the integer part and x2 is the decimal part. Record the decompressed data as d.

[0078] 2. Process x1. Since x1 is the result of rounding up a negative number, the result after decompression of x1 is recorded as d1 = x1.

[0079] 3. Process x2. Since x2 is the value of the original data with the decimal part enlarged 100 times, the result after decompression of x2 is recorded as d2 = x2 / 100.

[0080] 4. Because the original data is negative and x1 is rounded up, d = d1 - d2. Return the decompressed original data d.

[0081] The steps of the single-byte decompression SBDecompress(t,y) in this embodiment are as follows: Figure 6 As shown:

[0082] 1. Get a byte that needs to be decompressed byte by byte, record it as y, and the previous data as t. Record the decompressed data as p.

[0083] 2. Decompress the data. Since y is the difference between the current data to be decompressed and t multiplied by 100, p = y / 100 + t.

[0084] 3. Return the decompressed original data p.

[0085] The present invention realizes efficient compression of neuron membrane potential data by using two compression methods, double-byte compression and single-byte compression, and corresponding two decompression methods, double-byte decompression and single-byte decompression. The compression method is shown in FIG. Figure 7 As shown in the figure, the results of compressing 6 different data are shown, including a double-byte compression method and a single-byte compression method. The decompression process can be carried out according to the compression process.

[0086] Example 2

[0087] In this embodiment, neuronal membrane potential data with sampling intervals of 0.01ms, 0.1ms, 0.2ms, 0.3ms, 0.4ms, 0.5ms, 0.6ms, 0.7ms, 0.8ms, 0.9ms and 1.0ms are sampled in sequence to obtain 11 different data sets, each of which has a size of 1 million.

[0088] The 11 different data sets are compressed using the method of Example 1, and the compression ratio of the present invention is calculated based on the size of the space occupied by the compressed data and the original data in actual storage. The results of the compression ratio are shown in Table 1, and the variation trend of the compression ratio with the increase of the sampling interval is shown in Table 1. Figure 8 shown.

[0089] Table 1 Compression results

[0090]

[0091] Observe Table 1 and Figure 8 It can be clearly seen that the compression effect of this embodiment is very impressive. As the sampling interval increases, the difference between adjacent data point values ​​continues to increase, and the data compressed using double bytes continues to increase. Figure 8 The compression ratio of the present invention is in a specific interval of (25%, 50%). In the worst case, the compression ratio can reach 50%. For neuronal membrane potential data, in order to accurately observe the fluctuation of data, a smaller sampling interval, such as 0.1ms, is used in most application scenarios. Therefore, in most cases, the compression ratio of the present invention is close to 25%, and the sampling effect is very significant.

[0092] Example 3

[0093] This embodiment provides an efficient compression system for neuron membrane potential data, including a processor and a memory storing a plurality of computer instructions, wherein the computer instructions, when executed by the processor, implement the steps of the efficient compression method for neuron membrane potential data.

[0094] The specific definition of the efficient compression system for neuron membrane potential data can be found in the definition of the efficient compression method for neuron membrane potential data in the above text, which will not be repeated here.

[0095] The memory and the processor are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The memory stores a computer program that can be run on the processor, and the processor implements the method in the embodiment of the present invention by running the computer program stored in the memory.

[0096] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory is used to store a program, and the processor executes the program after receiving an execution instruction.

[0097] The processor may be an integrated circuit chip with data processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0098] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0099] The above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. An efficient compression method for neuron membrane potential data, comprising: Step 1: Input the original data set to be processed and record it as A; Step 2: compress the data in A in turn, and put the processed results into a new data set denoted as B. This step also includes: Step 2.1, process the first data in A, obtain the first data in A and record it as a1, use double-byte compression on a1, the compressed result b1=DBCompress(a1), put b1 into the compressed data set B; Step 2.2: Process the remaining data in turn, and obtain the i-th (i=2,3...) data in A in turn, record it as a i , a i With the previous data a i-1 The difference is recorded as t = a i -a i-1 , if t≥-0.64 and t≤0.63, then for a i Using single-byte compression, the compressed result is b i =SBCompress(t); otherwise, for a i Double-byte compression is used, and the compressed result is b i =DBCompress(a i );b i Put it into the compressed data set B; Step 3: Output data set B is the compressed result.

2. The method according to claim 1, characterized in that According to the compression process of steps 1 to 3, the data in B is decompressed in turn, and the processed results are put into a new data set recorded as C. C is completely consistent with A, including: Step 1, process the first two bytes in B, obtain the first two bytes b1 and b2 in B, use double-byte decompression on b1 and b2, the decompression result c1 = DBDecompress (b1, b2), put c1 into the decompressed data set C, and initialize the variable b = c1 representing the previous data; Step 2: Process the remaining bytes in turn, and obtain the i-th (i=3,4...) byte in B in turn, record it as b i , if b i The highest bit of b is 1, continue to get b i The next byte b i+1 , for b i and b i+1 Use double-byte decompression, the decompression result c = DBDecompress (b i ,b i+1 ); otherwise, for b i Use single-byte decompression, the decompression result c = SBDecompress(b,b i ); put c into the decompressed data set C and update b=c.

3. The method according to claim 1, characterized in that The double-byte compression comprises: Step 1, obtain a data that needs double-byte compression and record it as x; Step 2: Use one byte as x1 to represent the integer part of x. Since the integer part of x is a negative integer (-127, 0), one byte is sufficient to represent the value. And the highest bit of x1 is 1; Step 3: Use one byte as x2 to represent the decimal part of x. Since only two digits are retained after the decimal point of x, the decimal part is enlarged 100 times. At this time, the decimal part is converted into a positive integer in the range of [0,99], which is sufficient to be represented by one byte, that is, x2 = (x|-[x])*100. Step 4: Return two bytes x1 and x2, which are the result of the compression of x.

4. The method according to claim 1, characterized in that: The single-byte compression comprises: Step 1: Get the difference between the data to be compressed by single byte and the previous data, record it as y, and y is in [-0.64, 0.63]; Step 2: Use one byte to represent y as y1, mark the highest bit of y1 as 0, and use single-byte compression for the data; expand y by 100 times, and the value range is now [-64, 63]. Use the remaining 7 bits of y1 to represent the value range, that is, y1 = y*100; Step 3: Return a byte y1, which is the result of single-byte compression of the data.

5. The method according to claim 2, characterized in that: The double-byte decompression includes: Step 1, obtain two bytes that need double-byte decompression and record them as x1 and x2, where x1 is the integer part and x2 is the decimal part, and record the decompressed data as d; Step 2: process x1. Since x1 is a negative number rounded up, the result after decompression of x1 is recorded as d1=x1. Step 3: Process x2. Since x2 is the value of the original data with the decimal part enlarged 100 times, the result after decompression of x2 is recorded as d2=x2 / 100. Step 4: Because the original data is a negative number and x1 is rounded up, d=d1-d2; return the decompressed original data d.

6. The method according to claim 2, characterized in that The single-byte decompression includes: Step 1, obtain a byte that needs to be decompressed by single byte and record it as y, the previous data is recorded as t; the decompressed data is recorded as p; Step 2: Decompress the data. Since y is the difference between the current data to be decompressed and t multiplied by 100, p = y / 100 + t. Step 3: Return the decompressed original data p.

7. An efficient compression system for neuronal membrane potential data, comprising a processor and a memory storing a plurality of computer instructions, wherein the computer instructions, when executed by the processor, implement the steps of the efficient compression method for neuronal membrane potential data as described in claims 1 to 6.