Efficient DNA storage method and system based on hybrid coding strategy
Through an efficient DNA storage method based on a hybrid encoding strategy, the inefficiency and instability caused by base errors in existing DNA data storage is solved, and efficient coding and error correction capabilities in multiple types of complex data are achieved.
Patent Information
- Application Number
- CN202411610104.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-12
AI Technical Summary
Existing DNA data storage is prone to base errors during synthesis, storage, retrieval and sequencing, resulting in inefficient and unstable storage performance, and the prior art is difficult to process multiple types of complex data.
Using an efficient DNA storage method based on a hybrid encoding strategy, the original data is statistically analyzed, the encoding algorithm and parameter settings are determined, binary data is divided and blocked encoding, redundancy is added and converted into DNA sequences, and finally in the DNA sequence Add primers and marker positions.
It achieves the best encoding performance in multiple types of complex data, improves the efficiency and error correction capabilities of hybrid encoding, and ensures the robustness and stability of the data.
Smart Images

Figure CN119476423A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of DNA data storage, and in particular to an efficient DNA storage method and system based on a hybrid coding strategy. Background Art
[0002] With the rapid development of information technology, the gap between the exponential growth of data and the limited capacity of current mainstream storage media is becoming increasingly obvious. Faced with the pressure of data storage, it is urgent to develop more efficient storage media. DNA storage is seen as a new type of data storage medium with great potential. DNA data storage writes data information into DNA through synthesis technology and reads data information from DNA through sequencing technology. The main processes of conventional DNA data storage include: encoding, synthesis, storage, retrieval, sequencing and decoding.
[0003] Existing DNA data storage may have base errors such as deletion, insertion and substitution during synthesis, DNA storage, retrieval and sequencing, resulting in inefficiency and instability. In order to improve storage performance, current DNA data storage is often designed for a specific purpose. Although it achieves higher performance under certain circumstances, it limits the overall performance when processing multi-type complex data. Therefore, how to stably and efficiently store data in DNA sequences is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of the above problems, the embodiments of the present application provide an efficient DNA storage method and system based on a hybrid coding strategy to overcome the above problems or at least partially solve the above problems.
[0005] In a first aspect of the embodiments of the present application, an efficient DNA storage method based on a hybrid coding strategy is disclosed, the method comprising: Performing statistical analysis on the raw data to be stored to obtain data attributes, the data attributes including: data type, data volume, and data distribution; Determining a coding algorithm and parameter settings of a hybrid encoder according to the data attributes and coding requirements, wherein the coding algorithm is low-density parity-check coding or polar coding; Converting the original data into binary data, and dividing and block encoding the binary data according to a preset DNA sequence length, an encoding algorithm and parameter settings of the hybrid encoder to obtain a codeword sequence with redundancy; According to the mapping relationship between binary data and four-bit bases, the redundant codeword sequence is converted to obtain a data storage DNA sequence; According to the original data and the hybrid encoder, primers and markers are added to the data storage DNA sequence to obtain a final data storage DNA sequence, wherein the primers are used to record information of the DNA sequence storing the original data, and the markers are used to record at least parameter settings of the hybrid encoder.
[0006] Optionally, according to the mapping relationship between binary data and four-bit bases, the codeword sequence with redundancy is converted to obtain a data storage DNA sequence, including: According to the mapping relationship between the binary data and the four-bit bases, the redundant codeword sequence is converted into an initial DNA sequence; Determining whether the initial DNA sequence satisfies constraint conditions, wherein the constraint conditions include: whether the total content of cytosine bases and guanine bases in the initial DNA sequence is within a preset range, and whether the length of a long homopolymer in the initial DNA sequence is less than a length threshold; When the constraint condition is not satisfied, the initial DNA sequence is pseudo-randomly constructed to obtain a data storage DNA sequence satisfying the constraint, wherein the pseudo-random construction refers to recursively calling a pseudo-random library to perform sum-product operations on the initial DNA sequence.
[0007] Optionally, according to the original data and the hybrid encoder, adding primers and markers to the data storage DNA sequence to obtain a final data storage DNA sequence includes: Primers are added to the data storage DNA sequence according to the original data, and marker bits are added to the data storage DNA sequence according to the pseudo-randomization structure and the hybrid encoder to obtain a final data storage DNA sequence.
[0008] Optionally, according to a preset DNA sequence length, a coding algorithm and parameter settings of the hybrid encoder, the binary data is divided and block-coded to obtain a codeword sequence with redundancy, including: Dividing the binary data according to a first number of characters input by the hybrid encoder to obtain a plurality of binary sequences having a length of the first number; Encode the multiple binary sequences according to the encoding algorithm to obtain encoding sequences with a length of a second number, where the second number is the number of characters output by the hybrid encoder; The coding sequence is divided according to the preset DNA sequence length to obtain a codeword sequence with redundancy.
[0009] Optionally, encoding the multiple binary sequences according to the encoding algorithm to obtain encoding sequences with a length of a second number includes: In the case where the coding algorithm is low-density parity check coding, the multiple binary sequences are sequentially multiplied by a generator matrix of the low-density parity check coding to generate redundant bits, and a coding sequence having a length of a second number is obtained according to the generated redundant bits; When the coding algorithm is polarization coding, the multiple binary sequences are recursively polarized to generate a series of synthetic channels according to a generator matrix of the polarization coding, and the most reliable channel is selected to fill redundant bits according to frozen bits of the polarization coding to obtain a coding sequence with a second length.
[0010] Optionally, the method further comprises: Sequencing the data storage DNA sequence according to the primers of the original data to obtain the target data storage DNA sequence; Obtaining a coding algorithm and parameter settings of a hybrid encoder according to a marker bit in the target data storage DNA sequence; According to the mapping relationship from the four-bit base to the binary data, the target data storage DNA sequence is converted to obtain a plurality of binary codeword sequences; Decoding the plurality of binary codeword sequences according to the encoding algorithm and parameter settings of the hybrid encoder, removing redundant characters in the codewords, and obtaining binary data; The binary data is converted into raw data.
[0011] Optionally, obtaining a plurality of data storage DNA sequences, and obtaining an encoding algorithm and parameter settings of a hybrid encoder include: Sequencing the data storage DNA sequence according to the primers of the original data to obtain the target data storage DNA sequence; According to the marker bits in the target data storage DNA sequence, the encoding algorithm and parameter settings of the hybrid encoder are obtained.
[0012] Optionally, when the target data storage DNA sequence is subjected to pseudo-random construction processing, the target data storage DNA sequence is converted according to the mapping relationship between the four-bit bases and the binary data to obtain a plurality of binary codeword sequences, including: According to the mapping relationship from the four bases to the binary data, converting the codeword region in the target data storage DNA sequence into a plurality of pseudo-random binary sequences; According to the pseudo-randomization construction, the plurality of pseudo-random binary sequences are converted into a plurality of binary codeword sequences.
[0013] Optionally, decoding the multiple binary codeword sequences according to the encoding algorithm and parameter settings of the hybrid encoder, removing redundant characters in the codewords, and obtaining binary data includes: In the case where the coding algorithm is low-density parity check coding, converting the multiple binary codeword sequences into a first codeword sequence according to the number of output characters of the low-density parity check coding, and performing iterative decoding according to the first codeword sequence and a check matrix of the low-density parity check coding to obtain a binary sequence; When the coding algorithm is polar coding, the multiple binary codeword sequences are converted into second codeword sequences according to the number of output characters of the polar coding, and the second codeword sequences are sequentially decoded according to a generator matrix and frozen bits of the polar coding to obtain multiple binary sequences.
[0014] In a second aspect of the embodiments of the present application, an efficient DNA storage system based on a hybrid coding strategy is disclosed, the system comprising: The encoding module is used to perform statistical analysis on the original data to be stored to obtain data attributes, wherein the data attributes include: data type, data volume, and data distribution; determine the encoding algorithm and parameter settings of the hybrid encoder according to the data attributes and encoding requirements, wherein the encoding algorithm is low-density parity check encoding or polarization encoding; convert the original data into binary data, and divide and block encode the binary data according to a preset DNA sequence length, the encoding algorithm and parameter settings of the hybrid encoder to obtain a codeword sequence with redundancy; convert the codeword sequence with redundancy according to a mapping relationship between binary data and four-bit bases to obtain a data storage DNA sequence; add primers and markers to the data storage DNA sequence according to the original data and the hybrid encoder to obtain a final data storage DNA sequence, wherein the primers are used to record information of the DNA sequence storing the original data, and the markers are used to record at least the parameter settings of the hybrid encoder; A decoding module is used to sequence a data storage DNA sequence according to the primers of the original data to obtain a target data storage DNA sequence; obtain an encoding algorithm and parameter settings of a hybrid encoder according to a mark bit in the target data storage DNA sequence; convert the target data storage DNA sequence according to a mapping relationship from the four-bit base to binary data to obtain a plurality of binary code word sequences; decode the plurality of binary code word sequences according to the encoding algorithm and parameter settings of the hybrid encoder, remove redundant characters in the code words, and obtain binary data; and convert the binary data into original data.
[0015] The third aspect of the embodiments of the present application discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the efficient DNA storage method based on the hybrid coding strategy described in the first aspect of the embodiments of the present application.
[0016] The fourth aspect of the embodiments of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the efficient DNA storage method based on a hybrid coding strategy described in the first aspect of the embodiments of the present application are implemented.
[0017] The fifth aspect of the embodiments of the present application discloses a computer program product, including a computer program, which, when executed by a processor, implements the steps of the efficient DNA storage method based on the hybrid coding strategy described in the first aspect of the embodiments of the present application.
[0018] The embodiments of the present application include the following advantages: In the embodiment of the present application, since the coding algorithm and parameter settings used in the hybrid coding process are determined according to the data attributes and coding requirements of the original data, different coding algorithms (for example, low-density parity check coding and polarization coding) have different coding performances for different data, and thus the best coding performance can be achieved in multiple types of complex data. In addition, the coding algorithm can be a low-density parity check code or a polarization code. According to the performance difference of the low-density parity check code and the polarization code under different code words, the efficiency of the hybrid coding is improved; according to the error correction performance of the low-density parity check code and the polarization code under different code words, the error correction capability of the hybrid coding is improved. In addition, the coding information is stored in the marker bit, which can be used to identify changes in the DNA sequence region and the base position, improve the ability to identify DNA sequence errors, and ensure the robustness of the data. In this way, a stable and efficient DNA storage is realized, which can stably and efficiently store a large amount of complex data in a DNA sequence. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 It is a flow chart of the encoding steps of an efficient DNA storage method based on a hybrid encoding strategy provided in an embodiment of the present application; Figure 2It is a flow chart of encoding steps of another efficient DNA storage method based on a hybrid encoding strategy provided in an embodiment of the present application; Figure 3 It is a flowchart of decoding steps of an efficient DNA storage method based on a hybrid coding strategy provided in an embodiment of the present application; Figure 4 It is a flowchart of decoding steps of another efficient DNA storage method based on a hybrid coding strategy provided in an embodiment of the present application; Figure 5 It is a structural schematic diagram of an efficient DNA storage system based on a hybrid coding strategy provided in an embodiment of the present application; Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] DNA data storage writes data information into DNA through synthesis technology, and reads data information from DNA through sequencing technology. The main processes of conventional DNA data storage include: encoding, synthesis, storage, retrieval, sequencing and decoding. Specifically, using specific code conversion rules, the binary file is mapped to the corresponding base sequence composed of adenine (A), thymine (T), cytosine (C) and guanine (G), and then written into the DNA chain through synthesis technology; the DNA chain must be stored in a suitable environment to ensure stability; since there are a large number of DNA chains in the storage environment, obtaining the target data requires obtaining the corresponding DNA chain through retrieval technology; sequencing technology is used to read the base arrangement of the DNA chain, and then the bases are decoded to restore the original data.
[0023] Existing DNA data storage may have base errors such as deletions, insertions, and substitutions during synthesis, DNA storage, retrieval, and sequencing. It is necessary to add redundancy to the encoded data to correct random errors that may be introduced in the DNA sequence. During the encoding process, the DNA sequence must avoid some special constraints to reduce the error probability of the DNA sequence in the storage process. For example, a high or low GC content (i.e., the total content of cytosine bases and guanine bases) in the DNA sequence and a long homopolymer sequence may lead to a large number of errors in synthesis and sequencing.
[0024] In addition, the length of DNA sequences is also limited by technology, and long DNA sequences are usually divided into shorter fragments of equal length. In this case, each DNA sequence needs to contain an index segment to record address information. Primer tags are also added to the front and back ends of the DNA fragments to synthesize gene fragments or oligonucleotide libraries, which are then stored in vivo or in vitro. During the retrieval process, polymerase chain reaction (PCR) amplification identifies specific primers to find the target DNA chain, and the original file is restored through sequencing and decoding.
[0025] As the scale of DNA storage continues to expand, DNA encoding needs to meet different types of data and different storage requirements, so as to realize the practical application of DNA storage. In order to improve storage performance, current DNA data storage methods are often designed for a specific purpose. Although higher performance is achieved under certain conditions, the overall performance is limited when processing multi-type complex data. In addition, the difference between DNA storage and traditional media is that after traditional media completes data writing and reading, the data is arranged in the storage medium in the order of physical addresses, and fixed-format data can be found through physical addressing. In DNA storage, DNA chains are distributed in the storage medium in a chaotic form, and primers are needed to find the target chain, and then the data is sorted according to the index information. In addition, the DNA sequence will introduce certain random errors after the synthesis and sequencing process, which leads to the problem of data recovery.
[0026] In order to overcome the limitations of related technologies and achieve stable and efficient storage of data in DNA sequences, the present application embodiment provides an efficient DNA storage method based on a hybrid coding strategy, which achieves the best coding performance in multiple types of complex data. Detailed description is given below.
[0027] The present application embodiment provides an efficient DNA storage method based on a hybrid coding strategy, referring to Figure 1 As shown, Figure 1 1 is a flow chart of the coding steps of an efficient DNA storage method based on a hybrid coding strategy provided in an embodiment of the present application. Figure 1 As shown, the method may include steps S110 to S150: Step S110: Statistical analysis is performed on the original data to be stored to obtain the original data, wherein the data attributes include: data type, data volume, and data distribution.
[0028] In the embodiment of the present application, in order to achieve good DNA storage performance in different data scenarios, data attributes are taken as a factor to determine the encoding algorithm. For the original data to be stored, firstly, statistical analysis is performed on the original data, that is, statistics are performed on data information such as the data type, data volume, and data distribution of the original data, so as to obtain the data attributes of the original data.
[0029] Step S120: Determine a coding algorithm and parameter settings of a hybrid encoder according to the data attributes and coding requirements, wherein the coding algorithm is low-density parity-check coding or polar coding.
[0030] Among them, the coding requirements include coding redundancy, DNA sequence storage channel error rate and codeword length; the parameter settings of the hybrid encoder include the number of input characters, the number of output characters, and the coding parameters corresponding to different coding algorithms.
[0031] Specifically, for low-density parity check coding, the coding parameters include a check matrix and a generator matrix; wherein the check matrix of the low-density parity check coding is generated according to the codeword length, the check nodes and the variable nodes, and the generator matrix is the transposed check matrix. For polarization coding, the coding parameters include a generator matrix and frozen bits, and the frozen bits are set by recursively applying polarization operations based on the information bit length and the codeword length.
[0032] It can be understood that if there is only one original data to be stored, the encoding algorithm is one of low-density parity check encoding and polarization encoding; if the original data includes multiple data, the encoding algorithms corresponding to each original data may be different or may be the same.
[0033] In the embodiment of the present application, by taking data attributes and coding requirements as considerations for determining the coding algorithm, different coding algorithms (for example, low-density parity-check coding and polarization coding) have different coding performances for different data, thereby achieving the best coding performance in multiple types of complex data.
[0034] Step S130: converting the original data into binary data, and dividing and block encoding the binary data according to the preset DNA sequence length, the encoding algorithm and parameter settings of the hybrid encoder to obtain a codeword sequence with redundancy.
[0035] In the embodiment of the present application, the original data is converted into binary data according to the conversion relationship between the original data and the binary data. It is understandable that for different types of original data, the conversion relationship between the original data and the binary data is different.
[0036] In order to facilitate data encoding, the original data is converted into binary data, and then divided and block-encoded based on the binary data to obtain a codeword sequence with redundancy. The codeword sequence with redundancy includes: redundant codewords and codewords corresponding to the binary data, and the hybrid encoder performs error correction by adding redundant codewords to the binary data.
[0037] Step S140: According to the mapping relationship between binary data and four-bit bases, the code word sequence with redundancy is converted to obtain a data storage DNA sequence.
[0038] Among them, the four bases include adenine (A), thymine (T), cytosine (C) and guanine (G); the redundant codeword sequence is essentially a binary data sequence, and the DNA sequence is a base sequence composed of different bases. In order to store data in the DNA sequence, the redundant codeword sequence is converted according to the mapping relationship between binary data and four bases to obtain the data storage DNA sequence.
[0039] In one embodiment, the mapping relationship between binary data and four-bit bases is expressed as: 00-A, 01-T, 10-G, 11-C, that is, 00 in the code word sequence with redundancy is converted to adenine in the DNA sequence, 01 in the code word sequence with redundancy is converted to thymine in the DNA sequence, 10 in the code word sequence with redundancy is converted to cytosine in the DNA sequence, and 11 in the code word sequence with redundancy is converted to guanine in the DNA sequence.
[0040] It can be understood that in addition to the above-mentioned representation, the mapping relationship between binary data and four bases also has other representations. For example, the mapping relationship can also be expressed as: 00-C, 01-G, 10-A, 11-T. The embodiment of the present application does not make any specific limitation on the representation method of the mapping relationship between binary data and four bases.
[0041] Step S150: According to the original data and the hybrid encoder, primers and markers are added to the data storage DNA sequence to obtain a final data storage DNA sequence, wherein the primers are used to record information of the DNA sequence storing the original data, and the markers are used to record at least parameter settings of the hybrid encoder.
[0042] In the embodiment of the present application, primers are added to the data storage DNA sequence according to the original data, and a marker is added to the data storage DNA sequence according to the hybrid encoder. Thus, the storage information of the original data is recorded in the primer of the DNA sequence, so that the DNA data corresponding to the data to be decoded can be obtained according to the primer later; the information of the hybrid encoder (coding algorithm and parameter setting) is recorded in the marker of the DNA sequence, and the information of the hybrid encoder can be obtained based on the marker for decoding. In this way, by adding primers and markers to the data storage DNA sequence, changes in the DNA sequence region and base position can be identified, the ability to identify DNA sequence errors is improved, and the robustness of the data is ensured.
[0043] In practical applications, when the original data needs to be stored, the original data to be stored is stored in the DNA sequence according to the method of the above steps S110 to S150.
[0044] In the above process, since the coding algorithm and parameter settings used in the hybrid coding process are determined according to the data attributes and coding requirements of the original data, different coding algorithms (for example, low-density parity check coding and polarization coding) have different coding performances for different data, and thus can achieve the best coding performance in multiple types of complex data. In addition, the coding algorithm can be a low-density parity check code or a polarization code. According to the performance difference of the low-density parity check code and the polarization code under different code words, the efficiency of the hybrid coding is improved; according to the error correction performance of the low-density parity check code and the polarization code under different code words, the error correction capability of the hybrid coding is improved. In addition, storing the coding information in the marker bit can be used to identify changes in the DNA sequence region and the base position, improves the ability to identify DNA sequence errors, and ensures the robustness of the data. In this way, a stable and efficient DNA storage is realized, which can stably and efficiently store a large amount of complex data in a DNA sequence. In combination with the above embodiments, in one embodiment, the embodiment of the present application further provides an efficient DNA storage method based on a hybrid coding strategy. In this method, the above step S130 of "dividing and encoding the binary data in blocks according to the preset DNA sequence length, the encoding algorithm and parameter settings of the hybrid encoder to obtain a codeword sequence with redundancy" may specifically include steps S130-1 to S130-3: Step S130-1: Divide the binary data according to a first number of characters input by the hybrid encoder to obtain a plurality of binary sequences having a first number of lengths.
[0045] In the embodiments of the present application, for the convenience of encoding, binary data needs to be divided into multiple binary sequences that meet the input length of the hybrid encoder (i.e., multiple binary sequences with a length of the first quantity). Specifically, the lengths of the input characters corresponding to different encoding algorithms may be different. If the encoding algorithm is low-density parity-check (LDPC) coding, the first quantity is the number of input characters of LDPC coding. If the encoding algorithm is polar coding, the first quantity is the number of input characters of polar coding.
[0046] Step S130-2: Encode the multiple binary sequences according to the encoding algorithm to obtain an encoded sequence with a length of the second quantity, where the second quantity is the number of output characters of the hybrid encoder.
[0047] In the embodiments of the present application, the encoding algorithm is LDPC coding or polar coding. For binary sequences corresponding to different original data, the corresponding encoding algorithm is selected for encoding. Finally, the hybrid encoder outputs an encoded sequence with a length of the second quantity. If the encoding algorithm is LDPC coding, the second quantity is the number of output characters of LDPC coding. If the encoding algorithm is polar coding, the second quantity is the number of output characters of polar coding.
[0048] Specifically, encoding the multiple binary sequences according to the encoding algorithm to obtain an encoded sequence with a length of the second quantity includes item A-1 and item A-2: Item A-1: When the encoding algorithm is LDPC coding, sequentially multiply the multiple binary sequences by the generator matrix of LDPC coding to generate redundant bits, and obtain an encoded sequence with a length of the second quantity according to the generated redundant bits.
[0049] In the embodiments of the present application, the generator matrix G of LDPC coding is the transpose of the parity-check matrix H. The parity-check matrix H of LDPC coding is constructed based on the second quantity n of output characters, check nodes, and variable nodes. That is, the parity-check matrix H is a sparse matrix of m×n (where m < n), and the generator matrix G is a matrix of n×(n−m). When performing LDPC coding, multiply a binary sequence c with a length of the first quantity (such as the first quantity k = n−m) by the generator matrix G of LDPC coding to generate redundant bits, and then obtain an encoded sequence with a length of the second quantity n.
[0050] Item A-2: When the encoding algorithm is polar coding, according to the generator matrix of polar coding, pass the multiple binary sequences through recursive polarization to generate a series of synthetic channels, select the most reliable channel, and fill redundant bits according to the frozen bits of polar coding to obtain an encoded sequence with a length of the second quantity.
[0051] In the embodiment of the present application, the polar coding generation matrix is constructed according to the first number k of the encoder input characters and the second number n of the output characters. The polar coding generation matrix is a A polarization matrix is used, and a frozen bit is set by recursively applying a polarization operation based on an information bit length k and a codeword length n. Specifically, the reliability of the channel is calculated by calculating a bit error rate, and then the most reliable channel is selected to fill the redundant bits according to the frozen bits of the polarization code; the frozen bit length is nk and is set to 0, the information bit and the frozen bit are combined to form a bit sequence with a length of n, and then encoded by a generating matrix of the polarization code to obtain a coded sequence with a length of a second number n.
[0052] Step S130-3: Divide the coding sequence according to the preset DNA sequence length to obtain a codeword sequence with redundancy.
[0053] In the embodiment of the present application, the length of the coding sequence obtained after encoding is the second number. For the convenience of storage, after obtaining the coding sequence, the coding sequence is divided according to the preset DNA sequence length to obtain a code word sequence with redundancy that meets the preset DNA sequence length.
[0054] In this way, the binary data is divided and encoded in blocks according to the preset DNA sequence length, the encoding algorithm and parameter settings of the hybrid encoder. Since the encoding algorithm and parameter settings of the hybrid encoder are determined according to the data attributes and encoding requirements, it provides a variety of flexible encoding schemes for different data, reducing the risk of data leakage.
[0055] In combination with the above embodiments, in one implementation, the present application embodiment further provides an efficient DNA storage method based on a hybrid coding strategy. In this method, the above step S140 of "converting the redundant codeword sequence according to the mapping relationship between binary data and four-bit bases to obtain a data storage DNA sequence" may specifically include steps S140-1 to S140-3: Step S140-1: According to the mapping relationship between the binary data and the four-bit bases, the code word sequence with redundancy is converted into an initial DNA sequence.
[0056] Step S140-2: determining whether the initial DNA sequence satisfies constraint conditions, wherein the constraint conditions include: whether the total content of cytosine bases and guanine bases in the initial DNA sequence is within a preset range, and whether the length of the long homopolymer in the initial DNA sequence is less than a length threshold; Step S140-3: When the constraint condition is not satisfied, the initial DNA sequence is pseudo-randomly constructed to obtain a data storage DNA sequence that satisfies the constraint, wherein the pseudo-random construction refers to recursively calling a pseudo-random library to perform sum-product operations on the initial DNA sequence.
[0057] In the embodiments of the present application, it is considered that when the GC content (i.e., the total content of cytosine bases and guanine bases) in the DNA sequence is less or more, or the length of the long homopolymer is longer, the probability of DNA sequence errors increases significantly. Therefore, the randomness of the DNA sequence is improved by pseudo-randomization construction, the GC content is kept moderate (for example, the GC content is between 40% and 60%), and the length of the long homopolymer is effectively reduced, thereby complying with the biochemical constraints of DNA and achieving stable storage of data.
[0058] Specifically, for a codeword sequence with redundancy, firstly execute step S140-1 to convert the codeword sequence with redundancy into an initial DNA sequence. Then execute step S140-2 to determine whether the initial DNA sequence meets the constraint conditions, wherein GC content refers to the total content of cytosine bases and guanine bases, and long homopolymers refer to the number of continuous bases; only when the total content of cytosine bases and guanine bases in the initial DNA sequence is within a preset range and the length of the long homopolymer in the initial DNA sequence is less than the length threshold, it is determined whether the initial DNA sequence meets the constraint conditions, otherwise the initial DNA sequence does not meet the constraint conditions. In the case of not meeting the constraint conditions, execute step S140-3 to pseudo-randomize the initial DNA sequence to obtain a data storage DNA sequence that meets the constraints.
[0059] In this way, a pseudo-random DNA sequence that meets biochemical constraints can be generated through pseudo-random construction, which improves the stability of the DNA sequence and achieves stable storage of data.
[0060] Further, in the method, the above step S150 of “adding primers and markers to the data storage DNA sequence according to the original data and the hybrid encoder to obtain a final data storage DNA sequence” specifically includes: Primers are added to the data storage DNA sequence according to the original data, and marker bits are added to the data storage DNA sequence according to the pseudo-randomization structure and the hybrid encoder to obtain a final data storage DNA sequence.
[0061] In the embodiment of the present application, the storage information of the original data is recorded in the primer of the DNA sequence, so that the DNA data corresponding to the data to be decoded can be obtained according to the primer later. When the data storage DNA sequence is obtained through pseudo-random construction, it is necessary to store the pseudo-random construction process and the information of the hybrid encoder (coding algorithm and parameter settings) together in the mark bit, so that the information of the hybrid encoder and the pseudo-random construction information can be obtained based on the mark bit later, so as to realize the decoding of the data storage DNA sequence.
[0062] In this way, by adding primers and markers to the data storage DNA sequence, changes in the DNA sequence region and base position can be identified, thereby improving the ability to identify DNA sequence errors and ensuring the robustness of the data.
[0063] parameter Figure 2 As shown, Figure 2 is a flowchart of the encoding steps of another efficient DNA storage method based on a hybrid encoding strategy provided in an embodiment of the present application, such as Figure 2 As shown, in the method, the original data is encoded according to the following steps, and the method may include steps S210 to S270: Step S210: Statistically analyze the original data to be stored to obtain data attributes, which include: data type, data volume, and data distribution.
[0064] Step S220: Determine a coding algorithm and parameter settings of a hybrid encoder according to the data attributes and coding requirements, wherein the coding algorithm is low-density parity-check coding or polar coding.
[0065] Step S230: converting the original data into binary data, and dividing and block encoding the binary data according to the preset DNA sequence length, the encoding algorithm and parameter settings of the hybrid encoder to obtain a codeword sequence with redundancy.
[0066] Step S240: According to the mapping relationship between the binary data and the four-bit bases, the code word sequence with redundancy is converted into an initial DNA sequence.
[0067] Step S250: determining whether the initial DNA sequence satisfies constraint conditions, wherein the constraint conditions include: whether the total content of cytosine bases and guanine bases in the initial DNA sequence is within a preset range, and whether the length of the long homopolymer in the initial DNA sequence is less than a length threshold.
[0068] Step S260: When the constraint condition is not satisfied, the initial DNA sequence is pseudo-randomly constructed to obtain a data storage DNA sequence that satisfies the constraint, wherein the pseudo-random construction refers to recursively calling a pseudo-random library to perform sum-product operations on the initial DNA sequence.
[0069] Step S270: adding primers to the data storage DNA sequence according to the original data, and adding marker bits to the data storage DNA sequence according to the pseudo-randomization construction process and the hybrid encoder to obtain a final data storage DNA sequence.
[0070] In the embodiment of the present application, the coding algorithm and parameter settings used in the hybrid coding process are determined according to the data attributes and coding requirements of the original data. Different coding algorithms (for example, low-density parity check coding and polarization coding) have different coding performances for different data, so that the best coding performance can be achieved in multiple types of complex data. In addition, the coding algorithm can be a low-density parity check code or a polarization code. According to the performance difference of the low-density parity check code and the polarization code under different code words, the efficiency of the hybrid coding is improved; according to the error correction performance of the low-density parity check code and the polarization code under different code words, the error correction capability of the hybrid coding is improved.
[0071] Moreover, the randomness of DNA sequence is improved by pseudo-randomization construction, the moderation of GC content is maintained, and the length of long homopolymer is effectively reduced, so as to meet the biochemical constraints of DNA and realize the stable storage of data. In addition, due to the hybrid coding characteristics, the coding algorithm and parameter setting of the hybrid encoder are stored by the marker bit in the DNA sequence, which improves the security of stored information. Thus, the embodiment of the present application can design a complex hybrid coding method, and by adjusting the parameter setting of the encoder, a diversified flexible coding scheme is provided, reducing the risk of data leakage. In this way, a stable and efficient DNA storage is realized, and a large amount of complex data can be stably and efficiently stored in the DNA sequence.
[0072] In combination with the above embodiments, in one embodiment, the present application also provides an efficient DNA storage method based on a hybrid coding strategy. Figure 3 As shown, in the method, the data storage DNA sequence is decoded according to the following steps, specifically, including steps S310 to S350: Step S310: Sequence the data storage DNA sequence according to the primers of the original data to obtain the target data storage DNA sequence.
[0073] Among them, the target data storage DNA sequence refers to the DNA sequence used for decoding. The data storage DNA sequence carries the primers of the original data. The primers record the information of the DNA sequence storing the original data, and then specific extraction is performed based on the primers of the original data to obtain the corresponding target data storage DNA sequence.
[0074] Step S320: Obtaining the encoding algorithm and parameter settings of the hybrid encoder according to the marker bits in the target data storage DNA sequence.
[0075] The encoding algorithm and parameter setting of the hybrid encoder refer to the encoding algorithm and parameter setting used for encoding the target data storage DNA sequence; the parameter setting includes a first number of input characters and a second number of output characters; if the encoding algorithm is low-density parity check encoding, the parameter setting also includes a check matrix and a generator matrix of the low-density parity check encoding; if the encoding algorithm is polarization encoding, the parameter setting also includes a generator matrix and a frozen bit of the polarization encoding. The information of the hybrid encoder is stored in the mark bit of the target data storage DNA, and the encoding algorithm and parameter setting of the hybrid encoder are obtained through the mark bit.
[0076] Step S330: According to the mapping relationship from the four-bit base to the binary data, the target data storage DNA sequence is converted to obtain a plurality of binary codeword sequences.
[0077] In the embodiment of the present application, the target data storage DNA sequence is a base sequence composed of different bases. In order to obtain the stored data, the target data storage DNA sequence is converted according to the mapping relationship between the four-bit base and the binary data to obtain multiple binary code word sequences. For example, if the mapping relationship between the four-bit base and the binary data is: A-00, T-01, G-10, C-11, then A in the target data storage DNA sequence is converted to the value 00, T is converted to the value 01, G is converted to the value 10, and C is converted to the value 11, thereby obtaining a binary code word sequence.
[0078] In some embodiments, the target data storage DNA sequence is converted according to the mapping relationship from the four-bit base to binary data to obtain multiple binary codeword sequences, including: for the multiple copy characteristics of the target data storage DNA sequence (corresponding to multiple DNA sequences), based on the preset DNA sequence length and the mark bit position, the DNA sequence region is identified, whether the length meets the requirements, and the DNA sequence with poor quality is removed; for the remaining multiple DNA sequences, clustering is performed based on sequence similarity and index region to obtain a cluster containing multiple similar DNA sequences; for multiple DNA sequence clusters, based on the preset DNA sequence length and sequence alignment, the multiple DNA sequences are restored to obtain a DNA sequence from each cluster; finally, for each DNA sequence obtained by the clustering, according to the mapping relationship from the four-bit base to binary data, each DNA sequence is converted to obtain multiple binary codeword sequences.
[0079] Step S340: decoding the plurality of binary codeword sequences according to the encoding algorithm and parameter settings of the hybrid encoder, removing redundant characters in the codewords, and obtaining binary data.
[0080] For each binary codeword sequence, decoding is performed using the encoding algorithm and parameter settings of the hybrid encoder to remove redundant characters in the codeword and obtain binary data.
[0081] Specifically, according to the encoding algorithm and parameter setting of the hybrid encoder, the multiple binary codeword sequences are decoded, and redundant characters in the codewords are removed to obtain binary data, including item B-1 and item B-2: Item B-1: When the coding algorithm is low-density parity-check coding, the multiple binary codeword sequences are converted into a first codeword sequence according to the number of output characters of the low-density parity-check coding, and iterative decoding is performed according to the first codeword sequence and the check matrix of the low-density parity-check coding to obtain a binary sequence.
[0082] Item B-2: when the coding algorithm is polarization coding, converting the multiple binary codeword sequences into a second codeword sequence according to the number of output characters of the polarization coding, and sequentially decoding the second codeword sequence according to a generator matrix and frozen bits of the polarization coding to obtain multiple binary sequences.
[0083] In an embodiment of the present application, for each binary code word sequence, the binary code word sequence is spliced in units of the second number according to the second number and index order of the output characters to obtain multiple code word sequences with a length of the second number, and then for each code word sequence with a length of the second number, decoding is performed based on the encoding information (encoding algorithm and parameter device) of the hybrid encoder and the decoder.
[0084] (1) When the coding algorithm is low-density parity check coding, for each bit in each codeword sequence of a second length, a hard decision is used to obtain the probability of each bit being 0 or 1, that is, to initialize the maximum likelihood value Initially, the variable node (Variable node Refers to the bits in the transmission codeword. Each variable node corresponds to a bit in the encoded codeword. According to the received codeword bit and the information transmitted by the check node, it updates its own state to 0 or 1). (Check Node Refers to the check equation in the encoding process. According to the received variable node information, it determines whether the current solution meets the parity check condition) Send information , and calculate and send new information to the variable node at the same time. For each variable node, the information sent by the verification node It can be expressed as:
[0085] in, In addition to In addition to A collection of all variable nodes that are connected.
[0086] The variable node updates its maximum similarity value to reflect the new information brought by all the check nodes. :
[0087] According to the new maximum likelihood value, a hard decision is made for each variable node. Check whether the check matrix is satisfied. If all the check conditions are satisfied, the decoding is successful and the decoding process ends. Otherwise, return and transfer information.
[0088] (2) When the coding algorithm is polar coding, a Successive Cancellation List (SCL) algorithm is used for decoding the polar coding. The codeword sequence transmitted by the channel is obtained, and an empty list is created according to the length of the sequence. For each bit, starting from each path in the list, two possibilities that the bit is 0 or 1 are tried, and both paths are added to the list. The possibility is calculated for each path. After each decoding step, the most likely path in the list is retained according to the path possibility. When the decoding reaches the last bit, the most reliable path in the list is selected as the decoding result to obtain a decoded binary sequence.
[0089] Step S350: Convert the binary data into original data.
[0090] In the embodiment of the present application, after the binary data is obtained, the binary data is converted into the original data according to the conversion relationship between the binary data and the original data, so as to store the target data DNA sequence. It can be understood that for different types of original data, the conversion relationship between the binary data and the original data is different.
[0091] In practical applications, when it is necessary to obtain data stored in a DNA sequence, the corresponding target data storage DNA sequence is obtained according to the method of steps S310 to S350, and the target data storage DNA sequence is decoded to obtain the corresponding original data.
[0092] Through the above process, a DNA sequence error correction method and a decoding error correction method were designed based on a hybrid coding strategy. DNA sequence errors were corrected based on clustering and marker position recognition. Most insertion and deletion errors were corrected and changed into substitution errors. The remaining substitution errors were corrected through a decoding algorithm to improve the robustness of the data.
[0093] In combination with the above embodiments, in one embodiment, the present application also provides an efficient DNA storage method based on a hybrid coding strategy. Figure 4 As shown, in this method, when the target data storage DNA sequence is subjected to pseudo-randomization construction processing, the data storage DNA sequence is decoded according to the following steps, specifically, including steps S410 to S460: Step S410: Sequence the data storage DNA sequence according to the primers of the original data to obtain the target data storage DNA sequence.
[0094] Step S420: Obtaining the encoding algorithm and parameter settings of the hybrid encoder according to the marker bits in the target data storage DNA sequence.
[0095] Step S430: According to the mapping relationship from the four-bit base to the binary data, the codeword region in the target data storage DNA sequence is converted into a plurality of pseudo-random binary sequences.
[0096] Step S440: According to the pseudo-randomization construction, convert the plurality of pseudo-random binary sequences into a plurality of binary codeword sequences.
[0097] Step S450: decoding the plurality of binary codeword sequences according to the encoding algorithm and parameter settings of the hybrid encoder, removing redundant characters in the codewords, and obtaining binary data.
[0098] Step S460: Convert the binary data into original data.
[0099] In an embodiment of the present application, the target data storage DNA sequence is processed by pseudo-random construction, and the pseudo-random construction process is also recorded in the mark bit of the target data storage DNA sequence, so the encoding algorithm, parameter setting and pseudo-random construction of the hybrid encoder are obtained according to the mark bit.
[0100] After converting the codeword region in the target data storage DNA sequence into multiple pseudo-random binary sequences, it is necessary to restore the randomness of the pseudo-random binary sequence according to the pseudo-randomization structure to obtain a binary codeword sequence. Then, the binary codeword sequence is decoded to obtain binary data, and then restored to obtain the original data to complete the DNA data decoding.
[0101] Through the above process, a DNA sequence error correction method and a decoding error correction method were designed based on a hybrid coding strategy. DNA sequence errors were corrected based on clustering and marker position recognition. Most insertion and deletion errors were corrected and changed into substitution errors. The remaining substitution errors were corrected through a decoding algorithm to improve the robustness of the data.
[0102] Further, in order to better illustrate the performance of the efficient DNA storage method based on the hybrid coding strategy in the embodiment of the present application, the efficient DNA storage method based on the hybrid coding strategy in the embodiment of the application is described by taking the original data as multiple types of data including images, videos, PDF documents and audio as an example. The information of different types of original data is shown in Table 1: Table 1 Various types of raw data
[0103] In the embodiment of the present application, the entire computer simulation experiment was run on an AMD R9 CPU with 32GB of random access memory using Python 3.11 in a Windows 11 environment to ensure the fairness of the comparison.
[0104] First, different types of raw data are encoded according to the encoding steps of the efficient DNA storage method based on the hybrid encoding strategy in the embodiment of the present application, specifically: Step 1: Perform statistical analysis on the original data to be stored to obtain data attributes, which include: data type, data size, and data distribution.
[0105] Step 2: According to data attributes and coding requirements, determine the coding algorithm and parameter settings of the hybrid encoder, where the coding algorithm is low-density parity check coding or polar coding.
[0106] Specifically, the length of the coding channel and the channel error rate can be set to select the coding algorithm of the hybrid encoder, and the parameter settings include: preset DNA length (preset DNA length M=160), the first number k of input characters, the second number n of output characters, the generating matrix and check matrix of low-density parity-check coding, the generating matrix and frozen bits of polarization coding.
[0107] Step 3: Convert the original data (various original data in Table 1) into binary data, divide the binary data according to the first number of characters input by the hybrid encoder to obtain multiple binary sequences with a length of the first number, and record the address index; encode the multiple binary sequences according to the encoding algorithm to obtain a coding sequence with a length of the second number; divide the coding sequence according to the preset DNA sequence length to obtain a codeword sequence with redundancy; then record the address index, merge the two-level address indexes, and obtain index information.
[0108] Step 4: According to the mapping relationship between binary data and four-bit bases, the codeword sequence with redundancy is converted into an initial DNA sequence; it is determined whether the initial DNA sequence meets the constraint conditions. If the constraint conditions are not met, the initial DNA sequence is pseudo-randomly constructed to obtain a data storage DNA sequence that meets the constraint, wherein the pseudo-random construction refers to recursively calling a pseudo-random library and performing a sum-product operation with the initial DNA sequence. In the DNA sequence generated by the random construction, the GC content is maintained at about 50%, and the length of the homopolymer is less than 5.
[0109] Step 5: Add primers to the data storage DNA sequence according to the original data (i.e., add primers with a length of 20 nt to the front and back ends of the data storage DNA sequence respectively), and add marker bits to the data storage DNA sequence according to the pseudo-randomization structure and the hybrid encoder to obtain the final data storage DNA sequence.
[0110] When the data stored in the data storage DNA sequence is to be obtained, the data storage DNA sequence is decoded according to the decoding steps of the efficient DNA storage method based on the hybrid coding strategy in the embodiment of the present application, specifically: Step 6: Sequence the data storage DNA sequence according to the primers of the original data to obtain the target data storage DNA sequence, and obtain the encoding algorithm and parameter settings of the hybrid encoder according to the marker bits in the target data storage DNA sequence.
[0111] Since each DNA sequence undergoes the synthetic sequencing process, multiple copies that may contain errors are generated. The DNA sequences are clustered according to sequence similarity, and the most likely DNA sequence is recovered from each cluster to decode all the DNA sequences.
[0112] Specifically, the simulated synthetic sequencing process introduces random errors with a probability ranging from 0% to 3%, and the decoded data is consistent with the original data. The technical solution based on the embodiment of the present application achieves an information density of up to 1.9 bits / nt, and at the same time can correct a higher error rate by reducing the information density, providing a more stable encoding performance compared to other DNA storage methods, as shown in Table 2: Table 2 Comparison of DNA storage encoding scheme and experimental results
[0113] Through computer simulation experiments, various types of files such as images, videos and audio are input into the hybrid encoder, and then the data is encoded through the efficient DNA storage method of the hybrid coding strategy. The synthetic sequencing process is simulated for the encoded data storage DNA sequence, and random errors are introduced to verify the error correction capability of the decoding process. The experimental results show that the embodiment of the present application can maintain a stable DNA information storage density, and the decoding process can correct possible errors.
[0114] The present application also provides an efficient DNA storage system based on a hybrid coding strategy, referring to Figure 5 As shown, Figure 5 : is a schematic diagram of a structure of an efficient DNA storage system based on a hybrid coding strategy provided in an embodiment of the present application, the system comprising: The encoding module 510 is used to perform statistical analysis on the original data to be stored to obtain data attributes, wherein the data attributes include: data type, data volume, and data distribution; determine the encoding algorithm and parameter settings of the hybrid encoder according to the data attributes and encoding requirements, wherein the encoding algorithm is low-density parity check encoding or polarization encoding; convert the original data into binary data, and divide and block encode the binary data according to a preset DNA sequence length, the encoding algorithm and parameter settings of the hybrid encoder to obtain a codeword sequence with redundancy; convert the codeword sequence with redundancy according to a mapping relationship from binary data to four-bit bases to obtain a data storage DNA sequence; add primers and markers to the data storage DNA sequence according to the original data and the hybrid encoder to obtain a final data storage DNA sequence, wherein the primers are used to record information of the DNA sequence storing the original data, and the markers are used to record at least the parameter settings of the hybrid encoder; The decoding module 520 is used to sequence the data storage DNA sequence according to the primers of the original data to obtain the target data storage DNA sequence; obtain the encoding algorithm and parameter settings of the hybrid encoder according to the mark bit in the target data storage DNA sequence; convert the target data storage DNA sequence according to the mapping relationship from the four-bit base to the binary data to obtain multiple binary code word sequences; decode the multiple binary code word sequences according to the encoding algorithm and parameter settings of the hybrid encoder, remove redundant characters in the code word, and obtain binary data; convert the binary data into original data.
[0115] In an embodiment of the present application, the system can implement the above-mentioned efficient DNA storage method based on the hybrid coding strategy. When data storage is required, the original data is stored in the DNA sequence of the original data through the encoding module. When the data stored in the DNA sequence of the original data needs to be obtained, the target data storage DNA sequence to be decoded is obtained through the decoding module, and decoding is performed to obtain the corresponding original data.
[0116] In some optional embodiments, the encoding module is further used to convert the redundant codeword sequence into an initial DNA sequence according to the mapping relationship between the binary data and the four-bit base; determine whether the initial DNA sequence satisfies the constraint conditions, and the constraint conditions include: whether the total content of cytosine bases and guanine bases in the initial DNA sequence is within a preset range, and whether the length of the long homopolymer in the initial DNA sequence is less than a length threshold; if the constraint conditions are not met, perform pseudo-random construction on the initial DNA sequence to obtain a data storage DNA sequence that meets the constraints, and the pseudo-random construction refers to: recursively calling a pseudo-random library to perform sum-product operations on the initial DNA sequence.
[0117] In some optional embodiments, the encoding module is also used to add primers to the data storage DNA sequence according to the original data, and to add marker bits to the data storage DNA sequence according to the pseudo-randomization structure and the hybrid encoder to obtain a final data storage DNA sequence.
[0118] In some optional embodiments, the encoding module is further used to divide the binary data according to a first number of characters input by the hybrid encoder to obtain multiple binary sequences with a first length; encode the multiple binary sequences according to the encoding algorithm to obtain encoding sequences with a second length, where the second number is the number of characters output by the hybrid encoder; and divide the encoding sequence according to the preset DNA sequence length to obtain a codeword sequence with redundancy.
[0119] In some optional embodiments, the encoding module is further configured to, when the encoding algorithm is low-density parity-check encoding, sequentially multiply the multiple binary sequences by a generator matrix of the low-density parity-check encoding to generate redundant bits, and obtain a coding sequence with a length of the second number according to the generated redundant bits; when the encoding algorithm is polarization encoding, according to the generator matrix of the polarization encoding, generate a series of synthetic channels by recursively polarizing the multiple binary sequences, select the most reliable channel, fill the redundant bits according to the frozen bits of the polarization encoding, and obtain a coding sequence with a length of the second number.
[0120] In some optional embodiments, the decoding module is also used to convert the codeword region in the target data storage DNA sequence into multiple pseudo-random binary sequences according to the mapping relationship from the four-bit base to the binary data; and convert the multiple pseudo-random binary sequences into multiple binary codeword sequences according to the pseudo-randomization structure.
[0121] In some optional embodiments, the decoding module is further configured to, when the encoding algorithm is low-density parity-check encoding, convert the multiple binary codeword sequences into a first codeword sequence according to the number of output characters of the low-density parity-check encoding, and iteratively decode according to the first codeword sequence and a check matrix of the low-density parity-check encoding to obtain a binary sequence; and when the encoding algorithm is polarization encoding, convert the multiple binary codeword sequences into a second codeword sequence according to the number of output characters of the polarization encoding, and sequentially decode the second codeword sequence according to a generator matrix and frozen bits of the polarization encoding to obtain multiple binary sequences.
[0122] The present application also provides an electronic device, referring to Figure 6 , Figure 6 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device 600 includes: a memory 610 and a processor 620. The memory 610 and the processor 620 are connected via a bus communication. A computer program is stored in the memory 610. The computer program can be run on the processor 620, thereby implementing the steps of the efficient DNA storage method based on the hybrid coding strategy described in the embodiment of the present application.
[0123] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the efficient DNA storage method based on the hybrid coding strategy described in the embodiment of the present application are implemented.
[0124] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the efficient DNA storage method based on the hybrid coding strategy described in the embodiment of the present application.
[0125] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0126] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0127] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0128] The above is a detailed introduction to an efficient DNA storage method and system based on a hybrid coding strategy provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An efficient DNA storage method based on a hybrid coding strategy, characterized in that: The method comprises: Performing statistical analysis on the raw data to be stored to obtain data attributes, the data attributes including: data type, data volume, and data distribution; Determining a coding algorithm and parameter settings of a hybrid encoder according to the data attributes and coding requirements, wherein the coding algorithm is low-density parity-check coding or polar coding; Converting the original data into binary data, and dividing and block encoding the binary data according to a preset DNA sequence length, an encoding algorithm and parameter settings of the hybrid encoder to obtain a codeword sequence with redundancy; According to the mapping relationship between binary data and four-bit bases, the redundant codeword sequence is converted to obtain a data storage DNA sequence; According to the original data and the hybrid encoder, primers and markers are added to the data storage DNA sequence to obtain a final data storage DNA sequence, wherein the primers are used to record information of the DNA sequence storing the original data, and the markers are used to record at least parameter settings of the hybrid encoder.
2. The method according to claim 1, characterized in that According to the mapping relationship between binary data and four-bit bases, the redundant codeword sequence is converted to obtain a data storage DNA sequence, including: According to the mapping relationship between the binary data and the four-bit bases, the redundant codeword sequence is converted into an initial DNA sequence; Determining whether the initial DNA sequence satisfies constraint conditions, wherein the constraint conditions include: whether the total content of cytosine bases and guanine bases in the initial DNA sequence is within a preset range, and whether the length of a long homopolymer in the initial DNA sequence is less than a length threshold; When the constraint condition is not satisfied, the initial DNA sequence is pseudo-randomly constructed to obtain a data storage DNA sequence satisfying the constraint, wherein the pseudo-random construction refers to recursively calling a pseudo-random library to perform sum-product operations on the initial DNA sequence.
3. The method according to claim 2, characterized in that According to the original data and the hybrid encoder, a primer and a marker are added to the data storage DNA sequence to obtain a final data storage DNA sequence, including: Primers are added to the data storage DNA sequence according to the original data, and marker bits are added to the data storage DNA sequence according to the pseudo-randomization structure and the hybrid encoder to obtain a final data storage DNA sequence.
4. The method according to any one of claims 1 to 3, characterized in that: According to the preset DNA sequence length, the encoding algorithm and parameter settings of the hybrid encoder, the binary data is divided and block-encoded to obtain a codeword sequence with redundancy, including: According to a first number of characters input by the hybrid encoder, the binary data is divided to obtain a plurality of binary sequences having a length of the first number; Encode the multiple binary sequences according to the encoding algorithm to obtain encoding sequences with a length of a second number, where the second number is the number of characters output by the hybrid encoder; The coding sequence is divided according to the preset DNA sequence length to obtain a codeword sequence with redundancy.
5. The method according to claim 4, characterized in that Encoding the multiple binary sequences according to the encoding algorithm to obtain encoding sequences with a length of a second number, comprising: In the case where the coding algorithm is low-density parity check coding, the multiple binary sequences are sequentially multiplied by a generator matrix of the low-density parity check coding to generate redundant bits, and a coding sequence having a length of a second number is obtained according to the generated redundant bits; When the coding algorithm is polarization coding, the multiple binary sequences are recursively polarized to generate a series of synthetic channels according to a generator matrix of the polarization coding, and the most reliable channel is selected to fill redundant bits according to frozen bits of the polarization coding to obtain a coding sequence with a second length.
6. The method according to claim 1, characterized in that The method further comprises: Sequencing the data storage DNA sequence according to the primers of the original data to obtain the target data storage DNA sequence; Obtaining a coding algorithm and parameter settings of a hybrid encoder according to a marker bit in the target data storage DNA sequence; According to the mapping relationship from the four-bit base to the binary data, the target data storage DNA sequence is converted to obtain a plurality of binary codeword sequences; Decoding the plurality of binary codeword sequences according to the encoding algorithm and parameter settings of the hybrid encoder, removing redundant characters in the codewords, and obtaining binary data; The binary data is converted into raw data.
7. The method according to claim 6, characterized in that In the case where the target data storage DNA sequence is subjected to pseudo-random construction processing, the target data storage DNA sequence is converted according to the mapping relationship between the four bases and the binary data to obtain a plurality of binary codeword sequences, including: According to the mapping relationship from the four bases to the binary data, converting the codeword region in the target data storage DNA sequence into a plurality of pseudo-random binary sequences; According to the pseudo-randomization construction, the plurality of pseudo-random binary sequences are converted into a plurality of binary codeword sequences.
8. The method according to claim 6 or 7, characterized in that: According to the encoding algorithm and parameter setting of the hybrid encoder, the multiple binary codeword sequences are decoded, and redundant characters in the codewords are removed to obtain binary data, including: In the case where the coding algorithm is low-density parity check coding, converting the multiple binary codeword sequences into a first codeword sequence according to the number of output characters of the low-density parity check coding, and performing iterative decoding according to the first codeword sequence and a check matrix of the low-density parity check coding to obtain a binary sequence; When the coding algorithm is polar coding, the multiple binary codeword sequences are converted into second codeword sequences according to the number of output characters of the polar coding, and the second codeword sequences are sequentially decoded according to a generator matrix and frozen bits of the polar coding to obtain multiple binary sequences.
9. An efficient DNA storage system based on a hybrid coding strategy, characterized in that: The system comprises: The encoding module is used to perform statistical analysis on the original data to be stored to obtain data attributes, wherein the data attributes include: data type, data volume, and data distribution; determine the encoding algorithm and parameter settings of the hybrid encoder according to the data attributes and encoding requirements, wherein the encoding algorithm is low-density parity check encoding or polarization encoding; convert the original data into binary data, and divide and block encode the binary data according to a preset DNA sequence length, the encoding algorithm and parameter settings of the hybrid encoder to obtain a codeword sequence with redundancy; convert the codeword sequence with redundancy according to a mapping relationship between binary data and four-bit bases to obtain a data storage DNA sequence; add primers and markers to the data storage DNA sequence according to the original data and the hybrid encoder to obtain a final data storage DNA sequence, wherein the primers are used to record information of the DNA sequence storing the original data, and the markers are used to record at least the parameter settings of the hybrid encoder; A decoding module is used to sequence a data storage DNA sequence according to the primers of the original data to obtain a target data storage DNA sequence; obtain an encoding algorithm and parameter settings of a hybrid encoder according to a mark bit in the target data storage DNA sequence; convert the target data storage DNA sequence according to a mapping relationship from the four-bit base to binary data to obtain a plurality of binary code word sequences; decode the plurality of binary code word sequences according to the encoding algorithm and parameter settings of the hybrid encoder, remove redundant characters in the code words, and obtain binary data; and convert the binary data into original data.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the efficient DNA storage method based on the hybrid coding strategy described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
DNA storage coding method and device based on decimal system, and readable storage medium
CN114974429A
Hybrid system DNA encoding and decoding method and device
CN117577200A
Gene sequence error correction algorithm and system based on Gollope
CN118298873A