The invention discloses an encoding and decoding method and apparatus. In the encoding apparatus, a to-be-encoded information sequence is multiplied with a reformed
Hamming code generation matrix obtained by inserting columns of corresponding check bits in the original
Hamming code generation matrix in the columns of corresponding
Hamming code information bits in the original Hamming
code generation matrix to obtain a Hamming code encoding sequence, and the check bits in the Hamming code encoding sequence are dispersed in the Hamming code information bits, and
polar code encoding is performedbased on a reformed
polar code sequence. During decoding, layer-by-layer decoding is performed based on a serial decoding
algorithm, once the bit decoded in each layer is the
polar code information bit and is the check bit, Hamming code check is performed, the decoding is stopped in the case of check failure, thereby terminating the decoding in advance, and providing the error detection efficiencyof the decoding.