The embodiment of the invention discloses
a DNA coding method and device with biological constraint. In the method, a progressive staged training strategy is adopted, in the first stage, training is carried out with the purpose of minimizing
distortion of an original information source and a reconstructed information source, and through
collaborative design including centralized coding, a symmetric quantization threshold value and a
symmetric network structure, a compressed sequence naturally meets the ideal
GC content when represented as an ATCG
base sequence. In the second stage, the
loss function of the biological constraint is added, so that the
base sequence meets the biological base arrangement characteristic while
low distortion is kept. According to the method, the floating-point number sequence is naturally represented as the biological
base sequence through the structural design, the base distribution is uniform, the
distortion performance is good, the
DNA data
storage efficiency is improved, and the error rate is reduced.