Coding and decoding method and system based on DNA storage, electronic equipment and medium

By compressing and grouping the original data, detecting the data type and performing corresponding encoding operations, a base sequence is generated, and the target DNA sequence is obtained through synthesis. The dual-rule encoding and watermarking technology are adopted to solve the problems of low encoding efficiency and poor DNA sequence stability in the existing DNA storage encoding methods, and efficient and stable DNA storage is achieved.

CN119920282APending Publication Date: 2025-05-02SOUTH CHINA NORMAL UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411878654.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The existing DNA storage encoding methods have low coding efficiency, and there are problems such as imbalance in GC content and excessively long homopolymer length, resulting in low synthesis stability of DNA sequences.

Method used

By compressing and grouping the original data, detecting the data type and performing corresponding encoding operations, a base sequence is generated, and the target DNA sequence is obtained through synthesis. Double-rule encoding and watermarking technology are used to limit GC content and homopolymer length to improve the stability of DNA sequence.

Benefits of technology

It improves the coding efficiency and stability of DNA sequence synthesis, meets the biochemical constraints of DNA sequences, and realizes the reliability of long-term data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119920282A_ABST
    Figure CN119920282A_ABST
Patent Text Reader

Abstract

The invention discloses a coding and decoding method and system based on DNA storage, electronic equipment and a storage medium. According to the scheme, original data is compressed into a binary sequence; grouping the binary sequence to obtain a plurality of groups of first subsequences; detecting the first subsequences, adding watermarks to the first subsequences meeting a preset type, and detecting first data types of all the first subsequences; executing corresponding coding operation on the first sub-sequence for the first data type to obtain a corresponding base sequence; synthesizing according to the obtained base sequence to obtain a target DNA sequence; original data can be obtained by decoding the target DNA sequence; the sequences are grouped and subjected to double-rule coding, so that the coding efficiency is improved, the GC content and the homopolymer length are limited, and the stability of DNA sequence synthesis is improved; the embodiment of the invention can be widely applied to the technical field of DNA storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of DNA storage technology, and in particular to a coding method, system, electronic equipment and storage medium based on DNA storage. Background Art

[0002] With the development of the information age, digital data is growing exponentially. Existing storage media are difficult to meet the needs of data storage. Traditional storage media have a short storage time and are subject to physical properties and environmental factors. The stability of data storage is low and is not suitable for long-term preservation. Deoxyribonucleic acid (DNA), as a natural information storage medium, has the characteristics of high storage density, long storage time, low loss rate, strong anti-interference ability, and high stability. It can be used for digital data storage. DNA storage requires encoding of data information and information storage based on encoded synthetic DNA sequences. Existing DNA storage encoding methods have low encoding efficiency and problems such as unbalanced GC content and excessively long homopolymer length, which leads to low synthetic stability of DNA sequences. Summary of the invention

[0003] The main purpose of the embodiments of the present invention is to provide a coding method, system, electronic device and storage medium based on DNA storage, which can improve the coding efficiency and improve the stability of DNA sequence synthesis.

[0004] To achieve the above object, an embodiment of the present invention provides a DNA storage-based encoding and decoding method, which is applied to an encoding end, and the method includes:

[0005] Compressing the original data to obtain a binary sequence; grouping the binary sequence according to a first preset length to obtain a plurality of groups of first subsequences;

[0006] Performing a first detection on the first subsequence to determine the first data type;

[0007] Perform a corresponding encoding operation on the first subsequence according to the first bit data type to obtain a base sequence;

[0008] The target DNA sequence is obtained by synthesis according to the base sequence.

[0009] In some embodiments, performing a corresponding encoding operation on the first subsequence according to the first bit data type to obtain a base sequence specifically includes:

[0010] If the first data type is the first type, performing a first operation on a second subsequence corresponding to the first data type to obtain a base sequence;

[0011] If the first data type is the second type, a second operation is performed on a second subsequence corresponding to the first data type to obtain the base sequence.

[0012] In some embodiments, the method further comprises:

[0013] Performing a second detection on the first subsequence to determine a first data group type;

[0014] If the first data group type is a preset type, a watermark is added to the first subsequence to obtain a first subsequence with a watermark.

[0015] In some embodiments, adding a watermark to the first subsequence specifically includes:

[0016] Extracting data from the first subsequence according to a second preset length to obtain a first data group;

[0017] The first data group is XORed with a preset data group to obtain a second data group, and the first subsequence is updated according to the second data group to obtain the first subsequence with the watermark added.

[0018] In some embodiments, the method further comprises:

[0019] Determine a sequence length corresponding to the binary sequence, and compare the sequence length with the first preset length;

[0020] If the sequence length is an integer multiple of the first preset length, grouping the binary sequence according to the first preset length to obtain a plurality of groups of first subsequences;

[0021] Otherwise, characters are supplemented at the end position of the binary sequence according to the preset characters until the length of the sequence is an integer multiple of the first preset length.

[0022] To achieve the above object, another aspect of an embodiment of the present invention provides a DNA storage-based encoding and decoding method, which is applied to a decoding end, and the method includes:

[0023] Grouping the target DNA sequence according to a third preset length to obtain a plurality of base fragments, and matching the plurality of base fragments with a preset code table respectively;

[0024] If the match is successful, convert the base fragment into a binary sequence according to the successfully matched coding pattern in the preset code table; otherwise, perform a third operation on the base fragment to obtain the binary sequence;

[0025] The original data is obtained by performing an XOR calculation on the watermark sequence and the binary sequence; wherein the watermark sequence includes watermark position information.

[0026] In some embodiments, performing a third operation on the base fragment to obtain the binary sequence specifically includes:

[0027] Performing distance calculation between the base fragment and the preset code table to obtain a Hamming distance set;

[0028] A target Hamming distance is determined according to the Hamming distance set; and the base fragments are converted according to the coding pattern corresponding to the target Hamming distance to obtain the binary sequence.

[0029] To achieve the above object, another aspect of the embodiment of the present invention provides a coding system based on DNA storage, the system comprising:

[0030] An encoding module, used to implement any of the above methods applied to the encoding end;

[0031] The decoding module is used to implement any one of the above methods applied to the decoding end.

[0032] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned method when executing the computer program.

[0033] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0034] The implementation of the embodiments of the present invention includes the following beneficial effects: the embodiments provide a coding method, system, electronic device and storage medium based on DNA storage, which compresses original data to obtain a binary sequence; groups the binary sequence according to a first preset length to obtain a plurality of groups of first subsequences; detects the data type of the first bit of all first subsequences; determines a corresponding coding operation according to the data type of the first bit, and performs the corresponding coding operation on the first subsequence to obtain a base sequence; synthesizes according to the obtained base sequence to obtain a target DNA sequence; decodes the target DNA sequence to obtain the original data; groups the binary sequence and encodes it, and adopts double rule encoding according to the first bit to improve the encoding efficiency; adopts double rule encoding to limit the content of GC bases to a certain proportion, and limits the length of homopolymers through group encoding, satisfies the biochemical constraints of the DNA sequence, and improves the stability of the DNA sequence. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a schematic diagram of the steps of a coding method based on DNA storage provided by an embodiment of the present invention;

[0036] Figure 2 This is a schematic flow chart of the steps of padding a binary sequence in a DNA storage-based encoding and decoding method provided in an embodiment of the present invention;

[0037] Figure 3 It is a schematic flow chart of the steps of determining whether to add a watermark in a coding method based on DNA storage provided by an embodiment of the present invention;

[0038] Figure 4 It is a schematic flow chart of the steps of adding a watermark in a coding method based on DNA storage provided by an embodiment of the present invention;

[0039] Figure 5 It is a schematic flow chart of the steps of obtaining a base sequence in a coding method based on DNA storage provided by an embodiment of the present invention;

[0040] Figure 6 It is a schematic flow chart of the steps of decoding a DNA sequence in a coding method based on DNA storage provided by an embodiment of the present invention;

[0041] Figure 7 It is another schematic flow chart of steps for decoding a DNA sequence in a DNA storage-based encoding and decoding method provided in an embodiment of the present invention;

[0042] Figure 8 It is a schematic diagram of a step flow of a specific embodiment provided by an embodiment of the present invention;

[0043] Fig. 9 is a base sequence structure diagram obtained in a specific embodiment provided in an embodiment of the present invention;

[0044] Fig.10 It is a schematic diagram of an error probability-data recovery rate diagram in a specific embodiment provided by an embodiment of the present invention;

[0045] Fig.11 It is a schematic diagram of a replacement error probability-data recovery rate diagram in a specific embodiment provided by an embodiment of the present invention;

[0046] Fig.12 It is a structural block diagram of a DNA storage-based encoding and decoding system provided by an embodiment of the present invention;

[0047] Fig.13 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only provided for the convenience of explanation and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0049] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0050] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.

[0051] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present invention have the same meanings as those commonly understood by those skilled in the art of the present invention. The terms used in the embodiments of the present invention are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0052] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.

[0053] GC balance constraint: In DNA molecules, there are four bases, namely A-adenine, T-thymine, C-cytosine and G-guanine. Due to the double-stranded structure of DNA, adenine and thymine are paired with two hydrogen bonds, and cytosine and guanine are paired with three hydrogen bonds. GC content refers to the ratio of the number of guanine and cytosine in the DNA sequence to the total number of bases. Too high or too low GC content will cause instability or errors in the reading and writing of DNA sequences, affecting the accuracy of the encoded data.

[0054] Homopolymer length constraint (Homopolymer), the homopolymer length refers to the length of the continuously repeated bases in the DNA sequence. A homopolymer refers to a DNA fragment composed of repeated bases of the same type. A homopolymer that is too long will affect the stability of the DNA data. Existing DNA sequencing technology is difficult to accurately distinguish the number of consecutive identical bases, resulting in insertion, deletion or duplication errors; therefore, it is necessary to impose certain constraints on the homopolymer length during encoding.

[0055] Figure 1 The embodiment of the present invention provides an optional flow chart of a coding method based on DNA storage. Figure 1 The method may include but is not limited to steps S101 to S104.

[0056] Step S101, compressing the original data to obtain a binary sequence; grouping the binary sequence according to a first preset length to obtain a plurality of groups of first subsequences;

[0057] Step S102, performing a second detection on the first subsequence to determine the first data type;

[0058] Step S103, performing a corresponding encoding operation on the first subsequence according to the first data type to obtain a base sequence;

[0059] Step S104, synthesizing according to the base sequence to obtain the target DNA sequence.

[0060] In the steps S101 to S104 shown in the embodiment of the present application, the original data to be stored is compressed by a compression algorithm and converted into a binary sequence; then the converted binary sequence is grouped into a plurality of sequences of equal length. When the binary sequence is subsequently encoded, multiple sequence groups can be encoded at the same time, thereby improving the encoding efficiency; at the same time, the binary sequence is grouped so that each sequence does not affect each other during encoding, thereby improving the data recovery rate of subsequent decoding; in some embodiments, the plurality of groups of binary sequences obtained by grouping can be traversed, the first three binary numbers in each binary sequence group are detected, and when continuous repetitions occur, the binary sequence is grouped. A watermark is added to the position of the complex data, and the watermark position is recorded by generating a watermark sequence or by an array so as to be used for subsequent decoding and data recovery; after the grouped binary sequence is detected and the watermark is added, the first binary digit of each grouped binary sequence is detected, and different encoding rules are used for encoding according to different binary digits, and the binary sequence is mapped into a base sequence; a DNA sequence is synthesized according to the mapped base sequence to obtain a DNA sequence storing the original data; the synthesized DNA sequence is grouped to obtain a number of base fragments of equal length, and the base fragments are decoded and analyzed to obtain the original data stored in the DNA sequence.

[0061] In step S101 of some embodiments, Huffman coding may be used to compress the original data and convert it into a binary sequence. The original data may also be compressed by other coding methods, such as dictionary coding, but is not limited thereto.

[0062] See also Figure 2 In some embodiments, step S101 may include but is not limited to steps S201 to S203:

[0063] Step S201, determining a sequence length corresponding to a binary sequence, and comparing the sequence length with a first preset length;

[0064] Step S202, if the sequence length is an integer multiple of the first preset length, grouping the binary sequence according to the first preset length to obtain a plurality of groups of first subsequences;

[0065] Step S203: otherwise, characters are supplemented at the end position of the binary sequence according to the preset characters until the sequence length is an integer multiple of the first preset length.

[0066] In step S201 of some embodiments, before compressing and converting the binary sequence obtained, it is determined whether the binary sequence can be evenly grouped into binary groups of equal length according to the length of the binary sequence, and the binary sequence that cannot be evenly grouped is processed to improve the efficiency of binary sequence encoding.

[0067] In step S202 of some embodiments, if the length of the binary sequence obtained by compression conversion is an integer multiple of the binary grouping length of a preset grouping, the binary sequence obtained by compression conversion can be directly grouped and subsequent encoding operations can be performed.

[0068] In step S203 of some embodiments, if the length of the binary sequence obtained by the compression conversion is not an integer multiple of the binary group length of the preset group, the end position of the binary sequence is padded using a binary string, and it is detected whether the binary length after the padded operation satisfies the integer multiple of the binary group length of the preset group; the padding-detection operation is repeated until the length of the binary sequence obtained by the compression conversion is an integer multiple of the binary group length of the preset group, and the binary sequence padded for the last time is evenly grouped; in this embodiment, the binary sequence is grouped into binary groups of 7 bits, and the end position of the binary sequence is padded with zeros to update the length of the binary sequence.

[0069] See also Figure 3 In some embodiments, step S102 may include but is not limited to steps S301 to S302:

[0070] Step S301, performing a second detection on the first subsequence to determine the type of the first data group;

[0071] Step S302: if the first data group type is a preset type, a watermark is added to the first subsequence to obtain a first subsequence with a watermark added.

[0072] In step S301 of some embodiments, since the binary sequence is grouped, some binary groups may start with continuously repeated binary numbers, which may cause errors in subsequent encoding and affect the subsequent DNA sequence synthesis; therefore, it is necessary to add a watermark to the continuously repeated starting segment, update the continuously repeated binary numbers through the watermark, and retain the information in the original binary sequence.

[0073] In step S302 of some embodiments, the first three digits in the binary group are detected to determine whether there are consecutively repeated binary numbers, such as 000 or 111; if there are consecutively repeated binary numbers, a watermark is added to the consecutively repeated binary numbers.

[0074] See also Figure 4 In some embodiments, step S302 may include but is not limited to steps S401 to S402:

[0075] Step S401, extracting data from a first subsequence according to a second preset length to obtain a first data group;

[0076] Step S402: perform an XOR calculation on the first data group and the preset data group to obtain a second data group, and update the first subsequence according to the second data group to obtain a first subsequence with a watermark added.

[0077] In step S401 of some embodiments, three consecutive repeated binary numbers appear in the starting segment of the binary group, which will cause anomalies in subsequent encoding and lead to the loss of data in this part. In order to retain data as much as possible, a watermark is added to the first three binary numbers of the binary starting segment to eliminate the consecutive repeated binary numbers.

[0078] In step S402 of some embodiments, an XOR calculation is performed on the continuously repeated binary numbers in the starting segment of the binary group, and the continuously repeated binary numbers in the starting segment are updated to obtain an updated binary sequence; in this embodiment, the first three binary numbers of the binary group are detected, and the middle bit of the continuously repeated binary data is XORed with 1, such as 000 or 111, and 010 or 101 is obtained by calculation.

[0079] See also Figure 5 In some embodiments, step S103 may include but is not limited to steps S501 to S502:

[0080] Step S501, if the first data type is the first type, perform a first operation on the second subsequence corresponding to the first data type to obtain a base sequence;

[0081] Step S502: If the first data type is the second type, a second operation is performed on a second subsequence corresponding to the first data type to obtain a base sequence.

[0082] In step S501 of some embodiments, the first digit of the group or the binary group after adding the watermark is detected, and the remaining binary digits are encoded according to the type of the first digit; if the first digit is 0, the base pair combination corresponding to the remaining binary digits of the current binary group is determined based on the zero rule encoding table. In this embodiment, the zero rule encoding table is as follows:

[0083] Table 1

[0084]

[0085] The current binary group is mapped according to the base pair combination determined by the binary group to obtain the base fragments corresponding to the current binary group, and the mapped base fragments are spliced ​​according to the position of the binary group in the original binary sequence to obtain the base sequence corresponding to the binary sequence; DNA synthesis is performed according to the base sequence to obtain the target DNA sequence.

[0086] In step S502 of some embodiments, dual-rule encoding is adopted according to the first binary number of the binary group. In the encoding process, the first binary number used to determine the encoding rule does not participate in the encoding, thereby reducing the amount of encoded data and improving the encoding efficiency. In this embodiment, when the first binary number of the binary group is 1, the binary group is encoded with one rule, and the corresponding encoding rule table is shown as follows:

[0087] Table 2

[0088]

[0089] The base combination corresponding to each binary group is determined through the encoding rule table, and the binary group is mapped to obtain the corresponding base sequence; DNA synthesis is performed according to the obtained base sequence to obtain the corresponding DNA sequence; according to the position of each binary group in the binary sequence, the synthesized DNA sequence is spliced ​​to obtain the target DNA sequence storing the original data.

[0090] Figure 6 The embodiment of the present invention provides another optional flow chart of a coding method based on DNA storage. Figure 6 The method may include but is not limited to steps S601 to S603:

[0091] Step S601, grouping the target DNA sequence according to the third preset length to obtain a plurality of base fragments, and matching the plurality of base fragments with a preset code table respectively;

[0092] Step S602, if the match is successful, convert the base segment into a binary sequence according to the successfully matched coding pattern in the preset code table; otherwise, perform a third operation on the base segment to obtain a binary sequence;

[0093] Step S603, performing an XOR calculation on the watermark sequence and the binary sequence to obtain original data; wherein the watermark sequence includes watermark position information.

[0094] In step S601 of some embodiments, after the target DNA sequence is obtained by compressing, grouping, encoding and synthesizing the original data, the target DNA sequence can be placed in a vector for storage; and the target DNA sequence is extracted from the vector, and the target DNA sequence is grouped and decoded to restore the original data; in this embodiment, the target DNA sequence is grouped to obtain a number of base sequences of equal length, each base sequence includes four bases; reverse mapping is performed according to the base sequence and the encoding rule table to obtain the binary grouping corresponding to each base sequence to achieve decoding.

[0095] In step S602 of some embodiments, reverse mapping is performed according to the coding rule table and each base sequence, and each base sequence is decoded into a corresponding binary group. In this embodiment, the base sequence is matched with the coding pattern in the coding rule table, such as "GACT", "CGAA", etc. The first binary number of the binary group after reverse mapping is determined according to the first base bit type of the successfully matched coding pattern or the grouped base sequence, and then the corresponding binary group is obtained according to the binary number of the binary group corresponding to the successfully matched coding pattern. If the current base sequence cannot be successfully matched with the coding rule table, it is necessary to perform preset processing on the current base sequence to decode the optimal binary group data.

[0096] In step S603 of some embodiments, after each base sequence is interpreted into a corresponding binary group, the base sequences are spliced ​​according to their positions in the target DNA sequence to obtain a binary sequence corresponding to the target DNA sequence, thereby decoding the target DNA sequence; based on the watermark sequence or watermark position array obtained when the binary sequence is encoded, an XOR calculation is performed on the decoded binary sequence to obtain a binary sequence obtained by compressing the original data during the encoding process; the obtained binary sequence is decompressed to obtain the stored original data.

[0097] See also Figure 7In some embodiments, step S602 may include but is not limited to steps S701 to S702:

[0098] Step S701, performing distance calculation based on the base fragment and the preset code table to obtain a Hamming distance set;

[0099] Step S702, determining a target Hamming distance according to the Hamming distance set; converting the base fragments according to the coding pattern corresponding to the target Hamming distance to obtain a binary sequence.

[0100] In step S701 of some embodiments, the target DNA sequence extracted from the vector is grouped to obtain a number of base sequences of equal length, and each base sequence is matched with the encoding rule table for decoding; if the base sequence cannot be successfully matched with the encoding rule table, the Hamming distance of the current base sequence is calculated, and the Hamming distance of each encoding pattern in the encoding rule table is calculated, and the current base sequence is decoded according to the Hamming distance.

[0101] In step S702 of some embodiments, the minimum Hamming distance between the coding pattern and the current base sequence is determined based on the calculated Hamming distance, and the corresponding coding pattern is used as the target coding pattern of the current base sequence; the first binary number of the binary group is determined according to the type of the first base position of the current base sequence; illustratively, the first base position is "A" or "T", and the first binary number is "0"; the first base position is "C" or "G", and the first binary number is "1"; and then the corresponding binary group is determined according to the binary number corresponding to the target coding pattern.

[0102] The following is a detailed description and explanation of the solution of the embodiment of the present invention in conjunction with a specific application example:

[0103] See also Figure 8In a specific embodiment, the encoding and decoding method based on DNA storage proposed in the present invention is applied; the text, image or video data to be encoded and stored is compressed by Huffman coding, and the original data to be stored is converted into a binary sequence; then the converted binary sequence is preliminarily divided into 200-bit units, and a 3-byte RS code is added to each group of divided binary sequences to obtain a number of groups of binary sequences with a length of 224 bits, so as to limit the length of the synthesized DNA single chain and reduce the error during DNA synthesis; RS encoding is performed on the preliminarily divided binary sequence to improve the error correction capability during subsequent DNA sequence synthesis and decoding; then, the RS-encoded binary sequence is secondarily divided into 7-bit units to obtain The stem group is used for encoding binary groups; before encoding the binary groups to obtain the base sequence, the first three binary digits of each binary group are detected, watermarks are added to the continuously repeated binary groups, and the positions of the added watermarks are recorded to generate the watermark sequence; then, double-rule encoding is performed on each binary group respectively, and the zero rule encoding or one rule encoding is determined according to the first binary digit of each binary group, and the encoded base sequence is determined according to the remaining six binary digits and the corresponding encoding rule table, and its length is 128nt; primers are added to the head and tail of the encoded base sequence to facilitate subsequent amplification and detection; then, indexes are inserted between the primers and the bases to mark and distinguish different DNA fragments; the following is obtained by polymerizing the base pairs: Fig. 9 The DNA sequence shown in the figure; injecting the synthesized DNA sequence into the carrier can realize long-term storage, and the DNA sequence storing the original data can also be read from the carrier; the read DNA sequence is divided into 4nt units to obtain several base sequences; the obtained several base sequences are matched according to the encoding rule table, and the corresponding base sequences are reverse mapped according to the base pattern of the successfully matched rule table to decode the corresponding binary grouped data; for the undefined base fragments in the encoding rule table, the minimum Hamming distance is used to determine the corresponding base pattern, and the undefined base fragments are reverse mapped according to the determined base pattern to decode the corresponding binary grouped data; the decoded binary grouped data are processed according to the watermark sequence recorded during encoding to obtain the original binary grouped data, and the original binary grouped data are synthesized and Huffman decoded to restore the original text, image or video data; through multiple experiments, the performance data of different encoding methods in the following table are obtained,

[0104] Table 3

[0105] Coding Scheme Error Correction Code Information density (bits / nt) GC content (%) Maximum homopolymer length Church none 0.94 39-61 3 Goldman Repeat code 1.48 22.5-82.5 1 Grass RS Code 1.56 12.5-100 3 Erlich Fountain Code 1.98 40-60 4 Yin-Yang RS Code 1.95 40-60 4 This program Hamming distance + RS code 1.75 50 4

[0106] According to the above table, the GC content of this scheme is strictly limited to 50%, and the maximum homopolymer length is 4nt, which meets the biochemical constraints of DNA sequences and improves the stability of DNA sequence synthesis. At the same time, the information density is 1.75 bits / nt, which has a high coding efficiency.

[0107] According to the data recovery rate, a graph is drawn to obtain Figure 10-11 The data recovery rate diagram shown in Figure 1 shows the data recovery rate diagram, where Fig.10 The data recovery rate of this scheme after adding errors is Fig.11 is the data recovery rate after adding error correction code in this scheme; according to Fig.10 and Fig.11 ,After introducing 1%-10% replacement errors, this scheme still has a data recovery rate of more than 90%.

[0108] The implementation of the embodiments of the present invention includes the following beneficial effects: the embodiments provide a coding method, system, electronic device and storage medium based on DNA storage, the scheme compresses the original data to obtain a binary sequence; groups the binary sequence according to a first preset length to obtain a plurality of groups of first subsequences; detects the first subsequences, adds a watermark to the first subsequences that meet the preset type, and detects the first data type of all first subsequences; performs a first operation on the first subsequence whose first data type is the first type to obtain a base sequence, and performs a second operation on the first subsequence whose first data type is the second type to obtain a base sequence; synthesizes according to the obtained base sequence to obtain a target DNA sequence; decodes the target DNA sequence to obtain the original data; performs group coding on the binary sequence, and adopts dual rule coding according to the first bit of the grouped binary sequence to improve the coding efficiency; adopts dual rule coding to limit the content of GC bases to a certain proportion, and limits the length of homopolymers through group coding, satisfies the biochemical constraints of the DNA sequence, and improves the stability of the DNA sequence.

[0109] like Fig.12 As shown, an embodiment of the present invention further provides a coding system based on DNA storage, which can implement the above coding method based on DNA storage, and the system includes:

[0110] An encoding module, used to implement any method applied to the encoding end;

[0111] The decoding module is used to implement any method applied to the decoding end.

[0112] It can be seen that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0113] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned encoding and decoding method based on DNA storage when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0114] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0115] See also Fig.13 , Fig.13 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0116] The processor 1301 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0117] The memory 1302 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1302 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1302, and the processor 1301 calls and executes a DNA storage encoding method of the embodiment of this application;

[0118] Input / output interface 1303, used to implement information input and output;

[0119] The communication interface 1304 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0120] A bus 1305 that transmits information between the various components of the device (e.g., the processor 1301, the memory 1302, the input / output interface 1303, and the communication interface 1304);

[0121] The processor 1301 , the memory 1302 , the input / output interface 1303 and the communication interface 1304 are connected to each other in communication within the device via a bus 1305 .

[0122] Among them, the memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. The memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a remote memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0123] In addition, the embodiment of the present application also discloses a computer program product or a computer program, and the computer program product or the computer program is stored in a computer-readable storage medium. The processor of the computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above method. Similarly, the contents in the above method embodiment are all applicable to the storage medium embodiment, and the functions specifically implemented by the storage medium embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method embodiment.

[0124] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned encoding and decoding method based on DNA storage is implemented.

[0125] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0126] It is understood that all or some steps and systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0127] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A DNA storage-based encoding and decoding method, characterized in that: Applied to the encoding end, the method includes: Compressing the original data to obtain a binary sequence; grouping the binary sequence according to a first preset length to obtain a plurality of groups of first subsequences; Performing a first detection on the first subsequence to determine the first bit data type; Perform a corresponding encoding operation on the first subsequence according to the first bit data type to obtain a base sequence; The target DNA sequence is obtained by synthesis according to the base sequence.

2. The method according to claim 1, characterized in that The performing a corresponding encoding operation on the first subsequence according to the first bit data type to obtain a base sequence specifically includes: If the first data type is the first type, performing a first operation on a second subsequence corresponding to the first data type to obtain a base sequence; If the first data type is the second type, a second operation is performed on a second subsequence corresponding to the first data type to obtain the base sequence.

3. The method according to claim 1, characterized in that The method further comprises: Performing a second detection on the first subsequence to determine a first data group type; If the first data group type is a preset type, a watermark is added to the first subsequence to obtain a first subsequence with a watermark.

4. The method according to claim 3, characterized in that The adding a watermark to the first subsequence specifically includes: extracting data from the first subsequence according to a second preset length to obtain a first data group; The first data group is XORed with a preset data group to obtain a second data group, and the first subsequence is updated according to the second data group to obtain the first subsequence with the watermark added.

5. The method according to claim 1, characterized in that The method further comprises: Determine a sequence length corresponding to the binary sequence, and compare the sequence length with the first preset length; If the sequence length is an integer multiple of the first preset length, grouping the binary sequence according to the first preset length to obtain a plurality of groups of first subsequences; Otherwise, characters are supplemented at the end position of the binary sequence according to the preset characters until the length of the sequence is an integer multiple of the first preset length.

6. A DNA storage-based encoding and decoding method, characterized in that: Applied to the decoding end, the method includes: decoding the target DNA sequence to obtain the original data, specifically including: Grouping the target DNA sequence according to a third preset length to obtain a plurality of base fragments, and matching the plurality of base fragments with a preset code table respectively; If the match is successful, convert the base fragment into a binary sequence according to the successfully matched coding pattern in the preset code table; otherwise, perform a third operation on the base fragment to obtain the binary sequence; The original data is obtained by performing an XOR calculation on the watermark sequence and the binary sequence; wherein the watermark sequence includes watermark position information.

7. The method according to claim 6, characterized in that The performing a third operation on the base fragment to obtain the binary sequence specifically includes: Performing distance calculation between the base fragment and the preset code table to obtain a Hamming distance set; A target Hamming distance is determined according to the Hamming distance set; and the base fragments are converted according to the coding pattern corresponding to the target Hamming distance to obtain the binary sequence.

8. A coding system based on DNA storage, characterized in that: include: An encoding module, used to implement the method described in any one of claims 1 to 5; A decoding module, used to implement the method described in any one of claims 6-7.

9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to perform the method according to any one of claims 1 to 7 when executed by the processor.

Citation Information

Cited By

  • DNA storage reading method based on multiple hidden reference sequences

    CN120596016A