Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

76 results about "Run-length encoding" patented technology

Run-length encoding (RLE) is a form of lossless data compression in which runs of data (sequences in which the same data value occurs in many consecutive data elements) are stored as a single data value and count, rather than as the original run. This is most useful on data that contains many such runs. Consider, for example, simple graphic images such as icons, line drawings, Conway’s Game of Life, and animations. It is not useful with files that don't have many runs as it could greatly increase the file size.

Time sequence database data compression method, system and device and storage medium

The invention relates to the technical field of wind power generation equipment data processing. The invention provides a time sequence database data compression method, system and device and a storage medium. The method comprises the steps of dynamically partitioning time sequence data based on a preset time window; hybrid coding compression is performed on each data block, and a composite strategy of difference coding and run length coding is adopted for numerical data; a metadata index of the compression blocks is established, the time range, the data feature statistics and the compression parameters of each data block are recorded, and the metadata index comprises extreme value distribution, variance features and data fluctuation frequency indexes; and dynamically adjusting a compression strategy according to a historical data feature analysis result, predicting data fluctuation modes of different equipment sensors through a machine learning model, and automatically selecting an optimal coding combination and compression granularity for subsequent data blocks. The problems that when wind power plant time sequence data are processed through an existing method, time sequence characteristics are difficult to adapt, the storage cost is high and the query efficiency is low are solved.
Owner:HUANENG DINGBIAN NEW ENERGY POWER GENERATION CO LTD +1

Space-time data compression method and system based on lightweight processing

The invention discloses a spatio-temporal data compression method and system based on lightweight processing, and relates to the technical field of image data processing, and the method comprises the steps: based on spatio-temporal data to be compressed, establishing standardized data entries, forming a window set through time axis segmentation, carrying out the periodic discrimination of windows according to the frequency domain energy distribution, and constructing spatio-temporal blocks, establishing an error control parameter table based on the global error budget; generating a time coding stream, performing integerization on the three-dimensional coordinates and the attribute values, generating a space coding stream through double difference and run length coding, performing edge folding lightweight and texture compression on the grid data, and generating a joint coding result; and based on a joint coding result, dividing the compressed data into a base layer and a plurality of enhancement layers, and establishing a relevance hierarchical storage structure and a block-level index table to generate the compressed data capable of being transmitted in a streaming manner. According to the method, collaborative compression can be carried out by utilizing spatial-temporal data internal relevance.
Owner:SHENYANG SURVEYING & MAPPING RES INST CO LTD

Pavement crack image skeleton extraction method based on improved Zhang-Suen refinement algorithm

The invention relates to a pavement crack image skeleton extraction method based on an improved Zhang-Suen refinement algorithm. The method comprises the following steps: S1, carrying out binarization processing on a pavement crack image; s2, carrying out boundary expansion on the crack binary image; s3, carrying out run-length coding on the crack binary image in the horizontal direction, and carrying out compression storage on continuous non-zero pixel segments in each row; s4, using an improved Zhang-Suen refinement algorithm to process the crack binary image processed in the step S3; s5, removing boundary extension; s6, performing simplification processing on the preliminarily refined crack skeleton image by using four predefined 3 * 3 L-shaped structure templates; s7, removing burrs in the image; and S8, outputting a crack skeleton image. The technical problems that according to an existing skeleton extraction method, a topological structure is prone to being damaged, the calculation efficiency is low, the extraction result cannot be completely a skeleton with the single pixel width, and burrs exist in the skeleton extraction result are solved.
Owner:SHANDONG JIAOTONG UNIV +1

Pulse video data lossless coding and decoding method based on prediction model

The invention belongs to the technical field of high-speed photography, and discloses a pulse video data lossless coding and decoding method based on a prediction model. The method comprises the following steps: maintaining a historical queue of L moments for each pixel to establish a prediction model, comparing a pixel value of a subsequent frame with a prediction value to generate a sparse 0 / 1 prediction error sequence, and performing run length coding and exponential-Golomb coding secondary compression on the prediction error sequence; during decoding, a prediction model and queue update logic are reversely multiplexed, and original data are accurately restored from a prediction error value and a prediction value; the core of the method is that redundancy is eliminated through spatio-temporal context modeling, a high compression ratio is realized in combination with cascade coding, and meanwhile, pixel-level lossless recovery is ensured.
Owner:SHANGHAI UNIV OF ENG SCI

Point cloud encoding method and apparatus, point cloud decoding method and apparatus, and communication device

A point cloud encoding and decoding method and apparatus, and pertains to the field of point cloud processing technologies. The point cloud encoding method in embodiments of this application includes: An encoder determines, based on attribute information of target point cloud, a target attribute information distribution characteristic value corresponding to a target bit rate point, where the target bit rate point is a bit rate point corresponding to an attribute quantization step of the attribute information; the encoder determines a target run-length encoding manner based on the target attribute information distribution characteristic value; and the encoder performs encoding processing on the attribute information based on the target run-length encoding manner.
Owner:VIVO MOBILE COMM CO LTD

Power plant high-frequency data transmission method based on lossless compression algorithm

The invention provides a power plant high-frequency data transmission method based on a lossless compression algorithm. The power plant high-frequency data transmission method comprises the following steps of performing quality preprocessing on original high-frequency data; implementing hierarchical acquisition and periodic packaging according to data real-time requirements; performing differential coding for the data type: performing run-length coding on the switching value, and performing differential coding on the analog quantity; carrying out unified lossless compression on the coded data by using a Zstand-ard algorithm; the compressed data is encrypted and transmitted to an industrial internet platform, challenges confronted by a speed regulation system are handled through the steps, automatic optimization and dynamic adjustment of a data compression algorithm are achieved so as to adapt to the requirements of different application scenes, and the stability and efficiency of power production are improved.
Owner:CHINA YANGTZE POWER

Compression and decompression method for DNA sequencing data

The invention discloses a compression and decompression method for DNA sequencing data, and belongs to the technical field of biological information. The technical problems that in the prior art, when third-generation sequencing data are compressed, flexibility is poor, and the compression rate is low are solved. According to the compression method for the DNA sequencing data, global compression or block compression can be dynamically selected before compression, different compression methods are adopted for different types of data, and the flexibility of the compression method is improved; when the base sequence is compressed, the adopted self-indexing structure is a lossless compression method, the initial positions of all the sequences can be compressed and restored by using smaller data volume, and the compression rate is improved. Due to the fact that a special design is adopted in a run length coding structure, a character part is removed, an obtained run length segment is shorter, lossless compression of the position and the sequence is guaranteed, and meanwhile a better compression effect is provided. The method is mainly used for compression and decompression of DNA sequencing data.
Owner:HARBIN INST OF TECH

Fast star map lossless compression algorithm

The invention discloses a rapid star map lossless compression algorithm, and aims to solve the problems of large memory space and low compression efficiency of the existing lossless compression algorithm. According to the algorithm, the efficient compression of star map data is realized through the combination of a context modeling module, a predictive coding module and a run length coding module. The method specifically comprises the steps that a flat area and a non-flat area are divided according to local gradient values, run length coding is adopted in the flat area, and predictive coding is adopted in the non-flat area; the predictive coding is realized through gradient quantization merging, predictive error calculation and Rice coding; and run length coding is realized by counting the length of continuous same pixel points and performing table look-up coding. The algorithm optimizes the number of context types, reduces the storage demand, and improves the compression efficiency by dynamically correcting the predicted value. The method is suitable for application scenes with high requirements on data integrity, such as star sensors.
Owner:ROCKET FORCE UNIV OF ENG

Display panel Mura compensation data compression and decompression method

The invention discloses a display panel Mura compensation data compression and decompression method, which comprises the following steps: firstly, performing data fluctuation analysis on a compensation matrix in the row and column directions, and then selecting a row or column differential mode; then traversing the differential sequence and detecting the continuous repetition times, adopting a single-value coding mode for independent discrete values, compressing and storing the sequence with the repetition times greater than or equal to 2 through a run-length coding mode, and finally generating a compressed file containing the matrix dimension and the differential direction identifier; during decompression, the differential value is reversely accumulated in the row or column direction according to the head identifier, and the original compensation matrix is accurately reconstructed through pure addition and subtraction operation. According to the invention, through collaborative optimization of dynamic direction selection and a coding strategy, in cooperation with a decoding architecture based on addition and subtraction, rapid real-time processing can be completed, and hardware only needs a very simple operation unit and occupies less memory.
Owner:NANJING UNIV

Binary Image Compression Encoding and Decoding Method Based on Base62 Encoding

This invention relates to a binary image compression and decoding method based on Base62 encoding. The method involves converting the original binary image to Base32 to generate a Base32 two-dimensional array; setting the number of compressed bytes; compressing the Base32 array in blocks according to the number of compressed bytes to create an index matrix; performing a first compression on the Base32 two-dimensional array based on the index matrix; and performing a second compression on consecutive empty data segments appearing in the first compression result, based on the characteristics of numerous white blocks and similar adjacent rows in printed labels, using run-length encoding and character substitution algorithms. The resulting binary image compression is lossless, achieving a high compression ratio. Furthermore, being based on Base62 encoding, it is suitable for network transmission. The Base62 encoding table is fixed, simplifying decoding and meeting the needs of narrowband transmission in the Internet of Things (IoT) and decompression requirements of low-performance terminals.
Owner:SHANGHAI SEARI INTELLIGENT SYST CO LTD

Encoding a binary image

In various examples there is a method for encoding a binary image, the method comprising receiving the binary image; performing run-length encoding on pixel data of the binary image to produce run-length encoded data; performing differential encoding on the run-length encoded data to produce differential encoded data; performing variable length encoding on the differential encoded data to produce variable length encoded data; and applying a lossless compressor to the variable length encoded data to produce compressed data, the compressed data being an encoded binary image.
Owner:MICROSOFT TECHNOLOGY LICENSING LLC

WebGL-oriented hydrological grid data coding and rendering method and system

The invention discloses a WebGL-oriented hydrological grid data coding and rendering method and system, and relates to the technical field of water conservancy data visualization, and the method comprises the steps: carrying out the preprocessing of hydrological grid data, and carrying out the blocking according to a preset time length, and obtaining a plurality of time data blocks; performing joint coding of differential coding and run length coding on the water level data in each time data block, and performing polar coordinate quantization coding on the flow rate data in each time data block to obtain coded hydrological grid data; constructing a WebGL rendering pipeline based on pre-calculation and a double-buffering mechanism; and based on a WebGL rendering pipeline fragment shader, carrying out fusion rendering on the encoded hydrological grid data. The technical problems that the real-time interaction requirement cannot be met and the bandwidth is wasted in the prior art are solved.
Owner:BEIJING AEROSPACE SPACE VIEW INFORMATION TECH

System and methods for processing spatial data

A system for processing spatial data may be designed to receive neural network outputs corresponding to a first spatial data set, and translate the neural network outputs corresponding to the first spatial data set based on the motion between a second spatial data set and the first spatial data set. The system may perform zero-gap run length encoding on the neural network outputs to store the neural network outputs in memory. The system may also perform on-the-fly skip zero decoding and bilinear interpolation to translate the neural network outputs.
Owner:CORNELL UNIVERSITY

Connected component marking method and device, electronic equipment and storage medium

The invention discloses a connected component marking method and device, electronic equipment and a storage medium, and the method comprises the steps: building a corresponding row run length index table and a run length coding table for obtained image data; scanning the run length index table from top to bottom, and processing the run length line by line; traversing the run length coding table, and for the currently traversed run length, judging whether the run length is adjacent to the first run length of the previous row; if the run length is adjacent to the first run length of the last row, the connected component mark of the first run length is given to the run length, and for other run lengths adjacent to the run length after the first run length in the last row, the connected component mark of the first run length is given to the connected component mark of the first run length; establishing an equivalence relationship between the connected component mark of the current run and the connected component marks of the other runs, and updating an equivalence class table; and traversing the run length coding table again, if the connected component mark of the currently traversed run length is 0, creating a new connected component mark for the run length, otherwise, updating the connected component mark of the run length by using the mark in the equivalence class table. According to the technical scheme provided by the invention, the connected component marking method based on run length coding is higher in efficiency and less in occupied resources.
Owner:BEIJING SMARTER EYE TECH CO LTD +1

Data processing method and data processing apparatus

The present invention proposes a data processing method, a data processing apparatus, an electronic device, and a computer-readable storage medium. The method includes: in response to a data processing instruction, segmenting an original data to obtain multiple data segments of the original data to enable parallel processing of the multiple data segments, wherein the multiple data segments includes a first data segment; determining whether the first data segment is suitable for using a preset run-length encoding; and when the first data segment is suitable for using the run-length encoding, using the run-length encoding to perform a run-length encoding processing on the first data segment. According to some embodiments, the original data is initially segmented into multiple data segments, and each data segment can be processed independently and concurrently, thereby enhancing the speed of data compression processing.
Owner:SHENZHEN CORERAIN TECH CO LTD

Normalized Huffman encoding and decoding method and neural network computing chip

The present invention proposes a normalized Huffman coding method and a neural network computing chip, comprising: performing run-length all-zero coding on the neural network data to obtain run-length compressed data, wherein the run-length all-zero coding includes run-length coding only for zero characters in the neural network data; performing Huffman coding on the run-length compressed data, and adding 1 to the leaf node codes in each level of nodes in the coding result from top to bottom and shifting them left to move the leaf nodes in each level of nodes in the coding result to the left side of the tree structure, thereby generating a normalized Huffman coding of the coding result as the compression result of the neural network data.
Owner:INST OF COMPUTING TECH CHINESE ACAD OF SCI

A hierarchical bounding box-based video image fast cropping and dimension reduction method and system

The application provides a video image fast clipping and dimension reduction method and system based on a hierarchical bounding box, applied to the technical field of image processing, wherein the method collects multi-view dynamic scene point cloud data, and then divides the space by using a hierarchical bounding box to establish a bounding box structure with density characteristics; subsequently, optical diffraction array pre-filtering is used, and point clouds are separated based on wavelength selectivity and density distribution to generate a first subset and a background subset; then, adaptive pulse code modulation is used on nodes in the first subset to obtain high-precision data, and nodes in the second subset are compressed into low-code-rate data by using run-length encoding; subsequently, the two types of data are input into an improved k-d tree based on the spatial relationship of the bounding box to generate a two-dimensional point set representing key features, and a spatial index is constructed to realize real-time scene retrieval. The application can realize image dimension reduction while retaining key geometric features of the image, thereby improving efficient real-time spatial retrieval in a dynamic scene.
Owner:BEIJING ZHIHUI YUNZHOU TECH CO LTD

Generative image steganography method based on robust position mapping

The invention discloses a generative image steganography method based on robust position mapping. According to the technical scheme, a steganography system composed of a run length coding module, an initial Gaussian noise generation module, a candidate pool processing module, a pseudorandom sequence generation module, an index sorting module, an information embedding module and a stable diffusion model SD is constructed. The run length coding module carries out run length coding on the secret information to obtain a two-tuple Y; an initial Gaussian noise generation module generates a Gaussian noise tensor zinit; the candidate pool processing module performs positive and negative value division on the zinit; the pseudo-random sequence module generates a random sequence P, and an index matrix S'is obtained through the index sorting module. The information embedding module embeds the secret sequence after run length coding in the Y into an empty tensor zemed to obtain a tensor zemed conforming to Gaussian distribution; and the SD carries out denoising on the zzzled and decodes the zzzled to generate a steganographic image. According to the method, the secret information extraction accuracy and steganography capacity can be effectively improved.
Owner:NAT UNIV OF DEFENSE TECH

Adaptive block storage method based on data steady state feature recognition

The invention relates to the technical field of industrial control system data storage, in particular to a self-adaptive block storage method based on data steady-state feature recognition, which comprises a block management module, a mode conversion module, an index module and a data IO (input / output) module. And performing data organization by adaptively using the time sequence main module A or the hybrid main module B based on the data steady-state characteristics. The time sequence main module A is suitable for a high-steady-state data sequence and compresses continuous steady-state data by adopting run length coding; the mixing main module B is suitable for a steady-state and discrete data mixing sequence, and the two types of data are distinguished and processed in a bitmap marking mode. Through the innovative architecture of the A / B main module, the discrete module, the high-speed index and the mode conversion, the technical problem that high compression ratio and high query performance in industrial time series data storage are difficult to consider at the same time is effectively solved, and the method is particularly suitable for efficient storage and retrieval of mass time series data in industrial 4.0 and edge computing scenes.
Owner:SHANDONG ZHONGWANG YUNAN INTELLIGENT TECH CO LTD

Split runlength encoding compression and decompression of multi-planar image data

Devices, such as printers, for rendering compressed digital images, include a deserializer and multiple planar SRLE decoders each configured to transform an applied code from a serial input stream into one or more planar pixel values. The deserializer maintains a cursor position for each of the planar SRLE decoders and increments the cursor position of a corresponding one of the planar SRLE decoders in response to dequeuing a code of the corresponding planar SRLE decoder. The increment is an amount equal to a count of planar pixel values represented by the code. The planar pixel values output from the SRLE decoders are combined into a digital image rendering.
Owner:KYOCERA DOCUMENT SOLUTIONS INC

Dynamic grid animation coding and decoding method and device based on depth entropy model

The invention provides a dynamic grid animation coding method, a decoding method, a coding device and a decoding device based on a depth entropy model.The dynamic grid animation coding method comprises the steps that A1, vertex position offset of a grid animation frame sequence is coded, and a prediction model is constructed through vertex position information of a preorder frame; a2, based on the vertex position information of the preorder frame, dividing the vertex into a base layer and an inference layer by adopting hierarchical detail layering and uniform sampling layering; a3, for the vertexes in each layer, using inverse distance weighted interpolation based on nearest neighbors to predict the offset of the vertexes, and calculating a prediction residual error; a4, carrying out the coding of the prediction residual error of the vertex of the base layer through run-length coding; and coding the inference layer vertex by using a depth attention model based on an adaptive position descriptor. According to the method disclosed by the invention, the vertex position offset of two adjacent frames of animation sequences is coded in combination with a coding framework of deep learning, so that the compression performance of the grid animation is improved.
Owner:GUANGDONG BOHUA UHD INNOVATION CENT CO LTD

Connected component marking method and device, electronic equipment and storage medium

The application discloses a connected component marking method and device, electronic equipment and storage medium. The connected component marking method comprises the following steps: for the obtained image data, a corresponding row run index table and a run coding table are established; the run index table is scanned from top to bottom, and runs are processed row by row; the run coding table is traversed, and whether the current traversed run is adjacent to the first run of the last row is judged; if the run is adjacent to the first run of the last row, the connected component mark of the first run is assigned to the run, the equivalent relationship between the connected component mark of the current run and the connected component mark of other runs adjacent to the run after the first run in the last row is established, and the equivalence class table is updated; the run coding table is traversed again, if the connected component mark of the current traversed run is 0, a new connected component mark is established for the run, otherwise, the connected component mark of the run is updated by using the mark in the equivalence class table. According to the technical scheme provided by the application, the connected component marking method based on run coding is more efficient and occupies less resources.
Owner:BEIJING SMARTER EYE TECH CO LTD +1

Buffering a graphical overlay to be applied to an image

A device and a method for buffering a graphical overlay to be applied to an image is disclosed. A graphical overlay description specifying content, size, and position in the image of a graphical element of the graphical overlay is obtained, and the graphical overlay is divided into a plurality of sequential line fragments. For each line fragment it is determined, using the graphical overlay description, whether the line fragment overlaps a part of the graphical element. On condition that the line fragment overlaps a part of the graphical element, information representing the part of the graphical element is buffered in a buffer memory for the line fragment. On condition that the line fragment does not overlap any part of the graphical element, a run-length coding representing identical pixels is buffered in the buffer memory for the line fragment.
Owner:AXIS

Data lossless compression and encryption transmission method based on joint middleware

This invention discloses a lossless data compression and encrypted transmission method based on federated middleware, belonging to the field of computer application technology. The method includes: performing run-length encoding on the data to be processed based on federated middleware to obtain first compressed data; processing the first compressed data using a compression algorithm based on a raw-middleware dual dictionary to obtain second compressed data. This compression algorithm uses both the raw dictionary and the middleware dual dictionary, adding only values ​​that appear at a set frequency to the dictionary; sequentially performing Huffman coding and DES processing on the second compressed data to obtain encrypted data and a key; performing RSA processing on the key to obtain an encrypted key; and transmitting the encrypted data and the encrypted key to the target end using an encrypted compression transmission plugin of an experiment-and-train-enabled architecture. This method achieves lossless data compression and encryption based on federated middleware, with fast algorithm speed and high security.
Owner:HUAZHONG UNIV OF SCI & TECH +1

Image compression method and device, computer equipment and computer readable storage medium

The invention discloses an image compression method and device, computer equipment and a computer readable storage medium, and the method comprises the steps: inputting a target image into a lossy image compressor for compression, and obtaining a lossy reconstructed image; calculating a residual image between the lossy reconstructed image and the target image; translating the residual image to a non-negative interval, and performing bit plane segmentation on the translated residual image to obtain a high-order part and a low-order part; according to a judgment result of whether the high-order part is all zero, performing run-length coding on the high-order part to obtain first compression information; estimating the probability distribution of the low-order part to obtain the probability distribution and a mask matrix corresponding to the probability distribution; and based on the state of an accumulation matrix, according to the to-be-coded pixel indicated by the mask matrix, compressing the low-order part to obtain second compression information. According to the embodiment of the invention, image lossless compression is realized.
Owner:GUANGDONG WOFU HUAZHONG TECHNOLOGY CO LTD

Image corrosion method and device, electronic equipment and storage medium

ActiveCN120707393AImage enhancementImage analysisComputational scienceStructuring element
The invention discloses an image corrosion method and device, electronic equipment and a storage medium, and the method comprises the steps: traversing an obtained current image and all runs of a structural element, generating a basic run, and marking the serial number of the run of the structural element corresponding to the basic run, the basic run is a result of executing corrosion operation on the run of the current image and the run of the structural element; the basic runs are traversed line by line, if the number of the basic runs of the current line is smaller than M, or the number of the basic runs of the current line is larger than or equal to M and the structural element run indexes are incomplete, all the basic runs of the current line are deleted, and M is an integer larger than 1; otherwise, in the current row, performing intersection operation on the basic run according to the structural element run index, and searching the public area of the structural element run index. By adopting the technical scheme, the Blob image corrosion method based on run length coding is introduced, so that the Blob analysis processing speed and efficiency are efficiently and remarkably improved.
Owner:BEIJING SMARTER EYE TECH CO LTD +1

Data processing method and data processing apparatus

The present invention proposes a data processing method, a data processing apparatus, an electronic device, and a computer-readable storage medium. The method includes: in response to a data processing instruction, segmenting an original data to obtain multiple data segments of the original data to enable parallel processing of the multiple data segments, wherein the multiple data segments includes a first data segment; determining whether the first data segment is suitable for using a preset run-length encoding; and when the first data segment is suitable for using the run-length encoding, using the run-length encoding to perform a run-length encoding processing on the first data segment. According to some embodiments, the original data is initially segmented into multiple data segments, and each data segment can be processed independently and concurrently, thereby enhancing the speed of data compression processing.
Owner:SHENZHEN CORERAIN TECH CO LTD

Bab image pixel boundary tracking method and device based on run length coding

The invention provides a Blob image pixel boundary tracking method and device based on run length coding, and the method comprises the steps: determining a current run length corresponding to a current state of a target Blob image, and predicting a next run length corresponding to a next state according to a preset judgment condition, so as to achieve the state transition prediction; and extracting all position points included in the boundary from the current run to the next run to realize transfer operation. Therefore, according to the Blob pixel boundary tracking method based on run-length coding, the pixel boundary of the Blob image is calculated on the run-length coding, the calculation amount can be remarkably reduced, and the calculation efficiency of a traditional algorithm is improved.
Owner:BEIJING SMARTER EYE TECH CO LTD +1

Log data compression method and device, electronic equipment, medium and program product

The invention discloses a log data compression method and apparatus, an electronic device, a medium and a program product. The method comprises the steps of obtaining a log length of to-be-compressed log data; screening out a candidate log set with the same log length from a log length cache component; traversing the candidate log set according to a log queue reverse order mode, and dynamically selecting reference log data meeting a preset similarity threshold value from the candidate log set; performing XOR operation on the reference log data and the to-be-compressed log data to obtain intermediate log data; performing character reconstruction processing on the intermediate log data to generate character reconstruction log data; and performing run-length coding on the character reconstruction log data to obtain target compressed log data. Dynamic adaptation of the log structure can be achieved, efficient compression and rapid decompression of the log data are achieved, meanwhile, the burden of network transmission and early storage can be effectively reduced, and the method can be widely applied to the technical field of data processing.
Owner:GUANGZHOU UNIVERSITY

Data compression method and device based on dynamic run mark

The embodiment of the invention provides a data compression method and device based on a dynamic run mark, and the method comprises the steps: comparing an ith character in a to-be-compressed character sequence with an (i-1) th character, i being a positive integer greater than or equal to 1, and setting a 0th character in the to-be-compressed character sequence as an invalid value; if the ith character is the same as the (i-1) th character, 1 is set to be added to the counter, and the initial value of the counter is 0; if the ith character is different from the (i-1) th character, acquiring a value Q of a counter; under the condition that Q is larger than or equal to a threshold value, run-length coding is conducted on the (i-Q) th character to the (i-1) th character in the character sequence to be compressed, the highest bit of bytes representing the characters in the run-length coding is marked as 1, the number of bytes representing the number of times in the run-length coding is N, and the number of times is Q; and directly outputting the (i-Q)-th character to the (i-1)-th character in the to-be-compressed character sequence under the condition that Q is smaller than the threshold value.
Owner:HUNAN UNIV