WO2018103452A1 - 信息位图的编码、解码方法、装置及存储介质 - Google Patents

信息位图的编码、解码方法、装置及存储介质 Download PDF

Info

Publication number
WO2018103452A1
WO2018103452A1 PCT/CN2017/105868 CN2017105868W WO2018103452A1 WO 2018103452 A1 WO2018103452 A1 WO 2018103452A1 CN 2017105868 W CN2017105868 W CN 2017105868W WO 2018103452 A1 WO2018103452 A1 WO 2018103452A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit
encoding
decoding
bit string
algorithm
Prior art date
Application number
PCT/CN2017/105868
Other languages
English (en)
French (fr)
Inventor
白晓冬
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018103452A1 publication Critical patent/WO2018103452A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present application relates to the field of the Internet, and in particular to a method, an apparatus, and a storage medium for encoding and decoding an information bitmap.
  • Information exchange is the core task of network and distributed systems, that is, nodes (such as terminals, servers, network devices, etc.) exchange their respective information (for example: node status, file block status, routing status, etc.) to achieve information set coordination ( Reconciliation) and deduplication.
  • the information exchange task usually uses a bitmap Bitmap (ie, a bit string consisting of 0 and 1) as an index of information.
  • Bitmap Bitmap ie, a bit string consisting of 0 and 1
  • the terminal host uses a file block status bitmap as an index of a file block, wherein the i-th bit indicates whether the i-th file block is downloaded, and if the i-th file block is downloaded, the i-th is set.
  • bitmaps of information used for exchange are widely used in applications such as Internet video transmission, mobile terminal monitoring, and cloud data backup synchronization.
  • an application management APP of a mobile terminal such as a smart phone and a tablet
  • periodically uploads a mobile terminal status bitmap to the cloud monitoring center including user online status, user location information, mobile system type, APP type, system patch status, potential security threat types, etc., to aggregate the massive mobile user behavior and mobile terminal system status, providing efficient and accurate cloud services such as advertisement recommendation and security protection.
  • the Huffman coding method is a variable word length compression coding method based on the probability of occurrence of source characters, that is, the code generation length is high, the code length is short, the character generation probability is low, the code length is long, and the average optimal code length is realized.
  • the Huffman coding method has problems such as low compression ratio and high transmission overhead.
  • the Huffman coding method must rely on the accurate statistics of the probability of occurrence of source characters, so it is difficult to adapt to the mobile terminal application scenario in which the probability of occurrence of source characters is dynamically changed, resulting in a low bitmap compression ratio.
  • the Huffman coding method must be maintained.
  • a Huffman coding table for decoding not only requires additional overhead to dynamically update the coding table, but also results in high transmission overhead and low decoding efficiency.
  • the Golomb Coding method is a variant of Huffman coding. It can be decoded without maintaining a code table. Although it can avoid the maintenance overhead of the code table and improve the decoding efficiency, the method still relies on the source character probability of occurrence. Encoding, the bitmap compression ratio is still low.
  • the arithmetic coding method is based on the probability estimation of the source character occurrence, recursively encodes the entire character sequence to the interval [0, 1), and outputs a binary fraction as the coded output.
  • the average coding length of the arithmetic coding method is closer to the information entropy than the Huffman algorithm, and is more suitable for application scenarios where the probability of occurrence of source characters is equal.
  • the main reason is that the arithmetic coding method uses small numbers for encoding, and the Huffman coding uses integers for encoding, thus wasting part of the coding space.
  • the probability of occurrence of the source character is dynamically changed at any time, and the probability of occurrence of the source character of the arithmetic coding method differs greatly from the probability of occurrence of the actual character, resulting in a bitmap compression ratio. Lower.
  • the arithmetic coding method usually adopts a complex calculation operation type such as multiplication, which results in low bitmap compression decoding efficiency between mobile terminals with limited computing capabilities.
  • the embodiment of the present application provides a coding and decoding method, a device, and a storage medium for an information bitmap, so as to at least solve the technical problem that the transmission overhead caused by the Columbus coding directly on the information bitmap is large and the coding and decoding is difficult. .
  • an encoding method of an information bitmap including: an encoding apparatus acquires a target bitmap, where the target bitmap is a bit string, and is used as a target for exchange between corresponding nodes in the Internet.
  • the information index of the information the encoding device pre-codes the bit string corresponding to the target bitmap to respectively aggregate the 0-bit value and the 1-bit value in the bit string; the encoding device encodes the pre-coded bit string by the Columbus encoding algorithm.
  • a decoding method of an information bitmap including: a decoding apparatus acquires an encoding result obtained by encoding a target bitmap by using a Columbus encoding algorithm, and the target bitmap is a bit string. An information index used as target information exchanged between corresponding nodes in the Internet; the decoding device pre-decodes the encoded result to obtain a bit string in which a 0-bit value and a 1-bit value are respectively aggregated; the decoding device performs pre-decoding The bit string is decoded to restore the original bit string corresponding to the target bitmap from the bit string in which the 0 bit value and the 1-bit value are respectively aggregated.
  • an apparatus for encoding an information bitmap including: a first acquiring unit, configured to acquire a target bitmap, where the target bitmap is a bit string, and is used as a correspondence in the Internet. Information index of target information exchanged between nodes; precoding a unit, configured to precode the bit string corresponding to the target bitmap to separately aggregate a 0 bit value and a 1 bit value in the bit string; and the coding unit is configured to perform a Columbus coding algorithm on the precoded bit string coding.
  • a decoding apparatus for an information bitmap including: a second acquiring unit, configured to obtain an encoding result obtained by encoding a target bitmap by using a Columbus encoding algorithm, and the foregoing target
  • the bitmap is a bit string used as an information index of target information exchanged between corresponding nodes in the Internet;
  • the pre-decoding unit is configured to pre-decode the above-mentioned encoding result to obtain a 0-bit value and 1 bit respectively.
  • a bit string of values a decoding unit configured to decode the pre-decoded bit string to restore the original bit string corresponding to the target bitmap from the bit string in which the 0 bit value and the 1-bit value are respectively aggregated.
  • a storage medium is further provided, and the storage medium may store an execution instruction for performing an encoding and decoding method of the information bitmap in the foregoing embodiment.
  • the target bitmap is obtained by using an encoding device by precoding the information bitmap to encode the information bitmap before encoding the information bitmap by using the Columbus encoding algorithm.
  • the figure is a bit string used as an information index of target information exchanged between corresponding nodes in the Internet; the encoding device pre-codes the bit string corresponding to the target bitmap to respectively aggregate 0 bit values and 1 bit in the bit string.
  • the encoding device encodes the pre-encoded bit string by the Columbus encoding algorithm, and achieves the purpose of highly compressing the information bitmap, thereby realizing the technical effect of saving transmission overhead and reducing the difficulty of encoding and decoding in information exchange, thereby solving the correlation.
  • the transmission overhead is large and the coding and decoding is difficult.
  • FIG. 1 is a schematic diagram of a hardware environment of an encoding method of an information bitmap according to an embodiment of the present application
  • FIG. 2 is a flowchart of an optional encoding method of an information bitmap according to an embodiment of the present application
  • FIG. 3 is a flowchart of a method for decoding an optional information bitmap according to an embodiment of the present application
  • FIG. 4(a) is a schematic diagram of an optional bitwise exclusive OR non-coding and decoding according to an embodiment of the present application
  • 4(b) is a schematic diagram of an alternative hybrid run length encoding and decoding in accordance with an embodiment of the present application.
  • FIG. 5(a) is a schematic diagram of an optional information bitmap encoding according to an embodiment of the present application.
  • FIG. 5(b) is a schematic diagram of an optional information bitmap decoding according to an embodiment of the present application.
  • FIG. 6(a) is a schematic diagram of information bitmap exchange in an optional Internet video transmission application scenario according to an embodiment of the present application
  • FIG. 6(b) is a schematic diagram of an information bitmap exchange in an optional mobile terminal monitoring application scenario according to an embodiment of the present application
  • FIG. 6(c) is a schematic diagram of information bitmap exchange in an optional file backup synchronization application scenario according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of an apparatus for encoding an optional information bitmap according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an optional information bitmap decoding apparatus according to an embodiment of the present application.
  • FIG. 9 is a structural block diagram of a terminal according to an embodiment of the present application.
  • a method embodiment of an encoding method of an information bitmap is provided.
  • the encoding method of the information bitmap described above may be applied to a hardware environment composed of the server 102 and the terminal 104 as shown in FIG. 1.
  • the server 102 is connected to the terminal 104 through a network.
  • the network includes but is not limited to a wide area network, a metropolitan area network, or a local area network.
  • the terminal 104 is not limited to a PC, a mobile phone, a tablet, or the like.
  • the encoding method of the information bitmap of the embodiment of the present application may be executed by the server 102, may be executed by the terminal 104, or may be jointly executed by the server 102 and the terminal 104.
  • the encoding method of the information bitmap executed by the terminal 104 in the embodiment of the present application may also be performed by a client installed thereon.
  • FIG. 2 is a flowchart of an optional encoding method of an information bitmap according to an embodiment of the present application. As shown in FIG. 2, the method may include the following steps:
  • Step S202 the encoding device acquires a target bitmap, and the target bitmap is a bit string, which is used as an information index of target information exchanged between corresponding nodes in the Internet;
  • Step S204 the encoding apparatus pre-codes the bit string corresponding to the target bitmap to respectively aggregate the 0-bit value and the 1-bit value in the bit string.
  • Step S206 the encoding apparatus performs a Columbus encoding algorithm on the pre-encoded bit string. coding.
  • the target bitmap is acquired by the encoding device by precoding the information bitmap before encoding the information bitmap by using the Columbus encoding algorithm to aggregate the 0 and 1 in the bit string.
  • the bitmap is a bit string used as an information index of target information exchanged between corresponding nodes in the Internet; the encoding device pre-codes the bit string corresponding to the target bitmap to respectively aggregate the 0-bit value and 1 in the bit string The bit value; the encoding device encodes the pre-encoded bit string by the Columbus encoding algorithm, and achieves the purpose of highly compressing the information bitmap, thereby realizing the technical effect of saving transmission overhead and reducing the difficulty of encoding and decoding in information exchange, thereby solving the problem.
  • the transmission overhead caused by the Columbus encoding of the information bitmap is large, and the technical problem of coding and decoding is difficult.
  • step S202 since the target bitmap directly acquired by the encoding device is a bit string that is not encoded and compressed, if the target bitmap is used as information exchange between corresponding nodes in the Internet, there will be The problem of large transmission overhead and difficulty in encoding and decoding is that precoding processing is required.
  • step S204 when the encoding device pre-codes the bit string corresponding to the target bitmap to separately aggregate the 0-bit value and the 1-bit value in the bit string, at least one encoding algorithm may be employed.
  • the algorithm that can be applied to the precoding of the embodiment of the present application may include, but is not limited to, the following algorithms: Bitwise Exclusive-NOR Coding, Hybrid Run-Length Coding, and the like. .
  • the bitwise XOR non-coding algorithm mainly aggregates one original bitmap into a plurality of consecutive identical (such as 1 or 0) or different bits (such as 10 or 01);
  • the hybrid run length encoding method mainly uses a plurality of consecutive identical or Different bits are encoded as a bit start value and a bit count.
  • the encoding device encodes the bit start value and the bit count using Exponential Golomb Coding (ie, index Columbus encoding), thereby realizing a high compression ratio and fast codec of the bitmap.
  • Exponential Golomb Coding ie, index Columbus encoding
  • clustering Coding Clustering Coding
  • the clustering coding method of the present application is used to implement a high compression ratio and fast coding of a bitmap, which improves the transmission efficiency and processing rate of information exchange. It can be applied to typical product side application scenarios such as Internet video transmission, mobile terminal monitoring, and cloud data backup synchronization.
  • the encoding device pre-codes the bit string corresponding to the target bitmap to separately aggregate the 0-bit value and the 1-bit value in the bit string, including: the encoding device uses the bit string corresponding to the target bitmap.
  • the bitwise or non-coding algorithm encodes. It should be noted that the specific principle of the bitwise XOR non-coding algorithm will be explained in the following embodiments, and will not be described in detail herein.
  • the method further includes: after the encoding apparatus encodes the bitwise exclusive OR non-encoding algorithm The bit string is encoded using a hybrid run length encoding algorithm.
  • the clustering coding process for compressing the information bitmap may include the following three steps: (1) For an input original information bitmap (hereinafter referred to as the original bitmap), the bitwise difference may be adopted first. Or a non-coding algorithm to encode, the original bitmap is aggregated into continuous and discontinuous bit values by the exclusive-OR operation of adjacent bits, and the first bit value of the original bitmap is retained; (2) using a mixed-stroke encoding algorithm, A plurality of consecutive 0 or 1 bit values are encoded as consecutive identical bit start values and consecutive identical bit counts, and a plurality of consecutive 01 or 10 bits are encoded as consecutive different bit start values and consecutive different bit counts; (3) using an index The Columbus encoding algorithm encodes successive consecutive bit start values, consecutive identical bit counts, consecutive different bit start values, and successive different bit counts of the mixed run length encoding, and outputs a compressed information bitmap.
  • the original bitmap For an input original information bitmap (hereinafter referred to as the original bitmap), the bitwise difference may be adopted first. Or a non-
  • the scheme is a joint coding algorithm consisting of three algorithms: bitwise XOR non-coding algorithm, hybrid run length coding algorithm and exponential Columbus coding algorithm.
  • bitwise XOR or non-coding algorithm uses a bitwise XOR or non-coding algorithm to aggregate the information interaction bitmap into consecutive identical and different bits, which alleviates the dynamic change of the probability of occurrence of source characters brought by the mobile terminal.
  • the bitmap is calculated by the hybrid run length coding algorithm. Compression into a non-uniform stroke encoding facilitates subsequent Huffman encoding.
  • the exponential Columbus encoding algorithm is used to compress the run length encoding, avoiding maintenance of the encoding table and additional transmission overhead, and improving the bitmap compression decoding rate.
  • the cluster coding method of the present application has the advantages of high bitmap compression ratio and fast codec rate, and is applicable to application scenarios such as Internet video transmission, mobile terminal monitoring, and cloud data backup synchronization.
  • the encoding apparatus performs encoding by using a bitwise exclusive OR non-coding algorithm on the bit string corresponding to the target bitmap, including: the encoding device retains the first bit of the bit string corresponding to the target bitmap; and the encoding device reads the target bit Starting from the sub-bit of the bit string corresponding to the picture, the current bit value and the bit value adjacent to the current bit value and before the current bit value are sequentially XORed or non-encoded until the next bit bit value and the last bit of the bit string The bit value XOR is not completed until the non-coding operation is completed.
  • the bitwise XOR non-coding algorithm proposed by the present application encodes a bitmap by XOR between bits. If the two bit values are the same, the XOR non-operation result is 1; if the two bit values are not the same, the XOR non-operation result is 0.
  • the bitwise XOR non-coding algorithm of the present application performs an exclusive OR operation on the adjacent bit value of the original bitmap and retains the first bit value of the bitmap.
  • an original bitmap is 011010, firstly, the first bit value of the original bitmap is 0, which is the first bit value of the encoded bitmap, and then the subsequent bit of the original bitmap is XORed with the previous one of the previous bits.
  • bitwise XOR non-decoding algorithm performs an exclusive OR operation on the current bit value of the encoded bitmap and the current decoded bit value of the original bitmap.
  • the encoding device encodes the bit string encoded by the bitwise exclusive OR non-coding algorithm by using a mixed run length encoding algorithm, including: the encoding device will use the bit encoded by the bitwise exclusive OR non-encoding algorithm. A plurality of consecutive identical bits in the string are encoded as a first bit start value and a first bit count value; and/or the encoding device will use a plurality of consecutive different bits in the bit string encoded using the bitwise exclusive OR non-coding algorithm The code is a second bit start value and a second bit count value.
  • the hybrid run length code proposed in the present application is an extended run length code.
  • the hybrid run length coding method can represent not only a plurality of consecutive 0 or 1 bits as consecutive identical bit start values and consecutive identical bit counts, but also can represent multiple consecutive 01 or 10 bits as consecutive different bit start values and consecutive different bits. count.
  • m consecutive 0 bits can be encoded as (0, m)
  • m consecutive 1 bits can be encoded as (1, m), where 0 or 1 is the continuous same bit start value, and m is consecutive 0.
  • n consecutive 01 bits and m consecutive 1 bits can be encoded as 0 (n, m), where 0 represents consecutive different bit start values, n represents continuous 01 bit count, and m is a continuous 1 bit count .
  • the mixed-stroke decoding method decodes (0, m) or (1, m) into m consecutive 0 or 1 bits, and decodes 0 (n, m) into n consecutive 01 bits and m 1 bit, decoding 1 (n, m) into n consecutive 10 bits and m 1 bit.
  • n consecutive 01 or 10 bit encodings do not have to represent a starting value because the starting value can be inferred from the previous encoding.
  • n consecutive 01 bits and m consecutive 1 bits are encoded as (n, m) without necessarily representing a starting value of zero.
  • the hybrid run decoding method of the present application can decode any ( n, m). If n is 0 or 1, it is decoded as m consecutive 0 or 1 bits; if n ⁇ 2, it is decoded as n consecutive 01 or 10 bits. If the code before (n, m) is (1, k), then (n, m) is decoded into n consecutive 01 bits and m consecutive 1 bit; if the code before (n, m) is (0, k) Then, (n, m) is decoded into n consecutive 10 bits and m consecutive 1 bits.
  • the present application encodes the continuous bit start value and the continuous bit count of the mixed run length coding using the exponential Columbus code.
  • the exponential Columbus code consists of two parts of the front and back bit strings, where the back bit string is the binary value of the integer x+1, and the front bit string is ⁇ log2(x+1) ⁇ Whole) 0 bits.
  • Table 1 and Table 1 (continued) give the corresponding exponential Columbus codes for the integers 0, 1, 2, 3, 4, 5, 6, and 24.
  • the exponent Columbus code of the integer 0 is 1 and does not include the front 0 bit; the code of the integer 1 is 010, where the number of the front 0 bits is 1, the latter bit string is 10; the code of the integer 24 is 000011001, where The front 0 bit number is 4, and the rear bit string is 11001.
  • a method embodiment of a decoding method of an information bitmap is also provided.
  • the decoding method of the information bitmap may also be applied to a hardware environment composed of the server 102 and the terminal 104 as shown in FIG. 1 . I will not repeat them here.
  • FIG. 3 is a flowchart of a method for decoding an optional information bitmap according to an embodiment of the present application. As shown in FIG. 3, the method may include the following steps:
  • Step S302 the decoding device obtains the encoding result obtained by encoding the target bitmap by using the Columbus encoding algorithm, and the target bitmap is a bit string, which is used as an information index of the target information exchanged between the corresponding nodes in the Internet;
  • Step S304 the decoding apparatus pre-decodes the encoding result to obtain a bit string in which a 0-bit value and a 1-bit value are respectively aggregated;
  • Step S306 the decoding apparatus decodes the pre-decoded bit string to restore the original bit string corresponding to the target bitmap from the bit string in which the 0 bit value and the 1-bit value are respectively aggregated.
  • the cluster decoding process of the compressed information bitmap sequentially adopts exponential Columbus decoding, mixed-stroke decoding, and A bitwise XOR or non-decoding algorithm is used to decode a compressed bitmap into the original bitmap.
  • Index Columbus decoding, mixed-stroke decoding, and bitwise XOR non-decoding It has been explained in the above embodiments, and will not be further described herein.
  • the encoding result obtained by encoding the target bitmap after encoding by the Columbus encoding algorithm is used, and the target bitmap is a bit string, which is used as information of target information exchanged between corresponding nodes in the Internet.
  • the decoding device pre-decodes the encoded result to obtain a bit string in which the 0-bit value and the 1-bit value are respectively aggregated; and decodes the pre-decoded bit string to respectively aggregate the 0-bit value and the 1-bit value
  • the original bit string corresponding to the target bitmap is restored in the bit string, which can solve the technical problem that the transmission overhead caused by the Columbus coding directly on the information bitmap is large and the coding and decoding is difficult, and the highly compressed information bitmap is achieved.
  • the purpose is to realize the technical effect of saving transmission overhead and reducing coding and decoding difficulty in information exchange.
  • cluster decoding method of the present application is used to implement fast decoding of high compression ratio bitmaps, and the information exchange processing rate is improved, which can be applied to typical product side applications such as Internet video transmission, mobile terminal monitoring, and cloud data backup synchronization. Scenes.
  • the decoding apparatus pre-decodes the encoding result to obtain a bit string in which the 0-bit value and the 1-bit value are respectively aggregated.
  • the decoding apparatus decodes the encoding result by using a bitwise exclusive OR non-coding algorithm.
  • bitwise exclusive OR non-coding algorithm It should be noted that the specific principle of the bitwise XOR non-decoding algorithm is similar to the bitwise XOR non-coding algorithm. The specific principle of the bitwise XOR non-decoding algorithm has been described in the above embodiment, and will not be described in detail herein. .
  • the method further includes: the decoding apparatus adopts a mixture of the encoding before the decoding by the bitwise XOR non-decoding algorithm.
  • the run length coding algorithm performs decoding.
  • the bitmap decoding process of the bitmap compression includes the following three steps: (1) For a compressed bitmap, using exponential Columbus decoding, the bitmap is decoded into consecutive identical bit start values, continuous The same bit count, consecutive different bit start values, consecutive different bit counts, etc.; (2) using mixed-stroke decoding, decoding consecutive same bit start values and consecutive identical bit counts into multiple consecutive 0 or 1 bits, and will continue Different bit start values and consecutive different bit counts are decoded into multiple discontinuous 01 or 10 bits; (3) using bitwise XOR non-decoding, The decoded first bit value is the current decoded bit value, and the next bit value of the original bitmap is decoded by the bitwise exclusive OR operation of the current bit value and the current decoded bit value, and a decoded original bitmap is output.
  • the decoding apparatus uses the bitwise XOR or non-decoding algorithm to decode the encoding result, including: the decoding device retains the first bit of the bit string corresponding to the encoding result; and the decoding device uses the bit string corresponding to the encoding result. Starting from the bit, the current bit value and the bit value adjacent to the current bit value and located before the current bit value are subjected to exclusive OR non-decoding operation, until the next bit bit value and the last bit value of the bit string corresponding to the encoding result are different. Or until the non-decoding operation is completed.
  • bitwise XOR non-decoding algorithm proposed by the present application encodes a bitmap by XOR between bits. If the two bit values are the same, the XOR non-operation result is 1; if the two bit values are not the same, the XOR non-operation result is 0.
  • the bitwise XOR non-decoding algorithm of the present application performs an exclusive OR operation on the adjacent bit value of the original bitmap and retains the first bit value of the bitmap.
  • a coded bitmap 001000 is given, firstly, the first bit value of the coded bitmap is selected as the current decoded bit value of the original bitmap, and secondly, each subsequent bit value of the coded bitmap is different from the current decoded bit value of the original bitmap. Or non-operation, output a decoded original bitmap 011010.
  • the XOR bit value 0 of the coded bitmap and the XOR bit error value 0 of the original bitmap are 0, the 3rd bit value 1 and the 2nd are the operation result of the decoded bit value 1. Is 1.
  • the decoding apparatus performs decoding by using the mixed-travel decoding algorithm on the encoding before decoding by using the bitwise XOR non-decoding algorithm, including: decoding means before decoding by using the bitwise XOR non-decoding algorithm Encoding for decoding a plurality of consecutive identical bit-coded first bit start values and first bit count values; and/or decoding means for encoding prior to decoding using said bitwise XOR non-decoding algorithm The second bit start value and the second bit count value for decoding a plurality of consecutive different bit codes are decoded.
  • This application uses the exponential Columbus decoding for the continuous bit start value of the mixed run length code and even The bit count is continued for decoding.
  • the exponential Columbus decoding consists of two parts of the front and back bit strings, where the back bit string is the binary value of the integer x+1, and the front bit string is ⁇ log2(x+1) ⁇ Whole) 0 bits.
  • the exponential Columbus decoding algorithm computes the integer value of the back bit string based on the length of the front 0 bit string and the 1st bit, decoding a corresponding original integer.
  • the clustering coding method proposed by the present application is a joint coding method consisting of a bitwise exclusive OR non-coding method, a hybrid run length coding method and an exponential Columbus coding method, and the encoding and decoding process of the method is fast and reversible.
  • bitwise exclusive OR non-codec mixed run length codec
  • exponential Columbus codec will be described in detail below with reference to the accompanying drawings.
  • 4(a) is a schematic diagram of an optional bitwise exclusive OR non-coding and decoding according to an embodiment of the present application
  • FIG. 4(b) is an optional hybrid run length encoding according to an embodiment of the present application.
  • FIG. 5(a) is a schematic diagram of an optional information bitmap encoding according to an embodiment of the present application
  • FIG. 5(b) is an optional information bitmap decoding according to an embodiment of the present application. Schematic diagram.
  • Figure 5(a) shows an example of cluster coding for bitmap compression.
  • an 18-bit bitmap is output as 000110111000011001, where the exponential Columbus codes for integers 6, 2, 0, and 24 are 00111, 011, 1, and 000011001, respectively.
  • the compressed bitmap reduces the storage overhead by 43.8%.
  • the typical application scenarios of the codec method of the information diagram of the present application on the product side mainly include: an Internet video transmission application, a mobile terminal monitoring application, and a file backup synchronization application.
  • a video APP of a mobile terminal supports on-demand and live broadcast services, and provides a video server to the video server according to user viewing requirements.
  • the video file block bitmap is periodically sent, where 0 bits represent the played video file block and 1 bit represents the requested video file block; the video server will quickly and accurately send the user requested video file according to the received video file block bitmap.
  • the application management APP of the mobile terminal (eg, mobile assistant, etc.) is based on the defined user and file status (eg, user online status, user installation APP) Types, terminal system types, system patch types, security vulnerability types, etc.)
  • each file backup system sends its file data status bitmap to other file backup systems, where 0 bits represent the old version of the file data and 1 bit represents the file. New version of the data.
  • Each file backup system periodically exchanges file data status bitmaps and updates the file data synchronously according to the received file data status bitmap to ensure backup synchronization and consistency between multiple file systems.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the related art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM). ), including a number of instructions to make a terminal device
  • a storage medium such as ROM/RAM, disk, CD-ROM.
  • the method described in the various embodiments of the present application is implemented as a mobile phone, a computer, a server, or a network device.
  • FIG. 7 is a schematic diagram of an apparatus for encoding an optional information bitmap according to an embodiment of the present application.
  • the apparatus may include: a first obtaining unit 702 configured to acquire a target bitmap, a target bitmap.
  • the pre-encoding unit 704 is configured to pre-code the bit string corresponding to the target bitmap to respectively aggregate 0 bits in the bit string Value and 1-bit value; encoding unit 706, configured to encode the pre-encoded bit string using a Columbus encoding algorithm.
  • the directly acquired target bitmap is a bit string that is not encoded and compressed, if the target bitmap is used as information exchange between corresponding nodes in the Internet, there is a problem that the transmission overhead is large and the coding and decoding is difficult. Therefore, precoding processing is required.
  • At least one encoding algorithm may be employed when precoding the bit string corresponding to the target bitmap to separately aggregate the 0 bit value and the 1 bit value in the bit string.
  • the algorithm that can be applied to the precoding of the embodiment of the present application may include, but is not limited to, the following algorithms: Bitwise Exclusive-NOR Coding, Hybrid Run-Length Coding, and the like.
  • the bitwise XOR non-coding algorithm mainly aggregates one original bitmap into a plurality of consecutive identical (such as 1 or 0) or different bits (such as 10 or 01);
  • the hybrid run length encoding method mainly uses a plurality of consecutive identical or Different bits are encoded as a bit start value and a bit count.
  • bit start value and the bit count are encoded using Exponential Golomb Coding (ie, index Columbus coding) to achieve a high compression ratio and fast codec of the bitmap.
  • Exponential Golomb Coding ie, index Columbus coding
  • clustering Coding Clustering Coding
  • the clustering coding method (Clustering Coding) of the present application is used to implement high compression ratio and fast coding of the bitmap, which improves the transmission efficiency and processing rate of the information exchange, and can be applied to Internet video transmission, mobile terminal monitoring, and cloud.
  • Typical product side application scenarios such as data backup synchronization.
  • the precoding unit includes: a first precoding module configured to encode the bit string corresponding to the target bitmap by using a bitwise exclusive OR non-coding algorithm.
  • the precoding unit further includes: a second precoding module configured to perform bitwise XOR after encoding the bit string corresponding to the target bitmap by using a bitwise exclusive OR non-coding algorithm
  • the bit string encoded by the non-coding algorithm is encoded using a hybrid run length encoding algorithm.
  • the first pre-coding module includes: a first pre-coding sub-module configured to reserve a first bit of a bit string corresponding to the target bitmap; and a second pre-coding sub-module configured to be a target bitmap Starting with the sub-bit of the corresponding bit string, the current bit value and the bit value adjacent to the current bit value and located before the current bit value are sequentially XORed or non-encoded until the next bit bit value and the last bit of the bit string The value is XOR or non-coding operation is completed.
  • the second precoding module includes: a third precoding submodule configured to encode a plurality of consecutive identical bits in the bit string encoded by the bitwise exclusive OR non-coding algorithm. a bit start value and a first bit count value; and/or a fourth precoding submodule configured to encode a plurality of consecutive different bits in the bit string encoded using the bitwise exclusive OR non-coding algorithm as a second The bit start value and the second bit count value.
  • module/sub-module/unit in the embodiment may be configured to perform corresponding steps in Embodiment 1 of the present application, and details are not described herein again.
  • modules/submodules/units are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above embodiment 1. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware.
  • FIG. 8 is a schematic diagram of an optional information bitmap decoding apparatus according to an embodiment of the present application. As shown in FIG.
  • the apparatus may include: a second obtaining unit 802 configured to acquire a target bitmap in Columbus encoding An encoding result obtained by encoding the algorithm, the target bitmap is a bit string, used as an information index of target information exchanged between corresponding nodes in the Internet; and a pre-decoding unit 804 is configured to perform the encoding result Pre-decoding to obtain a bit string in which a 0-bit value and a 1-bit value are respectively aggregated; and a decoding unit 806 configured to decode the pre-decoded bit string to aggregate 0-bit value and 1-bit value from the respective The original bit string corresponding to the target bitmap is restored in the bit string.
  • a second obtaining unit 802 configured to acquire a target bitmap in Columbus encoding An encoding result obtained by encoding the algorithm, the target bitmap is a bit string, used as an information index of target information exchanged between corresponding nodes in the Internet
  • a pre-decoding unit 804 is configured to perform the encoding result Pre-de
  • the cluster decoding process of the compressed information bitmap sequentially adopts exponential Columbus decoding, mixed-stroke decoding, and A bitwise XOR or non-decoding algorithm is used to decode a compressed bitmap into the original bitmap.
  • Index Columbus decoding, mixed-stroke decoding, and bitwise XOR non-decoding have been described in the above embodiments, and will not be further described herein.
  • the pre-decoding unit includes: a first pre-decoding module configured to decode the encoding result by a bitwise XOR non-decoding algorithm.
  • the pre-decoding unit further includes: a second pre-decoding module, configured to decode the bitwise exclusive OR non-coding algorithm before using the bitwise XOR algorithm to decode the encoding result.
  • the previous encoding is decoded using a mixed-stroke decoding algorithm.
  • the first pre-decoding module includes: a first pre-decoding sub-module, configured to reserve a first bit of a bit string corresponding to the encoding result; and a second pre-decoding sub-module configured to be a bit corresponding to the encoding result
  • a first pre-decoding sub-module configured to reserve a first bit of a bit string corresponding to the encoding result
  • a second pre-decoding sub-module configured to be a bit corresponding to the encoding result
  • the second pre-decoding module includes: a third pre-decoding sub-module, configured to encode a plurality of consecutive identical bits in the encoding before decoding by the bitwise XOR non-decoding algorithm Decoding the first bit start value and the first bit count value; and/or the fourth pre-decoding sub-module, set to be used for multiple consecutive differences in the encoding before decoding by the bitwise XOR non-decoding algorithm The second bit start value and the second bit count value of the bit code are decoded.
  • module/sub-module/unit in the embodiment may be configured to perform corresponding steps in Embodiment 1 of the present application, and details are not described herein again.
  • modules/submodules/units are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above embodiment 1. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware.
  • a server or a terminal for implementing the encoding and decoding method of the above information bitmap is further provided.
  • the terminal may include: one or more (only one shown in the figure) processor 201, memory 203, and transmission device 205. (As in the transmitting apparatus in the above embodiment), as shown in FIG. 9, the terminal may further include an input/output device 207.
  • the memory 203 can be used to store the software program and the module, such as the encoding and decoding method of the information bitmap and the program instruction/module corresponding to the device in the embodiment of the present application, and the processor 201 runs the software program stored in the memory 203 and The module, thereby performing various functional applications and data processing, that is, implementing the encoding and decoding methods of the above information bitmap.
  • Memory 203 High speed random access memory may also be included, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 203 can further include memory remotely located relative to processor 201, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the above described transmission device 205 is used to receive or transmit data via a network, and can also be used for data transmission between the processor and the memory.
  • Specific examples of the above network may include a wired network and a wireless network.
  • the transmission device 205 includes a Network Interface Controller (NIC) that can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network.
  • the transmission device 205 is a Radio Frequency (RF) module configured to communicate with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • the memory 203 is used to store an application.
  • the processor 201 can call the application stored in the memory 203 through the transmission device 205 to perform the steps of: acquiring a target bitmap, the target bitmap being a bit string for use as target information exchanged between corresponding nodes in the Internet. Information index; precoding the bit string corresponding to the target bitmap to respectively aggregate the 0 bit value and the 1 bit value in the bit string; and encoding the precoded bit string by the Columbus encoding algorithm.
  • the processor 201 is further configured to perform the following steps: precoding the bit string corresponding to the target bitmap to separately aggregate the 0 bit value and the 1 bit value in the bit string, including: using the bitwise difference to the bit string corresponding to the target bitmap Or a non-coding algorithm for encoding.
  • the processor 201 is further configured to perform the following steps: after encoding the bit string corresponding to the target bitmap by using a bitwise exclusive OR non-coding algorithm, using a mixed run length encoding for the bit string encoded by the bitwise exclusive OR non-coding algorithm
  • the algorithm encodes.
  • the processor 201 is further configured to perform the following steps: encoding, by using a bitwise exclusive OR non-coding algorithm, the bit string corresponding to the target bitmap includes: retaining a first bit of the bit string corresponding to the target bitmap; and selecting a bit string corresponding to the target bitmap Starting with the next bit, sequentially the current bit value and adjacent to the current bit value And the bit value located before the current bit value is subjected to an exclusive OR non-encoding operation until the next bit bit value and the last bit value of the bit string are XOR or non-encoding operations are completed.
  • the processor 201 is further configured to perform the following steps: encoding the bit string encoded by the bitwise exclusive OR non-coding algorithm by using a mixed run length encoding algorithm includes: using a bit string encoded by a bitwise exclusive OR non-encoding algorithm A plurality of consecutive identical bits are encoded as a first bit start value and a first bit count value; and/or a plurality of consecutive different bits in the bit string encoded using the bitwise exclusive OR non-coding algorithm are encoded as a second The bit start value and the second bit count value.
  • the target bitmap is a bit string, which is used as an information index of target information exchanged between corresponding nodes in the Internet; precoding the bit string corresponding to the target bitmap to separately aggregate the bit strings
  • the 0-bit value and the 1-bit value are encoded by the Columbus encoding algorithm for the pre-encoded bit string, thereby achieving the purpose of highly compressing the information bitmap, thereby realizing the technical effect of saving transmission overhead and reducing the difficulty of encoding and decoding in information exchange.
  • the technical problem of large transmission overhead and difficulty in encoding and decoding due to Columbus coding directly on the information bitmap is solved in the related art.
  • the processor 201 can call the application stored in the memory 203 through the transmission device 205 to perform the following steps: acquiring the encoding result obtained by encoding the target bitmap after adopting the Columbus encoding algorithm, and the target bitmap is a bit string, which is used as a An index of information of target information exchanged between corresponding nodes in the Internet; precoding the encoded result to obtain a bit string in which a 0-bit value and a 1-bit value are respectively aggregated; and decoding the pre-decoded bit string to The original bit string corresponding to the target bitmap is restored in the bit string in which the 0 bit value and the 1-bit value are respectively aggregated.
  • the processor 201 is further configured to perform the following steps: pre-decoding the encoding result to obtain a bit string respectively merging the 0-bit value and the 1-bit value comprises: decoding the encoding result by using a bitwise exclusive OR non-decoding algorithm.
  • the processor 201 is further configured to perform the following steps: before using the bitwise XOR or non-coding algorithm to decode the encoding result, before using the bitwise XOR non-coding algorithm to decode the encoding
  • the combined travel decoding algorithm performs decoding.
  • the processor 201 is further configured to perform the following steps: performing decoding by using a bitwise XOR or non-decoding algorithm on the encoding result includes: retaining a first bit of the bit string corresponding to the encoding result; starting from a sub-bit of the bit string corresponding to the encoding result And performing an exclusive OR non-decoding operation on the current bit value and the bit value adjacent to the current bit value and located before the current bit value, until the next bit bit value and the last bit value of the bit string corresponding to the encoding result are XOR non-decoding operations Finished.
  • the processor 201 is further configured to: perform decoding by using a mixed-travel decoding algorithm for encoding before decoding by a bitwise XOR algorithm: for: encoding in a pre-decoding using a bitwise XOR non-decoding algorithm Decoding a first bit start value and a first bit count value of a plurality of consecutive identical bit codes; and/or for a plurality of consecutive different ones in the code before decoding using a bitwise XOR non-decoding algorithm The second bit start value and the second bit count value of the bit code are decoded.
  • the structure shown in FIG. 9 is only illustrative, and the terminal can be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, and a mobile Internet device (MID). Terminal equipment such as PAD.
  • FIG. 9 does not limit the structure of the above electronic device.
  • the terminal may also include more or fewer components (such as a network interface, display device, etc.) than shown in FIG. 9, or have a different configuration than that shown in FIG.
  • a storage medium is also provided.
  • the storage medium may be used to execute a program code of an encoding and decoding method of an information bitmap.
  • the foregoing storage medium may be located on at least one of the plurality of network devices in the network shown in the foregoing embodiment.
  • the storage medium is arranged to store program code for performing the following steps:
  • the storage medium is further configured to store program code for performing the following steps: precoding the bit string corresponding to the target bitmap to separately aggregate the 0 bit value and the 1 bit value in the bit string, including: target bit
  • precoding the bit string corresponding to the picture is encoded using a bitwise exclusive OR non-coding algorithm.
  • the storage medium is further configured to store program code for performing the following steps: after encoding the bit string corresponding to the target bitmap by using a bitwise exclusive OR non-coding algorithm, using a bitwise exclusive OR non-coding algorithm
  • the encoded bit string is encoded using a hybrid run length encoding algorithm.
  • the storage medium is further configured to store program code for performing the following steps: encoding the bit string corresponding to the target bitmap by using a bitwise XOR algorithm: including retaining the first bit of the bit string corresponding to the target bitmap Starting from the sub-bit of the bit string corresponding to the target bitmap, sequentially performing the XOR operation on the current bit value and the bit value adjacent to the current bit value and before the current bit value until the next bit of the bit string The value and the last bit value are XOR or non-encoding operations are completed.
  • the storage medium is further configured to store program code for performing the following steps: encoding the bit string encoded by the bitwise XOR or non-coding algorithm using a mixed run length encoding algorithm
  • the code includes: encoding a plurality of consecutive identical bits in a bit string encoded by a bitwise exclusive OR non-coding algorithm into a first bit start value and a first bit count value; and/or using a bitwise XOR A plurality of consecutive different bits in the bit string encoded by the non-coding algorithm are encoded as a second bit start value and a second bit count value.
  • the storage medium is arranged to store program code for performing the following steps:
  • S21 Obtain an encoding result obtained by encoding a target bitmap by using a Columbus encoding algorithm, where the target bitmap is a bit string, and is used as an information index of target information exchanged between corresponding nodes in the Internet;
  • the storage medium is further configured to store program code for performing the following steps: pre-decoding the encoded result to obtain a bit string respectively merging the 0-bit value and the 1-bit value comprises: using a bitwise bit for the encoded result
  • the XOR non-decoding algorithm performs decoding.
  • the storage medium is further configured to store program code for performing the steps of: decoding prior to decoding using a bitwise XOR non-coding algorithm prior to decoding the encoded result using a bitwise XOR non-coding algorithm
  • the hybrid run length coding algorithm is used for decoding.
  • the storage medium is further configured to store program code for performing the following steps: using the bitwise XOR or non-decoding algorithm to decode the encoding result comprises: retaining a first bit of the bit string corresponding to the encoding result; Starting with the sub-bit of the bit string, the current bit value and the bit value adjacent to the current bit value and located before the current bit value are XORed in turn, until the second bit bit value of the bit string corresponding to the encoding result is The last bit value XOR is not completed until the decoding operation is completed.
  • the storage medium is further arranged to store program code for performing the following steps: Encoding before decoding using a bitwise XOR non-decoding algorithm decoding using a mixed-stroke decoding algorithm includes: encoding a first bit for encoding a plurality of consecutive identical bits in a code before decoding using a bitwise XOR non-decoding algorithm Decoding a start value and a first bit count value; and/or a second bit start value and a second code for encoding a plurality of consecutive different bits in the code before decoding using a bitwise XOR non-decoding algorithm The bit count value is decoded.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the integrated unit in the above embodiment if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in the above-described computer readable storage medium.
  • the technical solution of the present application may be embodied in the form of a software product, or the whole or part of the technical solution, which is stored in the storage medium, including
  • the instructions are used to cause one or more computer devices (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
  • the disclosed client may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • Another point, the mutual coupling shown or discussed The direct or direct coupling or communication connection may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the information bitmap is pre-coded to aggregate the 0 and 1 in the bit string, and the target bitmap is obtained by acquiring the target bitmap.
  • a bit string used as an information index of target information exchanged between corresponding nodes in the Internet; precoding the bit string corresponding to the target bitmap to respectively aggregate 0 bit values and 1 bit values in the bit string;
  • the encoded bit string is encoded by the Columbus encoding algorithm, and the purpose of highly compressing the information bitmap is achieved, thereby realizing the technical effect of saving transmission overhead and reducing the difficulty of encoding and decoding in information exchange, thereby solving the related information in the related art.
  • Bitmaps have the technical problems of large transmission overhead caused by Columbus encoding and difficulty in encoding and decoding.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

一种信息位图的编码、解码方法、装置及存储介质。其中,该方法包括:编码装置获取目标位图,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引(S202);编码装置对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值(S204);编码装置对预编码后的比特串采用哥伦布编码算法进行编码(S206)。上述方法解决了相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题。

Description

信息位图的编码、解码方法、装置及存储介质
本申请要求于2016年12月06日提交中国专利局、优先权号为201611111546X、发明名称为“信息位图的编码、解码方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及互联网领域,具体而言,涉及一种信息位图的编码、解码方法、装置及存储介质。
背景技术
信息交换是网络和分布式系统的核心任务,即节点(如终端、服务器、网络设备等)之间交换各自信息(例如:节点状态、文件块状态、路由状态等),实现信息集的协调(Reconciliation)和去重(Deduplication)。为了节省网络带宽和提高交换效率,信息交换任务通常采用位图Bitmap(即由0和1组成的比特串)作为信息的索引。例如,在分布式文件下载应用中,终端主机采用文件块状态位图作为文件块的索引,其中第i个比特表示第i个文件块是否下载,如果第i个文件块下载,则设置第i个比特值为1,否则设置为0。特别是,随着移动互联网和云计算的迅猛发展,用于交换的信息的位图(以下简称为信息交换位图)广泛应用于互联网视频传输、移动终端监测、云数据备份同步等应用。例如,在移动终端监测应用中,移动终端(如智能手机和平板电脑))的应用管理APP会定期向云监测中心上传移动终端状态位图,包括用户在线状态、用户位置信息、移动系统类型、APP类型、系统补丁状态、潜在安全威胁类型等,从而汇聚海量移动用户行为和移动终端系统状态,提供广告推荐和安全防护等高效精确的云服务。
近年来,物联网和智慧城市的不断发展,泛在海量的移动终端应用给 信息交换位图带来传输开销高和交换速率低等挑战。首先,智能手机、无线传感器、可穿戴设备等海量移动终端带来大规模的信息交换位图传输,不仅消耗网络传输带宽,而且增大信息交换时延。其次,移动终端的计算能力有限,难以执行空间最优但计算密集型的位图压缩编解码方法。最后,由于异构移动终端的信源符号发生概率难以估计且随着时空动态变化,已有基于统计的无损压缩编码方法(例如,哈夫曼编码(Huffman Coding)和算术编码(Arithmetic Coding)),难以适应异构动态移动终端的信息交换位图压缩,单一的压缩编码方法存在压缩比率低等缺陷。因此,移动终端应用迫切需要高效的信息交换位图压缩方法,不仅减少位图传输开销,而且提高位图压缩的编解码速率。
针对信息交换位图压缩问题,已有研究工作提出了基于统计的无损压缩编码方法,主要分为哈夫曼编码方法和算术编码方法。哈夫曼编码方法是一种基于信源字符发生概率统计的变字长压缩编码方法,即字符发生概率高则编码长度短,字符发生概率低则编码长度长,实现平均最优编码长度。但是,在移动终端的信息交换位图应用中,哈夫曼编码方法存在压缩比率低和传输开销高等问题。首先,哈夫曼编码方法必须依赖信源字符发生概率的精确统计,因而难以适应信源字符发生概率动态变化的移动终端应用场景,导致位图压缩比率低;其次,哈夫曼编码方法必须维护一个哈夫曼编码表来进行解码,不仅需要额外开销来动态更新该编码表,而且导致传输开销高和解码效率低。哥伦布编码(Golomb Coding)方法是一种哈夫曼编码的变型,不必维护一个编码表即可解码,虽然可避免编码表维护开销和提升解码效率,但是该方法仍依赖信源字符发生概率统计进行编码,位图压缩比率仍较低。为了避免信源字符发生概率统计,算术编码方法是基于信源字符发生概率预估,对整个字符序列映射到区间[0,1)进行递归编码,输出一个二进制的小数作为编码输出。在理论上,算术编码方法的平均编码长度比哈夫曼算法更趋近于信息熵值,更适用于信源字符发生概率均等的应用场景。其主要原因是算术编码方法采用小数进行编码,而哈夫曼编码采用整数进行编码,因而浪费部分编码空间。但是,在实际 情况下,特别是在动态变化的移动终端应用中,由于信源字符发生概率随时空动态变化,算术编码方法的信源字符发生概率预估与实际字符发生概率相差较大,导致位图压缩比率较低。另外,算术编码方法通常采用乘法等复杂计算操作类型,导致计算能力有限的移动终端之间的位图压缩解码效率低。
针对上述已有位图压缩编码方法存在的压缩比率低、传输开销高和编解码效率低等问题,目前尚未提出有效的解决方案。
发明内容
本申请实施例提供了一种信息位图的编码、解码方法、装置及存储介质,以至少解决相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题。
根据本申请实施例的一个方面,提供了一种信息位图的编码方法,包括:编码装置获取目标位图,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;编码装置对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值;编码装置对预编码后的比特串采用哥伦布编码算法进行编码。
根据本申请实施例的另一方面,还提供了一种信息位图的解码方法,包括:解码装置获取目标位图在采用哥伦布编码算法进行编码后得到的编码结果,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;解码装置对编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串;解码装置对预解码后的比特串进行解码,以从分别聚合了0比特值和1比特值的比特串中还原出目标位图对应的原始比特串。
根据本申请实施例的一个方面,还提供了一种信息位图的编码装置,包括:第一获取单元,设置为获取目标位图,上述目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;预编码 单元,设置为对上述目标位图对应的上述比特串进行预编码,以分别聚合上述比特串中0比特值和1比特值;编码单元,设置为对预编码后的比特串采用哥伦布编码算法进行编码。
根据本申请实施例的另一方面,还提供了一种信息位图的解码装置,包括:第二获取单元,设置为获取目标位图在采用哥伦布编码算法进行编码后得到的编码结果,上述目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;预解码单元,设置为对上述编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串;解码单元,设置为对预解码后的比特串进行解码,以从上述分别聚合了0比特值和1比特值的比特串中还原出上述目标位图对应的原始比特串。
根据本申请实施例的一个方面,还提供了一种存储介质,该存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的信息位图的编码、解码方法。
在本申请实施例中,采用在采用哥伦布编码算法对信息位图进行编码之前先对信息位图进行预编码以聚合比特串中的0和1的方式,通过编码装置获取目标位图,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;编码装置对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值;编码装置对预编码后的比特串采用哥伦布编码算法进行编码,达到了高度压缩信息位图的目的,从而实现了信息交换时节约传输开销以及降低编解码难度的技术效果,进而解决了相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是根据本申请实施例的信息位图的编码方法的硬件环境的示意图;
图2是根据本申请实施例的一种可选的信息位图的编码方法的流程图;
图3是根据本申请实施例的一种可选的信息位图的解码方法的流程图;
图4(a)是根据本申请实施例的一种可选的按位异或非编码和解码的示意图;
图4(b)是根据本申请实施例的一种可选的混合行程编码和解码的示意图;
图5(a)是根据本申请实施例的一种可选的信息位图编码的示意图;
图5(b)是根据本申请实施例的一种可选的信息位图解码的示意图;
图6(a)是根据本申请实施例的一种可选的互联网视频传输应用场景中信息位图交换的示意图;
图6(b)是根据本申请实施例的一种可选的移动终端监测应用场景中信息位图交换的示意图;
图6(c)是根据本申请实施例的一种可选的文件备份同步应用场景中信息位图交换的示意图;
图7是根据本申请实施例的一种可选的信息位图的编码装置的示意图;
图8是根据本申请实施例的一种可选的信息位图的解码装置的示意图;以及
图9是根据本申请实施例的一种终端的结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动 前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
根据本申请实施例的一方面,提供了一种信息位图的编码方法的方法实施例。
可选地,在本实施例中,上述信息位图的编码方法可以应用于如图1所示的由服务器102和终端104所构成的硬件环境中。如图1所示,服务器102通过网络与终端104进行连接,上述网络包括但不限于:广域网、城域网或局域网,终端104并不限定于PC、手机、平板电脑等。本申请实施例的信息位图的编码方法可以由服务器102来执行,也可以由终端104来执行,还可以是由服务器102和终端104共同执行。其中,终端104执行本申请实施例的信息位图的编码方法也可以是由安装在其上的客户端来执行。
图2是根据本申请实施例的一种可选的信息位图的编码方法的流程图,如图2所示,该方法可以包括以下步骤:
步骤S202,编码装置获取目标位图,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;
步骤S204,编码装置对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值;
步骤S206,编码装置对预编码后的比特串采用哥伦布编码算法进行 编码。
通过上述步骤S202至步骤S206,采用在采用哥伦布编码算法对信息位图进行编码之前先对信息位图进行预编码以聚合比特串中的0和1的方式,通过编码装置获取目标位图,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;编码装置对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值;编码装置对预编码后的比特串采用哥伦布编码算法进行编码,达到了高度压缩信息位图的目的,从而实现了信息交换时节约传输开销以及降低编解码难度的技术效果,进而解决了相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题。
在步骤S202提供的技术方案中,由于编码装置直接获取的目标位图是未经编码压缩的比特串,此时若使用该目标位图作为在互联网中对应的节点间进行信息交换,则会存在传输开销大以及编解码难度大的问题,因此,需要进行预编码处理。
在步骤S204提供的技术方案中,在编码装置对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值时,可以采用至少一种编码算法。需要说明的是,可以应用于本申请实施例的预编码的算法可以包括但不限于以下算法:按位异或非编码(Bitwise Exclusive-NOR Coding)、混合行程编码(Hybrid Run-Length Coding)等。其中,按位异或非编码算法主要是将一个原始位图聚合为多个连续相同(如1或0)或不同比特(如10或01);混合行程编码方法主要是将多个连续相同或不同比特编码为比特起始值和比特计数。
在步骤S206提供的技术方案中,编码装置采用哥伦布编码(Exponential Golomb Coding)(即指数哥伦布编码)对比特起始值和比特计数进行编码,从而实现位图的高压缩比率和快速编解码。
需要说明的是,使用本申请聚类编码方法(Clustering Coding)实现位图的高压缩比率和快速编码,提升了信息交换的传输效率和处理速率, 可应用于互联网视频传输、移动终端监测、云数据备份同步等典型产品侧应用场景。
作为一种可选的实施例,编码装置对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值包括:编码装置对目标位图对应的比特串采用按位异或非编码算法进行编码。需要说明的是,按位异或非编码算法的具体原理将在下述实施方式中阐述,在此不再详细介绍。
作为一种可选的实施例,在编码装置对目标位图对应的比特串采用按位异或非编码算法进行编码之后,上述方法还包括:编码装置对采用按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码。
即,可选地,对信息位图进行压缩的聚类编码流程可以包括如下三个步骤:(1)对于一个输入的原始信息位图(以下简称为原始位图),可以先采用按位异或非编码算法进行编码,通过邻近比特的异或非操作,将该原始位图聚合为连续和不连续比特值,并保留原始位图的首位比特值;(2)采用混合行程编码算法,将多个连续0或1比特值编码为连续相同比特起始值和连续相同比特计数,并将多个连续01或10比特编码为连续不同比特起始值和连续不同比特计数;(3)采用指数哥伦布编码算法,对混合行程编码的连续相同比特起始值、连续相同比特计数、连续不同比特起始值和连续不同比特计数等进行编码,输出一个压缩后的信息位图。
该方案是由按位异或非编码算法、混合行程编码算法和指数哥伦布编码算法等三种算法组成的一个联合编码算法。首先,该方案采用按位异或非编码算法将信息交互位图聚合为连续相同和不同比特,减轻移动终端带来的信源字符发生概率动态变化问题;其次,采用混合行程编码算法将位图压缩成长度不均匀的行程编码,有利于后续哈夫曼编码;最后,采用指数哥伦布编码算法对行程编码进行压缩,避免维护编码表和额外传输开销,并提升位图压缩解码速率。总之,本申请的聚类编码方法具有位图压缩比率高和编解码速率快等优点,适用于互联网视频传输,移动终端监测、云数据备份同步等应用场景。
作为一种可选的实施例,编码装置对目标位图对应的比特串采用按位异或非编码算法进行编码包括:编码装置保留目标位图对应的比特串的首位;编码装置从述目标位图对应的比特串的次位开始,依次将当前比特值和与当前比特值相邻且位于当前比特值之前的比特值进行异或非编码运算,直到比特串的次末位比特值和末位比特值异或非编码运算完成为止。
本申请提出的按位异或非编码算法是利用比特之间的异或非操作对位图进行编码。如果两个比特值相同,则异或非操作结果为1;如果两个比特值不相同,则异或非操作结果为0。利用上述异或非操作的特性,本申请的按位异或非编码算法是对原始位图的邻近比特值进行异或非运算,且保留该位图的首位比特值。假设给定一个原始位图为011010,首先保留原始位图的首位比特值0为编码位图的首位比特值,其次对原始位图的后续每个比特与其前1位邻居比特进行异或非操作,输出一个编码位图001000。例如,原始位图的第2位比特值1与第1位比特值0的异或非操作结果为0,第3位比特值1与第2位比特值1的操作结果为1。与相关的编码算法不同,按位异或非解码算法是对编码位图的当前比特值与原始位图的当前解码比特值进行异或非操作。
作为一种可选的实施例,编码装置对采用按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码包括:编码装置将对采用按位异或非编码算法编码后的比特串中多个连续相同的比特编码为第一比特起始值和第一比特计数值;和/或编码装置将对采用按位异或非编码算法编码后的比特串中多个连续不同的比特编码为第二比特起始值和第二比特计数值。
本申请提出的混合行程编码是一种扩展的行程编码。混合行程编码方法不仅可对多个连续0或1比特表示为连续相同比特起始值和连续相同比特计数,而且可对多个连续01或10比特表示为连续不同比特起始值和连续不同比特计数。例如,m个连续0比特可编码为(0,m),m个连续1比特可编码为(1,m),其中0或1为连续相同比特起始值,m为连续0 或1比特计数;n个连续01比特和m个连续1比特可编码为0(n,m),其中0表示连续不同比特起始值,n表示为连续01比特计数,m为连续1比特计数。与上述编码方法相反,混合行程解码方法将(0,m)或(1,m)解码为m个连续0或1比特,而将0(n,m)解码为n个连续01比特和m个1比特,将1(n,m)解码为n个连续10比特和m个1比特。为了避免解码的歧义性,n个连续01或10比特的编码不必表示起始值,其原因是该起始值可通过前一个编码推测出。在本申请中,n个连续01比特和m个连续1比特编码为(n,m),而不必表示起始值0。由于(n,m)的n≥2而(0,m)或(1,m)的起始值为0或1(即n<2),因此本申请的混合行程解码方法可解码出任意(n,m)。如果n为0或1,则解码为m个连续0或1比特;如果n≥2,则解码为n个连续01或10比特。如果(n,m)之前的编码为(1,k),则(n,m)解码为n个连续01比特和m个连续1比特;如果(n,m)之前的编码为(0,k),则(n,m)解码为n个连续10比特和m个连续1比特。
需要说明的是,本申请采用指数哥伦布编码对混合行程编码的连续比特起始值和连续比特计数进行编码。对于一个给定非负整数x,指数哥伦布编码是由前后两部分比特串组成,其中后部比特串为整数x+1的二进制值,前部比特串为│log2(x+1)│(取整)个0比特。表1与表1(续)给出了整数0,1,2,3,4,5,6和24的对应指数哥伦布编码。例如,整数0的指数哥伦布编码为1,不包含前部0比特;整数1的编码为010,其中前部0比特个数为1,后部比特串为10;整数24的编码为000011001,其中前部0比特个数为4,后部比特串为11001。
表1
整数 指数哥伦布编码
0 1
1 010
表1(续)
整数 指数哥伦布编码
2 011
3 00100
4 00101
5 00110
6 00111
24 000011001
根据本申请实施例,还提供了一种信息位图的解码方法的方法实施例。可选地,在本实施例中,上述信息位图的解码方法也可以应用于如图1所示的由服务器102和终端104所构成的硬件环境中。在此不再赘述。
图3是根据本申请实施例的一种可选的信息位图的解码方法的流程图,如图3所示,该方法可以包括以下步骤:
步骤S302,解码装置获取目标位图在采用哥伦布编码算法进行编码后得到的编码结果,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;
步骤S304,解码装置对编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串;
步骤S306,解码装置对预解码后的比特串进行解码,以从分别聚合了0比特值和1比特值的比特串中还原出目标位图对应的原始比特串。
需要说明的是,与上述信息位图的编码方法相反,在本申请实施例中的信息位图的解码方法中,压缩的信息位图的聚类解码流程依次采用指数哥伦布解码、混合行程解码和按位异或非解码等算法,将一个压缩后的位图解码为原始位图。指数哥伦布解码、混合行程解码和按位异或非解码在 上述实施方式中已阐述,在此不再一一赘述。
通过上述步骤S302至步骤S306,通过获取目标位图在采用哥伦布编码算法进行编码后得到的编码结果,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;解码装置对编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串;对预解码后的比特串进行解码,以从分别聚合了0比特值和1比特值的比特串中还原出目标位图对应的原始比特串,可以解决相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题,达到了高度压缩信息位图的目的,从而实现了信息交换时节约传输开销以及降低编解码难度的技术效果。
需要说明的是,使用本申请聚类解码方法实现对高压缩比率位图的快速解码,提升了信息交换处理速率,可应用于互联网视频传输、移动终端监测、云数据备份同步等典型产品侧应用场景。
作为一种可选的实施例,解码装置对编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串包括:解码装置对编码结果采用按位异或非编码算法进行解码。需要说明的是,按位异或非解码算法的具体原理与按位异或非编码算法类似,按位异或非解码算法的具体原理已在在上述实施方式中阐述,在此不再详细介绍。
作为一种可选的实施例,解码装置在对编码结果采用采用按位异或非编码算法进行解码之前,上述方法还包括:解码装置对采用按位异或非解码算法解码前的编码采用混合行程编码算法进行解码。
与上述编码流程相反,位图压缩的聚类解码流程包括如下三个步骤:(1)对于一个压缩后的位图,采用指数哥伦布解码,将该位图解码为连续相同比特起始值、连续相同比特计数、连续不同比特起始值、连续不同比特计数等;(2)采用混合行程解码,将连续相同比特起始值和连续相同比特计数解码为多个连续0或1比特,并将连续不同比特起始值和连续不同比特计数解码为多个不连续01或10比特;(3)采用按位异或非解码, 以保留的首位比特值为当前解码比特值,通过当前比特值与当前解码比特值的按位异或非操作,解码为原始位图的下一个比特值,输出一个解码后的原始位图。
作为一种可选的实施例,解码装置对编码结果采用采用按位异或非解码算法进行解码包括:解码装置保留编码结果对应的比特串的首位;解码装置从编码结果对应的比特串的次位开始,依次将当前比特值和与当前比特值相邻且位于当前比特值之前的比特值进行异或非解码运算,直到编码结果对应的比特串的次末位比特值和末位比特值异或非解码运算完成为止。
本申请提出的按位异或非解码算法是利用比特之间的异或非操作对位图进行编码。如果两个比特值相同,则异或非操作结果为1;如果两个比特值不相同,则异或非操作结果为0。利用上述异或非操作的特性,本申请的按位异或非解码算法是对原始位图的邻近比特值进行异或非运算,且保留该位图的首位比特值。
假设给定一个编码位图001000,首先选取编码位图的首位比特值为原始位图的当前解码比特值,其次对编码位图的后续每个比特值与原始位图的当前解码比特值进行异或非操作,输出一个解码后的原始位图011010。例如,编码位图的第2位比特值0与原始位图的第1位解码比特值0的异或非操作结果为1,第3位比特值1和第2为解码比特值1的操作结果为1。
作为一种可选的实施例,解码装置对采用所述按位异或非解码算法解码前的编码采用混合行程解码算法进行解码包括:解码装置对采用所述按位异或非解码算法解码前的编码中的用于对多个连续相同的比特编码的第一比特起始值和第一比特计数值进行解码;和/或解码装置对采用所述按位异或非解码算法解码前的编码中的用于对多个连续不同的比特编码的第二比特起始值和第二比特计数值进行解码。
本申请采用指数哥伦布解码对混合行程编码的连续比特起始值和连 续比特计数进行解码。对于一个给定非负整数x,指数哥伦布解码是由前后两部分比特串组成,其中后部比特串为整数x+1的二进制值,前部比特串为│log2(x+1)│(取整)个0比特。对于一个给定的编码,指数哥伦布解码算法根据前部0比特串长度和第1个1比特来计算后部比特串的整数值,解码出一个相应的原始整数。假设给定一个指数哥伦布编码为00101,由于其前部0比特个数为2,后部比特个数应为2+1=3,因此解码后的整数为二进制101=5,再减1,即4。
本申请提出的聚类编码方法是由按位异或非编码方法、混合行程编码方法和指数哥伦布编码方法组成的一个联合编码方法,且该方法的编码和解码流程是快速且可逆的。以下将结合附图分别详细阐述按位异或非编解码、混合行程编解码和指数哥伦布编解码等工作原理和示例。其中,图4(a)是根据本申请实施例的一种可选的按位异或非编码和解码的示意图;图4(b)是根据本申请实施例的一种可选的混合行程编码和解码的示意图;图5(a)是根据本申请实施例的一种可选的信息位图编码的示意图;图5(b)是根据本申请实施例的一种可选的信息位图解码的示意图。
图5(a)给出了位图压缩的聚类编码示例。对于一个32比特的原始位图为00110000101010101010101010101010,采用按位异或非编码,输出编码后的位图为01010111000000000000000000000000;接着,采用混合行程编码,输出一个编码后的位图为0(6,2)(0,24),其中0为位图的首位比特值,(6,2)表示3(=6/2)个连续01比特和2个连续1比特,(0,24)表示24个连续0比特;最后,采用指数哥伦布编码,输出一个18比特的位图为000110111000011001,其中整数6、2、0和24的指数哥伦布编码分别为00111、011、1和000011001。与原始位图相比,压缩后的位图减少了43.8%的存储开销。
需要说明的是,本申请的信息图的编解码方法在产品侧的典型应用场景主要包括:互联网视频传输应用、移动终端监测应用和文件备份同步应用。
(1)如图6(a)所示,在互联网视频传输应用场景中,移动终端(例如,手机和平板电脑等)的视频APP支持点播和直播服务,根据用户观看需求,通过互联网向视频服务器定期发送视频文件块位图,其中0比特表示已播放的视频文件块,而1比特表示请求的视频文件块;视频服务器将根据接收的视频文件块位图,快速精确地发送用户请求的视频文件块。
(2)如图6(b)所示,移动终端监测应用场景中,移动终端的应用管理APP(例如:手机助手等)根据已定义的用户和文件状态(例如:用户在线状态、用户安装APP类型、终端系统类型、系统补丁类型、安全漏洞类型等)通过互联网定期向移动终端监测中心发送移动终端状态位图,定期收集移动用户行为数据,提供定制精确的增值服务(例如:广告推荐和安全防护等)。
(3)如图6(c)所示,在文件备份同步应用中,每个文件备份系统向其他文件备份系统发送其文件数据状态位图,其中0比特表示文件数据旧版本,1比特表示文件数据新版本。每个文件备份系统之间定期交换文件数据状态位图,并根据接收的文件数据状态位图,同步更新文件数据,确保多个文件系统之间的备份同步和一致性。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可 以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
根据本申请实施例的另一方面,还提供了一种用于实施上述信息位图的编码方法的信息位图的编码装置。图7是根据本申请实施例的一种可选的信息位图的编码装置的示意图,如图7所示,该装置可以包括:第一获取单元702,设置为获取目标位图,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;预编码单元704,设置为对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值;编码单元706,设置为对预编码后的比特串采用哥伦布编码算法进行编码。
由于直接获取的目标位图是未经编码压缩的比特串,此时若使用该目标位图作为在互联网中对应的节点间进行信息交换,则会存在传输开销大以及编解码难度大的问题,因此,需要进行预编码处理。
在对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值时,可以采用至少一种编码算法。需要说明的是,可以应用于本申请实施例的预编码的算法可以包括但不限于以下算法:按位异或非编码(Bitwise Exclusive-NOR Coding)、混合行程编码(Hybrid Run-Length Coding)等。其中,按位异或非编码算法主要是将一个原始位图聚合为多个连续相同(如1或0)或不同比特(如10或01);混合行程编码方法主要是将多个连续相同或不同比特编码为比特起始值和比特计数。
采用哥伦布编码(Exponential Golomb Coding)(即指数哥伦布编码)对比特起始值和比特计数进行编码,从而实现位图的高压缩比率和快速编解码。
需要说明的是,使用本申请聚类编码方法(Clustering Coding)实现位图的高压缩比率和快速编码,提升了信息交换的传输效率和处理速率,可应用于互联网视频传输、移动终端监测、云数据备份同步等典型产品侧应用场景。
作为一种可选的实施例,预编码单元包括:第一预编码模块,设置为对目标位图对应的比特串采用按位异或非编码算法进行编码。
作为一种可选的实施例,预编码单元还包括:第二预编码模块,设置为在对目标位图对应的比特串采用按位异或非编码算法进行编码之后,对采用按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码。
作为一种可选的实施例,第一预编码模块包括:第一预编码子模块,设置为保留目标位图对应的比特串的首位;第二预编码子模块,设置为从述目标位图对应的比特串的次位开始,依次将当前比特值和与当前比特值相邻且位于当前比特值之前的比特值进行异或非编码运算,直到比特串的次末位比特值和末位比特值异或非编码运算完成为止。
作为一种可选的实施例,第二预编码模块包括:第三预编码子模块,设置为将对采用按位异或非编码算法编码后的比特串中多个连续相同的比特编码为第一比特起始值和第一比特计数值;和/或第四预编码子模块,设置为将对采用按位异或非编码算法编码后的比特串中多个连续不同的比特编码为第二比特起始值和第二比特计数值。
需要说明的是,该实施例中的发上述模块/子模块/单元可以设置为执行本申请实施例1中的对应步骤,在此不再一一赘述。
此处需要说明的是,上述模块/子模块/单元与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例1所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现。
通过上述模块,可以解决了相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题,达到了高度压缩信息位图的目的,从而实现了信息交换时节约传输开销以及降低编解码难度的技术效果。
根据本申请实施例,还提供了一种用于实施上述信息位图的解码方法的信息位图的解码装置。图8是根据本申请实施例的一种可选的信息位图的解码装置的示意图,如图8所示,该装置可以包括:第二获取单元802,设置为获取目标位图在采用哥伦布编码算法进行编码后得到的编码结果,所述目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;预解码单元804,设置为对所述编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串;解码单元806,设置为对预解码后的比特串进行解码,以从所述分别聚合了0比特值和1比特值的比特串中还原出所述目标位图对应的原始比特串。
需要说明的是,与上述信息位图的编码方法相反,在本申请实施例中的信息位图的解码方法中,压缩的信息位图的聚类解码流程依次采用指数哥伦布解码、混合行程解码和按位异或非解码等算法,将一个压缩后的位图解码为原始位图。指数哥伦布解码、混合行程解码和按位异或非解码在上述实施方式中已阐述,在此不再一一赘述。
通过上述实施例,可以解决了相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题,达到了高度压缩信息位图的目的,从而实现了信息交换时节约传输开销以及降低编解码难度的技术效果。
作为一种可选的实施例,预解码单元包括:第一预解码模块,设置为对编码结果采用按位异或非解码算法进行解码。
作为一种可选的实施例,预解码单元还包括:第二预解码模块,设置为在对编码结果采用采用按位异或非编码算法进行解码之前,对采用按位异或非编码算法解码前的编码采用混合行程解码算法进行解码。
作为一种可选的实施例,第一预解码模块包括:第一预解码子模块,设置为保留编码结果对应的比特串的首位;第二预解码子模块,设置为从编码结果对应的比特串的次位开始,依次将当前比特值和与当前比特值相邻且位于当前比特值之前的比特值进行异或非解码运算,直到编码结果对 应的比特串的次末位比特值和末位比特值异或非解码运算完成为止。
作为一种可选的实施例,第二预解码模块包括:第三预解码子模块,设置为对采用按位异或非解码算法解码前的编码中的用于对多个连续相同的比特编码的第一比特起始值和第一比特计数值进行解码;和/或第四预解码子模块,设置为对采用按位异或非解码算法解码前的编码中的用于对多个连续不同的比特编码的第二比特起始值和第二比特计数值进行解码。
需要说明的是,该实施例中的发上述模块/子模块/单元可以设置为执行本申请实施例1中的对应步骤,在此不再一一赘述。
此处需要说明的是,上述模块/子模块/单元与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例1所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现。
通过上述模块,可以解决了相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题,达到了高度压缩信息位图的目的,从而实现了信息交换时节约传输开销以及降低编解码难度的技术效果。
根据本申请实施例的又一方面,还提供了一种用于实施上述信息位图的编码、解码方法的服务器或终端。
图9是根据本申请实施例的一种终端的结构框图,如图9所示,该终端可以包括:一个或多个(图中仅示出一个)处理器201、存储器203、以及传输装置205(如上述实施例中的发送装置),如图9所示,该终端还可以包括输入输出设备207。
其中,存储器203可用于存储软件程序以及模块,如本申请实施例中的信息位图的编码、解码方法和装置对应的程序指令/模块,处理器201通过运行存储在存储器203内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的信息位图的编码、解码方法。存储器203 可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器203可进一步包括相对于处理器201远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
上述的传输装置205用于经由一个网络接收或者发送数据,还可以用于处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置205包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置205为射频(Radio Frequency,RF)模块,其设置为通过无线方式与互联网进行通讯。
其中,存储器203用于存储应用程序。
处理器201可以通过传输装置205调用存储器203存储的应用程序,以执行下述步骤:获取目标位图,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值;对预编码后的比特串采用哥伦布编码算法进行编码。
处理器201还用于执行下述步骤:对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值包括:对目标位图对应的比特串采用按位异或非编码算法进行编码。
处理器201还用于执行下述步骤:在对目标位图对应的比特串采用按位异或非编码算法进行编码之后,对采用按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码。
处理器201还用于执行下述步骤:对目标位图对应的比特串采用按位异或非编码算法进行编码包括:保留目标位图对应的比特串的首位;从目标位图对应的比特串的次位开始,依次将当前比特值和与当前比特值相邻 且位于当前比特值之前的比特值进行异或非编码运算,直到比特串的次末位比特值和末位比特值异或非编码运算完成为止。
处理器201还用于执行下述步骤:对采用按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码包括:将对采用按位异或非编码算法编码后的比特串中多个连续相同的比特编码为第一比特起始值和第一比特计数值;和/或将对采用按位异或非编码算法编码后的比特串中多个连续不同的比特编码为第二比特起始值和第二比特计数值。
采用本申请实施例,提供了一种在采用哥伦布编码算法对信息位图进行编码之前先对信息位图进行预编码以聚合比特串中的0和1的方案。通过获取目标位图,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值;对预编码后的比特串采用哥伦布编码算法进行编码,达到了高度压缩信息位图的目的,从而实现了信息交换时节约传输开销以及降低编解码难度的技术效果,进而解决了相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题。
处理器201可以通过传输装置205调用存储器203存储的应用程序,以执行下述步骤:获取目标位图在采用哥伦布编码算法进行编码后得到的编码结果,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;对编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串;对预解码后的比特串进行解码,以从分别聚合了0比特值和1比特值的比特串中还原出目标位图对应的原始比特串。
处理器201还用于执行下述步骤:对编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串包括:对编码结果采用按位异或非解码算法进行解码。
处理器201还用于执行下述步骤:在对编码结果采用采用按位异或非编码算法进行解码之前,对采用按位异或非编码算法解码前的编码采用混 合行程解码算法进行解码。
处理器201还用于执行下述步骤:对编码结果采用采用按位异或非解码算法进行解码包括:保留编码结果对应的比特串的首位;从编码结果对应的比特串的次位开始,依次将当前比特值和与当前比特值相邻且位于当前比特值之前的比特值进行异或非解码运算,直到编码结果对应的比特串的次末位比特值和末位比特值异或非解码运算完成为止。
处理器201还用于执行下述步骤:对采用按位异或非编码算法解码前的编码采用混合行程解码算法进行解码包括:对采用按位异或非解码算法解码前的编码中的用于对多个连续相同的比特编码的第一比特起始值和第一比特计数值进行解码;和/或对采用按位异或非解码算法解码前的编码中的用于对多个连续不同的比特编码的第二比特起始值和第二比特计数值进行解码。
可选地,本实施例中的具体示例可以参考上述实施例1和实施例2中所描述的示例,本实施例在此不再赘述。
本领域普通技术人员可以理解,图9所示的结构仅为示意,终端可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图9其并不对上述电子装置的结构造成限定。例如,终端还可包括比图9中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图9所示不同的配置。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
本申请的实施例的一方面,还提供了一种存储介质。可选地,在本实 施例中,上述存储介质可以用于执行信息位图的编码、解码方法的程序代码。
可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:
S11,获取目标位图,所述目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;
S12,对所述目标位图对应的所述比特串进行预编码,以分别聚合所述比特串中0比特值和1比特值;
S13,对预编码后的比特串采用哥伦布编码算法进行编码。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值包括:对目标位图对应的比特串采用按位异或非编码算法进行编码。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:在对目标位图对应的比特串采用按位异或非编码算法进行编码之后,对采用按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:对目标位图对应的比特串采用按位异或非编码算法进行编码包括:保留目标位图对应的比特串的首位;从目标位图对应的比特串的次位开始,依次将当前比特值和与当前比特值相邻且位于当前比特值之前的比特值进行异或非编码运算,直到比特串的次末位比特值和末位比特值异或非编码运算完成为止。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:对采用按位异或非编码算法编码后的比特串采用混合行程编码算法进行编 码包括:将对采用按位异或非编码算法编码后的比特串中多个连续相同的比特编码为第一比特起始值和第一比特计数值;和/或将对采用按位异或非编码算法编码后的比特串中多个连续不同的比特编码为第二比特起始值和第二比特计数值。
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:
S21,获取目标位图在采用哥伦布编码算法进行编码后得到的编码结果,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;
S22,对编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串;
S23,对预解码后的比特串进行解码,以从分别聚合了0比特值和1比特值的比特串中还原出目标位图对应的原始比特串。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:对编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串包括:对编码结果采用按位异或非解码算法进行解码。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:在对编码结果采用采用按位异或非解码算法进行解码之前,对采用按位异或非编码算法解码前的编码采用混合行程编码算法进行解码。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:对编码结果采用采用按位异或非解码算法进行解码包括:保留编码结果对应的比特串的首位;从编码结果对应的比特串的次位开始,依次将当前比特值和与当前比特值相邻且位于当前比特值之前的比特值进行异或非解码运算,直到编码结果对应的比特串的次末位比特值和末位比特值异或非解码运算完成为止。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:对 采用按位异或非解码算法解码前的编码采用混合行程解码算法进行解码包括:对采用按位异或非解码算法解码前的编码中的用于对多个连续相同的比特编码的第一比特起始值和第一比特计数值进行解码;和/或对采用按位异或非解码算法解码前的编码中的用于对多个连续不同的比特编码的第二比特起始值和第二比特计数值进行解码。
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦 合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述仅是本申请的可选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。
工业实用性
在本申请实施例中,采用在采用哥伦布编码算法对信息位图进行编码之前先对信息位图进行预编码以聚合比特串中的0和1的方式,通过获取目标位图,目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;对目标位图对应的比特串进行预编码,以分别聚合比特串中0比特值和1比特值;对预编码后的比特串采用哥伦布编码算法进行编码,达到了高度压缩信息位图的目的,从而实现了信息交换时节约传输开销以及降低编解码难度的技术效果,进而解决了相关技术中由于直接对信息位图进行哥伦布编码造成的传输开销大以及编解码难度大的技术问题。

Claims (21)

  1. 一种信息位图的编码方法,包括:
    编码装置获取目标位图,所述目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;
    所述编码装置对所述目标位图对应的所述比特串进行预编码,以分别聚合所述比特串中0比特值和1比特值;
    所述编码装置对预编码后的比特串采用哥伦布编码算法进行编码。
  2. 根据权利要求1所述的方法,其中,对所述目标位图对应的所述比特串进行预编码,以分别聚合所述比特串中0比特值和1比特值包括:
    所述编码装置对所述目标位图对应的所述比特串采用按位异或非编码算法进行编码。
  3. 根据权利要求2所述的方法,其中,在对所述目标位图对应的所述比特串采用按位异或非编码算法进行编码之后,所述方法还包括:
    所述编码装置对采用所述按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码。
  4. 根据权利要求2或3所述的方法,其中,对所述目标位图对应的所述比特串采用按位异或非编码算法进行编码包括:
    所述编码装置保留所述目标位图对应的所述比特串的首位;
    所述编码装置从所述目标位图对应的所述比特串的次位开始,依次将当前比特值和与所述当前比特值相邻且位于所述当前比特值之前的比特值进行异或非编码运算,直到所述比特串的次末位比特值和末位比特值异或非编码运算完成为止。
  5. 根据权利要求3所述的方法,其中,对采用所述按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码包括:
    所述编码装置将对采用所述按位异或非编码算法编码后的比特串中多个连续相同的比特编码为第一比特起始值和第一比特计数值。;
  6. 根据权利要求3所述的方法,其中,对采用所述按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码包括:
    所述编码装置将对采用所述按位异或非编码算法编码后的比特串中多个连续不同的比特编码为第二比特起始值和第二比特计数值。
  7. 一种信息位图的解码方法,包括:
    解码装置获取目标位图在采用哥伦布编码算法进行编码后得到的编码结果,所述目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;
    所述解码装置对所述编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串;
    所述解码装置对预解码后的比特串进行解码,以从所述分别聚合了0比特值和1比特值的比特串中还原出所述目标位图对应的原始比特串。
  8. 根据权利要求7所述的方法,其中,对所述编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串包括:
    所述解码装置对所述编码结果采用按位异或非解码算法进行解码。
  9. 根据权利要求8所述的方法,其中,在对所述编码结果采用采用按位异或非编码算法进行解码之前,所述方法还包括:
    所述解码装置对采用所述按位异或非编码算法解码前的编码采用混合行程解码算法进行解码。
  10. 根据权利要求8或9所述的方法,其中,对所述编码结果采用采用按位异或非解码算法进行解码包括:
    所述解码装置保留所述编码结果对应的比特串的首位;
    所述解码装置从所述编码结果对应的比特串的次位开始,依次将当前比特值和与所述当前比特值相邻且位于所述当前比特值之前的比特值进行异或非解码运算,直到所述编码结果对应的比特串的次末位比特值和末位比特值异或非解码运算完成为止。
  11. 根据权利要求9所述的方法,其中,对采用所述按位异或非解码算法解码前的编码采用混合行程解码算法进行解码包括:
    所述解码装置对采用所述按位异或非解码算法解码前的编码中的用于对多个连续相同的比特编码的第一比特起始值和第一比特计数值进行解码。
  12. 根据权利要求9所述的方法,其中,对采用所述按位异或非解码算法解码前的编码采用混合行程解码算法进行解码包括:
    所述解码装置对采用所述按位异或非解码算法解码前的编码中的用于对多个连续不同的比特编码的第二比特起始值和第二比特计数值进行解码。
  13. 一种信息位图的编码装置,包括:一个或多个处理器,以及一个或多个存储指令的存储器,其中,所述存储指令由所述处理器执行,所述处理器所要执行的程序单元包括:
    第一获取单元,设置为获取目标位图,所述目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;
    预编码单元,设置为对所述目标位图对应的所述比特串进行预编码,以分别聚合所述比特串中0比特值和1比特值;
    编码单元,设置为对预编码后的比特串采用哥伦布编码算法进行编码。
  14. 根据权利要求13所述的装置,其中,所述预编码单元包括:
    第一预编码模块,设置为对所述目标位图对应的所述比特串采用按位异或非编码算法进行编码。
  15. 根据权利要求14所述的装置,其中,所述预编码单元还包括:
    第二预编码模块,设置为在对所述目标位图对应的所述比特串采用按位异或非编码算法进行编码之后,对采用所述按位异或非编码算法编码后的比特串采用混合行程编码算法进行编码。
  16. 根据权利要求14或15所述的装置,其中,所述第一预编码模块包括:
    第一预编码子模块,设置为保留所述目标位图对应的所述比特串的首位;
    第二预编码子模块,设置为从所述目标位图对应的所述比特串的次位开始,依次将当前比特值和与所述当前比特值相邻且位于所述当前比特值之前的比特值进行异或非编码运算,直到所述比特串的次末位比特值和末位比特值异或非编码运算完成为止。
  17. 一种信息位图的解码装置,包括:一个或多个处理器,以及一个或多个存储指令的存储器,其中,所述存储指令由所述处理器执行,所述处理器所要执行的程序单元包括:
    第二获取单元,设置为获取目标位图在采用哥伦布编码算法进行编码后得到的编码结果,所述目标位图为比特串,用于作为在互联网中对应的节点间进行交换的目标信息的信息索引;
    预解码单元,设置为对所述编码结果进行预解码,以得到分别聚合了0比特值和1比特值的比特串;
    解码单元,设置为对预解码后的比特串进行解码,以从所述分别聚合了0比特值和1比特值的比特串中还原出所述目标位图对应的原始比特串。
  18. 根据权利要求17所述的装置,其中,所述预解码单元包括:
    第一预解码模块,设置为对所述编码结果采用按位异或非解码算法进行解码。
  19. 根据权利要求18所述的装置,其中,所述预解码单元还包括:
    第二预解码模块,设置为在对所述编码结果采用采用按位异或非编码算法进行解码之前,对采用所述按位异或非编码算法解码前的编码采用混合行程解码算法进行解码。
  20. 根据权利要求18或19所述的装置,其中,所述第一预解码模块包括:
    第一预解码子模块,设置为保留所述编码结果对应的比特串的首位;
    第二预解码子模块,设置为从所述编码结果对应的比特串的次位开始,依次将当前比特值和与所述当前比特值相邻且位于所述当前比特值之前的比特值进行异或非解码运算,直到所述编码结果对应的比特串的次末位比特值和末位比特值异或非解码运算完成为止。
  21. 一种存储介质,所述存储介质包括存储的程序,其中,所述程序运行时执行上述权利要求1至6或7-12任一项中所述的方法。
PCT/CN2017/105868 2016-12-06 2017-10-12 信息位图的编码、解码方法、装置及存储介质 WO2018103452A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611111546.X 2016-12-06
CN201611111546.XA CN106815875B (zh) 2016-12-06 2016-12-06 信息位图的编码、解码方法及装置

Publications (1)

Publication Number Publication Date
WO2018103452A1 true WO2018103452A1 (zh) 2018-06-14

Family

ID=59106127

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/105868 WO2018103452A1 (zh) 2016-12-06 2017-10-12 信息位图的编码、解码方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN106815875B (zh)
WO (1) WO2018103452A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113906681A (zh) * 2019-09-12 2022-01-07 深圳市大疆创新科技有限公司 点云数据的编解码方法、系统和存储介质
CN116505952A (zh) * 2023-06-27 2023-07-28 厦门立林科技有限公司 红外码压缩方法、装置、智能设备及存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815875B (zh) * 2016-12-06 2020-02-07 腾讯科技(深圳)有限公司 信息位图的编码、解码方法及装置
CN109756311A (zh) * 2017-11-02 2019-05-14 普天信息技术有限公司 一种确定同步信号状态信息的方法及装置
CN108932738B (zh) * 2018-07-03 2022-08-16 南开大学 一种基于字典的位片索引压缩方法
CN109413072B (zh) * 2018-11-01 2021-05-07 北京望远传媒有限公司 一种传输数据的方法及设备
CN109725855B (zh) * 2018-12-29 2023-09-01 杭州宏杉科技股份有限公司 一种连跳复制的方法及装置
CN111680034B (zh) * 2020-05-07 2023-08-22 中国工业互联网研究院 一种最大比特携带的位图索引压缩方法
CN112269726A (zh) * 2020-10-22 2021-01-26 腾讯音乐娱乐科技(深圳)有限公司 一种数据处理方法及装置
CN114582301A (zh) * 2022-03-08 2022-06-03 康键信息技术(深圳)有限公司 一种信息显示方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1976459A (zh) * 2005-10-20 2007-06-06 财团法人工业技术研究院 影像压缩方法及记录格式
CN101076114A (zh) * 2007-06-15 2007-11-21 上海富瀚微电子有限公司 一种上下文自适应二进制算术编码器及其方法
CN103051341A (zh) * 2012-12-31 2013-04-17 华为技术有限公司 数据编码装置及方法、数据解码装置及方法
CN104038233A (zh) * 2014-05-09 2014-09-10 安庆师范学院 基于相邻位异或运算的测试数据压缩与解压缩方法
CN106815875A (zh) * 2016-12-06 2017-06-09 腾讯科技(深圳)有限公司 信息位图的编码、解码方法及装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104904199B (zh) * 2013-01-11 2017-06-06 寰发股份有限公司 深度查找表的编解码方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1976459A (zh) * 2005-10-20 2007-06-06 财团法人工业技术研究院 影像压缩方法及记录格式
CN101076114A (zh) * 2007-06-15 2007-11-21 上海富瀚微电子有限公司 一种上下文自适应二进制算术编码器及其方法
CN103051341A (zh) * 2012-12-31 2013-04-17 华为技术有限公司 数据编码装置及方法、数据解码装置及方法
CN104038233A (zh) * 2014-05-09 2014-09-10 安庆师范学院 基于相邻位异或运算的测试数据压缩与解压缩方法
CN106815875A (zh) * 2016-12-06 2017-06-09 腾讯科技(深圳)有限公司 信息位图的编码、解码方法及装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113906681A (zh) * 2019-09-12 2022-01-07 深圳市大疆创新科技有限公司 点云数据的编解码方法、系统和存储介质
CN113906681B (zh) * 2019-09-12 2022-10-18 深圳市大疆创新科技有限公司 点云数据的编解码方法、系统和存储介质
CN116505952A (zh) * 2023-06-27 2023-07-28 厦门立林科技有限公司 红外码压缩方法、装置、智能设备及存储介质
CN116505952B (zh) * 2023-06-27 2023-09-08 厦门立林科技有限公司 红外码压缩方法、装置、智能设备及存储介质

Also Published As

Publication number Publication date
CN106815875A (zh) 2017-06-09
CN106815875B (zh) 2020-02-07

Similar Documents

Publication Publication Date Title
WO2018103452A1 (zh) 信息位图的编码、解码方法、装置及存储介质
US20190007165A1 (en) Polar code encoding method and device
US9262986B2 (en) Reference frame management for screen content video coding using hash or checksum functions
US10003356B2 (en) Devices and methods of source-encoding and decoding of data
CN110545417B (zh) 一种桌面场景的图像编码、解码方法及相关装置
WO2018029542A2 (en) Method and apparatuse for coding and decoding polar codes
CN109644006A (zh) 编码数据和解码数据的装置及方法
US10075183B2 (en) Compression and encryption of a file
US10230391B2 (en) Compression and/or encryption of a file
CN103178968A (zh) 基于哈夫曼压缩的数据传输门限方案的加密方法
CN115811381A (zh) 网络通信方法、网络通信装置、电子设备及存储介质
CN113922947B (zh) 一种基于加权概率模型的自适应对称编码方法以及系统
CN110545431B (zh) 视频解码方法及装置、视频编码方法及装置
CN110545435B (zh) 一种基于概率模型的桌面像素编码方法、装置及存储介质
US10505713B2 (en) Compression and/or encryption of a file
CN114827289B (zh) 一种通信压缩方法、系统、电子装置和存储介质
CN109788160A (zh) 图像传输方法、装置、电子设备及存储介质
CN110855990B (zh) 图像编码、解码方法、计算机设备和图像处理系统
WO2024051299A1 (zh) 一种编解码方法及装置
CN111447453B (zh) 图像处理方法及装置
CN113784123B (zh) 视频编码方法和装置、存储介质及电子设备
CN112839226B (zh) 一种图像编码、解码方法、相关装置及存储介质
CN110995274B (zh) 一种解压缩方法及装置
WO2020078230A1 (zh) 图像块的划分方法和装置
CN204721509U (zh) Motion JPEG编码系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17877991

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17877991

Country of ref document: EP

Kind code of ref document: A1