Patent ID: 8432302

Claim:
A convolutional line coding method, comprising: constructing a sequence set, wherein a length of each sequence in the sequence set is n bits, and wherein n is a natural number greater than 1; determining an operation difference value for each sequence in the sequence set, wherein the operation difference value for each sequence in the set comprises a difference between a number of bits in the sequence having values of 0 and number of bits in the sequence having values of 1; identifying balanced sequences in the sequence set, wherein the operation difference value for each of the balanced sequences is equal to zero; obtaining for each of the balanced sequences source data of n−1 bits corresponding to the balanced sequence; identifying unbalanced sequences in the sequence set, wherein the operation difference value for each of the unbalanced sequences is not equal to zero; performing a Hamming distance detection for each of the unbalanced sequences in the sequence set to obtain source data of n−1 bits corresponding to each of the unbalanced sequences, wherein the Hamming distance is calculated between each of the unbalanced sequences and multiple sequences of n−1 bits, and wherein the source data of n−1 bits is selected for each of the unbalanced sequences from the multiple sequences of n−1 bits based at least in part on the source data of n−1 bits and the unbalanced sequence having a minimum Hamming distance; sorting the balanced sequences and the unbalanced sequences according to the operation difference values; generating a code table, wherein the code table comprises a number of entries, wherein each entry identifies one of the sequences of n bits and its corresponding source of n−1 bits; and obtaining a coding result comprising one of the sequences of n bits according to a mapping relation in the code table.