# US 12,010,352 B2 · Coding method and related device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,010,352 B2
- Document ID: US12010352B2
- Status: Granted
- Kind: B2
- Application number: 17/584,726
- Filed: 2022-01-26
- Published: 2022-07-14
- Granted: 2024-06-11
- Earliest claimed: 2019-08-15
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Ling Liu; Bin Li; Jiaqi Gu; Hui Shen
- Web page: https://patentgrep.com/patent/US12010352B2

## CPC

- H04N 19/93: Run-length coding
- G06T 9/00: Image coding (bandwidth or redundancy reduction for static pictures H04N1/41; coding or decoding of static colour picture signals H04N1/64; methods or arrangements for coding, decoding, compressing or decompressing digital video signals H04N19/00)
- H03M 7/30: Compression (speech analysis-synthesis for redundancy reduction G10L19/00; for image communication H04N); Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M 13/13: Linear codes
- H04N 19/184: the unit being bits, e.g. of the compressed video stream
- H04N 19/91: Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

The present disclosure provides example coding method, apparatus, and computer-readable storage medium. One example method includes sorting a plurality of pieces of run-length encoding (RLE) data based on their distribution probabilities. The plurality of pieces of sorted RLE data are mapped onto a plurality of pieces of reassembled data. The plurality of pieces of reassembled data are expanded into a plurality of pieces of binary data. A first matrix is generated based on the plurality of pieces of binary data. A code sequence is determined by processing a source signal, where the code sequence comprises a first set and a second set. A first vector is decoded to output a third set, where the third set includes one or more bits reserved after processing the source signal and one or more locations at which a decoding error occurs in one or more bits discarded after processing the source signal.

## Claims

### Claim 1

A coding method, wherein the method comprises:
obtaining a plurality of pieces of run-length encoding (RLE) data and a plurality of distribution probabilities corresponding to the plurality of pieces of RLE data;
sorting the plurality of pieces of RLE data based on the plurality of distribution probabilities;
mapping the plurality of pieces of sorted RLE data onto a plurality of pieces of reassembled data;
expanding the plurality of pieces of reassembled data into a plurality of pieces of binary data;
generating a first matrix based on the plurality of pieces of binary data;
calculating an occurrence probability of a bit 1 in each column in the first matrix based on the plurality of distribution probabilities;
determining, based on the occurrence probability, a code sequence by processing a source signal, wherein the code sequence comprises a first set and a second set, the first set comprises one or more bits reserved after processing the source signal, and the second set comprises one or more bits discarded after processing the source signal; and
decoding a first vector to output a third set, wherein the first vector is an all-0 sequence, or a vector obtained by multiplying a vector corresponding to the first set and a polarization matrix, and the third set comprises the one or more bits reserved after processing the source signal and one or more locations at which a decoding error occurs in the one or more bits discarded after processing the source signal.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the first set comprises one or more bits with each bit having a polarized entropy approximating to 1 in the code sequence, and the second set comprises one or more bits with each bit having a polarized entropy approximating to 0 in the code sequence.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the polarized entropy is determined based on the occurrence probability.

### Claim 4 (depends on 1)

The method according to claim 1, wherein decoding the first vector to output the third set comprises:
decoding based on a fixed bit set by using a polar decoder, to obtain an estimated value of the bit discarded after processing the source signal, wherein YN=0N, UF=US, YN is a received signal of the polar decoder, UF is the fixed bit set, US is the first set, and N is an integer greater than or equal to 1.

### Claim 5 (depends on 1)

The method according to claim 1, wherein decoding the first vector to output the third set comprises:
decoding based on a fixed bit set by using a polar decoder, to obtain an estimated value of the bit discarded after processing the source signal, wherein YN=[UF, 0I]*GN, UF=0F, YN is a received signal of the polar decoder, UF is the fixed bit set, US is the polarization matrix, and N is an integer greater than or equal to 1.

### Claim 6 (depends on 4)

The method according to claim 4, wherein decoding the first vector to output the third set comprises:
determining that the estimated value is different from an original value of the bit discarded after processing the source signal;
flipping the estimated value; and
recording the one or more locations at which a decoding error occurs in the one or more bits discarded after processing the source signal.

### Claim 7 (depends on 1)

The method according to claim 1, wherein sorting the plurality of pieces of RLE data based on the plurality of distribution probabilities comprises:
sorting the plurality of pieces of RLE data in a descending order of the plurality of distribution probabilities.

### Claim 8 (depends on 1)

The method according to claim 1, wherein calculating the occurrence probability of a bit 1 in each column in the first matrix based on the plurality of distribution probabilities comprises:
performing layering based on each column of the first matrix to obtain a plurality of bit planes, and calculating the occurrence probability of a bit 1 in each bit plane.

### Claim 9

A coding apparatus, wherein the apparatus comprises:
at least one processor; and
one or more non-transitory memories, coupled to the at least one processor and storing computer-readable instructions that when executed by the at least one processor, cause the coding apparatus to perform operations comprising:
obtaining a plurality of pieces of run-length encoding (RLE) data and a plurality of distribution probabilities corresponding to the plurality of pieces of RLE data;
sorting the plurality of pieces of RLE data based on the plurality of distribution probabilities;
mapping the plurality of pieces of sorted RLE data onto a plurality of pieces of reassembled data;
expanding the plurality of pieces of reassembled data into a plurality of pieces of binary data;
generating a first matrix based on the plurality of pieces of binary data;
calculating an occurrence probability of a bit 1 in each column in the first matrix based on the plurality of distribution probabilities;
determining, based on the occurrence probability, a code sequence by processing a source signal, wherein the code sequence comprises a first set and a second set, the first set comprises one or more bits reserved after processing the source signal, and the second set comprises one or more bits discarded after processing the source signal; and
decoding a first vector to output a third set, wherein the first vector is an all-0 sequence, or is a vector obtained by multiplying a vector corresponding to the first set and a polarization matrix, and the third set comprises the one or more bits reserved after processing the source signal and one or more locations at which a decoding error occurs in the one or more bits discarded after processing the source signal.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein the first set comprises one or more bits with each bit having a polarized entropy approximating to 1 in the code sequence, and the second set comprises one or more bits with each bit having a polarized entropy approximating to 0 in the code sequence.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the polarized entropy is determined based on the occurrence probability.

### Claim 12 (depends on 9)

The apparatus according to claim 9, wherein decoding the first vector to output the third set comprises:
decoding based on a fixed bit set by using a polar decoder, to obtain an estimated value of the bit discarded after processing the source signal, wherein YN=0N, UF=US, YN is a received signal of the polar decoder, UF is the fixed bit set, US is the first set, and N is an integer greater than or equal to 1.

### Claim 13 (depends on 9)

The apparatus according to claim 9, wherein decoding the first vector to output the third set comprises:
decoding based on a fixed bit set by using a polar decoder, to obtain an estimated value of the bit discarded after processing the source signal, wherein YN=[UF, 0I]*GN, UF=0F, YN is a received signal of the polar decoder, UF is the fixed bit set, GN is the polarization matrix, and N is an integer greater than or equal to 1.

### Claim 14 (depends on 12)

The apparatus according to claim 12, wherein decoding the first vector to output the third set comprises: determining that the estimated value is different from an original value of the bit discarded after processing the source signal, flipping the estimated value, and recording the one or more locations at which a decoding error occurs in the one or more bits discarded after processing the source signal.

### Claim 15 (depends on 9)

The apparatus according to claim 9, wherein sorting the plurality of pieces of RLE data based on the plurality of distribution probabilities comprises:
sorting the plurality of pieces of RLE data in a descending order of the plurality of distribution probabilities.

### Claim 16 (depends on 9)

The apparatus according to claim 9, wherein calculating the occurrence probability of a bit 1 in each column in the first matrix based on the plurality of distribution probabilities comprises:
performing layering based on each column of the first matrix to obtain a plurality of bit planes, and calculate the occurrence probability of a bit 1 in each bit plane.

### Claim 17

A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores instructions that when executed on a computer, cause the computer to perform operations comprising:
obtaining a plurality of pieces of run-length encoding (RLE) data and a plurality of distribution probabilities corresponding to the plurality of pieces of RLE data;
sorting the plurality of pieces of RLE data based on the plurality of distribution probabilities;
mapping the plurality of pieces of sorted RLE data onto a plurality of pieces of reassembled data;
expanding the plurality of pieces of reassembled data into a plurality of pieces of binary data;
generating a first matrix based on the plurality of pieces of binary data;
calculating an occurrence probability of a bit 1 in each column in the first matrix based on the plurality of distribution probabilities;
determining, based on the occurrence probability, a code sequence by processing a source signal, wherein the code sequence comprises a first set and a second set, the first set is one or more bits reserved after processing the source signal, and the second set is one or more bits discarded after processing the source signal; and
decoding a first vector to output a third set, wherein the first vector is an all-0 sequence, or is a vector obtained by multiplying a vector corresponding to the first set and a polarization matrix, and the third set comprises the one or more bits reserved after processing the source signal and one or more locations at which a decoding error occurs in the one or more bits discarded after processing the source signal.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium according to claim 17, wherein the first set comprises one or more bits with each bit having a polarized entropy approximating to 1 in the code sequence, and the second set comprises one or more bits with each bit having a polarized entropy approximating to 0 in the code sequence.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium according to claim 18, wherein the polarized entropy is determined based on the occurrence probability.

### Claim 20 (depends on 17)

The non-transitory computer-readable storage medium according to claim 17, wherein decoding the first vector to output the third set comprises:
decoding based on a fixed bit set by using a polar decoder, to obtain an estimated value of the bit discarded after processing the source signal, wherein YN=0N, UF=US, YN is a received signal of the polar decoder, UF is the fixed bit set, US is the first set, and N is an integer greater than or equal to 1.
