Patent attributes
Embodiments of this application provide an encoding and decoding method and device in wireless communications between network devices and user equipment. The encoding method includes: obtaining, by a transmit end, a post-polar-encoding data length corresponding to to-be-encoded data; segmenting, by the transmit end, the to-be-encoded data into at least one code block based on the post-encoding data length and a preset threshold; and performing, by the transmit end, polar encoding on each code block, and transmitting encoded data to a receive end. The embodiments of this application avoid a data transmission performance loss caused by an excessive quantity of segments.