The invention discloses an end-to-end
DNA data storage coding method and
system based on multiple constraint loss, and relates to the technical field of
DNA storage. A complementary matrix
convolution detection mechanism is designed in a coding stage, a hairpin structure is found through the complementary matrix
convolution detection mechanism, a micronizable
loss function is constructed, and a micronizable hairpin structure constraint
loss function is realized. An interpretable error predictor based on Transform is trained through real
sequencing data, a penalty
loss function is constructed by means of an attention mechanism error-prone motif
mask matrix to achieve error-prone motif suppression, and then
GC content loss and homopolymer loss are fused to form a multi-constraint loss function. According to the method, an end-to-end architecture with a Transform auto-
encoder as a main body is constructed, mapping of image data and
a DNA sequence is realized through differentiable
arithmetic coding,
data reconstruction is completed in combination with
noise injection and reverse decoding, and in a training stage, a deep Q network is adopted to carry out adaptive joint adjustment on weights of a multi-constraint loss function and
mean square error reconstruction loss, so that
data reconstruction is completed. And end-to-end optimization of
model parameters is realized.