DNA-based information encoding method, decoding method, and computer-readable storage medium

By using the encoding method of index sequence and error correction redundant information in DNA storage, combined with the three-segment base substitution rule and RS error correction code, the problems of information integrity and correctness in DNA storage are solved, and an efficient encoding and decoding process and improved storage density are achieved.

CN115206430BActive Publication Date: 2025-09-23TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210697607.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-20
Publication Date
2025-09-23
Estimated Expiration
2042-06-20

AI Technical Summary

Technical Problem

In the existing technology, when DNA stores information, there is a problem that the integrity and correctness of the information are difficult to ensure during the encoding and decoding process. In particular, errors are easily introduced during the DNA synthesis and sequencing process, affecting the storage accuracy.

Method used

A DNA-based information encoding method is adopted. By dividing the information block into an index number and error correction redundant information, and using a three-segment base substitution rule and RS error correction code, the binary data is converted into a deoxyribonucleotide sequence, and the index number and error correction redundant information are added to ensure the accuracy of the encoding and decoding process.

Benefits of technology

It realizes an efficient encoding and decoding process, meets biological requirements, improves storage density, and can correct errors in the storage process during decoding to ensure the integrity and correctness of the information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115206430B_ABST
    Figure CN115206430B_ABST
Patent Text Reader

Abstract

The present invention provides a DNA-based information encoding method, decoding method, and computer-readable storage medium. The information encoding method comprises the following steps: Step S1: obtaining byte stream data of an information file to be encoded; Step S2: dividing the byte stream data into multiple information blocks and assigning an index number to each information block; Step S3: adding error correction redundant information to each information block; Step S4: converting each information block into a binary sequence; Step S5: converting the binary sequence of each information block into a deoxyribonucleotide sequence consisting of the four bases A, T, C, and G; Step S6: outputting the deoxyribonucleotide sequence as encoded information. The encoding and decoding method of the present invention has high encoding and decoding efficiency and can ensure information integrity and accuracy during encoding and decoding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of biotechnology and information technology, and in particular to a DNA-based information encoding method, a decoding method, and a computer-readable storage medium. Background Art

[0002] The rapid development of IT equipment and broadband networks has led to exponential growth in digital information. Emerging sensor network technologies are likely to drive further rapid growth. Virtual storage and cloud computing are expected to play an even greater role in the future, posing challenges to the management of massive storage resources. To date, the accumulated stored data is estimated to exceed 20 zettabytes, and this amount is growing by approximately 50% annually. It is predicted that by 2040, it will exceed 3 yottabytes, requiring more than 10 zettabytes of data. 9 kg of silicon wafers as storage backup, but according to forecasts, the output of silicon wafers in 2040 will be only 10 7 ~10 8 kg, which puts a severe test on the storage system. This prediction has stimulated the exploration of cost-competitive storage materials, hoping to find a volume density greater than 10 times that of flash memory. 3 times, but the storage energy consumption is 10 times less than flash memory 8 times the new storage material.

[0003] After a period of exploration and experimental verification, it is believed that using DNA as a medium for storing information is an effective solution to the current problem of increasing information volume. Traditional information storage media use binary data, representing two states: "0" and "1." However, DNA contains four deoxyribonucleotides: "A," "T," "C," and "G," allowing for data storage using a quaternary system. Furthermore, due to its nanoscale dimensions, DNA storage can theoretically achieve a much higher density than disks, flash memory, and other storage methods. Researchers believe that if information can be packed as densely as E. coli genes, approximately 1 kilogram of DNA could meet the world's storage needs. With the gradual maturity of DNA synthesis (data writing) and DNA sequencing (data reading) technologies, research efforts in DNA storage have yielded significant results, and the application prospects of DNA storage are broad.

[0004] As research on DNA storage progresses, how to ensure the integrity and correctness of information during the encoding and decoding process has become a matter of great concern in this field.

[0005] It should be noted that the information disclosed in the above background technology section is only used to understand the background of this application, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention

[0006] In order to make up for the deficiencies of the prior art, the present application provides a DNA-based information encoding method, decoding method and computer-readable storage medium.

[0007] In a first aspect, the present application provides a DNA-based information encoding method, comprising the following steps:

[0008] Step S1: Obtain byte stream data of the information file to be encoded;

[0009] Step S2: Divide the byte stream data into multiple information blocks, and assign an index number to each information block;

[0010] Step S3: adding error correction redundant information to each information block;

[0011] Step S4: convert each information block into a sequence in binary form;

[0012] Step S5: converting the binary sequence of each information block into a deoxyribonucleotide sequence consisting of four bases: A, T, C, and G;

[0013] Step S6: Outputting the deoxyribonucleotide sequence as coding information.

[0014] Preferably, in step S5, for sequences other than index numbers, base conversion is performed in bytes, and in each byte, two different bases are used to replace the first three bits according to the bit value combination of the first three bits, one base is used to replace the middle two bits according to the bit value combination of the middle two bits, and one base is used to replace each of the last three bits according to the bit value of each bit and the first two bases of the current position; for sequences of index numbers, two different bases are used to replace the first three bits according to the bit value combination of the first three bits, one base is used to replace the middle two bits according to the bit value combination of the middle two bits, and one base is used to replace each of the remaining bits according to the bit value of each bit and the first two bases of the current position.

[0015] Preferably, the first three bits are replaced by two different bases according to the position value combination of the first three bits, specifically including: "000", "001", "010", "011", "100", "101", "110", "111" are replaced by AC, AG, TC, TG, CA, CT, GA, GT respectively.

[0016] Preferably, the use of one base to replace the middle two bits according to the position value combination of the middle two bits specifically includes: "00", "01", "10", and "11" are replaced with A, T, C, and G respectively.

[0017] Preferably, one base is used to replace each of the last three bits or the remaining bits according to the bit value of each bit in the last three bits or the remaining bits and the first two bases of the current bit, specifically including: when the current bit is "0" and the first two bases of the current position are a group consisting of AA, AT, AC, AG, TA, TT, TC, TG, CA, CT, CC, CG, GA, GT, GC, and GG, the current bit is correspondingly replaced with one of C, C, A, A, G, G, A, C, T, A, A, A, C, A, A, A; when the current bit is "1" and the first two bases of the current position are a group consisting of AA, AT, AC, AG, TA, TT, TC, TG, CA, CT, CC, CG, GA, GT, GC, and GG, the current bit is correspondingly replaced with one of G, G, G, C, C, C, G, T, G, G, T, T, T, C, T, T.

[0018] Preferably, the index number is added in front of the information block, and the error correction redundant information is added after the information block; or, the index number is added after the information block, and the error correction redundant information is added in front of the information block.

[0019] Preferably, the information block is 20 bytes in size, the index number is 2 bytes in size, and the error correction redundant information is 4 bytes in size.

[0020] Preferably, the error correction redundant information adopts RS error correction code.

[0021] In a second aspect, the present application further provides a DNA-based information decoding method for decoding information encoded using the DNA-based information encoding method as described in the first aspect, comprising the following steps:

[0022] Step T1: obtaining the deoxyribonucleotide sequence to be decoded;

[0023] Step T2: converting the deoxyribonucleotide sequence into a binary sequence, and then converting it into byte stream data;

[0024] Step T3: using the error correction redundant information in the byte stream data to check and correct errors on the information blocks contained in the byte stream data;

[0025] Step T4: sorting each information block using the index sequence number in the byte stream data to restore the original information;

[0026] Step T5: Output the restored original information.

[0027] In a second aspect, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the DNA-based information encoding method as described in the first aspect or the DNA-based information decoding method as described in the second aspect.

[0028] The beneficial effects of the present application include: the encoding and decoding method of computer digital information when using DNA to store information has a high encoding and decoding efficiency. At the same time, by adding index numbers and error correction redundant information, the integrity and correctness of the information during encoding and decoding can be guaranteed. The present invention can encode and decode computer digital files of any format, such as: TXT text, JPG pictures, MP4 videos, MP3 audio and other digital files.

[0029] In a further preferred technical solution, during the encoding and decoding process, base conversion is performed in bytes, each byte of information is converted into a fixed length of bases, and the structure of the DNA chain is designed according to the conversion ratio, which is more flexible.

[0030] In a further preferred technical solution, the base substitution rules used in the encoding and decoding method have a certain self-checking capability. Combined with the RS error correction code to add redundant information, only a small amount of redundant information is needed to have self-checking and error correction capabilities. This method of reducing redundancy can also improve the storage density of the entire DNA storage.

[0031] The encoding and decoding method of the embodiment of the present invention can achieve high encoding and decoding efficiency while also avoiding the impact on the accuracy of DNA synthesis and sequencing processes due to failure to meet biological requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a flow chart of a DNA-based information encoding method according to a specific embodiment of the present invention;

[0033] Figure 2 is a flow chart of a DNA-based information decoding method according to a specific embodiment of the present invention;

[0034] Figure 3 is the JPG picture to be stored in Example 1 of the present invention;

[0035] Figure 4 is a flow chart of the DNA-based information encoding method in Example 1 of the present invention;

[0036] Figure 5 Schematic diagram of the structure of a single DNA chain after encoding in Example 1 of the present invention;

[0037] Figure 6This is a coding information diagram of the text of "Quiet Night Thoughts" encoded in the form of a deoxyribonucleic acid sequence in Example 1 of the present invention;

[0038] Figure 7 is encoded in the form of a deoxyribonucleic acid sequence in Example 1 of the present invention Figure 3 A screenshot of some of the encoding information of the JPG image shown;

[0039] Figure 8 This is a flow chart of the DNA-based information decoding method in Example 2 of the present invention. DETAILED DESCRIPTION

[0040] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope of the present invention and its application.

[0041] Research on DNA storage has revealed several challenges. First, directly converting the information to be stored on a computer into deoxyribonucleotides using a quaternary conversion method fails to meet certain biological requirements. These requirements primarily include two aspects: 1. The G and C content of deoxyribonucleotides should ideally be between 40% and 60%; 2. The converted DNA chain should minimize the presence of single repeats of bases, meaning that a single base should not appear three or more times consecutively. This will affect the accuracy of DNA synthesis and sequencing. Secondly, due to the immaturity of DNA synthesis and sequencing technology, errors can be introduced during the synthesis and sequencing stages. Data indicate that the probability of single base errors during sequencing with second-generation DNA sequencing technology is 1% to 2%. These errors can lead to insertions, deletions, and substitutions of deoxyribonucleotides within the DNA chain, and in severe cases, can even result in the loss of large segments of sequence. Therefore, the inventors have designed a coding method specifically for converting stored information into deoxyribonucleotides. This method achieves high encoding and decoding efficiency while also effectively meeting the aforementioned biological requirements. Furthermore, to ensure accurate stored information during decoding, error correction measures are incorporated into the encoding and decoding process of DNA storage. If errors occur during storage, these errors can be corrected during decoding to obtain the correct stored information. The encoding and decoding method of the present invention addresses these two key issues in DNA storage, achieving high encoding and decoding efficiency while ensuring information integrity and accuracy during decoding.

[0042] like Figure 1 As shown, a specific embodiment of the present invention provides a DNA-based information encoding method, comprising the following steps:

[0043] Step S1: Obtain byte stream data of the information file to be encoded;

[0044] Step S2: Divide the byte stream data into multiple information blocks, and assign an index number to each information block;

[0045] Step S3: adding error correction redundant information to each information block;

[0046] Step S4: convert each information block into a sequence in binary form;

[0047] Step S5: converting the binary sequence of each information block into a deoxyribonucleotide sequence consisting of four bases: A, T, C, and G;

[0048] Step S6: Outputting the deoxyribonucleotide sequence as coding information, wherein the output information can be stored as a text file.

[0049] In a preferred embodiment, in step S5, a three-segment base substitution rule is used to convert the binary sequence into a deoxyribonucleotide sequence consisting of the four bases A, T, C, and G. Specifically, for sequences other than index numbers, base conversion is performed on a byte basis. In each byte, two different bases are used to replace the first three bits according to the bit value combination of the first three bits, one base is used to replace the middle two bits according to the bit value combination of the middle two bits, and one base is used to replace each of the last three bits according to the bit value of each bit and the first two bases of the current position. For sequences with index numbers, two different bases are used to replace the first three bits according to the bit value combination of the first three bits, one base is used to replace the middle two bits according to the bit value combination of the middle two bits, and one base is used to replace each of the remaining bits according to the bit value of each bit and the first two bases of the current position. The three-stage base replacement method of this preferred embodiment can not only meet biological requirements well, but also perform certain verification and error correction according to its three-stage base replacement rules to obtain correct storage information.

[0050] Further preferably, the first three digits are replaced by two different bases according to the combination of the first three digit values, specifically: "000", "001", "010", "011", "100", "101", "110", "111" are replaced by AC, AG, TC, TG, CA, CT, GA, GT respectively, that is, the replacement rules are shown in Table 1 below:

[0051] Table 1: Base substitution rules for the first segment

[0052] First 3 binary sequence 000 001 010 011 100 101 110 111 bases AC AG TC TG CA CT GA CT

[0053] Further preferably, the middle two bits are replaced with one base according to the position value combination of the middle two bits, specifically including: "00", "01", "10", and "11" are replaced with A, T, C, and G respectively. That is, the replacement rules are shown in Table 2 below:

[0054] Table 2: Base substitution rules for the second segment

[0055] Middle 2-bit binary sequence 00 01 10 11 bases A T C G

[0056] Further preferably, the step of replacing each of the last three or remaining bits with one base according to the bit value of each bit in the last three or remaining bits and the first two bases of the current bit specifically includes: when the current bit is "0" and the first two bases of the current position are a group consisting of AA, AT, AC, AG, TA, TT, TC, TG, CA, CT, CC, CG, GA, GT, GC, and GG, the current bit is correspondingly replaced with one of C, C, A, A, G, G, A, C, T, A, A, A, C, A, A, A; when the current bit is "1" and the first two bases of the current position are a group consisting of AA, AT, AC, AG, TA, TT, TC, TG, CA, CT, CC, CG, GA, GT, GC, and GG, the current bit is respectively replaced with one of G, G, G, C, C, C, G, T, G, G, T, T, T, C, T, T, that is, the replacement rules are shown in Table 3 below:

[0057] Table 3: Base substitution rules for the third segment

[0058]

[0059] In a preferred embodiment, the index number is added in front of the information block and the error correction redundant information is added after the information block; or, the index number is added after the information block and the error correction redundant information is added in front of the information block.

[0060] In a preferred embodiment, the information block is 20 bytes in size, the index number is 2 bytes in size, and the error correction redundant information is 4 bytes in size.

[0061] In a preferred embodiment, the error correction redundant information adopts RS (Reed Solomon) error correction code.

[0062] like Figure 2 As shown, a specific embodiment of the present invention further provides a DNA-based information decoding method for decoding information encoded using the above-mentioned DNA-based information encoding method, comprising the following steps:

[0063] Step T1: obtaining the deoxyribonucleotide sequence to be decoded;

[0064] Step T2: converting the deoxyribonucleotide sequence into a binary sequence, and then converting it into byte stream data;

[0065] Step T3: using the error correction redundant information in the byte stream data to check and correct errors on the information blocks contained in the byte stream data;

[0066] Step T4: sorting each information block using the index sequence number in the byte stream data to restore the original information;

[0067] Step T5: Output the restored original information.

[0068] A coding and decoding method involved in a specific embodiment of the present invention can encode and decode any computer-stored digital information. In the following embodiments, pictures and text content are taken as examples, and the present invention is further described in detail with reference to the accompanying drawings.

[0069] Example 1

[0070] Respectively Figure 3 Take the JPG image and Li Bai's "Quiet Night Thoughts" as examples. The text of "Quiet Night Thoughts" is: "Bright moonlight shines on my bed, I wonder if it is frost on the ground. I look up at the bright moon, and look down at my hometown." The total size is 72 bytes. Figure 3 The picture shown is a JPG picture with a pixel size of 300*300, which is 7.47KB (7655 bytes). The DNA-based information encoding method combines the three-segment base substitution rule and the RS error correction code to convert the digital information file stored in the computer into base sequence information that meets biological constraints, such as Figure 4 As shown, the specific process is as follows:

[0071] First, a computer is used to read the documents containing the JPG image and the text of "Quiet Night Thoughts" respectively, read them in binary form, and convert them into byte stream data; then, according to the length design of each DNA chain, the byte stream data is divided into blocks to obtain multiple information blocks, and each information block is assigned a two-byte index number. If the index length does not meet the requirement, it is padded to two bytes; then, redundant information is added to the information blocks obtained by block division (i.e., the information blocks with added index numbers) using Reed-Solomon error correction code; then, sequence conversion is performed on the information blocks containing the index numbers and error correction redundant information. Specifically, the byte stream data stored in hexadecimal is first converted into a binary sequence such as "01001100", and then base conversion is further performed using a three-segment base substitution rule (such as Tables 1-3 above) to convert it into a deoxyribonucleotide sequence composed of the four bases A, T, C, and G; finally, it is output to TXT text to complete the encoding process.

[0072] During the information segmentation process described above, when synthesizing DNA, the length of a single strand is less than 200 bp. Therefore, the size of the information stored on a single DNA strand must be determined based on the number of deoxyribonucleotides on that strand, and the byte stream data of the information file must be segmented accordingly. Specifically, the information segmentation process is as follows: Since each DNA strand is no longer than 200 bp, and each byte is converted to 6 bp, plus there is also redundant information for index numbers and error correction, a 20-byte information segment is appropriate. In other words, the 72-byte text of "Quiet Night Thoughts" is segmented into 4 information segments, and a 7655-byte JPG image is segmented into 383 information segments. Furthermore, during the information segmentation process, the last information segment may be less than 20 bytes. In this case, this can be addressed by copying part of the previous information segment to make up the 20 bytes. For example, the last information segment of "Quiet Night Thoughts" is 12 bytes, less than 20 bytes, so the first 8 bytes of the third information segment can be copied to make up the 20 bytes.

[0073] In the above encoding process, the index number is assigned to each information block in the order of the blocks. The index number is also a sequential number, that is, it is a number sorted from 0 to large. Each index number is preferably two bytes in size. If the length is not met, "0" can be added in front until it reaches two bytes, 16 bits (bits). That is, the maximum index length in this encoding method is 2 16 , the information to be stored is divided into 2 at most 16Information blocks can be created. Alternatively, each index number can be placed at the beginning of each information block to form a new information block. For example, the index numbers for the four information blocks of the text "Quiet Night Thoughts" are 0, 1, 2, and 3. However, since each index number is preferably two bytes long, any values ​​less than two bytes can be padded with zeros. In other words, in this example, the index numbers for the four information blocks of the text "Quiet Night Thoughts" become 00, 01, 02, and 03.

[0074] During the encoding process, RS error correction code is used to add a certain amount of redundant information to each information block. For example, redundant information is added after the information block to form a new information block. During decoding, errors in the storage process can be corrected according to the RS error correction code's decoding process. When using RS error correction code, the relationship between the added redundant information and the error correction capability is: N = X / 2, where N represents the number of correctable bytes and X represents the number of redundant information bytes. For example, if RS error correction code is used to add 4 bytes of redundant information after an information block, the decoding algorithm can correct errors within 2 bytes during the storage process. In this example, the specific process of adding redundant information using RS error correction code is as follows: Since each information block contains 20 bytes of information, 4 bytes of redundant information can be added. This can correct 2 bytes of errors within the 20 bytes of information, meaning that 10% of errors can be corrected, which basically meets the requirements of DNA storage.

[0075] In the above encoding process, an index number is added in front of each information block, and redundant information for error correction is added at the back. After forming a new information block, it is still in the form of byte stream data. The byte stream data stored in hexadecimal is further converted into a binary sequence such as "01001100".

[0076] In the above encoding process, the information block that has been converted into a binary sequence is converted into a deoxyribonucleic acid sequence consisting of four bases: A, T, C, and G using a three-segment base substitution rule. Specifically, the specific process of the three-stage base substitution rule is as follows: for sequences other than the index number (i.e., the binary sequence corresponding to the original information block and the error correction redundant information), base conversion is performed on a byte-by-byte basis. Each byte of information (1 byte is 8 bits) is divided into three segments and converted separately. The first segment is the first 3 bits of information, which are converted using the first segment base substitution rule table shown in Table 1 above to convert the first 3 bits of information into 2 bp of deoxyribonucleic acid. The second segment is the 4th and 5th bits of information, which are converted using a quaternary conversion, that is, "00", "01", "10", and "11" correspond to the four bases "A", "T", "C", and "G", respectively. For details, see the second segment base substitution rule table shown in Table 2 above. The third segment is the 6th, 7th, and 8th bits of information. The conversion of the third segment is related not only to the corresponding binary sequence information, but also to the first two bases of the current position. The two together determine which base is replaced by the next bit of binary sequence information. For details, see the third segment base substitution table shown in Table 3 above. In general, every 8 bits of information is converted into 6bp. For example, the binary sequence "10110110" becomes "CTCGTA" after conversion. For sequences of index numbers, the three-segment base substitution rule is slightly different. The difference is that two different bases are used to replace the first three bits based on the combination of their bit values. One base is used to replace the middle two bits based on the combination of their bit values. Then, one base is used to replace each of the remaining bits based on the bit value of each bit and the two bases before the current position. Specifically, in this example, since the index number used is 2 bytes (16 bits of information), the first three bits of information form the first segment and are converted using the first segment base substitution rule table shown in Table 1 above. Bits 4 and 5 form the second segment and are converted using the second segment base substitution rule table shown in Table 2 above. Bits 7 to 16 form the third segment and are converted using the second segment base substitution rule table shown in Table 3 above. In other words, the 16-bit index number is converted into a 14bp DNA sequence.

[0077] After the above encoding process, the original storage information is divided into many DNA chains. In this example, the text of "Quiet Night Thoughts" is divided into 4 chains, and the JPG image is divided into 383 chains. The specific structure of each DNA chain is: 14bp index number, 120bp storage information, and 24bp error correction redundant information. The specific structure is as follows: Figure 5 shown.

[0078] After the encoding is completed, the DNA sequences obtained by converting the text of "Quiet Night Thoughts" and the JPG image are stored in two TXT files respectively. The picture of encoding the text of "Quiet Night Thoughts" with DNA sequence is as follows: Figure 6 As shown, the DNA sequence Figure 3 A partial screenshot of the JPG image encoding is shown as Figure 7 shown.

[0079] Example 2

[0080] Still using the method in Example 1 Figure 3 Taking the JPG picture and Li Bai's "Quiet Night Thoughts" as examples, the DNA-based information decoding method is to restore the deoxyribonucleic acid sequence information obtained by sequencing the DNA storage to the original information file, and correct some errors that occurred during the storage process through RS error correction code and base substitution rules, such as Figure 8 As shown, the specific process is as follows:

[0081] First, the DNA sequences of the "Quiet Night Thoughts" text and the JPG image are read from the TXT text file respectively; then the deoxyribonucleotide sequence in the read file is converted into a binary sequence such as "01001100", and then converted into a byte stream data information block stored in hexadecimal; then, each information block is verified and error-corrected; then, the complete and correct information blocks obtained after error correction are sorted according to the index sequence number to restore the original information byte stream data; finally, the decoded information is output as a file of the corresponding type to complete the decoding.

[0082] In the above decoding process, the three-segment base substitution rules in Tables 1-3 are also used when converting the DNA sequence into a binary sequence.

[0083] In the above decoding process, the RS error correction code and the three-segment replacement rule are used to verify and correct the read information, and the correct information is saved. Specifically, the information verification and error correction are performed using the RS error correction code algorithm. Since 4 bytes of redundant information are added to each information block, the 2-byte error of each information block during the storage process can be corrected. In addition, a certain degree of error correction can also be performed based on the three-step base substitution rule. Specifically, because the conversion of the binary sequence into the DNA sequence during the aforementioned encoding is strictly performed according to the three-step base substitution table, no sequences outside the table will appear. Therefore, during decoding, the process of decoding the DNA sequence into the binary sequence can also be corrected to a certain extent based on the three-step base substitution rule. For example, the binary sequence "10110110" is converted into the DNA sequence "CTCGTA". If a base substitution error occurs during DNA storage, resulting in "CTCCTA", a lookup of the third step of the base substitution table shown in Table 3 above indicates that the fourth base is incorrect and should be "A" or "G". In addition, considering the last two bases "TA", it is known that the first two bases must be "CG" to ensure that the last two bases are "TA". Therefore, the three-step base substitution rule can also be used to perform certain verification and error correction to obtain correct stored information.

[0084] In the information sorting process described above, the first two bytes of each complete and correct information block that has been corrected are read to obtain the index number of each information block. The information blocks are sorted according to the index number and then spliced ​​together to obtain the complete and correct stored information.

[0085] In the above decoding process, the information output process can read the file header information in the stored information according to the different file types, output the stored information in the form of byte stream data as the original file type, complete the decoding process, and obtain the correct original information.

[0086] Specific embodiments of the present invention provide a DNA-based information encoding and decoding method. The encoding method utilizes a three-segment base substitution rule to ensure high encoding efficiency while meeting biological constraints. Furthermore, by adding index numbers and RS error correction redundancy information, information integrity and correctness are guaranteed during decoding. The entire encoding and decoding method can store byte stream data and is applicable to computer-stored digital information in any format, such as TXT text, JPG images, MP4 video, MP3 audio, and other digital files.

[0087] A specific embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the aforementioned DNA-based information encoding method or the aforementioned DNA-based information decoding method is implemented.

[0088] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0089] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0090] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0092] The background section of the present invention may contain background information about the problem or environment of the present invention, but does not necessarily describe the prior art. Therefore, the inclusion of content in the background section is not an admission by the applicant that the prior art is present.

[0093] The above description further details the present invention in conjunction with specific / preferred embodiments, and the specific implementation of the present invention should not be construed as being limited to these descriptions. Persons skilled in the art will appreciate that, without departing from the spirit of the present invention, they may make various substitutions or modifications to the described embodiments, and such substitutions or modifications should be considered within the scope of the present invention. Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "preferred embodiments," "examples," "specific examples," or "some examples" indicates that the specific features, structures, materials, or characteristics described in conjunction with such embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of such terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Persons skilled in the art may combine and assemble the different embodiments or examples, and features of the different embodiments or examples, described herein, without conflicting opinions. Although the embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions, and modifications may be made herein without departing from the scope of the present invention.

Claims

1. A DNA-based information encoding method, characterized in that: The steps include: Step S1: Obtain byte stream data of the information file to be encoded; Step S2: Divide the byte stream data into multiple information blocks and assign an index number to each information block; the information block is 20 bytes in size, the index number is 2 bytes in size, and the error correction redundant information is 4 bytes in size; Step S3: adding error correction redundant information to each information block, wherein the error correction redundant information adopts RS error correction code; Step S4: convert each information block into a sequence in binary form; Step S5: converting the binary sequence of each information block into a deoxyribonucleotide sequence consisting of four bases: A, T, C, and G; Step S6: outputting the deoxyribonucleotide sequence as coding information; In step S5, for sequences other than index numbers, base conversion is performed in bytes. In each byte, two different bases are used to replace the first three bits according to the bit value combination of the first three bits, one base is used to replace the middle two bits according to the bit value combination of the middle two bits, and one base is used to replace each of the last three bits according to the bit value of each bit and the first two bases of the current position; for sequences of index numbers, two different bases are used to replace the first three bits according to the bit value combination of the first three bits, one base is used to replace the middle two bits according to the bit value combination of the middle two bits, and one base is used to replace each of the remaining bits according to the bit value of each bit and the first two bases of the current position.

2. The DNA-based information encoding method according to claim 1, wherein: The first three bits are replaced by two different bases according to the position value combination of the first three bits, specifically including: "000", "001", "010", "011", "100", "101", "110", "111" are replaced by AC, AG, TC, TG, CA, CT, GA, GT respectively.

3. The DNA-based information encoding method according to claim 1 or 2, wherein: The step of replacing the middle two bits with one base according to the position value combination of the middle two bits specifically includes: "00", "01", "10", and "11" are replaced with A, T, C, and G respectively.

4. The DNA-based information encoding method according to any one of claims 1 to 2, characterized in that: According to the position value of each of the last three bits or the remaining bits and the first two bases of the current bit, one base is used to replace each of the last three bits or the remaining bits, specifically including: when the current bit is "0" and the first two bases of the current position are a group selected from AA, AT, AC, AG, TA, TT, TC, TG, CA, CT, CC, CG, GA, GT, GC, and GG, the current bit is correspondingly replaced with one of C, C, A, A, G, G, A, C, T, A, A, A, C, A, A, A; when the current bit is "1" and the first two bases of the current position are a group selected from AA, AT, AC, AG, TA, TT, TC, TG, CA, CT, CC, CG, GA, GT, GC, and GG, the current bit is correspondingly replaced with one of G, G, G, C, C, C, G, T, G, G, T, T, T, C, T, T.

5. The DNA-based information encoding method according to any one of claims 1 to 2, characterized in that: The index number is added in front of the information block, and the error correction redundant information is added after the information block; or, the index number is added after the information block, and the error correction redundant information is added in front of the information block.

6. A DNA-based information decoding method for decoding information encoded using the DNA-based information encoding method according to any one of claims 1 to 5, characterized in that: The steps include: Step T1: obtaining the deoxyribonucleotide sequence to be decoded; Step T2: converting the deoxyribonucleotide sequence into a binary sequence, and then converting it into byte stream data; Step T3: using the error correction redundant information in the byte stream data to check and correct errors on the information blocks contained in the byte stream data; Step T4: sorting each information block using the index sequence number in the byte stream data to restore the original information; Step T5: Output the restored original information.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the DNA-based information encoding method according to any one of claims 1 to 5 or the DNA-based information decoding method according to claim 6 is implemented.

Citation Information

Patent Citations

  • DNA data storage coding and decoding method

    CN109300508A

  • Coding and decoding method and coding and decoding device for binary information to base sequence for DNA data storage

    CN112382340A