A coding and decoding method for adversarial nanopore channel error correction
Patent Information
- Application Number
- CN202611364329.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-04
- Publication Date
- 2026-10-02
AI Technical Summary
然而,这些已有工作主要针对单一错误类型(仅替换或仅删除),且通常只能纠正少量错误(如单个错误),缺乏对多种编辑错误(插入、删除、替换)同时存在的通用纠错编码方案,同时在冗余度(redundancy)方面也未能达到理论上的一阶最优
[0012]本发明的有益效果是:(1)实现了一阶最优的冗余度。相较于现有技术中前导常数为 或
的冗余度表达(如
或
),本技术方案通过引入
序列构造摘要的方法,将冗余度降至
,其前导常数
与理论下界一致,实现了信息传输或存储效率的最大化。
Smart Images

Figure CN122870174A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of error control coding technology in communication and storage systems, and in particular to a coding and decoding method for adversarial nanopore channel error correction. Background Technology
[0002] Nanopore sequencing is a core reading technology in DNA data storage. Its basic principle is as follows: the DNA strand to be sequenced (a string of length n composed of the character set Σ_q={A,T,C,G}) passes through a nanopore. The sequencer scans from left to right bit by bit in a sliding window of size l (typically 5–6), reading a substring of length l (called an l-mer) at a time, thus generating an l-mer sequence. This process is essentially an inter-symbol interference (ISI) channel. Subsequently, this l-mer sequence may be affected by editing errors such as insertion, deletion, and substitution, resulting in the final erroneous output. The goal of nanopore sequencing is to recover the original string from the final erroneous output.
[0003] In existing technologies, research on nanopore channels can be divided into two main categories: probabilistic channel models and deterministic (adversarial) channel models. Under probabilistic models, researchers mainly focus on the achievable information rate analysis in the information theory sense; under deterministic models, researchers focus on combinatorial and algebraic coding problems.
[0004] In the research of error correction coding for deterministic nanopore channels, early work investigated channel models containing only ISI effects and substitution errors, and proposed corresponding coding schemes. Subsequently, single deletion correction codes for ISI effects superimposed on deletion errors were also proposed. However, these existing works mainly target single error types (replacement only or deletion only), and usually can only correct a small number of errors (such as a single error). They lack universal error correction coding schemes for multiple editing errors (insertion, deletion, and replacement) that coexist, and they have not achieved theoretical first-order optimality in terms of redundancy. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide an encoding and decoding method for adversarial nanopore channel error correction. It utilizes the structural observation that the ambiguity caused by editing errors in nanopore ISI channels is necessarily accompanied by periodic segments in the string, transforming the error correction problem into the problem of detecting and correcting changes in the length of periodic segments. Based on this, adversarial nanopore channel error correction is achieved through an encoding and decoding scheme.
[0006] The objective of this invention is achieved through the following technical solution: an encoding and decoding method for adversarial nanopore channel error correction, comprising the following steps:
[0007] Step S1: Construct an adversarial nanopore channel consisting of two cascaded channels. Process the q-ary string through the adversarial nanopore channel to obtain the output. -mer sequence;
[0008] Step S2: Output -mer sequences are used for gap detection and consistency recovery;
[0009] Step S3: Define the error correction problem and transform it into the problem of detecting and recovering changes in the length of periodic segments;
[0010] Step S4: By comparing the edits between two sequences of equal length, analyze the uniqueness of the edit channel, identify the check fragments, and construct a summary of the check fragment lengths;
[0011] Step S5: Error correction of the adversarial nanopore channel is achieved through encoding and decoding.
[0012] The beneficial effects of this invention are: (1) It achieves first-order optimal redundancy. Compared with the prior art, the leading constant is... or Redundancy expression (e.g.) or This technical solution introduces... Methods for constructing summaries from sequences reduce redundancy to Its leading constant Consistent with the theoretical lower bound, this maximizes the efficiency of information transmission or storage.
[0013] (2) A unified correction of multiple editing errors in adversarial nanopore channels is achieved. This technical solution corrects multiple editing errors simultaneously through an "enumeration-verification" framework. -mer eliminates insertion, deletion, and replacement errors while maintaining first-order optimality of coding redundancy. This is a problem that has not yet been solved in existing technologies.
[0014] (3) The decoding ambiguity problem caused by periodic segments was systematically solved. This was achieved by introducing the concept of inspection segments and... This abstract mechanism enables the accurate identification and decoding of editing errors caused by periodic segments that cannot be detected by simple gap detection, fundamentally solving the core error correction challenge of nanopore channels. The theoretical basis of this scheme (Fine-Wilf theorem) provides a rigorous guarantee, ensuring that all checked segments can be uniquely identified and recovered under small parameter conditions.
[0015] (4) Low computational complexity in encoding and decoding. With fixed parameters... Down,( Sequence construction) in a pre-computed lookup table (size: In the case of [missing information], online encoding has near-linear complexity, while decoding has polynomial complexity. ,exist This is entirely feasible in real-world scenarios where the constant value is used. Attached Figure Description
[0016] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0017] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings, but the scope of protection of the present invention is not limited to the following description.
[0018] This invention utilizes the structural observation that the ambiguity caused by editing errors in nanopore ISI channels is inevitably accompanied by periodic segments in the string, transforming the error correction problem into the problem of detecting and correcting changes in the length of periodic segments. Specifically, this technical solution: (1) defines a length of at least... The cycle does not exceed (2) Prove that under small parameter conditions ( (etc.), different inspection segments do not contain each other and have limited overlap, so they can be uniquely sorted; (3) using The sequence (a generalization of the Sidon set) performs digest encoding on the length of the checked fragment, and the original string is recovered at the receiving end by the difference in the digest. Using this method, this technical solution, for the first time, constructs a redundancy-optimal (first-order) redundancy scheme for adversarial nanopore editing channels. ) explicit error correction codes.
[0019] Specifically: such as Figure 1 As shown, an encoding / decoding method for adversarial nanopore channel error correction includes the following steps:
[0020] Step S1: Construct an adversarial nanopore channel consisting of two cascaded channels. Process the q-ary string through the adversarial nanopore channel to obtain the output. -mer sequence;
[0021] Level 1: Inter-symbol interference (ISI) channel.
[0022] The input is of length of Metastring , The alphabet is represented as , length is A collection of strings, This represents an alphabet of size q; where The codeword to be transmitted / stored has a length of The alphabet is represented as A collection of strings of length n; and For each length is The known connector sequences are added to both ends of the codeword; the ISI channel has a size of The sliding window scans the input string character by character, generating a new string for each character it moves. -mer, output -mer sequence , of which indivual -mer is .remember For the input string Generated via ISI channel -mer sequence;
[0023] Level 2: Adversarial editing channel.
[0024] This channel outputs to the ISI channel. -mer sequence applied up to Each edit operation, each edit is... The -mer option specifies one of the insertion, deletion, or replacement operations, and outputs the result. -mer sequence This scheme adopts the anchored convention: two joints. -mer and Uneditable and not allowed in Before or Then perform the insertion operation. (Note:) For two -mer is the edit distance between sequences, where the cost of each insertion, deletion, or replacement is 1. .
[0025] Step S2: Output -mer sequences are used for gap detection and consistency recovery;
[0026] For output -mer any two adjacent sequences -mer: and ,like The length is suffix and The length is If the prefixes are the same, then they are called integers. for and A gap between them. The corresponding length is Normal ISI overlap, at this time it is called two -mer is consistent. Let The minimum gap between the two. (This is achieved through...) and Insert between indivual The `-mer` option can construct the shortest consistent output. -mer sequence. For adjacent outputs The `-mer` option executes the operation sequentially, resulting in a consistent output. -mer sequence, its corresponding Metastrings are denoted as output strings. .
[0027] Under the channel deletion condition It is the input string The subsequence; under the edit channel, Can be regarded as An edited version. Mapping This is a fundamental step in decoding.
[0028] Step S3: Define the error correction problem and transform it into the problem of detecting and recovering changes in the length of periodic segments;
[0029] The error correction problem is to correct errors from the output. -mer sequence Chinese recovery code ;
[0030] For any Metastring ,like For everything If established, it is called for One period; the smallest period is the smallest positive integer that has this property. If a substring has a periodicity Then it is called a period of A periodic segment is a segment that cannot be extended to the left or right into a longer substring with the same period; such a segment is called a maximally periodic segment.
[0031] According to the Fine-Wilf theorem: if the periods of two strings are respectively , And they are in If they are equal in consecutive positions, then they are equal everywhere.
[0032] Editing errors leading to decoding ambiguity inevitably result in the appearance of periodic segments. Specifically, if a segment of length is... of -mer burst deletion preserves - The consistency of the -mer sequence means that there must be a sequence in the input string with a length of at least 1. The period is Periodic segments; when When the minimum period of the periodic segment is divisible In other words, only by deleting an integer number of minimum periods within a periodic segment can the condition be maintained. The -mer parameter is consistent, and the receiver cannot detect such deletions through gap detection alone. This observation transforms the error correction problem into the problem of detecting and recovering periodic changes in segment length.
[0033] Step S4: Analyze the uniqueness of the edit channel by comparing the edits between two sequences of equal length, identify the check fragments, and construct a summary of the check fragment lengths;
[0034] (1) Edit alignment: To analyze the uniqueness under edit channels, the concept of edit alignment between two equal-length sequences is required: Edit alignment connects the two sequences by introducing a gap symbol " "After aligning two rows of equal length and removing all gap symbols, the original sequences are obtained, with the two rows not having gaps simultaneously on the same column. Columns without cost are considered matching columns (two identical non-gap symbols), while costly columns are replaced (two different non-gap symbols) or inserted / deleted (exactly one is a gap symbol). The largest consecutive costly column (bounded by matching columns on both sides) is called the alignment edit burst. In this scenario, both aligned sequences are ISI outputs." -mer sequence, therefore the matching boundary column is composed of the same -mer constitutes; due to all -mer sequences all use the same left and right connectors. -mer start and end, allowing you to select the optimal alignment for these two connectors. -mer matches.
[0035] (2) Definition of check pattern:
[0036] For any Metastring One of its calibration segments is defined as having a cycle of no more than [number missing]. And the length is at least The largest periodic segment, in which This is the period of the segment.
[0037] This solution applies to Small parameter case (i.e.) Its rationale is as follows: if two candidate codewords... -mer sequences are all Within one edit, close to output -mer sequences, then the two are mutually... Within one editor; examine the comparison between the two editors in case of sudden changes, if the boundary... The offset intervals of -mer in the two sequences are respectively , Then the cost of this sudden event is at least Therefore ;like Then the comparison should focus on trivial sudden events. For non-trivial sudden events... Let's assume ( (The situation is symmetrical). At this time... The overlapping portion corresponding to the smaller gap has a periodicity. And its length is at least Therefore, any local editing ambiguity is limited by a period not exceeding [a certain value]. The length is at least It is carried by periodic segments.
[0038] This parameter condition guarantees:
[0039] The length of the checked segment is at least This is sufficient to demonstrate its cycle. (Depend on Right now ensure);
[0040] The overlap between adjacent inspection segments is at most 100%. 1 symbol (by Fine-Wilf theorem: ,in ,exist (Established below).
[0041] Since the length of each calibration segment is at least... The overlap between adjacent check segments is at most 100%. ( The period of each check segment is the smaller of the periods of any two adjacent check segments, and is strictly less than the minimum length of any check segment. Therefore, no check segment contains the other check segment, and all check segments have distinct starting positions and can be uniquely numbered from left to right. Meanwhile, in... Under these conditions, a burst edit will only change the length of a single check segment, without merging or splitting multiple check segments.
[0042] (3) Sequence construction
[0043] set up This is an exchange group. sequence in Called Sequence, if all are at most The sums of all multisets consisting of elements are distinct: for any , ,like
[0044]
[0045] but And multiset and same.
[0046] This scheme adopts the Bose-Chowla construction: Let For prime powers, For Bose-Chowla sequence( ), Represents the modulus of an integer The remainder class of the additive group, then
[0047]
[0048] Indicated by Bose-Chowla Sequence A amplification A sequence containing p elements. The principle is: group elements... The first coordinate provides the uniqueness of the Bose-Chowla summation, and the second coordinate records the number of terms in the summation, thus ensuring that "exactly..." "Item" is promoted to "at most" Item. ,when At that time, take of Metaset composition sequence ; Modulo an integer The remainder class of additive groups;
[0049] (4) Check the digest of the segment length:
[0050] For any string ,remember The number of segments to be checked. , The first The start and end indices of each check segment ( To avoid duplicate counting of overlapping portions of adjacent inspection segments, the overlapping portion is assigned to the inspection segment that appears later, and the first overlapping portion is defined as... The end index of each checked segment is
[0051]
[0052] Then the first The interval of each calibration segment is Define a string. of Abstract
[0053]
[0054] When the deletion operation shortens the belonging range of certain checked segments... a symbol ( Furthermore, the shortened verification segment was not completely destroyed, meaning its remaining length is still at least [length missing]. When ), the change in the abstract is
[0055]
[0056] in, As a prefix of the input string, To output the string containing... The corresponding prefix part; , These represent the summaries of the prefix string before deletion (input side) and after deletion (output side), respectively.
[0057] Depend on The properties of the sequence, the summation difference uniquely determines all shortening amounts. (i.e., the number of symbols deleted from each check segment), based on which each shortened check segment can be expanded and restored according to its periodicity.
[0058] Furthermore, since decoding requires handling cases where the output string prefix is truncated, the checksum fragment may disappear due to truncation. Therefore, this scheme additionally records the parity of the number of checksum fragments. This is used to determine whether the truncated end check segment exists.
[0059] Step S5: Implement error correction for the adversarial nanopore channel through encoding and decoding.
[0060] Encoding method:
[0061] Given information length ,make prefix string The maximum number of segments checked in the middle section, among which This is a message string. The encoding steps are as follows:
[0062] Selecting prime powers In the group Construct according to step S403 sequence ;
[0063] Calculate prefix string Abstract The parity of the number of its checked segments ;
[0064] Will Encoded as a fixed length Metastring ;
[0065] use Yuan - Edit correction codes (e.g., those constructed by Sima et al.) - Deletion correction code; since a replacement can be considered as a deletion plus an insertion, any 2t-deletion correction code can be used as a t-edit correction code) Perform protective encoding to obtain redundant strings. ;
[0066] The final encoded output (codeword) is The complete input string is .
[0067] Thus, the error correction code is obtained. .
[0068] Redundancy analysis: Due to Unprotected summary The length is .exist fixed, Under conditions of growth, the protection code only increases. One symbol. Therefore, redundant strings. The length is This achieves first-order optimality. This is because... -Edit channel to - Channel deletion is a special case: Any channel that can be corrected An editor's code can definitely be corrected. One delete, and -The lower bound for redundancy removal of correction codes is Therefore, the redundancy of this scheme matches the preceding term of this lower bound.
[0069] Decoding method (enumeration-verification):
[0070] The decoding adopts an "enumeration-verification" framework, which consists of two stages: candidate generation and distance verification.
[0071] Step 1: Candidate Generation
[0072] The receiving end received an error output. -mer sequence back:
[0073] (1) Enumerate all possible discard schemes: from Discard at most Output -mer (These may be errors introduced by insert or replace operations) -mer), for each scheme, we obtain A reserved subsequence .
[0074] (2) Only retain the subsequences that satisfy the following two conditions. :
[0075] Subsequence length (i.e.) -mer number )satisfy ;
[0076] First and last -mer represents the connector sequence. and .
[0077] (3) For each retained subsequence Application Mapping ,get Metastring, only retaining the length within Results within the specified range.
[0078] (4) Treat the string as output containing only deletion errors, and call the check fragment and The abstract deletion and reconstruction sub-process (see below) yields candidate codewords. With candidate input strings .
[0079] The actual input string It will definitely appear in the enumeration result: All errors introduced by insertion and replacement After discarding the -mer option, the remaining subsequence is the true one. -mer is a deleted version of the sequence.
[0080] Deletion and Refactoring Sub-procedure: Given a result considered as the deletion output Metastring (It is) Delete at most (Resulting from one symbol)
[0081] (a) From Redundant parts recovery Thus, parity information is obtained. With Abstract ;
[0082] (b) Let To effectively delete a number of symbols, increment the offset. Extract prefix Find the minimum value that satisfies the following conditions : Abstract Difference It can be represented as sequence No more than The sum of elements;
[0083] (c) by nature, The only way to determine the amount of shortening in each calibration segment ( ); and expand each shortened check segment according to its periodicity. One symbol is enough to recover the complete prefix. Remove connector sequence and redundant parts Connecting yields candidate codewords .
[0084] At this point, the candidate input string is .
[0085] Step 2: Distance Verification
[0086] For each candidate input string Calculate its ISI output -mer sequence With received sequence Edit distance between them. If Then accept For correct decoding results; otherwise, discard. Remove connector sequences. and Then the correct code will be obtained. This verification step guarantees the uniqueness of the final output.
[0087] Uniqueness guarantee: Assume two candidates , Both have passed verification. Because both are in Within a certain number of edits, the triangle inequality of edit distance is obtained as follows: .exist (thereby Under the condition of ), combined with two structural lemmas—(i) when -mer edit distance not exceeding At that time, each -mer edits can correspond to at most one Metasymbol editing; (ii) the edit distance between strings of equal length is monotonic under the constraint of a fixed coordinate interval—the redundant block satisfies ,in for Edit distance between metastrings. Due to redundant blocks... Yuan -Edit correction code protection, therefore ,thereby .
[0088] Further comparison of the two prefixes and To combine the two -Optimal edit alignment between -mer sequences (at most) According to the comparison edit burst decomposition, each non-trivial comparison edit burst changes only the length of one check segment. Let... For the first The length changes (with signs) of each checked segment, then , ,and
[0089]
[0090] Right now
[0091]
[0092] Both sides of the equation are At most in the sequence The sum of the elements, by The property is that the multisets of the indices at both ends are the same, thus all That is, there is no non-trivial comparison editing suddenness. Therefore, at most one candidate passes the verification, and the decoding result is unique.
[0093] Complexity: Step 1 enumeration Each subsequence; the edit distance verification for each candidate can be achieved through dynamic programming. Completed within a specified time. Therefore, in the parameters... When the time complexity is fixed, the entire decoding process has a polynomial time complexity.
[0094] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the methods described in the foregoing embodiments, such as changing the names of the methods. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A coding and decoding method for adversarial nanopore channel error correction, characterized in that: Includes the following steps: Step S1: Construct an adversarial nanopore channel consisting of two cascaded channels. Process the q-ary string through the adversarial nanopore channel to obtain the output. -mer sequence; Step S2: Output -mer sequences are used for gap detection and consistency recovery; Step S3: Define the error correction problem and transform it into the problem of detecting and recovering changes in the length of periodic segments; Step S4: Analyze the uniqueness of the edit channel by comparing the edits between two sequences of equal length, identify the check fragments, and construct a summary of the check fragment lengths; S401. To analyze the uniqueness under the edit channel, an edit comparison between two sequences of equal length is required: Editing the alignment involves introducing a gap symbol between the two sequences. "Align the two lines to be of equal length, remove all gap symbols, and obtain the original sequence, with the two lines not having gaps at the same time in the same column; Columns with no cost are considered matching columns, and the two non-gap symbols are identical; The columns have a cost for replacement or insertion / deletion; when the columns are replaced, the two non-gap symbols are different; when inserted / deleted, exactly one is a gap symbol. The largest consecutive costly sequence is called the comparison-edit burst; Both aligned sequences are ISI outputs. -mer sequence, matching boundary columns consisting of the same -mer constitutes; due to all -mer sequences all use the same left and right connectors. -mer start and end, selects the optimal alignment for these two joints. -mer matches; S402. Define the verification segment: For any Metastring One of its calibration segments is defined as having a cycle of no more than [number missing]. And the length is at least The largest periodic segment, in which The period of this segment; for In the case of small parameters, if the two candidate codewords... -mer sequences are all Within one edit, close to output -mer sequences, then the two are mutually... Within one editor; Examining the comparison between the two, editing suddenly, if the boundary The offset intervals of -mer in the two sequences are respectively , Then the cost of this sudden event is at least Therefore ;like Then the comparison should be edited for trivial sudden events; for non-trivial sudden events, there are... Let's assume At this point, the overlapping portion corresponding to the smaller gap has a periodicity. And its length is at least Therefore, any local editing ambiguity is limited by a period not exceeding [a certain value]. The length is at least The periodic segments that carry it; Conditions guaranteed for the verification segment: The length of the checked segment is at least This is sufficient to demonstrate its cycle. This condition is determined by Right now ensure; The overlap between adjacent inspection segments is at most 100%. One symbol; Since the length of each calibration segment is at least... The overlap between adjacent check segments is at most 100%. The smaller of the periods of two adjacent check segments is strictly less than the minimum length of any check segment. Therefore, any check segment does not contain the other check segment. All check segments have distinct starting positions and are uniquely numbered from left to right. exist Under these conditions, a burst edit will only change the length of one check segment, and will not merge or split multiple check segments; S403. Construction sequence: set up For an exchange group, group sequence in Called Sequence, if all are at most The sums of all multisets consisting of elements are distinct: for any , ,like: ; but And multiset and Same; among them, These are the number of terms in the two sums, i.e., the multiset. and Size; For the group The index of the element in the middle; set up For prime powers, , A is Bose-Chowla sequence, Represents the modulus of an integer The remainder class of the additive group; ,but: ; Indicated by Bose-Chowla Sequence A amplification Sequences, the principle of which is: group elements The first coordinate provides the uniqueness of the Bose-Chowla summation, and the second coordinate records the number of terms in the summation, thus ensuring that "exactly" is achieved. "Item" is promoted to "at most" "Item"; take ,when At that time, take of Metaset composition sequence ; Modulo an integer The remainder class of the additive group; S404. Construct a summary to check fragment length: For any string ,remember The number of segments to be checked. , The first The start and end indices of each check segment. To avoid duplicate counting of overlapping portions between adjacent inspection segments, the overlapping portion is assigned to the inspection segment that appears later, and the first overlapping portion is defined as... The end index of each checked segment is: ; Then the first The interval of each calibration segment is Define a string of Abstract ; When the deletion operation shortens the belonging range of certain checked segments... A symbol, Furthermore, the shortened verification segment was not completely destroyed, meaning its remaining length is still at least [length missing]. At that time, the change in the abstract was: ; in, For the prefix of the input string, To output the string containing... The corresponding prefix part; , These represent the summaries of the prefix string before and after deletion, respectively. Depend on Sequence properties, summary difference Uniquely determine all shortening amounts Based on this, each shortened calibration segment is extended and restored according to its periodicity; Because decoding requires handling cases where the output string prefix is truncated, the checksum fragment may disappear due to truncation. Therefore, the parity of the number of checksum fragments is additionally recorded. This is used to determine whether the truncated end check segment exists; Step S5: Error correction of the adversarial nanopore channel is achieved through encoding and decoding.
2. The encoding and decoding method for adversarial nanopore channel error correction according to claim 1, characterized in that: In the adversarial nanopore channel, the first-level channel is an ISI channel, and the second-level channel is an adversarial editing channel; The ISI channel, or Inter-symbol Interference Channel, has an input of length [missing information]. of Metastring , The alphabet is represented as , length is A collection of strings, This represents an alphabet of size q; where The codeword to be transmitted / stored has a length of The alphabet is represented as A collection of strings of length n; and For each length is The known connector sequences are added to both ends of the codeword; the ISI channel has a size of The sliding window scans the input string character by character, generating a new string for each character it moves. -mer, output -mer sequence , of which indivual -mer is ;remember For the input string Generated via ISI channel -mer sequence; The adversarial editing channel, for the output of the ISI channel -mer sequence applied up to Each edit operation, each edit is... The -mer option allows insertion, deletion, or replacement, producing the output. -mer sequence ; for The i-th -mer, i=0,1,2,…N; two connectors -mer and Uneditable and not allowed in Before or Then perform the insertion operation; note For two -mer is the edit distance between sequences, where the cost of each insertion, deletion, or replacement is 1. .
3. The encoding and decoding method for adversarial nanopore channel error correction according to claim 2, characterized in that: Step S2 includes: For output -mer any two adjacent sequences -mer: and ,like medium length is suffix and medium length is If the prefixes are the same, then they are called integers. for and A gap between them; The corresponding length is Normal ISI overlap, at this time it is called two -mer is consistent; make To minimize the gap between the two, by and Insert between indivual -mer, constructs the shortest consistent... -mer sequence; For adjacent outputs The `-mer` option executes the operation sequentially, resulting in a consistent output. -mer sequence, its corresponding Metastrings are denoted as output strings. ; mapping Indicates the output -mer sequence Perform consistency operations; Under the channel deletion condition It is input Metastring The subsequence; under the edit channel, Considered Metastring An edited version.
4. The encoding and decoding method for adversarial nanopore channel error correction according to claim 1, characterized in that: Step S3 includes: The error correction problem is defined as starting from the error output. -mer sequence Chinese recovery code ; Define periodic segments: For any Metastring ,like For everything If established, it is called for One period; the smallest period is the smallest positive integer that has this property; If a substring has a periodicity Then it is called a period of A periodic segment; if it cannot be extended to the left or right into a longer substring with the same period, it is called a maximally periodic segment. According to the Fine-Wilf theorem: if the periods of two strings are respectively , And they are in If they are equal in consecutive positions, then they are equal everywhere; Define decoding ambiguity: Editing errors leading to decoding ambiguity will inevitably be accompanied by periodic segments: if a segment of length is... of -mer sudden deletion preserved - The consistency of the -mer sequence means that there must be a sequence in the input string with a length of at least 1. The period is Periodic segments; when When the minimum period of the periodic segment is divisible Only by deleting an integer number of minimum periods within a periodic segment can the condition be maintained. -mer is consistent, and the receiving end cannot detect such deletions by gap detection alone; Therefore, the error correction problem is transformed into the problem of detecting and recovering changes in the length of periodic segments.
5. The encoding and decoding method for adversarial nanopore channel error correction according to claim 4, characterized in that: Step S5 includes: S501. Given message length ,make prefix string The maximum number of segments checked in the middle section, among which For information strings, The alphabet is represented as , length is A collection of strings, The alphabet is represented as , length is A collection of strings, The encoding steps for a alphabet of size q are as follows: Selecting prime powers In the group ,structure sequence ; Calculate prefix string Abstract The parity of the number of its checked segments ; Will Encoded as a fixed length Metastring ; use Yuan -Edit correction code For protection coding, the t-edit correction code adopts the 2t-deletion correction code. Since one replacement is considered as one deletion plus one insertion, any 2t-deletion correction code can be used as a t-edit correction code, resulting in a redundant string. ; The final encoded output is The complete input string is ; Thus, the error correction code is obtained. ; S502. The receiver received an error output. -mer sequence Then, candidate codewords are generated first: (1) Enumerate all possible discard schemes: from Discard at most Output -mer, for each scheme, obtain A reserved subsequence ; (2) Only retain the subsequences that satisfy the following two conditions. : Subsequence length, i.e. -mer number ,satisfy ; First and last -mer represents the connector sequence. and ; (3) For each retained subsequence Application Mapping ,get Metastring, only retaining the length within Results within the range; (4) Treat the string as output containing only deletion errors, and call the check fragment and The deletion and reconstruction sub-process of the abstract yields candidate codewords. With candidate input strings ; The actual input string It will definitely appear in the enumeration result: All errors introduced by insertion and replacement After discarding the -mer option, the remaining subsequence is the true one. -mer is a deleted version of the sequence; Deletion and Refactoring Sub-procedure: Given a result considered as the deletion output Metastring , it is Delete at most The result of the symbols: (a) From Redundant parts recovery Thus, parity information is obtained. With Abstract ; (b) Let To effectively delete a number of symbols, increment the offset. Extract prefix Find the minimum value that satisfies the following conditions : Abstract difference It can be represented as sequence No more than The sum of elements; (c) by nature, The only way to determine the amount of shortening in each calibration segment ( ); and expand each shortened check segment according to its periodicity. Each symbol, restoring the complete prefix. Remove connector sequence and redundant parts Connecting yields candidate codewords ; At this point, the candidate input string is ; S503. For candidate input strings... Perform distance verification: For each candidate input string Calculate its ISI output -mer sequence With received sequence Edit distance between; like Then accept The result is correctly decoded; otherwise, it is discarded. Remove connector sequence and Then the correct code will be obtained. .