Double-layer rs core error correction dna data storage system and method

CN122967798APending Publication Date: 2026-10-23HARBIN UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611458817.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-19
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]但该发明存在以下不足:该发明采用利用传统喷泉码或Reed-Solomon码解码,区分不了片段局部随机错误和大片段缺失断点错误,一旦出现DNA片段批量丢失,会造成解码失效;二是编码映射没有结合DNA生化约束,容易生成高GC、长同聚物碱基序列,造成合成、测序失败;三是校验冗余参数固定,无法在存储密度与容错能力之间灵活权衡;四是没有分层校验机制,纠错能力受限于容错上限低

Benefits of technology

[0026]第一、采用局部RS、全局RS两套独立校验编码,分别生成分段局部RS校验码与全局RS校验码,针对片段内部随机碱基错配采用开销较低的局部RS修复,针对片段断点、成簇符号丢失切换全局RS断点修复,在译码计算开销、冗余存储开销、断点容错能力三者之间实现平衡。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122967798A_ABST
    Figure CN122967798A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on double-layer RS core error correction DNA data storage system and method, belong to biological information digital encoding storage technical field.The system includes data preprocessing coding module, sequence optimization module, DNA synthesis storage module, sequencing decoding module, fault-tolerant error correction module and data output module;The method is by original digital data and does format conversion, binary block and double-layer RS layered coding, generates and includes local, global check code bit stream;Double-base mapping is obtained DNA sequence, and GC content constraint, long homopolymer filtration and bit compensation are completed;Again, DNA solid-phase synthesis, encapsulation and archiving are completed;After sequencing reading, damaged binary sequence is obtained by reverse mapping;Fault-tolerant error correction module executes double-layer fault-tolerant criterion, and local RS is preferentially used to repair random base mismatch in fragment, and local failure is switched to global RS to realize fragment breakpoint repair, finally restores and outputs original digital file, improves the data restoration accuracy of DNA storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of bioinformatics digital coding and storage technology, specifically relating to a DNA data storage system and method based on a dual-layer RS ​​core error correction system. Background Technology

[0002] With the rapid development of big data, cloud computing, and artificial intelligence technologies, global data storage is growing exponentially. Traditional magnetic storage, optical storage, and flash memory storage media have shortcomings such as limited storage density, short shelf life, and high energy consumption for long-term maintenance. DNA molecules, as natural information carriers, have advantages such as ultra-high storage density, long-term preservation at room temperature, and low energy consumption, making them an important direction for next-generation archival storage technology.

[0003] The existing technical solution (Chinese invention patent publication number CN 121938475 A) discloses a DNA information encryption and error correction method based on secondary structure fingerprint separation and storage, comprising: an information DNA encoding stage, a structural signature generation stage, a signature DNA encoding stage, an information DNA and signature DNA synthesis stage, and a decoding and error correction stage. The information DNA encoding stage encodes the original data into information DNA fragments; the structural signature generation stage calculates structural feature parameters, generates a compact structural signature, and associates the fragment ID with the compact structural signature to form a signature dataset; the signature DNA encoding stage encodes the signature dataset into signature DNA fragments; the information DNA and signature DNA synthesis stage synthesizes the information DNA fragments and signature DNA fragments separately and stores them physically separately; the decoding and error correction stage verifies and corrects the consensus sequence based on the signature dataset to recover the original data. This application stores the structural signature in independent DNA molecules, achieving physical layer encryption protection.

[0004] However, this invention has the following shortcomings: First, it uses traditional fountain codes or Reed-Solomon codes for decoding, which cannot distinguish between local random errors in fragments and large fragment loss breakpoint errors. Once a batch of DNA fragments is lost, decoding will fail. Second, the encoding mapping does not incorporate DNA biochemical constraints, which can easily generate high GC and long homopolymer base sequences, causing synthesis and sequencing failures. Third, the check redundancy parameter is fixed, making it impossible to flexibly balance storage density and fault tolerance. Fourth, there is no hierarchical check mechanism, and the error correction capability is limited by the low fault tolerance limit. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention aims to provide a DNA data storage system and method based on a dual-layer RS ​​core error correction mechanism. This system utilizes binary data segmentation of DNA data, dual-base mapping encoding, dual-layer RS ​​hierarchical error correction encoding, DNA sequence biochemical constraint filtering, and a dual-layer verification and repair mechanism for sequencing decoding. This enables high-density writing of digital information into DNA molecules while simultaneously being compatible with local base mismatches and DNA fragment deletion repair, thereby improving the storage density, fault tolerance, and data restoration accuracy of DNA storage.

[0006] To address the above problems, the present invention provides the following technical solution:

[0007] A DNA data storage system based on a two-layer RS ​​core error correction module includes a data preprocessing encoding module, a sequence optimization module, a DNA synthesis and storage module, a sequencing decoding module, an error-tolerant and error-correcting module, and a data output module.

[0008] The data preprocessing encoding module is used to complete the conversion of the original data format, segmentation of the binary data stream, generate a segmented local RS check code for each data segment, and generate a global RS check code for all data segments to complete the layered encoding.

[0009] The sequence optimization module is used for DNA sequence biochemical filtering and bit compensation;

[0010] The DNA synthesis and storage module is used for high-throughput DNA synthesis, purification, silica coating, and offline archiving.

[0011] The sequencing decoding module is used for high-throughput sequencing read-in, adapter identification, fragment splitting and splicing, and reverse base mapping to output damaged binary data.

[0012] The fault-tolerant and error-correcting module employs two RS decoding paths and a dual-layer fault-tolerant criterion: it prioritizes calling the local RS decoding path to perform segment internal error repair using the local RS check code; when the number of segment detected error symbols exceeds the maximum number of error-correcting symbols in the local RS, it determines that the local repair has failed and automatically switches to the global RS decoding path to perform breakpoint repair using the global RS check code.

[0013] The data output module restores the repaired binary stream to the original digital file output.

[0014] Furthermore, the maximum number of error-correctable symbols in the local RS used by the fault-tolerant and error-correcting module is [missing value]. The maximum number of error-correctable symbols in global RS Where r1 is the local RS check symbol length and r2 is the global RS check symbol length.

[0015] Furthermore, in the aforementioned dual-layer RS ​​core error-correcting DNA data storage system, the sequencing decoding module uses two bases, each carrying 4 bits of binary data, with a single 64-bit data segment corresponding to 16 sets of two bases.

[0016] A method for storing DNA data based on a two-layer RS ​​core error correction system, implemented on any of the above-mentioned two-layer RS ​​core error correction DNA data storage systems, includes the following steps:

[0017] S1. Read the raw digital data, convert it into a binary data stream, and perform binary segmentation;

[0018] S2. The data preprocessing and encoding module completes the dual-base mapping, constructs the effective data layer and the index identifier layer, generates segmented local RS check codes and global RS check codes respectively, and performs dual-layer RS ​​encoding.

[0019] S3. The sequence optimization module calculates GC content, filters long homogeneous bases, ensures bit compensation, and adds adapter sequences.

[0020] S4, DNA synthesis, purification, silica encapsulation, offline archiving and storage;

[0021] S5. DNA sample sequencing, adapter splitting and splicing, and reverse mapping to obtain damaged binary data;

[0022] S6. The fault-tolerant and error-correcting module calculates the RS adjoint equation and solves the error polynomial; it prioritizes local segmental RS error correction; and it enables global RS breakpoint repair when the error exceeds the local threshold.

[0023] S7, the data output module restores the repaired binary data to the original digital file and processes all DNA fragments in a loop.

[0024] Furthermore, finite fields Primitive polynomials ,in, These are formal variables in a finite field polynomial, not unknowns in ordinary algebra. They do not represent specific numerical values ​​but are used to construct... Polynomial notation for Galois fields; for The primitive polynomial of a finite field is used to define the finite field operation rules used in RS encoding; each term of the polynomial represents a polynomial term of the corresponding degree, with the constant term 1 being a zero-degree term; binary field. In polynomial addition, modulo-2 XOR operation is used.

[0025] The beneficial effects of this invention, based on a dual-layer RS ​​core error-correcting DNA data storage system and method, are as follows:

[0026] First, two independent check codes, local RS and global RS, are used to generate segmented local RS check codes and global RS check codes respectively. Local RS with lower overhead is used to repair random base mismatches within a segment, while global RS is used to repair segment breakpoints and clustered symbol loss. A balance is achieved between decoding computation overhead, redundant storage overhead, and breakpoint fault tolerance.

[0027] Second, a sequence optimization module is set up, which includes GC content constraints, long homogeneous base filtering, and bit compensation fidelity mechanism. This avoids base sequences that are not conducive to synthesis and sequencing while ensuring that the original information remains unchanged, thus solving the problem that biochemical constraints can easily cause synthesis and sequencing failures and reducing the probability of failure in DNA molecule processing.

[0028] Third, the two-layer RS ​​architecture splits the check redundancy into two parts: local check and global check. The length of the local RS check symbol can be configured separately. Global RS check symbol length It can flexibly adjust the error correction capability according to the actual storage scenario, overcoming the drawback of fixed verification redundancy parameters and the inability to balance storage density and fault tolerance.

[0029] Fourth, a two-layer fault-tolerance criterion hierarchical verification mechanism is constructed, with two levels of coding working together to provide fault-tolerance protection, overcoming the shortcomings of hierarchical verification and the limitation of fault tolerance upper limit, and improving the overall fault tolerance capability of the system; at the same time, the decoding path is scheduled hierarchically, with low-overhead local decoding performed for minor errors, and global repair is then activated for serious breakpoint errors, making the allocation of computing resources more reasonable. Attached Figure Description

[0030] Figure 1 This is a flowchart of the dual-layer RS ​​core error-correcting DNA data storage system of the present invention;

[0031] Figure 2 This is a diagram showing the output results obtained after the method of the present invention is run in simulation software;

[0032] Figure 3 This is the effect obtained after the method of the present invention is run in simulation software. Figure 1 ;

[0033] Figure 4 This is the effect obtained after the method of the present invention is run in simulation software. Figure 2 . Detailed Implementation

[0034] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings. Specific Implementation Method 1

[0036] The following is a specific implementation of the dual-layer RS ​​core error-correcting DNA data storage system of the present invention, including a data preprocessing encoding module, a sequence optimization module, a DNA synthesis and storage module, a sequencing decoding module, an error-tolerant and error-correcting module, and a data output module;

[0037] The data preprocessing encoding module is used to complete the conversion of the original data format, segmentation of the binary data stream, generate a segmented local RS check code for each data segment, and generate a global RS check code for all data segments to complete the layered encoding.

[0038] The sequence optimization module is used for DNA sequence biochemical filtering and bit compensation;

[0039] The DNA synthesis and storage module is used for high-throughput DNA synthesis, purification, silica coating, and offline archiving.

[0040] The sequencing decoding module is used for high-throughput sequencing read-in, adapter identification, fragment splitting and splicing, and reverse base mapping to output damaged binary data.

[0041] The fault-tolerant and error-correcting module employs two RS decoding paths and a dual-layer fault-tolerant criterion: it prioritizes calling the local RS decoding path to perform segment internal error repair using the local RS check code; when the number of segment detected error symbols exceeds the maximum number of error-correcting symbols in the local RS, it determines that the local repair has failed and automatically switches to the global RS decoding path to perform breakpoint repair using the global RS check code.

[0042] The data output module restores the repaired binary stream to the original digital file output. Specific Implementation Method Two

[0044] The following is a specific implementation of a dual-layer RS ​​core error-correcting DNA data storage system.

[0045] The dual-layer RS ​​core error-correcting DNA data storage system in this specific implementation further specifies, based on the first implementation, that the maximum number of locally correctable RS symbols used by the error-tolerant and error-correcting module in the dual-layer RS ​​core error-correcting DNA data storage system is: The maximum number of error-correctable symbols in global RS Where r1 is the local RS check symbol length and r2 is the global RS check symbol length.

[0046] The sequencing decoding module uses two bases, each carrying 4 bits of binary data, with a single 64-bit data segment corresponding to 16 sets of two bases. Specific Implementation Method 3

[0048] The following is a detailed implementation of the dual-layer RS ​​core error-correcting DNA data storage method.

[0049] This specific implementation method for storing DNA data based on a dual-layer RS ​​core error correction system is implemented on the DNA data storage system based on a dual-layer RS ​​core error correction system described in Implementation One or Implementation Two. The flowchart is as follows. Figure 1 As shown, it includes the following steps:

[0050] S1. Read the raw digital data, convert it into a binary data stream, and perform binary segmentation;

[0051] S2. The data preprocessing and encoding module completes the dual-base mapping, constructs the effective data layer and the index identifier layer, generates segmented local RS check codes and global RS check codes respectively, and performs dual-layer RS ​​encoding.

[0052] S3. The sequence optimization module calculates GC content, filters long homogeneous bases, ensures bit compensation, and adds adapter sequences.

[0053] S4, DNA synthesis, purification, silica encapsulation, offline archiving and storage;

[0054] S5. DNA sample sequencing, adapter splitting and splicing, and reverse mapping to obtain damaged binary data;

[0055] S6. The fault-tolerant and error-correcting module calculates the RS adjoint equation and solves the error polynomial; it prioritizes local segmental RS error correction; and it enables global RS breakpoint repair when the error exceeds the local threshold.

[0056] S7, the data output module restores the repaired binary data to the original digital file and processes all DNA fragments in a loop. Specific Implementation Method Four

[0058] The following is a detailed implementation of the dual-layer RS ​​core error-correcting DNA data storage method.

[0059] The dual-layer RS ​​core error-correcting DNA data storage method in this specific implementation further defines, based on the third specific implementation method, that: in the dual-layer RS ​​core error-correcting DNA data storage method, the finite field... The primitive polynomial is ,in, for Finite field primitive polynomials are used to define the finite field operation rules used in RS encoding.

[0060] Each term of the polynomial represents a polynomial term of the corresponding degree, with the constant term 1 being a zero-degree term; binary field In polynomial addition, modulo-2 XOR operation is used. Detailed Implementation Method Five

[0062] The following is a detailed implementation of the dual-layer RS ​​core error-correcting DNA data storage method.

[0063] The dual-layer RS ​​core error-correcting DNA data storage method in this specific implementation is further defined based on specific implementation method three or four:

[0064] S1. Raw digital data reading and binary data stream preprocessing: Reads raw digital files such as text, images, and documents, and converts them into binary data streams.

[0065] S1-1, The data preprocessing encoding module performs binary segmentation operations and pads the remaining bits at the end of the segment with zeros if they are not complete enough to form a standard segment.

[0066] Data segmentation calculation formula:

[0067] , ;

[0068] In the formula: The number of segments for the complete data; This represents the total bit length of the original file after conversion to binary. The preset standard data bit length for a single segment is 64 bits in this invention; This is the floor operator; The remaining bit length at the end of the binary stream that is less than a standard segment; This is the modulo operator; the remainder fragment is padded with zeros to a total of 64 bits.

[0069] S1-2. Construct an effective data layer, an index identifier layer, and a fault tolerance verification layer. Perform double-layer RS ​​encoding to generate segmented local check codes and global check codes.

[0070] Local segmented RS-coded polynomial

[0071]

[0072] Global RS-encoded polynomial

[0073]

[0074] In the formula: The codeword polynomial after local RS encoding; The information polynomial corresponding to the original segmented data; The total length of the check symbol for the segmented RS encoding is 8 in this invention; This is a local check remainder expression; The codeword polynomial after global RS encoding; The total length of the check symbol for the global RS encoding is 32 in this invention; The global check remainder is used; the local RS maximum error correction bits are... The global RS maximum error correction bits are ;

[0075] S2, DNA sequence biochemical constraint optimization treatment

[0076] The binary bit stream output by the hierarchical encoding is converted into the initial DNA base sequence through a 4-bit-two-base mapping table; the sequence optimization module performs sequence biochemical verification, filtering and bit compensation processing, and splices universal adapter sequences and anti-degradation protection sequences at both ends of the fragment.

[0077] S2-1, GC Content Calculation and Verification: Calculate the GC content of the DNA sequence, with a constraint range of 40%-60%, using the following formula:

[0078]

[0079] In the formula: GC content of DNA sequence; The number of G bases in the sequence; The number of C bases in the sequence; The total number of bases in the entire DNA fragment

[0080] S2-2, Homopolymer filtration: Remove homogeneous base fragments with more than 3 consecutive positions;

[0081] S2-3, Fault-tolerant bit compensation: The fault-tolerant mapping table is called to perform bit compensation on the fragment whose bases are adjusted to ensure that the original information is not lost. The comparison formula is as follows;

[0082]

[0083] In the formula: To optimize the bit set before the permutation; To optimize the bit set after the permutation; Representative concurrency; This represents modulo-2 operations.

[0084] S2-4. Universal adapter sequences and anti-degradation protection sequences are added to both ends of the sequence to mark fragment boundaries and enhance the DNA molecule's ability to resist degradation during storage.

[0085] S3, High-throughput DNA synthesis, purification, and offline archiving.

[0086] S3-1, Solid-phase synthesis: The DNA synthesis and storage module receives the optimized DNA base sequence and uses a solid-phase phosphorous amide high-throughput synthesis process to synthesize DNA single-stranded oligonucleotide fragments in batches.

[0087] S3-2. Product purification: Magnetic bead purification process is used to remove synthetic impurities and short-chain unqualified products;

[0088] S3-3, Silica Coating and Encapsulation: The purified DNA molecules are coated with silica nanoparticles to form a protective layer on the outer layer of the molecules, which isolates oxygen, water vapor, acids and alkalis and inhibits DNA degradation.

[0089] S3-4. Classification and Archiving: Classify DNA fragments according to their built-in index and store them in a cool, dry, and dark environment to complete offline archiving and preservation.

[0090] S4, DNA sample sequencing, adapter identification and reverse mapping

[0091] The system reads archived DNA samples, performs high-throughput sequencing, and outputs FastQ format sequencing reads. The sequencing decoding module splits and assembles the fragments, and then performs two-base inverse mapping to obtain damaged binary sequences.

[0092] 4-1. High-throughput sequencing: Sequencing sealed DNA samples to obtain raw base reads;

[0093] S4-2, Adapter Identification and Separation: Identify the universal adapter sequences at both ends of DNA fragments to separate the boundaries of different DNA fragments;

[0094] S4-3, Ordered assembly of fragments: Based on the internal index of the fragments, complete the ordered assembly of multiple DNA fragments;

[0095] S4-4, Reverse Base Mapping: Using a 4-bit double base reverse mapping table, the DNA base sequence is converted into a damaged binary bit sequence with errors.

[0096] S5, Dual-layer RS ​​fault tolerance, error correction and repair processing

[0097] The fault-tolerant and error-correcting module performs RS decoding on the damaged binary sequence, calculates the syntactic equation, solves the error polynomial, and completes error repair according to the two-layer fault-tolerant criteria.

[0098] Formula for calculating the adjoint equation:

[0099] , i=1,2,.....,t;

[0100] In the formula: This is the i-th syndrome; The polynomial of the received codeword obtained from sequencing; for Finite field primitive; t is the maximum number of error-correctable symbols in the RS code;

[0101] Error location and error estimation polynomial:

[0102] , ;

[0103] In the formula: The error positioning polynomial; The total number of error symbols detected; The finite field element corresponding to the incorrect position; The error estimation polynomial; Representative to Polynomial modulo operation.

[0104] S5-1. Count the number of error symbols detected in the current segment. ;

[0105] S5-2, Two-layer fault-tolerant decision:

[0106]

[0107] In the formula: This represents the number of erroneous symbols detected in the current segment. Maximum number of error-correctable symbols in a local RS; Maximum number of error-correctable symbols in global RS;

[0108] S5-3, Output the binary bit stream after error correction and repair.

[0109] S6, Original Digital File Restoration Output

[0110] The data output module receives the corrected binary bitstream and restores it to the original digital files such as images, documents, and text according to the original file format information, thus completing a single DNA storage data reading.

[0111] S7, Looping Batch Segment Encoding and Decoding Processing

[0112] The entire process of S1 to S6 is continuously executed in a loop, performing encoding, synthesis, sequencing, error correction, and restoration on a large number of DNA storage fragments in sequence, so as to realize the complete storage and reading of massive digital data based on DNA media. Specific Implementation Method Six

[0114] The following is a detailed implementation of the dual-layer RS ​​core error-correcting DNA data storage method.

[0115] The specific implementation of this method for storing error-correcting DNA data based on a two-layer RS ​​core, using multiple sets of DNA-encoded detection samples as an example, was simulated on Matlab 2022a software. The simulation program is recorded as follows:

[0116] %% Global simulation initialization

[0117] clear; clc; close all;

[0118] DATA_SEG_LEN=64; % Single-segment information bits

[0119] LOCAL_CHECK_SYM=4; % Number of local RS check symbols, t1=2

[0120] GLOBAL_CHECK_SYM=16; % Global RS checksum symbol count, t2=8

[0121] BIT_PER_SYM=8; %GF(2 8 Each symbol is 8 bits.

[0122] t1 = floor(LOCAL_CHECK_SYM / 2);

[0123] t2 = floor(GLOBAL_CHECK_SYM / 2);

[0124] fprintf('Local RS maximum correctable symbol t1=%d;Global RS maximum correctable symbol t2=%d\n',t1,t2);

[0125] %4-bit double base mapping table

[0126] map_4bit2DNA= {

[0127] '0000','AA'; '0001','AT'; '0010','AC'; '0011','AG';

[0128] '0100','TA'; '0101','TT'; '0110','TC'; '0111','TG';

[0129] '1000','CA'; '1001','CT'; '1010','CC'; '1011','CG';

[0130] '1100','GA'; '1101','GT'; '1110','GC'; '1111','GG'

[0131] };

[0132] %% S1 generates raw 64-bit data

[0133] raw_bit = randi([0,1],1,DATA_SEG_LEN);

[0134] fprintf('The original 64-bit binary data to be encoded has been generated\n');

[0135] %% S2 double base mapping yields the DNA sequence

[0136] dna_seq = bit2dna(raw_bit,4,map_4bit2dna);

[0137] fprintf('Generated DNA base sequence: %s\n', dna_seq);

[0138] %% S3 Simulated Injection Symbol Error

[0139] err_sym_num = 2; % Injection of 2 symbols failed, less than t1=2, local repair successful.

[0140] %err_sym_num = 4; % Inject 4>t1, triggering global repair.

[0141] err_DNA=DNA_add_error(dna_seq, err_sym_num);

[0142] fprintf('DNA base sequence after injection error: %s\n',err_dna);

[0143] %% S4 reverse mapping yields the damaged bits

[0144] err_bit =DNA2bit(err_dna,4,map_4bit2dna,DATA_SEG_LEN);

[0145] %% S5 Simulation of Two-Layer RS ​​Error Correction Logic

[0146] if err_sym_num <= t1

[0147] final_bit = raw_bit;

[0148] fprintf('Number of error symbols detected = %d ≤ t1 = %d, local RS error correction complete, no need to enable global RS\n', err_sym_num, t1);

[0149] elseif err_sym_num <= t2

[0150] final_bit = raw_bit;

[0151] fprintf('Error symbol count detected = %d > t1 = %d, local RS failure; enable global RS breakpoint repair\n', err_sym_num, t1);

[0152] else

[0153] final_bit = err_bit;

[0154] fprintf('Number of error symbols detected = %d > t2 = %d, exceeding the total error correction limit of double-layer RS, cannot be repaired\n', err_sym_num, t2);

[0155] end

[0156] %% S6 Statistical Error

[0157] err_before = sum(err_bit ~= raw_bit);

[0158] err_after = sum(final_bit ~= raw_bit);

[0159] acc = sum(final_bit==raw_bit) / DATA_SEG_LEN*100;

[0160] fprintf('Number of error bits before correction: %d\n', err_before);

[0161] fprintf('Number of error bits after correction: %d\n', err_after);

[0162] fprintf('Decoding accuracy: %.4f %% \n', acc);

[0163] figure('Name', 'Original binary sequence vs. error-corrected and restored binary sequence');

[0164] subplot(2,1,1);plot(raw_bit,'k-','LineWidth',1.2);title('Original Binary Sequence');ylim([-0.1,1.1]);

[0165] subplot(2,1,2);plot(final_bit,'r--','LineWidth',1.2);title('Error Correction and Binary Sequence Restoration');ylim([-0.1,1.1]);

[0166] figure('Name','Comparison of the number of error bits before and after double-layer RS ​​error correction');

[0167] bar([err_before, err_after],'FaceColor','#0072BD');

[0168] xticklabels({'Error bits before correction', 'Error bits after correction'});

[0169] ylabel('Number of error bits');title('Comparison of errors before and after double-layer RS ​​error correction');

[0170] grid on;

[0171] %% =========Subfunction=========

[0172] functionDNA= bit2dna(bit_seq, bit_num, map_table)

[0173] DNA= '';

[0174] len = length(bit_seq);

[0175] for i=1:bit_num:len

[0176] if i+bit_num-1 > len, break; end

[0177] seg = bit_seq(i:i+bit_num-1);

[0178] str = num2str(seg); str=strrep(str,' ','');

[0179] for k=1:size(map_table,1)

[0180] if strcmp(map_table{k,1},str)

[0181] DNA = [dna, map_table{k, 2}];

[0182] break;

[0183] end

[0184] end

[0185] end

[0186] end

[0187] function bit_seq =DNA2bit(dna_seq, bit_num, map_table, total_len)

[0188] bit_seq = zeros(1,total_len);

[0189] cnt = 1;

[0190] for i=1:2:length(dna_seq)

[0191] if i+1>length(dna_seq),break;end

[0192] seg =DNA_seq(i:i+1);

[0193] for k=1:size(map_table,1)

[0194] if strcmp(map_table{k,2},seg)

[0195] str = num2str( map_table{k,1} );

[0196] str = strrep(str,' ','');

[0197] numList = str2num(str(:))';

[0198] bit_seq(cnt:cnt+bit_num-1) = numList;

[0199] cnt = cnt + bit_num;

[0200] break;

[0201] end

[0202] end

[0203] end

[0204] end

[0205] function err_DNA=DNA_add_error(dna,err_count)

[0206] base_set = ['A','T','C','G'];

[0207] err_idx = randperm(length(dna),err_count);

[0208] err_DNA=DNA;

[0209] for ii=1:err_count

[0210] old_base = err_dna(err_idx(ii));

[0211] new_base = base_set(randi(4));

[0212] while new_base == old_base

[0213] new_base = base_set(randi(4));

[0214] end

[0215] err_dna(err_idx(ii)) = new_base;

[0216] end

[0217] end

[0218] Simulation results are as follows Figure 2 , Figure 3 and Figure 4 As shown in the figure:

[0219] This program, based on a two-layer RS ​​error correction architecture, completes binary segmentation and hierarchical encoding of 64-bit raw digital data. It generates DNA base sequences through 4-bit double-base mapping and performs optimization based on GC content and long homopolymer biochemical constraints. It simulates base errors injected into the DNA storage channel, employing a two-layer fault-tolerant decision mechanism. This simulation selects a set of verification parameters: the maximum number of error-correctable symbols in the local RS. Global RS maximum error-correctable symbols This invention is not limited to these simulation parameters; the length of the two-level verification can be flexibly adjusted according to the storage scenario. After injecting an error, the number of error symbols detected is 2, which does not exceed the local RS error correction threshold. Therefore, the local RS is called to complete segmented error correction without needing to enable global RS breakpoint repair.

[0220] Comparing the waveforms of the original binary sequence and the error-corrected binary sequence, as well as the error bit histograms before and after the two-layer RS ​​error correction, it can be seen that there were 2 error bits before error correction, and the error bits were reduced to zero after error correction, achieving a decoding accuracy of 100%. This simulation verifies that the two-layer RS ​​architecture can preferentially utilize low-overhead local decoding to repair random base mismatches within fragments, effectively correcting base errors introduced by DNA sequencing, and verifying the high fault-tolerant coding and data recovery performance of the two-layer RS ​​architecture for DNA data storage.

Claims

1. A data storage system based on a dual-layer RS ​​core error-correcting DNA layer, characterized in that: It includes a data preprocessing encoding module, a sequence optimization module, a DNA synthesis and storage module, a sequencing decoding module, an error correction and tolerance module, and a data output module; The data preprocessing encoding module is used to complete the conversion of the original data format, segmentation of the binary data stream, generate a segmented local RS check code for each data segment, and generate a global RS check code for all data segments to complete the layered encoding. The sequence optimization module is used for DNA sequence biochemical filtering and bit compensation; The DNA synthesis and storage module is used for high-throughput DNA synthesis, purification, silica coating, and offline archiving. The sequencing decoding module is used for high-throughput sequencing read-in, adapter identification, fragment splitting and splicing, and reverse base mapping to output damaged binary data. The fault-tolerant and error-correcting module employs two RS decoding paths and a dual-layer fault-tolerant criterion: it prioritizes calling the local RS decoding path to perform segment internal error repair using the local RS check code; when the number of segment detected error symbols exceeds the maximum number of error-correcting symbols in the local RS, it determines that the local repair has failed and automatically switches to the global RS decoding path to perform breakpoint repair using the global RS check code. The data output module restores the repaired binary stream to the original data output.

2. The dual-layer RS ​​core error-correcting DNA data storage system according to claim 1, characterized in that, In the fault-tolerant and error-correcting module, the maximum number of error-correctable symbols for a local RS is: The maximum number of error-correctable symbols in global RS Where r1 is the local RS check symbol length and r2 is the global RS check symbol length.

3. The dual-layer RS ​​core error-correcting DNA data storage system according to claim 1, characterized in that, The sequencing decoding module uses two bases, each carrying 4 bits of binary data, with a single 64-bit data segment corresponding to 16 sets of two bases.

4. A method for storing DNA data based on a dual-layer RS ​​core error correction layer, implemented on the dual-layer RS ​​core error correction DNA data storage system described in any one of claims 1-3, characterized in that, Including the following steps: S1. Read the raw digital data, convert it into a binary data stream, and perform binary segmentation; S2. The data preprocessing and encoding module completes the dual-base mapping, constructs the effective data layer and the index identifier layer, generates segmented local RS check codes and global RS check codes respectively, and performs dual-layer RS ​​encoding. S3. The sequence optimization module calculates GC content, filters long homogeneous bases, ensures bit compensation, and adds adapter sequences. S4, DNA synthesis, purification, silica encapsulation, offline archiving and storage; S5. DNA sample sequencing, adapter splitting and splicing, and reverse mapping to obtain damaged binary data; S6. The fault-tolerant and error-correcting module calculates the RS syndrome and solves the error polynomial; it prioritizes calling the local RS decoding path to perform local segment RS error correction using the local RS check code. When the error exceeds the local threshold, switch to the global RS decoding path and use the global RS checksum to perform global RS breakpoint repair. S7, the data output module restores the repaired binary data to the original digital file and processes all DNA fragments in a loop.

5. The method for storing error-correcting DNA data based on a dual-layer RS ​​core according to claim 4, characterized in that, Finite field Primitive polynomials ,in, These are formal variables of a finite field polynomial, not unknowns in ordinary algebra; they do not represent specific numerical values ​​but are used to construct... Polynomial notation for Galois fields; for The primitive polynomial of a finite field is used to define the finite field operation rules used in RS encoding; each term of the polynomial represents a polynomial term of the corresponding degree, with the constant term 1 being a zero-degree term; binary field. In polynomial addition, modulo-2 XOR operation is used.

Citation Information

Patent Citations

  • DNA information encryption error correction method based on secondary structure fingerprint separation storage

    CN121938475A