WO2022120626A1 - Dna-based data storage method and apparatus, dna-based data recovery method and apparatus, and terminal device - Google Patents

Dna-based data storage method and apparatus, dna-based data recovery method and apparatus, and terminal device Download PDF

Info

Publication number
WO2022120626A1
WO2022120626A1 PCT/CN2020/134847 CN2020134847W WO2022120626A1 WO 2022120626 A1 WO2022120626 A1 WO 2022120626A1 CN 2020134847 W CN2020134847 W CN 2020134847W WO 2022120626 A1 WO2022120626 A1 WO 2022120626A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
data
algorithm
base sequence
binary
Prior art date
Application number
PCT/CN2020/134847
Other languages
French (fr)
Chinese (zh)
Inventor
李敏
戴俊彪
王洋
姜青山
罗周卿
姜双英
Original Assignee
中国科学院深圳先进技术研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Priority to PCT/CN2020/134847 priority Critical patent/WO2022120626A1/en
Publication of WO2022120626A1 publication Critical patent/WO2022120626A1/en

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16BBIOINFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR GENETIC OR PROTEIN-RELATED DATA PROCESSING IN COMPUTATIONAL MOLECULAR BIOLOGY
    • G16B50/00ICT programming tools or database systems specially adapted for bioinformatics

Definitions

  • the present application belongs to the technical field of data storage, and in particular, relates to a DNA-based data storage method, a data recovery method, a data storage device, a data recovery device, a terminal device, and a computer-readable storage medium.
  • DNA deoxyribonucleic acid
  • DNA as a storage medium
  • One of the advantages of DNA as a storage medium is the stability of DNA molecules, which can be stored for up to a hundred years without human intervention.
  • Most of the data will be preprocessed by some algorithms before being stored. If the data can be restored after decades or hundreds of years, it is necessary to know the data and the corresponding preprocessing algorithm.
  • the preprocessing algorithm used cannot be guaranteed. Whether it exists completely, and the data stored after preprocessing cannot be recovered.
  • DNA-based data storage method DNA-based data storage method, data recovery method, data storage device, data recovery device, terminal equipment and computer-readable storage medium, aiming to solve the problem of whether the preprocessing algorithm adopted cannot be guaranteed because it cannot be guaranteed. It exists completely, and the data stored after preprocessing cannot be recovered.
  • the embodiments of the present application provide a DNA-based data storage method, including:
  • the data file is a file obtained by preprocessing the original data according to the algorithm file; edit the data file and the algorithm file according to the preset file format, and generate the binary file to be encoded, so
  • the file format is used to indicate the index type between the data file and the algorithm file;
  • the binary file is encoded to obtain a base sequence, and the base sequence is used to synthesize and store the data file and the algorithm file.
  • the DNA fragment of the algorithm file is a file obtained by preprocessing the original data according to the algorithm file; edit the data file and the algorithm file according to the preset file format, and generate the binary file to be encoded, so
  • the file format is used to indicate the index type between the data file and the algorithm file;
  • the binary file is encoded to obtain a base sequence, and the base sequence is used to synthesize and store the data file and the algorithm file.
  • the DNA fragment of the algorithm file is a file obtained by preprocessing the original data according to the algorithm file; edit the data file and the algorithm file according to the preset
  • the method before acquiring the data file to be stored, the method further includes: compressing, deleting redundancy or encrypting the original data according to the algorithm file, Get the data file.
  • the editing of the data file and the algorithm file according to a preset file format to generate a binary file to be encoded includes:
  • edit the attribute identification bits and valid data bits of the data file according to the attribute identification bits and the valid data bits of the data file, determine the relative The offset of the valid data bits of the data file; based on the offset, edit the valid data bits of the algorithm file to obtain a binary file in which the data file and the algorithm file are located in the same file.
  • the encoding of the binary file to obtain a base sequence includes:
  • the editing of the data file and the algorithm file according to a preset file format to generate a binary file to be encoded includes:
  • the preset file format edit the first attribute identification bit and the first valid data bit of the data file to obtain the first binary file corresponding to the data file; according to the preset file format, Edit the second attribute identification bit and the second valid data bit of the algorithm file to obtain a second binary file corresponding to the algorithm file; wherein, the first binary file and the second binary file
  • the files are two independent files.
  • the encoding of the binary file to obtain a base sequence includes:
  • the first binary file and the second binary file are encoded to obtain the first base sequence of the first binary file and the second binary file.
  • prepare the second base sequence of the file add the first primer sequence to the head and tail of the first base sequence to obtain the base sequence for synthesizing the first fragment in the DNA fragment; add the second primer sequence To the head and tail of the second base sequence, the base sequence for synthesizing the second fragment in the DNA fragment is obtained.
  • the encoding of the binary file to obtain a base sequence includes:
  • the first binary file and the second binary file are encoded to obtain the first base sequence of the first binary file and the second binary file.
  • preparing the second base sequence of the file adding the head primer sequence and the tail primer sequence to the head and tail of the first base sequence to obtain the base sequence for synthesizing the third fragment in the DNA fragment; adding A universal primer sequence and a tail primer sequence of one or more first base sequences corresponding to the second base sequence to the head and tail of the second base sequence to obtain a primer for synthesizing the DNA fragment.
  • the base sequence of the fourth fragment is preparing the second base sequence of the file; adding the head primer sequence and the tail primer sequence to the head and tail of the first base sequence to obtain the base sequence for synthesizing the third fragment in the DNA fragment; adding A universal primer sequence and a tail primer sequence of one or more first base sequences corresponding to the second base sequence to the head and tail of the second base sequence to obtain a primer for synthesizing the DNA fragment.
  • the embodiments of the present application provide a DNA-based data recovery method, including:
  • the DNA fragment to be decoded is used to store data files and algorithm files; decoding the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, the file format used to indicate the index type between the data file and the algorithm file; read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type;
  • the algorithm file performs parsing processing on the data file to obtain the original data corresponding to the data file.
  • the decoding process is performed on the DNA segment to be decoded to obtain a binary file conforming to a preset file format, including:
  • the DNA fragment to be decoded is sequenced to obtain the base sequence of the DNA fragment; according to the preset decoding model, the base sequence of the DNA fragment is sequenced Decoding is performed to obtain the binary file; wherein, the binary file is a file in which the data file and the algorithm file are located in the same file.
  • the attribute identification bit of the data file includes an index indicating an index type; the reading of the data file and the algorithm file in the binary file is performed according to The index type calls the algorithm file, including:
  • the decoding process is performed on the DNA segment to be decoded to obtain a binary file conforming to a preset file format, including:
  • the first fragment is sequenced to obtain the first base sequence and the second primer sequence; according to the second primer sequence, the to-be-decoded sequence Sequencing the second fragment of the DNA fragment obtained by obtaining the second base sequence; according to a preset decoding model, decoding the first base sequence and the second base sequence to obtain the first base sequence
  • the first binary file corresponding to the base sequence and the second binary file corresponding to the second base sequence wherein, the first binary file corresponds to the data file, and the second binary file corresponds to the data file.
  • the file corresponds to the algorithm file.
  • the decoding process is performed on the DNA segment to be decoded to obtain a binary file conforming to a preset file format, including:
  • the third fragment is sequenced to obtain the first base sequence; according to the tail primer sequence of the third fragment and For the universal primer sequence of the fourth fragment in the DNA fragments to be decoded, the fourth fragment is sequenced to obtain a second base sequence; according to a preset decoding model, the first base sequence and the The second base sequence is decoded to obtain a first binary file corresponding to the first base sequence and a second binary file corresponding to the second base sequence; wherein, the first binary file is The system file corresponds to the data file, and the second binary file corresponds to the algorithm file.
  • the first attribute identification bit of the data file includes an index indicating an index type; the reading the data file and the algorithm file in the binary file, And call the algorithm file according to the index type, including:
  • an embodiment of the present application provides a DNA-based data storage device, including:
  • a first acquiring unit configured to acquire a data file to be stored, where the data file is a file obtained by preprocessing the original data according to the algorithm file;
  • the first processing unit is configured to edit the data file and the algorithm file according to a preset file format, and generate a binary file to be encoded, and the file format is used to indicate the relationship between the data file and the algorithm file.
  • index type
  • the coding unit is used for coding the binary file to obtain a base sequence, and the base sequence is used for synthesizing the DNA fragments storing the data file and the algorithm file.
  • an embodiment of the present application provides a DNA-based data recovery device, including:
  • a second acquiring unit configured to acquire DNA fragments to be decoded, and the DNA fragments to be decoded are used to store data files and algorithm files;
  • a decoding unit configured to decode the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, where the file format is used to indicate an index type between the data file and the algorithm file;
  • a second processing unit configured to read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type
  • the parsing unit is configured to perform parsing processing on the data file according to the algorithm file to obtain original data corresponding to the data file.
  • an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, which is implemented when the processor executes the computer program Any one of the data storage method in the above-mentioned first aspect or any one of the data recovery method in the above-mentioned second aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements any one of the above-mentioned first aspect The method for data storage or the method for data recovery according to any one of the above second aspects.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a terminal device, enables the terminal device to execute the data storage method described in any one of the first aspects or the second method described above.
  • the data recovery method of any one of the aspects is not limited to:
  • the terminal device obtains the data file to be stored, and the data file is a file obtained by preprocessing the original data according to the algorithm file; the data file and the algorithm file are edited according to the preset file format, and the data file to be encoded is generated.
  • the file format is used to indicate the index type between the data file and the algorithm file; the binary file is encoded to obtain the base sequence, and the base sequence is used to synthesize the DNA fragments that store the data file and the algorithm file.
  • the base sequence is obtained, and the DNA is synthesized and stored, which reduces the external information. It reduces the risk of unrecoverable data due to the loss of external algorithms, and ensures the integrity and reliability of large-scale data storage in a long-term uncertain environment; it has strong ease of use and practicability.
  • FIG. 1 is a schematic diagram of a system architecture of an application scenario provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a DNA-based data storage method provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a logical relationship between a data file and an algorithm file provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of a logical relationship between a data file and an algorithm file provided by another embodiment of the present application.
  • FIG. 5 is a schematic diagram of a synthetic DNA fragment provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a synthetic DNA fragment provided by another embodiment of the present application.
  • FIG. 7 is a schematic diagram of a synthetic DNA fragment provided by another embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a DNA-based data recovery method provided by another embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a binary file provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a binary file provided by another embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a DNA-based data storage device provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a DNA-based data recovery device provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the term “if” may be contextually interpreted as “when” or “once” or “in response to determining” or “in response to detecting “.
  • the phrases “if it is determined” or “if the [described condition or event] is detected” may be interpreted, depending on the context, to mean “once it is determined” or “in response to the determination” or “once the [described condition or event] is detected. ]” or “in response to detection of the [described condition or event]”.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • DNA storage The general process of DNA storage is that digital data is encoded into DNA base sequences, DNA fragments are synthesized according to the encoded base sequences, and stored in storage media in vivo and in vitro. Among them, the synthesis of DNA fragments can be realized by writing nucleotide base sequences through a synthesizer, and then the pooled liquid is used as a medium for storage. When reading data, the data can be read, sequenced by a sequencer, and recovered by subsequent decoding processing.
  • FIG. 1 is a schematic diagram of a system architecture of an application scenario provided by an embodiment of the present application.
  • FIG. 1 shows an end-to-end full-process DNA storage system architecture that realizes data self-contained and self-recovery provided by an embodiment of the present application.
  • the preprocessing methods include but are not limited to compression, redundant deletion, encryption, encoding, etc., to obtain data files, and at the same time, obtain the algorithm files of the preprocessing algorithm. If the data file and the algorithm file are defined according to the preset file format, a digital file is obtained, and the self-contained data to be encoded is realized.
  • the digital file may be a file in binary, quaternary, or octal format, which is not specifically limited.
  • different encoding techniques are used to encode digital files to obtain base sequences; through synthetic biology, base sequences are synthesized into DNA fragments and stored in in vivo and in vitro storage media.
  • the layout of data in the DNA storage media is optimized, such as the index algorithm corresponding to the test tube number of the DNA storage file, etc., to improve the search for DNA storage files. read speed.
  • the DNA fragment is sequenced to obtain the base sequence; and the base sequence is decoded into a digital file through a computer mathematical algorithm (the inverse operation of the encoding process); the digital file includes binary, quaternary or File formats such as octal represent files for data files and algorithm files.
  • a computer mathematical algorithm the inverse operation of the encoding process
  • the digital file includes binary, quaternary or File formats such as octal represent files for data files and algorithm files.
  • the algorithm for preprocessing the original data is also stored in DNA according to a certain file format in the storage stage, so that the data can be completely restored without the aid of an external algorithm, or the data can be restored with the least external information.
  • Complete original data in the application scenario of large-scale and complex data storage, in order to realize the self-containment and self-interpretation of data stored in DNA, a unified digital file format is defined, and data and algorithms are associated and managed in a unified manner; It ensures the reliability of large-scale data storage in a long-term uncertain environment and the integrity of data recovery.
  • FIG. 2 it is a schematic flowchart of a DNA-based data storage method provided by an embodiment of the present application, including the following steps:
  • Step S201 Obtain a data file to be stored, where the data file is a file obtained by preprocessing the original data according to the algorithm file.
  • the data files are files obtained by preprocessing various types of raw data.
  • Various types of raw data include text types (txt format, doc format, etc.), image types (jpg format, etc.), and video types. Different types of raw data correspond to different preprocessing algorithms.
  • the method before acquiring the data file to be stored, the method further includes: compressing, removing redundancy or encrypting the original data according to the algorithm file to obtain the data file.
  • pre-processing methods include but are not limited to processing such as compression, redundancy deletion, or encryption.
  • preprocessing process the purpose of compression can be achieved by removing redundancy.
  • common preprocessing algorithms include Huffman coding, fountain codes or LZMA data compression algorithms.
  • the data compression algorithm of Huffman coding is suitable for application scenarios where each character of the input file appears with an unequal probability;
  • the original data information can be recovered with high probability by using code overhead, which can greatly improve the storage efficiency in the process of DNA storage.
  • the LZMA data compression algorithm makes full use of the structural characteristics of various original data, and can realize simple and feasible data compression processing.
  • Step S202 Edit the data file and the algorithm file according to a preset file format to generate a binary file to be encoded, where the file format is used to indicate an index type between the data file and the algorithm file.
  • a standard file storage format is preset. Edit the data file and the algorithm file according to the preset file format to obtain the binary file to be encoded.
  • the size unit of the binary file is bytes; the format in the binary file includes an identification bit used to indicate the index type corresponding to the data file and the algorithm file; the index type includes direct index and indirect index.
  • the index type is direct index
  • the data file and the algorithm file are edited according to the file format shown in Table 1, and the corresponding binary file to be encoded is obtained.
  • editing a data file and an algorithm file according to a preset file format to generate a binary file to be encoded includes: editing attribute identification bits and valid data bits of the data file according to the preset file format; attribute identification bit and valid data bit, determine the offset of the algorithm file relative to the valid data bit of the data file; based on the offset, edit the valid data bit of the algorithm file to obtain the data file and the algorithm file Binaries located in the same file.
  • the file format includes an offset address corresponding to each variable name related to the data file and the algorithm file, the size of the occupied bytes, and the like.
  • the file format of the data file includes attribute identification bits of the data file and valid data bits of the data file.
  • the variable names of the attribute identification bits of the data file include the data file start flag DataB, the file type Type, the flag field Flag, the compression method ComS, the compressed data length ComLen, the data length before compression SouLen, and the data start flag PayloadB;
  • the data file The variable name of the valid data bits includes the compressed or uncompressed data Payload;
  • the variable name of the valid data bits of the algorithm file includes the compression algorithm code or logical representation (optional) Algr.
  • the address offset and size corresponding to each variable name is shown in Table 1.
  • the identification bit of the data file start marker DataB indicates the start of the compressed (or uncompressed) data file.
  • editing the data file and the algorithm file according to the preset file format to generate the binary file to be encoded includes: editing the first attribute identification bit and the first valid data bit of the data file according to the preset file format to obtain the first binary file corresponding to the data file; according to the preset file format, edit the second attribute identification bit and the second valid data bit of the algorithm file to obtain the second binary file corresponding to the algorithm file; wherein, The first binary file and the second binary file are two independent files.
  • the compression algorithm is expressed in another file, as shown in Table 2, the algorithm file corresponding to the binary file alone file format.
  • Table 2 each variable name corresponding to the algorithm file, the address offset corresponding to each variable name, the size of the occupied bytes, and the corresponding function.
  • the variable name of the binary file of the algorithm file includes the attribute identification bit of the algorithm file and the valid data bit of the algorithm file; the variable name of the attribute identification bit of the algorithm file includes the algorithm file start tag AlgrB and the compression algorithm name AlgrName, the valid data of the algorithm file.
  • the bit is the specific algorithm AlgrData (ie, the specific algorithm or logical representation of data compression).
  • the data files and algorithm files are edited according to the preset file format, and the obtained digital files can also be files of other formats, such as ternary files or quaternary files, which correspond to different file formats. Different meanings are set.
  • the identification bits of the same or similar concepts all fall within the protection scope of the embodiments of the present application.
  • Step S203 the binary file is encoded to obtain a base sequence, and the base sequence is used to synthesize the DNA fragments storing the data file and the algorithm file.
  • encoding a binary file refers to converting the binary file information that needs to be stored into a DNA base sequence (that is, a sequence containing A, G, C, and T) through a certain correspondence or rule.
  • a DNA base sequence that is, a sequence containing A, G, C, and T
  • the base sequence DNA fragments used to synthesize storage data files and algorithm files are used to synthesize storage data files and algorithm files.
  • coding models are suitable for different information types, for example, some coding models are suitable for text information, some are only suitable for picture information, and some can be suitable for various types of information.
  • Synthesis of DNA fragments is the process of linking the bases in the base sequence one by one to form a DNA chain.
  • the code conversion may be performed through a conversion model based on a mathematical algorithm.
  • the DNA fragment is composed of A, G, C and T4 bases. Since the data in the computer is in the form of binary (ie 0, 1), storing the data information in the DNA is to encode the binary code stream of the data information. DNA is stored for base sequences. According to the structure of DNA, common DNA storage coding models include binary model, ternary model and quaternary model.
  • the binary model defines any two of the A, T, C and G4 bases as 1, and the other two as 1, that is, the base sequence has only two states of 0 and 1.
  • the binary model can better avoid the unbalanced GC content and many homopolymers in DNA, which can reduce the difficulty of synthesizing DNA fragments in the later stage.
  • the ternary model means that the entire base sequence has only 3 states: 0, 1 and 2. First, edit the data information to be stored into a ternary code stream, and then encode 0, 1 and 2 in the code stream according to the corresponding relationship in Table 3 to obtain the base sequence. The ternary model determines the next base by the previous base, which can store more information.
  • the coding model also includes a quaternary model, which corresponds A, T, C, and G in the base to 0, 1, 2, and 3, and converts the binary code stream read into DNA into quaternary. Commonly prohibited
  • the model mapping relationship is shown in Table 4, wherein the mapping relationship is not unique and includes different combination schemes, and Table 4 only shows one of the mapping relationships.
  • the quaternary model has stronger information storage capacity, and each base can encode two bits of data, which can improve storage efficiency and reduce DNA storage costs.
  • encoding the binary file to obtain the base sequence includes: encoding the binary file according to a preset encoding model to obtain the base sequence of the binary file; adding primer sequences to the base sequence of the binary file The head and tail of the DNA fragment are obtained to obtain the base sequence used for the synthesis of DNA fragments.
  • the preset coding model includes the above-mentioned binary coding model, ternary coding model and quaternary coding model.
  • FIG. 3 a schematic diagram of the logical relationship between a data file and an algorithm file provided by an embodiment of the present application, the logical relationship of the direct index type between the data file and the algorithm file, the data and the algorithm are located in the same binary file.
  • the data is fragmented, and primer sequences are added to the first position of the base fragment.
  • data 1 is preprocessed by algorithm 1
  • data 2 is preprocessed by algorithm 1
  • data n is preprocessed by algorithm m.
  • Each file x has a pair of primer identifiers, including head primer x-F and tail primer x-R, and different data can correspond to the same or different algorithms; for example, data 1 in file 1 corresponds to algorithm 1, and the first part of file 1 includes primer sequences 1-F and 1- R, data 2 in file 2 corresponds to algorithm 1, the first part of file 2 includes primer sequences 2-F and 2-R, and data n in file n corresponds to algorithm m, and the first part of file n includes primer sequences n-F and n-R.
  • Figure 3 shows the direct index relationship between data files and algorithm files.
  • Each binary file x contains data and a backup of the algorithm corresponding to the data. Loss or damage of the binary files in it will not affect each other, such as file 1 If it is lost, file 2 can still be recovered through its corresponding algorithm; it is suitable for application scenarios with very high data security and reliability requirements.
  • the schematic diagram of synthesizing DNA fragments corresponds to the logical relationship of the data corresponding algorithm shown in FIG. 3 , and the encoded files are divided to obtain DNA fragments that can be stored.
  • primer sequences 1-F and 1-R are added to both ends of the base sequence of data 1, 1-F is added to one end of data 1, and 1-R is added to the other end of data 1 ;
  • the primer sequence 1-F of file 1 is added to the head of the base sequence of data 1, as the head primer of the DNA fragment corresponding to data 1
  • the primer sequence 1-R of file 1 is added to the base sequence of data 1 , as the tail primer of the DNA fragment corresponding to data 1.
  • primer sequences 1-F and 1-R to both ends of the base sequence of Algorithm 1, add 1-F to one end of Algorithm 1, and add 1-R to the other end of Algorithm 1;
  • the primer sequence 1-F of 1 is added to the head of the base sequence of Algorithm 1 as the head primer of the DNA fragment corresponding to Algorithm 1
  • the primer sequence 1-R of File 1 is added to the tail of the base sequence of Algorithm 1, as The tail primer of the DNA fragment corresponding to Algorithm 1.
  • primer sequences n-F and n-R of file n are added to both ends of the base sequence of data n, n-F is added to one end of the base sequence of data n, and n-R is added to the other end of the clip sequence of data n.
  • the primer sequence n-F of file n is added to the head of the base sequence of data n, as the head primer of the DNA fragment corresponding to data n;
  • the primer sequence n-R of file n is added to the tail of data n, as data n corresponding The tail primer of the DNA fragment;
  • the primer sequences n-F and n-R of file n are added to both ends of the base sequence of algorithm m, n-F is added to one end of the base sequence of algorithm m, and n-R is added to the other end of algorithm m.
  • One end for example, add the primer sequence n-F of file n to the head of the base sequence of algorithm m, as the head primer of the DNA fragment corresponding to algorithm m; add the primer sequence n-R of file n to the tail of the base sequence of algorithm m, As the tail primer of the DNA fragment corresponding to the algorithm m; thus dividing the encoded file x to obtain a DNA fragment that can be stored.
  • the primer sequence is information stored externally in the DNA, and the DNA fragment can be sequenced through the primer sequence to obtain the base sequence of the DNA fragment.
  • Adding primer sequences to the head and tail of the base sequence of the binary file is not limited to the primer sequences corresponding to the above-mentioned head and tail, as long as it is added at both ends of the base sequence of the binary file.
  • encoding the binary file to obtain the base sequence includes: encoding the first binary file and the second binary file according to a preset encoding model to obtain the The first base sequence of the first binary file and the second base sequence of the second binary file; adding the first primer sequence to the head and tail of the first base sequence to obtain for synthesis The base sequence of the first fragment in the DNA fragment; adding the second primer sequence to the head and tail of the second base sequence to obtain the base sequence for synthesizing the second fragment in the DNA fragment.
  • the first binary file is a binary file of a data file
  • the second binary file is a binary file of an algorithm file corresponding to the data file.
  • the first binary file and the corresponding second binary file are collectively referred to as DNA files.
  • the first to nth DNA files are encoded to obtain the first to nth DNA files.
  • the base sequence of the DNA file After dividing the base sequence of each DNA file into short fragments, adding a first primer sequence to the head and tail of the first base sequence to obtain a base sequence for synthesizing the first fragment in the DNA fragments; adding A second primer sequence is applied to the head and tail of the second base sequence to obtain a base sequence for synthesizing the second fragment of the DNA fragments.
  • the first base sequence is the sequence corresponding to the data file
  • the second base sequence is the sequence corresponding to the algorithm file
  • the first primer sequence corresponding to each DNA file may be a sequence containing different base pairs.
  • FIG. 4 in order to reduce the redundancy in the data storage process and reduce the cost of synthesis and sequencing, another embodiment of the present application provides a schematic diagram of the logical relationship between a data file and an algorithm file. Binary files are kept separately.
  • the encoded data is fragmented, and primer sequences are added to the first position of the base fragment.
  • both data 1 and data 2 are preprocessed by algorithm 1
  • data 3 is preprocessed by algorithm 2.
  • Each file x is identified by a pair of primers, including the head primer x-F and the tail primer x-R.
  • the first part of file 1 includes the first primer sequences 1-F and 1-R
  • the data file 1 includes data 1 and the second primer sequences 1'-F and 1'-R
  • the first part of file 2 includes the first primer sequences 2-F and 1'-R
  • 2-R data file 2 includes data 2 and second primer sequences 1'-F, 1'-R
  • the first position of file 3 includes first primer sequences 3-F and 3-R
  • data file 3 includes data 3 and second Primer sequences 2'-F, 2'-R.
  • the second primer sequence is the primer sequence corresponding to the algorithm.
  • the base pair sequence of the second primer sequence corresponding to different algorithms can be different.
  • the second primer sequences 1'-F and 1'-R corresponding to the algorithm 1
  • the second primer sequences 2'-F and 2'-R corresponding to Algorithm 2.
  • the primers x-F and x-R corresponding to the data file x and the primers x'-F and x'-R corresponding to the algorithm file x are two different pairs of primers, and the primer sequences of the data pointing to the algorithm are included in the data file.
  • FIG. 6 corresponding to FIG. 4 is a schematic diagram of synthesizing DNA fragments provided by another embodiment of the present application.
  • the encoded file is divided to obtain DNA fragments that can be stored; the DNA fragment corresponding to the synthesized data file is the first fragment, and the DNA fragment corresponding to the synthesized algorithm is the second fragment. Fragment.
  • the data is stored separately from the algorithm, and the first primer sequence may be externally stored data for DNA storage.
  • the first primer sequences 1-F and 1-R are added to the head and tail of the base sequence of data file 1 to obtain the first fragment; the first primer sequences 2-F and 2-R are added Go to the head and tail of the base sequence of data file 2 to obtain the first fragment; add the second primer sequences 1'-F and 1'-R to the head and tail of the base sequence of algorithm 1 to obtain the second fragment.
  • the first primer sequence is externally stored information stored in DNA, and the first fragment is sequenced through the first primer sequence to obtain the base sequence of the first fragment.
  • Adding the first primer sequence to the head and tail of the base sequence of the data file, and adding the second primer sequence to the head and tail of the base sequence of the algorithm, are not limited to those corresponding to the head and tail of the base sequence described above.
  • the primer sequence can be added to both ends of the clip sequence in the binary file.
  • the information stored externally is as little as possible, and the information stored in DNA is as much as possible.
  • Only the first base sequence of the first fragment can be stored externally, but this method requires Amplified and sequenced twice.
  • the first primer sequence of the data file and the second primer sequence of the algorithm can also be used as external storage information for DNA storage.
  • encoding the binary file to obtain the base sequence includes: encoding the first binary file and the second binary file according to a preset encoding model to obtain the first binary file The first base sequence of the first base sequence and the second base sequence of the second binary file; the head primer sequence and the tail primer sequence are added to the head and tail of the first base sequence to obtain the DNA fragment used in the synthesis of The base sequence of the third fragment; adding a universal primer sequence and one or more tail primer sequences of the first base sequence corresponding to the second base sequence to the head and tail of the second base sequence to obtain DNA for synthesis The base sequence of the fourth fragment in the fragment.
  • FIG. 7 a schematic diagram of synthesizing DNA fragments provided in another embodiment of the present application.
  • different data may correspond to the same algorithm, for example, data 1, data 2 and data 3 are all preprocessed by algorithm 1, Data 4 is preprocessed by Algorithm 2, but the pointer direction of the algorithm file and the data file is reversed from the algorithm file to the data file.
  • the binary files of the data files and the binary files of the algorithm files are kept separately. After encoding the first binary file corresponding to the data file and the second binary file corresponding to the algorithm file, the encoded data is fragmented, and primer sequences are added to the first position of the base fragment.
  • data 1, data 2, and data 3 are all preprocessed by algorithm 1, and data 4 is preprocessed by algorithm 2.
  • Each file x is identified by a pair of primers, including the head primer x-F and the tail primer x-R.
  • the primers x-F and x-R corresponding to the data file x, and the primers corresponding to the algorithm file x include universal primers and one or more primers x-R; wherein, the primer x-R corresponding to the data file x and the primer x-R corresponding to the algorithm file x are the same primers, which are defined by Algorithms point to data.
  • file 1, file 2, etc. in (a) in FIG. 7 refer to DNA files including data files and algorithm files.
  • the head primer sequence and the tail primer sequence are added to both ends of the first base sequence, respectively, and the universal primer sequence and the one or more first base sequences corresponding to the second base sequence are added.
  • the tail primer sequences are respectively added to both ends of the second base sequence; wherein, the first base sequence is the fragment corresponding to the data file, and the second base sequence is the fragment corresponding to the algorithm file.
  • the base sequence of data 1 is added to the head primer sequence 1-F and the tail primer sequence 1-R
  • the base sequence of data 2 is added to the head primer sequence 2-F and tail primer sequence 2-R
  • data The tail primer sequence 2-R of 2, the tail primer sequence 3-R of data 3; the head primer sequence 4-F and the tail primer sequence 4-R are added to the base sequence of data 4, in the base sequence of algorithm 2.
  • the general primer sequence is added to the head, and the tail primer sequence 4-R corresponding to data 4 is added to the tail; thus, the DNA fragments corresponding to each data file and the algorithm file are synthesized, and the DNA fragment corresponding to the data is classified as the third fragment. The corresponding DNA fragment is classified as the fourth fragment.
  • the universal primer sequence and the head primer sequences of one or more first base sequences corresponding to the second base sequence may also be added to both ends of the second base sequence, respectively.
  • primers x-F and x-R corresponding to the data file x are known primer sequences, which can be external storage for DNA storage. information. With the above-mentioned known primer sequences, the DNA fragment can be sequenced once to obtain the base sequences corresponding to the data file and the algorithm file.
  • a head primer sequence and a tail primer sequence are added to the head and tail of the first base sequence
  • a universal primer sequence and one or more tail primer sequences of the first base sequence corresponding to the second base sequence are added to The head and tail of the second base sequence, or adding a universal primer sequence and one or more head primer sequences of the first base sequence corresponding to the second base sequence to the head and tail of the second base sequence, without It is limited to the primer sequences corresponding to the head and tail of the base sequence described above, and it suffices to be added at both ends of the clip sequence of the binary file.
  • the DNA sequences of the data file and the algorithm file can be expanded simultaneously according to the primer sequence and the general primer sequence of the data file, and the data can be decoded at the same time. files and algorithm files, reducing the amount of information that needs to be saved externally. By storing the data files and algorithm files separately, the concurrent amplification and sequencing of the data files and the algorithm files is realized.
  • FIG. 8 a schematic flowchart of a DNA-based data recovery method provided by another embodiment of the present application.
  • the DNA-based data recovery method as an inverse operation process of DNA-based data storage, can realize the self-recovery of the stored original data.
  • the data preprocessing algorithm is stored in DNA.
  • the system finds the primer sequence of the corresponding file, and simultaneously obtains the data and executable algorithm file through PCR sequencing. After decoding, the executable algorithm in the same directory can automatically convert the data file. Perform analysis, restore the original data, and realize the self-interpretation of the data.
  • the process includes:
  • step S801 the DNA fragment to be decoded is acquired, and the DNA fragment to be decoded is used to store the data file and the algorithm file.
  • the data files and algorithm files are stored in the in vivo and ex vivo storage media in the form of DNA fragments.
  • the system can find the corresponding DNA storage file and the corresponding primer sequence.
  • Data files can be various types of information such as text, picture, and video.
  • the data files are obtained by preprocessing the original data through the algorithm files.
  • the preprocessing algorithms include compression, redundancy deletion, encryption and other preprocessing algorithms.
  • Step S802 decoding the DNA segment to be decoded to obtain a binary file conforming to a preset file format, where the file format is used to indicate the index type between the data file and the algorithm file.
  • the process of decoding the DNA fragments is the inverse of the encoding process.
  • decoding the DNA fragment to be decoded to obtain a binary file conforming to a preset file format includes: sequencing the DNA fragment to be decoded according to the primer sequences in the DNA fragment to be decoded to obtain the DNA fragment The base sequence of the DNA fragment is decoded according to the preset decoding model to obtain a binary file.
  • the DNA fragments are amplified by PCR technology, and then sequenced to obtain the base sequence of the data and the algorithm.
  • the preset decoding model is an inverse operation model of the encoding model, and through the conversion relationship of the decoding model, the data and the base sequence of the algorithm are converted into corresponding binary files.
  • the binary file is a file in which the data file and the algorithm file are located in the same file, and the index type is direct index.
  • FIG. 9 is a schematic structural diagram of a binary file provided by an embodiment of the present application.
  • the data and the algorithm are located in the same binary file, including the attribute identification bits of the data file, the valid data bits of the data file, and the valid data bits of the algorithm file.
  • the variable name corresponding to each identification bit as shown in (a) in Figure 9, the attribute identification bit of the data file includes the data file start mark, data file type, binary attribute mark, compression method, compressed data length, compression Pre-data length and data start marker, etc.
  • the offset of the valid data bits of the algorithm file can be determined by the start of book marker field and the valid data bits of the data file.
  • performing decoding processing on the DNA fragment to be decoded to obtain a binary file conforming to a preset file format includes: performing decoding on the first fragment according to the first primer sequence of the first fragment in the DNA fragment to be decoded Sequencing to obtain a first base sequence and a second primer sequence; according to the second primer sequence, sequencing the second fragment in the DNA fragment to be decoded to obtain a second base sequence; according to a preset decoding model, the first The base sequence and the second base sequence are decoded to obtain a first binary file corresponding to the first base sequence and a second binary file corresponding to the second base sequence.
  • the first binary file corresponds to a data file
  • the second binary file corresponds to an algorithm file.
  • PCR technology is used to amplify and sequence the first fragment to obtain the base sequence of data 1 and the second primer. sequence.
  • the second fragment is amplified and sequenced to obtain the base sequence corresponding to the algorithm file.
  • the base sequence of the data file and the base sequence of the algorithm file are decoded to obtain the binary file of the data file and the binary file of the algorithm file.
  • the first fragment in the decoding process corresponding to the DNA fragment shown in FIG. 6 , according to the first primer sequences 1-F and 1-R, the first fragment can be amplified, and then sequenced to obtain the base sequence of the data file 1.
  • the base sequence of data file 1 includes the first base sequence corresponding to data 1 and the second primer sequence 1'-F, 1'-R; according to the second primer sequence 1'-F, 1'-R, for the first
  • the two fragments are amplified and sequenced to obtain the base sequence corresponding to Algorithm 1.
  • the first primer sequences 2-F and 2-R the first fragment can be amplified and then sequenced to obtain the base sequence of data file 2.
  • the base sequence of data file 2 includes the first base corresponding to data 2 sequence and the second primer sequence 1'-F, 1'-R; according to the second primer sequence 1'-F, 1'-R, the second fragment is amplified, and then sequenced to obtain the base sequence corresponding to algorithm 1 .
  • the first primer sequences 3-F and 3-R the first fragment can be amplified and then sequenced to obtain the base sequence of data file 3.
  • the base sequence of data file 3 includes the first base corresponding to data 3 sequence and the second primer sequence 2'-F, 2'-R; according to the second primer sequence 2'-F, 2'-R, the second fragment is amplified, and then sequenced to obtain the base sequence corresponding to algorithm 2 .
  • the first binary file corresponding to the data file includes the first attribute identification bit of the data file and the first valid data bit of the data file; the first attribute identification bit includes the start of the data file Variable fields such as tag, data file type, binary attribute tag, compression method, data length after compression, data length before compression, and data start tag.
  • the binary attribute tag field includes one byte, eight bits, the first bit F1 indicates whether the original data is preprocessed, and F2 indicates the index type between the data file and the algorithm file.
  • the second binary file corresponding to the algorithm file as shown in (c) of FIG. 10 includes the second attribute identifier of the algorithm file and the second valid data bits of the algorithm file.
  • the second attribute identification bit includes the field of the algorithm file start marker and the field of the algorithm name.
  • the second significant data bit indicates the specific preprocessing algorithm employed.
  • the first binary file corresponds to a data file
  • the second binary file corresponds to an algorithm file
  • decoding the DNA fragment to be decoded to obtain a binary file conforming to a preset file format includes: according to the head primer sequence and the tail primer sequence of the third fragment in the DNA fragment to be decoded, The third fragment is sequenced to obtain the first base sequence; according to the tail primer sequence of the third fragment and the universal primer sequence of the fourth fragment in the DNA fragments to be decoded, the fourth fragment is sequenced to obtain the second base base sequence; according to the preset decoding model, decode the first base sequence and the second base sequence to obtain the first binary file corresponding to the first base sequence and the second binary file corresponding to the second base sequence binary file.
  • the primer sequences corresponding to the data files only need to be stored externally, and the DNA fragments are sequenced by reading the primer sequences corresponding to the data files, and the data files and algorithm files are obtained at the same time. corresponding base sequences.
  • the third fragment and the fourth fragment are simultaneously amplified by using PCR technology, and then sequenced to obtain The base sequence corresponding to the data file and the base sequence corresponding to the algorithm file.
  • the third fragment corresponding to data 1 and the fourth fragment corresponding to algorithm 1 are simultaneously amplified, and then sequenced to obtain the corresponding data 1.
  • the base sequence of and the base sequence corresponding to Algorithm 1. By decoding the base sequence of the data file and the base sequence of the algorithm file, the first binary file and the second binary file in the file format shown in FIG. 10 are obtained.
  • the first binary file corresponds to a data file
  • the second binary file corresponds to an algorithm file
  • Step S803 read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type.
  • the attribute identification bit of the data file when the index type between the data query and the algorithm file is a direct index, includes an index indicating the index type; read the data in the binary file file, algorithm file, and calling the algorithm file according to the index type, including: reading the attribute identification bits and valid data bits of the data file of the binary file, and determining the index type based on the attribute identification bit of the data file; reading the algorithm file of the binary file The valid data bits of the file are called according to the index type.
  • the first attribute identification bit of the data file when the index type between the data file and the algorithm file is an indirect index, includes an identification indicating the index type; read the data file in the binary file and the algorithm file, and call the algorithm file according to the index type, including: reading the first attribute identification bit and the first valid data bit of the data file in the first binary file, and determining the index type according to the first attribute identification bit; reading; The second attribute identification bit and the second valid data bit of the algorithm file in the second binary file are obtained, and the algorithm of the second valid data bit of the second binary file is called according to the index type.
  • Step S804 Perform parsing processing on the data file according to the algorithm file to obtain original data corresponding to the data file.
  • DNA storage needs to be stored for a long time in practical applications.
  • the data preprocessing algorithm may be lost, in order to ensure the security and integrity of the data in the long-term uncertain environment, the compression algorithm is used.
  • a specific file format is stored in DNA fragments, and on the basis of controlling the amount of data redundancy and simplifying the complexity of data reading, it ensures that the data can be self-interpreted and self-recoverable.
  • FIG. 11 shows a structural block diagram of the DNA-based data storage device provided by the embodiment of the present application. relevant part.
  • the device includes:
  • the first obtaining unit 111 is configured to obtain a data file to be stored, where the data file is a file obtained by preprocessing the original data according to the algorithm file;
  • the first processing unit 112 is configured to edit the data file and the algorithm file according to a preset file format, and generate a binary file to be encoded, and the file format is used to indicate the difference between the data file and the algorithm file.
  • the index type ;
  • the encoding unit 113 is configured to encode the binary file to obtain a base sequence, and the base sequence is used for synthesizing a DNA fragment storing the data file and the algorithm file.
  • FIG. 12 shows a structural block diagram of the DNA-based data recovery apparatus provided by the embodiment of the present application. relevant part.
  • the device includes:
  • the second obtaining unit 121 is configured to obtain DNA fragments to be decoded, and the DNA fragments to be decoded are used to store data files and algorithm files;
  • the decoding unit 122 is configured to perform decoding processing on the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, where the file format is used to indicate the index type between the data file and the algorithm file ;
  • a second processing unit 123 configured to read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type;
  • the parsing unit 124 is configured to perform parsing processing on the data file according to the algorithm file to obtain original data corresponding to the data file.
  • DNA storage needs to be stored for a long time in practical applications.
  • the data preprocessing algorithm may be lost, in order to ensure the security and integrity of the data in the long-term uncertain environment, the compression algorithm is used.
  • a specific file format is stored in DNA fragments, and on the basis of controlling the amount of data redundancy and simplifying the complexity of data reading, it ensures that the data can be self-interpreted and self-recoverable.
  • FIG. 13 is a schematic structural diagram of a terminal device according to an embodiment of the application.
  • the terminal device 13 of this embodiment includes: at least one processor 130 (only one is shown in FIG. 13 ), a processor, a memory 131 , and a processor 131 stored in the memory 131 and available for processing in the at least one processor
  • the computer program 132 running on the processor 130, the processor 130 implements the steps in any of the above method embodiments when the computer program 132 is executed.
  • the terminal device 13 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, the processor 130 and the memory 131 .
  • FIG. 13 is only an example of the terminal device 13, and does not constitute a limitation on the terminal device 13, and may include more or less components than the one shown, or combine some components, or different components , for example, may also include input and output devices, network access devices, and the like.
  • the so-called processor 130 may be a central processing unit (Central Processing Unit, CPU), and the processor 130 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuits) , ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 131 may be an internal storage unit of the terminal device 13 in some embodiments, such as a hard disk or a memory of the terminal device 13 .
  • the memory 131 may also be an external storage device of the terminal device 13 in other embodiments, such as a plug-in hard disk equipped on the terminal device 13, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc.
  • the memory 131 may also include both an internal storage unit of the terminal device 13 and an external storage device.
  • the memory 131 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, for example, program codes of the computer program, and the like.
  • the memory 131 may also be used to temporarily store data that has been output or will be output.
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.
  • the embodiments of the present application provide a computer program product, when the computer program product runs on a mobile terminal, the steps in the foregoing method embodiments can be implemented when the mobile terminal executes the computer program product.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the present application realizes all or part of the processes in the methods of the above embodiments, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium.
  • the computer program includes computer program code
  • the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like.
  • the computer-readable medium may include at least: any entity or device capable of carrying the computer program code to the photographing device/terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media.
  • ROM read-only memory
  • RAM random access memory
  • electrical carrier signals telecommunication signals
  • software distribution media For example, U disk, mobile hard disk, disk or CD, etc.
  • computer readable media may not be electrical carrier signals and telecommunications signals.
  • the disclosed apparatus/network device and method may be implemented in other manners.
  • the apparatus/network device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

Abstract

Disclosed are a DNA-based data storage method, data recovery method, data storage apparatus and data recovery apparatus, and a terminal device and a computer-readable storage medium. The data storage method comprises: acquiring a data file to be stored, wherein the data file is a file obtained by pre-processing original data according to an algorithm file; editing the data file and the algorithm file according to a preset file format, so as to generate a binary file to be encoded, wherein the file format is used for indicating an index type between the data file and the algorithm file; and encoding the binary file to obtain a base sequence, wherein the base sequence is used for synthesizing a DNA fragment that stores the data file and the algorithm file. By means of the present application, the problem of it not being possible for data stored after pre-processing to be recovered due to it not being possible to ensure whether a pre-processing algorithm used is completely present can be solved, thereby ensuring the integrity of the storage and recovery of data in uncertain environments.

Description

基于DNA的数据存储方法、数据恢复方法、装置及终端设备DNA-based data storage method, data recovery method, device and terminal equipment 技术领域technical field
本申请属于数据存储技术领域,尤其涉及一种基于DNA的数据存储方法、数据恢复方法、数据存储装置、数据恢复装置、终端设备及计算机可读存储介质。The present application belongs to the technical field of data storage, and in particular, relates to a DNA-based data storage method, a data recovery method, a data storage device, a data recovery device, a terminal device, and a computer-readable storage medium.
背景技术Background technique
随着计算机技术和网络技术的快速发展,数据信息量的增长速度将很快超过现有硬盘等传统存储介质的承受能力。脱氧核糖核酸(DeoxyriboNucleic Acid,DNA)分子作为一种新型的存储介质,由于具有存储密度高、保存时间长、维护成本低等优势,近年来受到广泛关注。With the rapid development of computer technology and network technology, the growth rate of data information volume will soon exceed the capacity of traditional storage media such as existing hard disks. Deoxyribonucleic acid (DNA) molecule, as a new type of storage medium, has attracted extensive attention in recent years due to its advantages of high storage density, long storage time and low maintenance cost.
目前,在DNA存储实际应用方面的研究仍存在许多亟待解决的问题。DNA作为存储介质的一大优点就是DNA分子的稳定性,在没有人为干预的条件下可以保存长达百年之久。而数据在存储之前大部分会经过一些算法的预处理,如果实现在几十年或者上百年后恢复数据,则需要知道数据和其对应采用的预处理算法,但由于无法保证采用的预处理算法是否完整存在,而导致经过预处理后存储的数据无法恢复的问题。At present, there are still many problems to be solved in the research on the practical application of DNA storage. One of the advantages of DNA as a storage medium is the stability of DNA molecules, which can be stored for up to a hundred years without human intervention. Most of the data will be preprocessed by some algorithms before being stored. If the data can be restored after decades or hundreds of years, it is necessary to know the data and the corresponding preprocessing algorithm. However, the preprocessing algorithm used cannot be guaranteed. Whether it exists completely, and the data stored after preprocessing cannot be recovered.
技术问题technical problem
本申请实施例的目的之一在于:基于DNA的数据存储方法、数据恢复方法、数据存储装置、数据恢复装置、终端设备及计算机可读存储介质,旨在解决由于无法保证采用的预处理算法是否完整存在,而导致经过预处理后存储的数据无法恢复的问题。One of the purposes of the embodiments of the present application is: DNA-based data storage method, data recovery method, data storage device, data recovery device, terminal equipment and computer-readable storage medium, aiming to solve the problem of whether the preprocessing algorithm adopted cannot be guaranteed because it cannot be guaranteed. It exists completely, and the data stored after preprocessing cannot be recovered.
技术解决方案technical solutions
为解决上述技术问题,本申请实施例采用的技术方案是:In order to solve the above-mentioned technical problems, the technical solutions adopted in the embodiments of the present application are:
第一方面,本申请实施例提供了一种基于DNA的数据存储方法,包括:In a first aspect, the embodiments of the present application provide a DNA-based data storage method, including:
获取待存储的数据文件,所述数据文件为根据算法文件对原始数据进行预处理得到的文件;根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;将所述二进制文件进行编码,得到碱基序列,所述碱基序列用于合成存储所述数据文件和所述算法文件的DNA片段。Obtain the data file to be stored, the data file is a file obtained by preprocessing the original data according to the algorithm file; edit the data file and the algorithm file according to the preset file format, and generate the binary file to be encoded, so The file format is used to indicate the index type between the data file and the algorithm file; the binary file is encoded to obtain a base sequence, and the base sequence is used to synthesize and store the data file and the algorithm file. The DNA fragment of the algorithm file.
在第一方面的一种可能的实现方式中,在所述获取待存储的数据文件之前,所述方法还包括:根据所述算法文件对所述原始数据进行压缩、删冗或加密的处理,得到所述数据文件。In a possible implementation manner of the first aspect, before acquiring the data file to be stored, the method further includes: compressing, deleting redundancy or encrypting the original data according to the algorithm file, Get the data file.
在第一方面的一种可能的实现方式中,所述根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,包括:In a possible implementation manner of the first aspect, the editing of the data file and the algorithm file according to a preset file format to generate a binary file to be encoded includes:
根据预设的所述文件格式,编辑所述数据文件的属性标识位和有效数据位;根据所述数据文件的所述属性标识位和所述有效数据位,确定所述算法文件相对于所述数据文件的有效数据位的偏移量;基于所述偏移量,编辑所述算法文件的有效数据位,得到所述数据文件和所述算法文件位于同一文件的二进制文件。According to the preset file format, edit the attribute identification bits and valid data bits of the data file; according to the attribute identification bits and the valid data bits of the data file, determine the relative The offset of the valid data bits of the data file; based on the offset, edit the valid data bits of the algorithm file to obtain a binary file in which the data file and the algorithm file are located in the same file.
在第一方面的一种可能的实现方式中,所述将所述二进制文件进行编码,得到碱基序列,包括:In a possible implementation manner of the first aspect, the encoding of the binary file to obtain a base sequence includes:
根据预设的编码模型,将所述二进制文件进行编码,得到所述二进制文件的碱基序列; 添加引物序列至所述二进制文件的碱基序列的首部和尾部,得到用于合成所述DNA片段的碱基序列。Encoding the binary file according to a preset encoding model to obtain the base sequence of the binary file; adding primer sequences to the head and tail of the base sequence of the binary file to obtain the DNA fragment for synthesizing the binary file base sequence.
在第一方面的一种可能的实现方式中,所述根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,包括:In a possible implementation manner of the first aspect, the editing of the data file and the algorithm file according to a preset file format to generate a binary file to be encoded includes:
根据预设的所述文件格式,编辑所述数据文件的第一属性标识位和第一有效数据位,得到所述数据文件对应的第一二进制文件;根据预设的所述文件格式,编辑所述算法文件的第二属性标识位和第二有效数据位,得到所述算法文件对应的第二二进制文件;其中,所述第一二进制文件和所述第二二进制文件为相互独立的两个文件。According to the preset file format, edit the first attribute identification bit and the first valid data bit of the data file to obtain the first binary file corresponding to the data file; according to the preset file format, Edit the second attribute identification bit and the second valid data bit of the algorithm file to obtain a second binary file corresponding to the algorithm file; wherein, the first binary file and the second binary file The files are two independent files.
在第一方面的一种可能的实现方式中,所述将所述二进制文件进行编码,得到碱基序列,包括:In a possible implementation manner of the first aspect, the encoding of the binary file to obtain a base sequence includes:
根据预设的编码模型,将所述第一二进制文件和所述第二二进制文件进行编码,得到所述第一二进制文件的第一碱基序列和所述第二二进制文件的第二碱基序列;添加第一引物序列至所述第一碱基序列的首部和尾部,得到用于合成所述DNA片段中的第一片段的碱基序列;添加第二引物序列至第二碱基序列的首部和尾部,得到用于合成DNA片段中的第二片段的碱基序列。According to a preset encoding model, the first binary file and the second binary file are encoded to obtain the first base sequence of the first binary file and the second binary file. prepare the second base sequence of the file; add the first primer sequence to the head and tail of the first base sequence to obtain the base sequence for synthesizing the first fragment in the DNA fragment; add the second primer sequence To the head and tail of the second base sequence, the base sequence for synthesizing the second fragment in the DNA fragment is obtained.
在第一方面的一种可能的实现方式中,所述将所述二进制文件进行编码,得到碱基序列,包括:In a possible implementation manner of the first aspect, the encoding of the binary file to obtain a base sequence includes:
根据预设的编码模型,将所述第一二进制文件和所述第二二进制文件进行编码,得到所述第一二进制文件的第一碱基序列和所述第二二进制文件的第二碱基序列;添加头部引物序列和尾部引物序列至所述第一碱基序列的首部和尾部,得到用于合成所述DNA片段中的第三片段的碱基序列;添加通用引物序列以及与所述第二碱基序列对应的一个或多个第一碱基序列的尾部引物序列至所述第二碱基序列的首部和尾部,得到用于合成所述DNA片段中的第四片段的碱基序列。According to a preset encoding model, the first binary file and the second binary file are encoded to obtain the first base sequence of the first binary file and the second binary file. preparing the second base sequence of the file; adding the head primer sequence and the tail primer sequence to the head and tail of the first base sequence to obtain the base sequence for synthesizing the third fragment in the DNA fragment; adding A universal primer sequence and a tail primer sequence of one or more first base sequences corresponding to the second base sequence to the head and tail of the second base sequence to obtain a primer for synthesizing the DNA fragment. The base sequence of the fourth fragment.
第二方面,本申请实施例提供了一种基于DNA的数据恢复方法,包括:In the second aspect, the embodiments of the present application provide a DNA-based data recovery method, including:
获取待解码的DNA片段,所述待解码的DNA片段用于存储数据文件和算法文件;对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;读取所述二进制文件中的所述数据文件和所述算法文件,并根据所述索引类型调用所述算法文件;根据所述算法文件对所述数据文件进行解析处理,得到所述数据文件对应的原始数据。Obtaining the DNA fragment to be decoded, the DNA fragment to be decoded is used to store data files and algorithm files; decoding the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, the file format used to indicate the index type between the data file and the algorithm file; read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type; The algorithm file performs parsing processing on the data file to obtain the original data corresponding to the data file.
在第二方面的一种可能的实现方式中,所述对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,包括:In a possible implementation manner of the second aspect, the decoding process is performed on the DNA segment to be decoded to obtain a binary file conforming to a preset file format, including:
根据所述待解码的DNA片段中的引物序列,对所述待解码的DNA片段进行测序,得到所述DNA片段的碱基序列;根据预设的解码模型,将所述DNA片段的碱基序列进行解码,得到所述二进制文件;其中,所述二进制文件为所述数据文件和所述算法文件位于同一文件的文件。According to the primer sequences in the DNA fragment to be decoded, the DNA fragment to be decoded is sequenced to obtain the base sequence of the DNA fragment; according to the preset decoding model, the base sequence of the DNA fragment is sequenced Decoding is performed to obtain the binary file; wherein, the binary file is a file in which the data file and the algorithm file are located in the same file.
在第二方面的一种可能的实现方式中,所述数据文件的属性标识位包括指示索引类型的标识;所述读取所述二进制文件中的所述数据文件、所述算法文件,并根据所述索引类型调用所述算法文件,包括:In a possible implementation manner of the second aspect, the attribute identification bit of the data file includes an index indicating an index type; the reading of the data file and the algorithm file in the binary file is performed according to The index type calls the algorithm file, including:
读取所述二进制文件的所述数据文件的属性标识位和有效数据位,并基于所述数据文件的属性标识位确定所述索引类型;读取所述二进制文件的所述算法文件的有效数据位, 并根据所述索引类型调用所述算法文件的所述有效数据位。Read the attribute identification bits and valid data bits of the data file of the binary file, and determine the index type based on the attribute identification bits of the data file; read the valid data of the algorithm file of the binary file bits, and the valid data bits of the algorithm file are called according to the index type.
在第二方面的一种可能的实现方式中,所述对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,包括:In a possible implementation manner of the second aspect, the decoding process is performed on the DNA segment to be decoded to obtain a binary file conforming to a preset file format, including:
根据所述待解码的DNA片段中的第一片段的第一引物序列,对所述第一片段进行测序,得到第一碱基序列和第二引物序列;根据所述第二引物序列,对待解码的DNA片段中的第二片段进行测序,得到第二碱基序列;根据预设的解码模型,将所述第一碱基序列和所述第二碱基序列进行解码,得到所述第一碱基序列对应的第一二进制文件和所述第二碱基序列对应的第二二进制文件;其中,所述第一二进制文件对应所述数据文件,所述第二二进制文件对应所述算法文件。According to the first primer sequence of the first fragment in the DNA fragments to be decoded, the first fragment is sequenced to obtain the first base sequence and the second primer sequence; according to the second primer sequence, the to-be-decoded sequence Sequencing the second fragment of the DNA fragment obtained by obtaining the second base sequence; according to a preset decoding model, decoding the first base sequence and the second base sequence to obtain the first base sequence The first binary file corresponding to the base sequence and the second binary file corresponding to the second base sequence; wherein, the first binary file corresponds to the data file, and the second binary file corresponds to the data file. The file corresponds to the algorithm file.
在第二方面的一种可能的实现方式中,所述对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,包括:In a possible implementation manner of the second aspect, the decoding process is performed on the DNA segment to be decoded to obtain a binary file conforming to a preset file format, including:
根据所述待解码的DNA片段中的第三片段的头部引物序列和尾部引物序列,对所述第三片段进行测序,得到第一碱基序列;根据所述第三片段的尾部引物序列和所述待解码的DNA片段中的第四片段的通用引物序列,对所述第四片段进行测序,得到第二碱基序列;根据预设的解码模型,将所述第一碱基序列和所述第二碱基序列进行解码,得到所述第一碱基序列对应的第一二进制文件和所述第二碱基序列对应的第二二进制文件;其中,所述第一二进制文件对应所述数据文件,所述第二二进制文件对应所述算法文件。According to the head primer sequence and the tail primer sequence of the third fragment in the DNA fragment to be decoded, the third fragment is sequenced to obtain the first base sequence; according to the tail primer sequence of the third fragment and For the universal primer sequence of the fourth fragment in the DNA fragments to be decoded, the fourth fragment is sequenced to obtain a second base sequence; according to a preset decoding model, the first base sequence and the The second base sequence is decoded to obtain a first binary file corresponding to the first base sequence and a second binary file corresponding to the second base sequence; wherein, the first binary file is The system file corresponds to the data file, and the second binary file corresponds to the algorithm file.
在第二方面的一种可能的实现方式中,所述数据文件的第一属性标识位包括指示索引类型的标识;所述读取所述二进制文件中的所述数据文件和所述算法文件,并根据所述索引类型调用所述算法文件,包括:In a possible implementation manner of the second aspect, the first attribute identification bit of the data file includes an index indicating an index type; the reading the data file and the algorithm file in the binary file, And call the algorithm file according to the index type, including:
读取所述第一二进制文件中所述数据文件的第一属性标识位和第一有效数据位,并根据所述第一属性标识位确定所述索引类型;读取所述第二二进制文件中所述算法文件的第二属性标识位和第二有效数据位,并根据所述索引类型调用所述第二二进制文件的所述第二有效数据位的算法。Read the first attribute identification bit and the first valid data bit of the data file in the first binary file, and determine the index type according to the first attribute identification bit; read the second two The second attribute identification bit and the second valid data bit of the algorithm file in the binary file, and the algorithm of the second valid data bit of the second binary file is called according to the index type.
第三方面,本申请实施例提供了一种基于DNA的数据存储装置,包括:In a third aspect, an embodiment of the present application provides a DNA-based data storage device, including:
第一获取单元,用于获取待存储的数据文件,所述数据文件为根据算法文件对原始数据进行预处理得到的文件;a first acquiring unit, configured to acquire a data file to be stored, where the data file is a file obtained by preprocessing the original data according to the algorithm file;
第一处理单元,用于根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;The first processing unit is configured to edit the data file and the algorithm file according to a preset file format, and generate a binary file to be encoded, and the file format is used to indicate the relationship between the data file and the algorithm file. index type;
编码单元,用于将所述二进制文件进行编码,得到碱基序列,所述碱基序列用于合成存储所述数据文件和所述算法文件的DNA片段。The coding unit is used for coding the binary file to obtain a base sequence, and the base sequence is used for synthesizing the DNA fragments storing the data file and the algorithm file.
第四方面,本申请实施例提供了一种基于DNA的数据恢复装置,包括:In a fourth aspect, an embodiment of the present application provides a DNA-based data recovery device, including:
第二获取单元,用于获取待解码的DNA片段,所述待解码的DNA片段用于存储数据文件和算法文件;a second acquiring unit, configured to acquire DNA fragments to be decoded, and the DNA fragments to be decoded are used to store data files and algorithm files;
解码单元,用于对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;a decoding unit, configured to decode the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, where the file format is used to indicate an index type between the data file and the algorithm file;
第二处理单元,用于读取所述二进制文件中的所述数据文件和所述算法文件,并根据所述索引类型调用所述算法文件;a second processing unit, configured to read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type;
解析单元,用于根据所述算法文件对所述数据文件进行解析处理,得到所述数据文件对应的原始数据。The parsing unit is configured to perform parsing processing on the data file according to the algorithm file to obtain original data corresponding to the data file.
第五方面,本申请实施例提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序所述处理器执行所述计算机程序时实现上述第一方面中任一项数据存储的方法或上述第二方面中任一项数据恢复的方法。In a fifth aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, which is implemented when the processor executes the computer program Any one of the data storage method in the above-mentioned first aspect or any one of the data recovery method in the above-mentioned second aspect.
第六方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面中任一项所述的数据存储的方法或上述第二方面中任一项所述的数据恢复的方法。In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements any one of the above-mentioned first aspect The method for data storage or the method for data recovery according to any one of the above second aspects.
第七方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面中任一项所述的数据存储的方法或上述第二方面中任一项所述的数据恢复的方法。In a seventh aspect, an embodiment of the present application provides a computer program product that, when the computer program product runs on a terminal device, enables the terminal device to execute the data storage method described in any one of the first aspects or the second method described above. The data recovery method of any one of the aspects.
可以理解的是,上述第二方面至第七方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that, for the beneficial effects of the foregoing second aspect to the seventh aspect, reference may be made to the relevant descriptions in the foregoing first aspect, which will not be repeated here.
有益效果beneficial effect
本申请实施例的有益效果在于:终端设备获取待存储的数据文件,数据文件为根据算法文件对原始数据进行预处理得到的文件;根据预设的文件格式编辑数据文件和算法文件,生成待编码的二进制文件,文件格式用于指示数据文件与算法文件之间的索引类型;将二进制文件进行编码,得到碱基序列,碱基序列用于合成存储数据文件和算法文件的DNA片段。通过按预设的文件格式编辑数据文件和算法文件,设定数据文件与算法文件之间的索引类型以及将数据文件与算法文件同时编码得到碱基序列,合成DNA后进行存储,减少了外部信息的存储,降低了因外部算法的丢失导致数据无法恢复的风险,保证了大规模数据在长期不确定环境下存储的完整性和可靠性;具有较强的易用性与实用性。The beneficial effects of the embodiments of the present application are as follows: the terminal device obtains the data file to be stored, and the data file is a file obtained by preprocessing the original data according to the algorithm file; the data file and the algorithm file are edited according to the preset file format, and the data file to be encoded is generated. The file format is used to indicate the index type between the data file and the algorithm file; the binary file is encoded to obtain the base sequence, and the base sequence is used to synthesize the DNA fragments that store the data file and the algorithm file. By editing the data file and algorithm file according to the preset file format, setting the index type between the data file and the algorithm file, and encoding the data file and the algorithm file at the same time, the base sequence is obtained, and the DNA is synthesized and stored, which reduces the external information. It reduces the risk of unrecoverable data due to the loss of external algorithms, and ensures the integrity and reliability of large-scale data storage in a long-term uncertain environment; it has strong ease of use and practicability.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或示范性技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that are used in the description of the embodiments or exemplary technologies. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本申请一实施例提供的应用场景的系统架构示意图;1 is a schematic diagram of a system architecture of an application scenario provided by an embodiment of the present application;
图2是本申请一实施例提供的基于DNA数据存储方法的流程示意图;2 is a schematic flowchart of a DNA-based data storage method provided by an embodiment of the present application;
图3是本申请一实施例提供的数据文件与算法文件逻辑关系的示意图;3 is a schematic diagram of a logical relationship between a data file and an algorithm file provided by an embodiment of the present application;
图4是本申请另一实施例提供的数据文件与算法文件逻辑关系的示意图;4 is a schematic diagram of a logical relationship between a data file and an algorithm file provided by another embodiment of the present application;
图5是本申请一实施例提供的合成DNA片段的示意图;5 is a schematic diagram of a synthetic DNA fragment provided by an embodiment of the present application;
图6是本申请另一实施例提供的合成DNA片段的示意图;6 is a schematic diagram of a synthetic DNA fragment provided by another embodiment of the present application;
图7是本申请另一实施例提供的合成DNA片段的示意图;7 is a schematic diagram of a synthetic DNA fragment provided by another embodiment of the present application;
图8是本申请另一实施例提供的基于DNA数据恢复方法的流程示意图;8 is a schematic flowchart of a DNA-based data recovery method provided by another embodiment of the present application;
图9是本申请一实施例提供的二进制文件的结构示意图;9 is a schematic structural diagram of a binary file provided by an embodiment of the present application;
图10是本申请另一实施例提供的二进制文件的结构示意图;10 is a schematic structural diagram of a binary file provided by another embodiment of the present application;
图11是本申请实施例提供的基于DNA数据存储装置的结构示意图;11 is a schematic structural diagram of a DNA-based data storage device provided by an embodiment of the present application;
图12是本申请实施例提供的基于DNA数据恢复装置的结构示意图;12 is a schematic structural diagram of a DNA-based data recovery device provided by an embodiment of the present application;
图13是本申请实施例提供的终端设备的结构示意图。FIG. 13 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体 细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details, such as specific system structures and technologies, are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, components and/or sets thereof.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in the specification of this application and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting ". Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and should not be construed as indicating or implying relative importance.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
随着数字化信息广泛应用和大数据科学的急速发展,人们每天产生的信息数据呈指数型增长,而现有传统的存储介质已经逐渐无法满足需求。DNA分子作为一种新型的存储介质,由于其具有存储密度高、保存时间长、维护成本低以及稳定性强等优势,受到广泛关注。With the widespread application of digital information and the rapid development of big data science, the information data that people generate every day is increasing exponentially, and the existing traditional storage media has gradually been unable to meet the demand. As a new type of storage medium, DNA molecules have attracted extensive attention due to their advantages of high storage density, long storage time, low maintenance cost, and strong stability.
目前,针对DNA存储的研究更多的集中在通过高效的编码、解码以及提高容错性等方向提高存储效率,减少合成测序成本;在基于DNA的存储介质上更偏重于理论和材料结构的探索。At present, research on DNA storage is more focused on improving storage efficiency and reducing the cost of sequencing by synthesis through efficient encoding, decoding, and improving fault tolerance. On DNA-based storage media, more emphasis is placed on the exploration of theory and material structure.
DNA存储的一般流程是数字数据编码成DNA的碱基序列,根据编码的碱基序列合成DNA片段,并存储在体内外的存储介质中。其中,可以通过合成器写入核苷酸碱基序列实现DNA片段的合成,然后以池化的液体作为介质进行存储。读取数据时进行可以通过测序仪进行读取、测序,以及通过后续解码处理恢复数据。The general process of DNA storage is that digital data is encoded into DNA base sequences, DNA fragments are synthesized according to the encoded base sequences, and stored in storage media in vivo and in vitro. Among them, the synthesis of DNA fragments can be realized by writing nucleotide base sequences through a synthesizer, and then the pooled liquid is used as a medium for storage. When reading data, the data can be read, sequenced by a sequencer, and recovered by subsequent decoding processing.
现有的DNA存储方向主要针对高效的编解码方法、相关数据建模以及DNA存储介质材料和结构的研究;而在基于DNA的数据存储过程中,在数字数据存储之前,会对数字数据进行预处理,例如压缩、删冗、加密、编码等。如果在数据存储几十年或者上百年后仍可以恢复数据,就需要知道数据和其对应的预处理算法;但经过长时间后,无法保证以上的预处理算法是否还完整存在。如果在面对大规模数据在不确定环境中长期存储的实际应用场景中,如果外部预处理算法丢失,则会导致即使有加密等预处理过的数据也无法得到完整可靠的恢复。Existing DNA storage directions are mainly aimed at efficient encoding and decoding methods, related data modeling, and research on DNA storage medium materials and structures; while in the DNA-based data storage process, digital data will be pre-processed before digital data storage. Processing, such as compression, redundancy removal, encryption, encoding, etc. If the data can be recovered after being stored for decades or hundreds of years, it is necessary to know the data and its corresponding preprocessing algorithm; however, after a long period of time, there is no guarantee that the above preprocessing algorithms still exist completely. In a practical application scenario where large-scale data is stored for a long time in an uncertain environment, if the external preprocessing algorithm is lost, even preprocessed data such as encryption cannot be recovered completely and reliably.
请参阅图1,是本申请一实施例提供的应用场景的系统架构示意图。图1示出了本申 请实施例提供的一种实现数据自包含、自恢复的端到端的全流程DNA存储系统架构,如图1所示,在对数据进行存储之前,针对不同格式的数字数据(原始数据)进行预处理,预处理方式包括但不限于压缩、删冗、加密、编码等,得到数据文件,同时获取预处理算法的算法文件。按预设的文件格式定义数据文件和算法文件的,得到数字文件,实现待编码数据的自包含。其中,数字文件可以为二进制、四进制或八进制等格式的文件,不做具体限定。然后通过计算机数学算法,使用不同的编码技术对数字文件进行编码,得到碱基序列;通过合成生物学,将碱基序列合成DNA片段,并存储到体内、体外存储介质中。在存储过程中,根据DNA不同的存储介质的特点,结合传统硅基存储介质,优化数据在DNA存储介质中的布局,例如DNA存储文件的试管编号所对应的索引算法等,提高DNA存储文件查找读取的速度。在需要读取数据时,对DNA片段测序,得到碱基序列;并通过计算机数学算法(编码过程的逆运算),将碱基序列解码为数字文件;其中数字文件包括通过二进制、四进制或八进制等形式的文件格式表示数据文件和算法文件的文件。读取数字文件中的数据文件和算法文件,根据算法文件对数据文件进行解析,恢复原始数据,实现数据的自解析。Please refer to FIG. 1 , which is a schematic diagram of a system architecture of an application scenario provided by an embodiment of the present application. FIG. 1 shows an end-to-end full-process DNA storage system architecture that realizes data self-contained and self-recovery provided by an embodiment of the present application. As shown in FIG. 1 , before data is stored, for digital data in different formats (raw data) is preprocessed, and the preprocessing methods include but are not limited to compression, redundant deletion, encryption, encoding, etc., to obtain data files, and at the same time, obtain the algorithm files of the preprocessing algorithm. If the data file and the algorithm file are defined according to the preset file format, a digital file is obtained, and the self-contained data to be encoded is realized. Wherein, the digital file may be a file in binary, quaternary, or octal format, which is not specifically limited. Then, through computer mathematical algorithms, different encoding techniques are used to encode digital files to obtain base sequences; through synthetic biology, base sequences are synthesized into DNA fragments and stored in in vivo and in vitro storage media. In the storage process, according to the characteristics of different DNA storage media, combined with traditional silicon-based storage media, the layout of data in the DNA storage media is optimized, such as the index algorithm corresponding to the test tube number of the DNA storage file, etc., to improve the search for DNA storage files. read speed. When the data needs to be read, the DNA fragment is sequenced to obtain the base sequence; and the base sequence is decoded into a digital file through a computer mathematical algorithm (the inverse operation of the encoding process); the digital file includes binary, quaternary or File formats such as octal represent files for data files and algorithm files. Read the data file and algorithm file in the digital file, analyze the data file according to the algorithm file, restore the original data, and realize the self-analysis of the data.
通过本申请实施例,在存储阶段把对原始数据进行预处理的算法也按照一定的文件格式存储DNA中,使数据在不借助外部算法时就可以实现完整恢复,或者通过外部最少的信息恢复出完整的原始数据;在大规模、复杂的数据存储的应用场景中,为实现DNA存储的数据的自包含和自解释,定义统一的数字文件的格式,将数据和算法进行关联对应及统一管理;保证了大规模数据在长期不确定环境下存储的可靠性以及数据恢复的完整性。Through the embodiment of the present application, the algorithm for preprocessing the original data is also stored in DNA according to a certain file format in the storage stage, so that the data can be completely restored without the aid of an external algorithm, or the data can be restored with the least external information. Complete original data; in the application scenario of large-scale and complex data storage, in order to realize the self-containment and self-interpretation of data stored in DNA, a unified digital file format is defined, and data and algorithms are associated and managed in a unified manner; It ensures the reliability of large-scale data storage in a long-term uncertain environment and the integrity of data recovery.
下面通过具体的实施例进一步介绍在对数据进行DNA存储过程的详细流程。The detailed flow of the DNA storage process for data is further described below through specific embodiments.
参见图2,是本申请一实施例提供基于DNA数据存储方法的流程示意图,包括以下步骤:Referring to Fig. 2, it is a schematic flowchart of a DNA-based data storage method provided by an embodiment of the present application, including the following steps:
步骤S201,获取待存储的数据文件,所述数据文件为根据算法文件对原始数据进行预处理得到的文件。Step S201: Obtain a data file to be stored, where the data file is a file obtained by preprocessing the original data according to the algorithm file.
在一些实施例中,数据文件为各种类型的原始数据经过预处理后得到的文件。各种类型的原始数据包括文本类(txt格式、doc格式等)、图像类(jpg格式等)以及视频类等。不同类型的原始数据对应不同的预处理算法。In some embodiments, the data files are files obtained by preprocessing various types of raw data. Various types of raw data include text types (txt format, doc format, etc.), image types (jpg format, etc.), and video types. Different types of raw data correspond to different preprocessing algorithms.
在一些实施例中,在获取待存储的数据文件之前,还包括:根据所述算法文件对所述原始数据进行压缩、删冗或加密的处理,得到所述数据文件。In some embodiments, before acquiring the data file to be stored, the method further includes: compressing, removing redundancy or encrypting the original data according to the algorithm file to obtain the data file.
在一些实施例中,为了最大化的利用DNA存储空间,将数据信息存入DNA之前需要对数据信息预处理,预处理方式包括但不限于压缩、删冗或加密等处理。在预处理过程,通过删冗可以达到压缩的目的。在DNA存储过程中,常见的预处理算法包括哈夫曼编码、喷泉码或LZMA数据压缩算法等。In some embodiments, in order to maximize the utilization of DNA storage space, data information needs to be pre-processed before being stored in DNA, and the pre-processing methods include but are not limited to processing such as compression, redundancy deletion, or encryption. In the preprocessing process, the purpose of compression can be achieved by removing redundancy. In the DNA storage process, common preprocessing algorithms include Huffman coding, fountain codes or LZMA data compression algorithms.
其中,哈夫曼编码的数据压缩算法适用于输入文件各字符非等概率出现的应用场景;喷泉码具有独立的随机性,压缩处理过程中的编译码复杂程度低,且能以较小的译码开销来高概率的恢复原始数据信息,在DNA存储过程中可以极大的提高存储的效率;LZMA数据压缩算法充分利用了各类原始数据的结构特点,可实现简单、可行的数据压缩处理。Among them, the data compression algorithm of Huffman coding is suitable for application scenarios where each character of the input file appears with an unequal probability; The original data information can be recovered with high probability by using code overhead, which can greatly improve the storage efficiency in the process of DNA storage. The LZMA data compression algorithm makes full use of the structural characteristics of various original data, and can realize simple and feasible data compression processing.
步骤S202,根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型。Step S202: Edit the data file and the algorithm file according to a preset file format to generate a binary file to be encoded, where the file format is used to indicate an index type between the data file and the algorithm file.
在一些实施例中,为了实现对大规模、多类型的数据在复杂环境中的DNA存储,预设 了标准的文件存格式。将数据文件和算法文件按预设的文件格式编辑,得到待编码的二进制文件。二进制文件的大小单位为字节;二进制文件中格式包括用于指示数据文件和算法文件对应的索引类型的标识位;索引类型包括直接索引和间接索引。当索引类型为直接索引时,按如表1所示的文件格式对数据文件和算法文件进行编辑,得到相应的待编码的二进制文件。In some embodiments, in order to realize the DNA storage of large-scale, multi-type data in a complex environment, a standard file storage format is preset. Edit the data file and the algorithm file according to the preset file format to obtain the binary file to be encoded. The size unit of the binary file is bytes; the format in the binary file includes an identification bit used to indicate the index type corresponding to the data file and the algorithm file; the index type includes direct index and indirect index. When the index type is direct index, the data file and the algorithm file are edited according to the file format shown in Table 1, and the corresponding binary file to be encoded is obtained.
在一些实施例中,根据预设的文件格式编辑数据文件和算法文件,生成待编码的二进制文件,包括:根据预设的文件格式,编辑数据文件的属性标识位和有效数据位;根据数据文件的属性标识位和有效数据位,确定所述算法文件相对于所述数据文件的有效数据位的偏移量;基于偏移量,编辑算法文件的有效数据位,得到数据文件和所述算法文件位于同一文件的二进制文件。In some embodiments, editing a data file and an algorithm file according to a preset file format to generate a binary file to be encoded includes: editing attribute identification bits and valid data bits of the data file according to the preset file format; attribute identification bit and valid data bit, determine the offset of the algorithm file relative to the valid data bit of the data file; based on the offset, edit the valid data bit of the algorithm file to obtain the data file and the algorithm file Binaries located in the same file.
示例性的,文件格式包括数据文件和算法文件分别相关的各变量名对应的偏移地址、占用字节的大小等。如表1所示的数据文件格式,数据文件的文件格式包括数据文件的属性标识位和数据文件的有效数据位。其中,数据文件的属性标识位的各变量名包括数据文件开始标记DataB、文件类型Type、标记字段Flag、压缩方式ComS、压缩后数据长度ComLen、压缩前数据长度SouLen、数据开始标记PayloadB;数据文件的有效数据位的变量名包括压缩或未压缩数据Payload;算法文件的有效数据位的变量名包括压缩算法代码或逻辑表示(可选)Algr。如表1所示的,各变量名对应的地址偏移及大小。Exemplarily, the file format includes an offset address corresponding to each variable name related to the data file and the algorithm file, the size of the occupied bytes, and the like. As shown in the data file format in Table 1, the file format of the data file includes attribute identification bits of the data file and valid data bits of the data file. Among them, the variable names of the attribute identification bits of the data file include the data file start flag DataB, the file type Type, the flag field Flag, the compression method ComS, the compressed data length ComLen, the data length before compression SouLen, and the data start flag PayloadB; the data file The variable name of the valid data bits includes the compressed or uncompressed data Payload; the variable name of the valid data bits of the algorithm file includes the compression algorithm code or logical representation (optional) Algr. As shown in Table 1, the address offset and size corresponding to each variable name.
其中,数据文件开始标记DataB的标识位标明压缩后(或未压缩)数据文件的开始。标记字段Flag占一个字节,包括8位,每一位表示数据文件的二值属性;第一位F1表示数据是否经过压缩处理,如果数据经过压缩处理,则F1=0,若未经过压缩处理,则F1=1;第二位F2比哦啊是实现数据自包含自解析过程中算法的索引类型,F2=0表示直接索引,F2=1表示间接索引;若为间接索引,则数据文件的有效数据位的后续位待定。若F1=0,则压缩方式字段有效。数据开始标记标志数据文件的有效数据的开始,通过该字段和有效数据长度字段可以计算出压缩算法的偏移。若数据经过压缩且索引类型为直接压缩,即F1+F2=0,则该二进制文件包含压缩算法。The identification bit of the data file start marker DataB indicates the start of the compressed (or uncompressed) data file. The flag field Flag occupies one byte, including 8 bits, each bit represents the binary attribute of the data file; the first bit F1 indicates whether the data is compressed or not, if the data is compressed, then F1=0, if it is not compressed , then F1=1; the second F2 ratio is the index type of the algorithm that implements the data self-contained self-analysis process, F2=0 means direct index, F2=1 means indirect index; if it is an indirect index, the data file Subsequent bits of valid data bits are pending. If F1=0, the compression mode field is valid. The data start marker marks the beginning of the valid data of the data file, and the offset of the compression algorithm can be calculated through this field and the valid data length field. If the data is compressed and the index type is direct compression, that is, F1+F2=0, the binary file contains a compression algorithm.
在一些实施例中,根据预设的文件格式编辑数据文件和算法文件,生成待编码的二进制文件,包括:根据预设的文件格式,编辑数据文件的第一属性标识位和第一有效数据位,得到数据文件对应的第一二进制文件;根据预设的文件格式,编辑算法文件的第二属性标识位和第二有效数据位,得到算法文件对应的第二二进制文件;其中,第一二进制文件和第二二进制文件为相互独立的两个文件。In some embodiments, editing the data file and the algorithm file according to the preset file format to generate the binary file to be encoded includes: editing the first attribute identification bit and the first valid data bit of the data file according to the preset file format to obtain the first binary file corresponding to the data file; according to the preset file format, edit the second attribute identification bit and the second valid data bit of the algorithm file to obtain the second binary file corresponding to the algorithm file; wherein, The first binary file and the second binary file are two independent files.
在一些实施例中,若数据经过压缩且索引类型为间接索引,即F1=0、F2=1,则压缩算法在另一文件中表示,如表2所示的算法文件单独对应的二进制文件的文件格式。如表2所示,算法文件对应的各变量名、各变量名对应的地址偏移、所占字节的大小以及对应的作用。算法文件的二进制文件的变量名包括算法文件的属性标识位和算法文件的有效数据位;其中算法文件的属性标识位的变量名包括算法文件开始标记AlgrB和压缩算法名称AlgrName,算法文件的有效数据位为具体算法AlgrData(即数据压缩的具体算法或者逻辑表示)。In some embodiments, if the data is compressed and the index type is indirect index, that is, F1=0, F2=1, the compression algorithm is expressed in another file, as shown in Table 2, the algorithm file corresponding to the binary file alone file format. As shown in Table 2, each variable name corresponding to the algorithm file, the address offset corresponding to each variable name, the size of the occupied bytes, and the corresponding function. The variable name of the binary file of the algorithm file includes the attribute identification bit of the algorithm file and the valid data bit of the algorithm file; the variable name of the attribute identification bit of the algorithm file includes the algorithm file start tag AlgrB and the compression algorithm name AlgrName, the valid data of the algorithm file. The bit is the specific algorithm AlgrData (ie, the specific algorithm or logical representation of data compression).
可理解的,上述按预设的文件格式对数据文件和算法文件进行编辑,得到的数字文件还可以是其他格式文件,例如三进制文件或四进制文件等对应不同的文件格式设置不同含义的标识位,具有相同或相似的构思均属于本申请实施例的保护范围之内。It is understandable that the data files and algorithm files are edited according to the preset file format, and the obtained digital files can also be files of other formats, such as ternary files or quaternary files, which correspond to different file formats. Different meanings are set. The identification bits of the same or similar concepts all fall within the protection scope of the embodiments of the present application.
Figure PCTCN2020134847-appb-000001
Figure PCTCN2020134847-appb-000001
表1Table 1
Figure PCTCN2020134847-appb-000002
Figure PCTCN2020134847-appb-000002
表2Table 2
步骤S203,将所述二进制文件进行编码,得到碱基序列,所述碱基序列用于合成存储所述数据文件和所述算法文件的DNA片段。Step S203, the binary file is encoded to obtain a base sequence, and the base sequence is used to synthesize the DNA fragments storing the data file and the algorithm file.
在一些实施例中,将二进制文件进行编码指通过一定的对应关系或规则将需要存储的二进制文件信息转化为DNA的碱基序列(即包含A、G、C、T的序列),碱基序列用于合成存储数据文件和算法文件的DNA片段。In some embodiments, encoding a binary file refers to converting the binary file information that needs to be stored into a DNA base sequence (that is, a sequence containing A, G, C, and T) through a certain correspondence or rule. The base sequence DNA fragments used to synthesize storage data files and algorithm files.
其中,不同的编码模型适用于不同的信息类型,例如有的编码模型适用于文本信息,有的仅适用于图片信息,有的可以适用于多种类型的信息。合成DNA片段是将碱基序列中的碱基逐个连接形成DNA链的过程。Among them, different coding models are suitable for different information types, for example, some coding models are suitable for text information, some are only suitable for picture information, and some can be suitable for various types of information. Synthesis of DNA fragments is the process of linking the bases in the base sequence one by one to form a DNA chain.
示例性的,在进行编码转换过程中,可以通过基于数学算法的转换模型进行编码转换。DNA片段是由A、G、C和T4个碱基组成,由于计算机中的数据都是二进制(即0、1)形式存在,因此将数据信息存储至DNA中为将数据信息的二进制码流编码为碱基序列存储DNA。根据DNA的组成结构,常见的DNA存储编码模型包括二进制模型、三进制模型和四进制模型。Exemplarily, during the code conversion process, the code conversion may be performed through a conversion model based on a mathematical algorithm. The DNA fragment is composed of A, G, C and T4 bases. Since the data in the computer is in the form of binary (ie 0, 1), storing the data information in the DNA is to encode the binary code stream of the data information. DNA is stored for base sequences. According to the structure of DNA, common DNA storage coding models include binary model, ternary model and quaternary model.
其中,二进制模型将A、T、C和G4个碱基中的任意两个定义为1,另外两个定义为1,即碱基序列只有0和1两种状态。二进制模型可以较好的避免DNA中出现GC含量不 均衡、均聚物较多等情况,可降低后期合成DNA片段的难度。三进制模型指整个碱基序列只有3种状态:0、1和2。首先将待存储的数据信息编辑为三进制码流,然后对码流中的0、1和2按照表3中的对应关系进行编码,得到碱基序列。三进制模型通过前一个碱基确定后一个碱基,可以存储更多的信息。Among them, the binary model defines any two of the A, T, C and G4 bases as 1, and the other two as 1, that is, the base sequence has only two states of 0 and 1. The binary model can better avoid the unbalanced GC content and many homopolymers in DNA, which can reduce the difficulty of synthesizing DNA fragments in the later stage. The ternary model means that the entire base sequence has only 3 states: 0, 1 and 2. First, edit the data information to be stored into a ternary code stream, and then encode 0, 1 and 2 in the code stream according to the corresponding relationship in Table 3 to obtain the base sequence. The ternary model determines the next base by the previous base, which can store more information.
另外,编码模型还包括四进制模型,将碱基中的A、T、C和G对应0、1、2和3,将读入DNA的二进制码流转换为四进制,常见的地禁止模型映射关系如表4所示,其中该映射关系不唯一,包括不同的组合方案,表4仅示出其中一种映射关系。In addition, the coding model also includes a quaternary model, which corresponds A, T, C, and G in the base to 0, 1, 2, and 3, and converts the binary code stream read into DNA into quaternary. Commonly prohibited The model mapping relationship is shown in Table 4, wherein the mapping relationship is not unique and includes different combination schemes, and Table 4 only shows one of the mapping relationships.
Figure PCTCN2020134847-appb-000003
Figure PCTCN2020134847-appb-000003
表3table 3
二进制数据binary data 0000 0101 1010 1111
对应碱基corresponding base AA TT CC GG
表4Table 4
可理解的,四进制模型具有更强的信息存储能力,每位碱基可以编码两位数据,可以提高存储效率,降低DNA存储成本。Understandably, the quaternary model has stronger information storage capacity, and each base can encode two bits of data, which can improve storage efficiency and reduce DNA storage costs.
在一些实施例中,将二进制文件进行编码,得到碱基序列,包括:根据预设的编码模型,将二进制文件进行编码,得到二进制文件的碱基序列;添加引物序列至二进制文件的碱基序列的首部和尾部,得到用于合成DNA片段的碱基序列。In some embodiments, encoding the binary file to obtain the base sequence includes: encoding the binary file according to a preset encoding model to obtain the base sequence of the binary file; adding primer sequences to the base sequence of the binary file The head and tail of the DNA fragment are obtained to obtain the base sequence used for the synthesis of DNA fragments.
在一些实施例中,预设的编码模型包括上述所述的二进制编码模型、三进制编码模型及四进制编码模型。In some embodiments, the preset coding model includes the above-mentioned binary coding model, ternary coding model and quaternary coding model.
如图3所示,本申请一实施例提供的数据文件与算法文件逻辑关系的示意图,数据文件与算法文件之间的直接索引类型的逻辑关系,数据与算法位于同一二进制文件,在对二进制文件进行编码后,将数据分片,添加引物序列至碱基片段的首位。如图3所示,数据1通过算法1进行预处理,数据2通过算法1进行预处理,数据n通过算法m进行预处理。每份文件x有一对引物标识,包括头引物x-F和尾引物x-R,不同数据可以对应相同或不同的算法;例如文件1中数据1对应算法1,文件1首位包括引物序列1-F和1-R,文件2中数据2对应算法1,文件2首位包括引物序列2-F和2-R,以及文件n中数据n对应算法m,文件n的首位包括引物序列n-F和n-R。图3示出了数据文件与算法文件之间的直接索引关系,每一份二进制文件x包含数据以及该数据对应的算法的备份,在其中的二进制文件丢失或损坏不会相互影响,如文件1丢失,文件2依然可以通过其对应的算法恢复;适用于数据安全性及可靠性要求非常高的应用场景。As shown in FIG. 3 , a schematic diagram of the logical relationship between a data file and an algorithm file provided by an embodiment of the present application, the logical relationship of the direct index type between the data file and the algorithm file, the data and the algorithm are located in the same binary file. After encoding, the data is fragmented, and primer sequences are added to the first position of the base fragment. As shown in Figure 3, data 1 is preprocessed by algorithm 1, data 2 is preprocessed by algorithm 1, and data n is preprocessed by algorithm m. Each file x has a pair of primer identifiers, including head primer x-F and tail primer x-R, and different data can correspond to the same or different algorithms; for example, data 1 in file 1 corresponds to algorithm 1, and the first part of file 1 includes primer sequences 1-F and 1- R, data 2 in file 2 corresponds to algorithm 1, the first part of file 2 includes primer sequences 2-F and 2-R, and data n in file n corresponds to algorithm m, and the first part of file n includes primer sequences n-F and n-R. Figure 3 shows the direct index relationship between data files and algorithm files. Each binary file x contains data and a backup of the algorithm corresponding to the data. Loss or damage of the binary files in it will not affect each other, such as file 1 If it is lost, file 2 can still be recovered through its corresponding algorithm; it is suitable for application scenarios with very high data security and reliability requirements.
如图5所示,本申请一实施例提供的合成DNA片段的示意图,对应图3所示的数据对应算法的逻辑关系,将编码后的文件分割后得到可以存储的DNA片段。在合成DNA片段时,将引物序列1-F和1-R添加至数据1的碱基序列的两端,将1-F添加至数据1的一端,将1-R添加至数据1的另一端;例如将文件1的引物序列1-F添加至数据1的碱基序列的 首部,作为数据1对应的DNA片段的头引物,将文件1的引物序列1-R添加至数据1的碱基序列的尾部,作为数据1对应的DNA片段的尾引物。同时,将引物序列1-F和1-R添加至算法1的碱基序列的两端,将1-F添加至算法1的一端,将1-R添加至算法1的另一端;例如将文件1的引物序列1-F添加至算法1的碱基序列的首部,作为算法1对应的DNA片段的头引物,将文件1的引物序列1-R添加至算法1的碱基序列的尾部,作为算法1对应的DNA片段的尾引物。以此类推,将文件n的引物序列n-F和n-R添加至数据n的碱基序列的两端,将n-F添加至数据n的碱基序列的一端,将n-R添加至数据n的剪辑序列的另一端;例如将文件n的引物序列n-F添加至数据n的碱基序列的首部,作为数据n对应的DNA片段的头引物;将文件n的引物序列n-R添加至数据n的尾部,作为数据n对应的DNA片段的尾引物;同时,将文件n的引物序列n-F和n-R添加至算法m的碱基序列的两端,将n-F添加至算法m的碱基序列的一端,将n-R添加至算法m的另一端;例如将文件n的引物序列n-F添加至算法m的碱基序列的首部,作为算法m对应的DNA片段的头引物;将文件n的引物序列n-R添加至算法m的碱基序列的尾部,作为算法m对应的DNA片段的尾引物;从而将编码的文件x分割后得到可以存储的DNA片段。As shown in FIG. 5 , the schematic diagram of synthesizing DNA fragments provided by an embodiment of the present application corresponds to the logical relationship of the data corresponding algorithm shown in FIG. 3 , and the encoded files are divided to obtain DNA fragments that can be stored. When synthesizing DNA fragments, primer sequences 1-F and 1-R are added to both ends of the base sequence of data 1, 1-F is added to one end of data 1, and 1-R is added to the other end of data 1 ; For example, the primer sequence 1-F of file 1 is added to the head of the base sequence of data 1, as the head primer of the DNA fragment corresponding to data 1, and the primer sequence 1-R of file 1 is added to the base sequence of data 1 , as the tail primer of the DNA fragment corresponding to data 1. At the same time, add primer sequences 1-F and 1-R to both ends of the base sequence of Algorithm 1, add 1-F to one end of Algorithm 1, and add 1-R to the other end of Algorithm 1; The primer sequence 1-F of 1 is added to the head of the base sequence of Algorithm 1 as the head primer of the DNA fragment corresponding to Algorithm 1, and the primer sequence 1-R of File 1 is added to the tail of the base sequence of Algorithm 1, as The tail primer of the DNA fragment corresponding to Algorithm 1. By analogy, the primer sequences n-F and n-R of file n are added to both ends of the base sequence of data n, n-F is added to one end of the base sequence of data n, and n-R is added to the other end of the clip sequence of data n. For example, the primer sequence n-F of file n is added to the head of the base sequence of data n, as the head primer of the DNA fragment corresponding to data n; the primer sequence n-R of file n is added to the tail of data n, as data n corresponding The tail primer of the DNA fragment; at the same time, the primer sequences n-F and n-R of file n are added to both ends of the base sequence of algorithm m, n-F is added to one end of the base sequence of algorithm m, and n-R is added to the other end of algorithm m. One end; for example, add the primer sequence n-F of file n to the head of the base sequence of algorithm m, as the head primer of the DNA fragment corresponding to algorithm m; add the primer sequence n-R of file n to the tail of the base sequence of algorithm m, As the tail primer of the DNA fragment corresponding to the algorithm m; thus dividing the encoded file x to obtain a DNA fragment that can be stored.
可理解的,引物序列为DNA存储的外部存储的信息,通过引物序列可以对DNA片段进行测序,得到DNA片段的碱基序列。添加引物序列至二进制文件的碱基序列的首部和尾部,不局限上述所述的首部和尾部对应的引物序列,满足添加在二进制文件的碱基序列的两端即可。Understandably, the primer sequence is information stored externally in the DNA, and the DNA fragment can be sequenced through the primer sequence to obtain the base sequence of the DNA fragment. Adding primer sequences to the head and tail of the base sequence of the binary file is not limited to the primer sequences corresponding to the above-mentioned head and tail, as long as it is added at both ends of the base sequence of the binary file.
在一些实施例中,将二进制文件进行编码,得到碱基序列,包括:根据预设的编码模型,将所述第一二进制文件和所述第二二进制文件进行编码,得到所述第一二进制文件的第一碱基序列和所述第二二进制文件的第二碱基序列;添加第一引物序列至所述第一碱基序列的首部和尾部,得到用于合成所述DNA片段中的第一片段的碱基序列;添加第二引物序列至第二碱基序列的首部和尾部,得到用于合成DNA片段中的第二片段的碱基序列。In some embodiments, encoding the binary file to obtain the base sequence includes: encoding the first binary file and the second binary file according to a preset encoding model to obtain the The first base sequence of the first binary file and the second base sequence of the second binary file; adding the first primer sequence to the head and tail of the first base sequence to obtain for synthesis The base sequence of the first fragment in the DNA fragment; adding the second primer sequence to the head and tail of the second base sequence to obtain the base sequence for synthesizing the second fragment in the DNA fragment.
在一些实施例中,第一二进制文件为数据文件的二进制文件,第二二进制文件为数据文件对应的算法文件的二进制文件。将第一二进制文件和对应的第二二进制文件统称为DNA文件,当存在n个DNA文件时,对第一个至第n个DNA文件进行编码,得到第一个至第n个DNA文件的碱基序列。将每个DNA文件的碱基序列分割成短片段后,添加第一引物序列至第一碱基序列的首部和尾部,得到用于合成所述DNA片段中的第一片段的碱基序列;添加第二引物序列至所述第二碱基序列的首部和尾部,得到用于合成所述DNA片段中的第二片段的碱基序列。重复此步骤,添加第一引物序列和第二引物序列至第n个DNA文件的碱基序列。其中,第一碱基序列为数据文件对应的序列,第二碱基序列为算法文件对应的序列;每个DNA文件对应的第一引物序列可以为包含不同碱基对的序列。In some embodiments, the first binary file is a binary file of a data file, and the second binary file is a binary file of an algorithm file corresponding to the data file. The first binary file and the corresponding second binary file are collectively referred to as DNA files. When there are n DNA files, the first to nth DNA files are encoded to obtain the first to nth DNA files. The base sequence of the DNA file. After dividing the base sequence of each DNA file into short fragments, adding a first primer sequence to the head and tail of the first base sequence to obtain a base sequence for synthesizing the first fragment in the DNA fragments; adding A second primer sequence is applied to the head and tail of the second base sequence to obtain a base sequence for synthesizing the second fragment of the DNA fragments. Repeat this step to add the first primer sequence and the second primer sequence to the base sequence of the nth DNA file. The first base sequence is the sequence corresponding to the data file, and the second base sequence is the sequence corresponding to the algorithm file; the first primer sequence corresponding to each DNA file may be a sequence containing different base pairs.
如图4所示的,为降低数据存储过程中的冗余以减少合成和测序成本,本申请另一实施例提供的数据文件与算法文件逻辑关系的示意图,数据文件的二进制文件和算法文件的二进制文件分开保存。As shown in FIG. 4 , in order to reduce the redundancy in the data storage process and reduce the cost of synthesis and sequencing, another embodiment of the present application provides a schematic diagram of the logical relationship between a data file and an algorithm file. Binary files are kept separately.
在对数据文件对应的第一二进制文件和算法文件对应的第二二进制文件进行编码后,将编码后的数据分片,添加引物序列至碱基片段的首位。如图4所示,数据1和数据2均通过算法1进行预处理,数据3通过算法2进行预处理。每份文件x有一对引物标识,包括头引物x-F和尾引物x-R。例如文件1首位包括第一引物序列1-F和1-R,数据文件1包含数据1和第二引物序列1’-F、1’-R;文件2首位包括第一引物序列2-F和2-R,数据 文件2包括数据2和第二引物序列1’-F、1’-R;文件3首位包括第一引物序列3-F和3-R,数据文件3包含数据3和第二引物序列2’-F、2’-R。第二引物序列为算法对应的引物序列,不同算法对应的第二引物序列的碱基对序列可以不同,如图4所示的算法1对应的第二引物序列1’-F、1’-R,算法2对应的第二引物序列2’-F、2’-R。After encoding the first binary file corresponding to the data file and the second binary file corresponding to the algorithm file, the encoded data is fragmented, and primer sequences are added to the first position of the base fragment. As shown in Figure 4, both data 1 and data 2 are preprocessed by algorithm 1, and data 3 is preprocessed by algorithm 2. Each file x is identified by a pair of primers, including the head primer x-F and the tail primer x-R. For example, the first part of file 1 includes the first primer sequences 1-F and 1-R, the data file 1 includes data 1 and the second primer sequences 1'-F and 1'-R; the first part of file 2 includes the first primer sequences 2-F and 1'-R; 2-R, data file 2 includes data 2 and second primer sequences 1'-F, 1'-R; the first position of file 3 includes first primer sequences 3-F and 3-R, data file 3 includes data 3 and second Primer sequences 2'-F, 2'-R. The second primer sequence is the primer sequence corresponding to the algorithm. The base pair sequence of the second primer sequence corresponding to different algorithms can be different. As shown in Figure 4, the second primer sequences 1'-F and 1'-R corresponding to the algorithm 1 , the second primer sequences 2'-F and 2'-R corresponding to Algorithm 2.
其中,数据文件x对应的引物x-F、x-R与算法文件x对应的引物x’-F、x’-R是不同的两对引物,数据指向算法的引物序列包含在数据文件中。Among them, the primers x-F and x-R corresponding to the data file x and the primers x'-F and x'-R corresponding to the algorithm file x are two different pairs of primers, and the primer sequences of the data pointing to the algorithm are included in the data file.
与图4相对应的图6,是本申请另一实施例提供的合成DNA片段的示意图。对应图4所示的数据对应算法的逻辑关系,将编码后的文件分割后得到可以存储的DNA片段;合成的数据文件对应的DNA片段为第一片段,合成的算法对应的DNA片段为第二片段。将数据与算法分开保存,第一引物序列可为DNA存储的外部存储数据。如图6所示,将第一引物序列1-F、1-R添加至数据文件1的碱基序列的首部和尾部,得到第一片段;将第一引物序列2-F、2-R添加至数据文件2的碱基序列的首部和尾部,得到第一片段;将第二引物序列1’-F、1’-R添加至算法1的碱基序列的首部和尾部,得到第二片段。将第一引物序列3-F、3-R添加至数据文件3的碱基序列的首部和尾部,得到第一片段;将第二引物序列2’-F、2’-R添加至算法2的碱基序列的首部和尾部,得到第二片段。FIG. 6 corresponding to FIG. 4 is a schematic diagram of synthesizing DNA fragments provided by another embodiment of the present application. Corresponding to the logical relationship of the data corresponding algorithm shown in Figure 4, the encoded file is divided to obtain DNA fragments that can be stored; the DNA fragment corresponding to the synthesized data file is the first fragment, and the DNA fragment corresponding to the synthesized algorithm is the second fragment. Fragment. The data is stored separately from the algorithm, and the first primer sequence may be externally stored data for DNA storage. As shown in Figure 6, the first primer sequences 1-F and 1-R are added to the head and tail of the base sequence of data file 1 to obtain the first fragment; the first primer sequences 2-F and 2-R are added Go to the head and tail of the base sequence of data file 2 to obtain the first fragment; add the second primer sequences 1'-F and 1'-R to the head and tail of the base sequence of algorithm 1 to obtain the second fragment. Add the first primer sequence 3-F, 3-R to the head and tail of the base sequence of data file 3 to obtain the first fragment; add the second primer sequence 2'-F, 2'-R to the algorithm 2 The head and tail of the base sequence were obtained to obtain the second fragment.
可以理解的,第一引物序列为DNA存储的外部存储的信息,通过第一引物序列对第一片段进行测序,得到第一片段的碱基序列。添加第一引物序列至数据文件的碱基序列的首部和尾部,以及添加第二引物序列至算法的碱基序列的首部和尾部,不局限于上述所述的碱基序列的首部和尾部对应的引物序列,满足添加在二进制文件的剪辑序列的两端即可。It can be understood that the first primer sequence is externally stored information stored in DNA, and the first fragment is sequenced through the first primer sequence to obtain the base sequence of the first fragment. Adding the first primer sequence to the head and tail of the base sequence of the data file, and adding the second primer sequence to the head and tail of the base sequence of the algorithm, are not limited to those corresponding to the head and tail of the base sequence described above. The primer sequence can be added to both ends of the clip sequence in the binary file.
由于DNA存储时间长、环境不确定,使得外部存储的信息尽可能少,存储在DNA中的信息尽可能多,外部可以只保存第一片段的第一碱基序列即可,但是此种方法需要两次扩增和测序。另外,还可以将数据文件的第一引物序列和算法的第二引物序列作为DNA存储的外部保存信息。Due to the long storage time of DNA and the uncertain environment, the information stored externally is as little as possible, and the information stored in DNA is as much as possible. Only the first base sequence of the first fragment can be stored externally, but this method requires Amplified and sequenced twice. In addition, the first primer sequence of the data file and the second primer sequence of the algorithm can also be used as external storage information for DNA storage.
在一些实施例中,将二进制文件进行编码,得到碱基序列,包括:根据预设的编码模型,将第一二进制文件和第二二进制文件进行编码,得到第一二进制文件的第一碱基序列和第二二进制文件的第二碱基序列;添加头部引物序列和尾部引物序列至第一碱基序列的首部和尾部,得到用于合成所述DNA片段中的第三片段的碱基序列;添加通用引物序列以及与第二碱基序列对应的一个或多个第一碱基序列的尾部引物序列至第二碱基序列的首部和尾部,得到用于合成DNA片段中的第四片段的碱基序列。In some embodiments, encoding the binary file to obtain the base sequence includes: encoding the first binary file and the second binary file according to a preset encoding model to obtain the first binary file The first base sequence of the first base sequence and the second base sequence of the second binary file; the head primer sequence and the tail primer sequence are added to the head and tail of the first base sequence to obtain the DNA fragment used in the synthesis of The base sequence of the third fragment; adding a universal primer sequence and one or more tail primer sequences of the first base sequence corresponding to the second base sequence to the head and tail of the second base sequence to obtain DNA for synthesis The base sequence of the fourth fragment in the fragment.
在一些实施例中,为减少测序次数和成本,对上述编码方式进一步改进。如图7所示,本申请另一实施例提供的合成DNA片段的示意图。其中,图7中的(a)图所示的数据与算法之间的逻辑关系,不同的数据可能对应相同的算法,例如数据1、数据2和数据3均采用的算法1进行的预处理,数据4经过算法2进行预处理,但算法文件与数据文件的指针方向是由算法文件反向指向数据文件。数据文件的二进制文件和算法文件的二进制文件分开保存。在对数据文件对应的第一二进制文件和算法文件对应的第二二进制文件进行编码后,将编码后的数据分片,添加引物序列至碱基片段的首位。In some embodiments, in order to reduce the number of sequencing times and costs, the above-mentioned encoding method is further improved. As shown in FIG. 7 , a schematic diagram of synthesizing DNA fragments provided in another embodiment of the present application. Among them, the logical relationship between the data and the algorithm shown in (a) in Figure 7, different data may correspond to the same algorithm, for example, data 1, data 2 and data 3 are all preprocessed by algorithm 1, Data 4 is preprocessed by Algorithm 2, but the pointer direction of the algorithm file and the data file is reversed from the algorithm file to the data file. The binary files of the data files and the binary files of the algorithm files are kept separately. After encoding the first binary file corresponding to the data file and the second binary file corresponding to the algorithm file, the encoded data is fragmented, and primer sequences are added to the first position of the base fragment.
如图7中的(a)图所示,数据1、数据2和数据3均通过算法1进行预处理,数据4通过算法2进行预处理。每份文件x有一对引物标识,包括头引物x-F和尾引物x-R。数据文件x对应的引物x-F和x-R,算法文件x对应的引物包括通用引物、一个或多个引物x-R;其中,数据文件x对应的引物x-R与算法文件x对应的引物x-R是相同的引物,由算法指 向数据。其中,图7中的(a)图中的文件1、文件2等指代包括数据文件和算法文件的DNA文件。As shown in (a) of FIG. 7 , data 1, data 2, and data 3 are all preprocessed by algorithm 1, and data 4 is preprocessed by algorithm 2. Each file x is identified by a pair of primers, including the head primer x-F and the tail primer x-R. The primers x-F and x-R corresponding to the data file x, and the primers corresponding to the algorithm file x include universal primers and one or more primers x-R; wherein, the primer x-R corresponding to the data file x and the primer x-R corresponding to the algorithm file x are the same primers, which are defined by Algorithms point to data. Among them, file 1, file 2, etc. in (a) in FIG. 7 refer to DNA files including data files and algorithm files.
在一些实施例中,将头部引物序列和尾部引物序列分别添加至第一碱基序列的两端,将通用引物序列以及与第二碱基序列对应的一个或多个第一碱基序列的尾部引物序列分别添加至第二碱基序列的两端;其中,第一碱基序列为数据文件对应的片段,第二碱基序列为算法文件对应的片段。In some embodiments, the head primer sequence and the tail primer sequence are added to both ends of the first base sequence, respectively, and the universal primer sequence and the one or more first base sequences corresponding to the second base sequence are added. The tail primer sequences are respectively added to both ends of the second base sequence; wherein, the first base sequence is the fragment corresponding to the data file, and the second base sequence is the fragment corresponding to the algorithm file.
如图7中的(b)图所示,将数据1的碱基序列添加头部引物序列1-F和尾部引物序列1-R,将数据2的碱基序列添加头部引物序列2-F和尾部引物序列2-R,将数据3的碱基序列添加头部引物序列3-F和尾部引物序列3-R,将算法1添加通用引物序列和数据1的尾部引物序列1-R、数据2的尾部引物序列2-R、数据3的尾部引物序列3-R;在数据4的碱基序列添加头部引物序列4-F和尾部引物序列4-R,在算法2的碱基序列的头部添加通用引物序列,尾部添加数据4对应的尾部引物序列4-R;从而合成得到各个数据文件和算法文件分别对应的DNA片段,将将数据对应的DNA片段归为第三片段,将算法对应的DNA片段归为第四片段。As shown in (b) of FIG. 7 , the base sequence of data 1 is added to the head primer sequence 1-F and the tail primer sequence 1-R, and the base sequence of data 2 is added to the head primer sequence 2-F and tail primer sequence 2-R, add the base sequence of data 3 to the head primer sequence 3-F and tail primer sequence 3-R, add algorithm 1 to the universal primer sequence and the tail primer sequence 1-R of data 1, data The tail primer sequence 2-R of 2, the tail primer sequence 3-R of data 3; the head primer sequence 4-F and the tail primer sequence 4-R are added to the base sequence of data 4, in the base sequence of algorithm 2. The general primer sequence is added to the head, and the tail primer sequence 4-R corresponding to data 4 is added to the tail; thus, the DNA fragments corresponding to each data file and the algorithm file are synthesized, and the DNA fragment corresponding to the data is classified as the third fragment. The corresponding DNA fragment is classified as the fourth fragment.
在一些实施例中,还可以将通用引物序列以及与第二碱基序列对应的一个或多个第一碱基序列的头部引物序列分别添加至第二碱基序列的两端。In some embodiments, the universal primer sequence and the head primer sequences of one or more first base sequences corresponding to the second base sequence may also be added to both ends of the second base sequence, respectively.
可以理解的,数据文件x对应的引物x-F、x-R,以及算法文件x对应的通用引物、一个或多个头部(或尾部)引物序列,为已知的引物序列,可以为DNA存储的外部存储信息。通过上述已知的引物序列,可以对DNA片段进行一次测序得到数据文件和算法文件对应的碱基序列。It can be understood that the primers x-F and x-R corresponding to the data file x, as well as the general primers and one or more head (or tail) primer sequences corresponding to the algorithm file x are known primer sequences, which can be external storage for DNA storage. information. With the above-mentioned known primer sequences, the DNA fragment can be sequenced once to obtain the base sequences corresponding to the data file and the algorithm file.
另外,添加头部引物序列和尾部引物序列至第一碱基序列的首部和尾部,以及添加通用引物序列以及与第二碱基序列对应的一个或多个第一碱基序列的尾部引物序列至第二碱基序列的首部和尾部,或者添加通用引物序列以及与第二碱基序列对应的一个或多个第一碱基序列的头部引物序列至第二碱基序列的首部和尾部,不局限于上述所述的碱基序列的首部和尾部对应的引物序列,满足添加在二进制文件的剪辑序列的两端即可。In addition, a head primer sequence and a tail primer sequence are added to the head and tail of the first base sequence, and a universal primer sequence and one or more tail primer sequences of the first base sequence corresponding to the second base sequence are added to The head and tail of the second base sequence, or adding a universal primer sequence and one or more head primer sequences of the first base sequence corresponding to the second base sequence to the head and tail of the second base sequence, without It is limited to the primer sequences corresponding to the head and tail of the base sequence described above, and it suffices to be added at both ends of the clip sequence of the binary file.
通过上述实施例,只需保存数据文件的引物序列,在解码恢复过程中,根据数据文件的引物序列和通用引物序列,可以实现同时扩展数据文件和算法文件的DNA序列,即可同时解码得到数据文件和算法文件,减少了外部需要保存的信息量。通过将数据文件和算法文件分开保存实现了数据文件和算法文件的可并发扩增测序。Through the above embodiment, only the primer sequence of the data file needs to be saved, and in the decoding and recovery process, the DNA sequences of the data file and the algorithm file can be expanded simultaneously according to the primer sequence and the general primer sequence of the data file, and the data can be decoded at the same time. files and algorithm files, reducing the amount of information that needs to be saved externally. By storing the data files and algorithm files separately, the concurrent amplification and sequencing of the data files and the algorithm files is realized.
如图8所示,本申请另一实施例提供的基于DNA数据恢复方法的流程示意图。基于DNA的数据恢复方法作为基于DNA的数据存储的逆运算处理过程,可以实现存储的原始数据的自恢复。将数据预处理算法保存在DNA中,读取数据时,系统找到对应文件的引物序列,通过PCR测序同时得到数据和可执行算法文件,解码后在同一目录下的可执行算法可以自动将数据文件进行解析,恢复得到原始数据,实现数据的自解释。如图8所示,该流程包括:As shown in FIG. 8 , a schematic flowchart of a DNA-based data recovery method provided by another embodiment of the present application. The DNA-based data recovery method, as an inverse operation process of DNA-based data storage, can realize the self-recovery of the stored original data. The data preprocessing algorithm is stored in DNA. When reading the data, the system finds the primer sequence of the corresponding file, and simultaneously obtains the data and executable algorithm file through PCR sequencing. After decoding, the executable algorithm in the same directory can automatically convert the data file. Perform analysis, restore the original data, and realize the self-interpretation of the data. As shown in Figure 8, the process includes:
步骤S801,获取待解码的DNA片段,待解码的DNA片段用于存储数据文件和算法文件。In step S801, the DNA fragment to be decoded is acquired, and the DNA fragment to be decoded is used to store the data file and the algorithm file.
在一些实施例中,数据文件和算法文件以DNA片段的形式存储在体内、外存储介质中。需要读取数据时,系统可以找到对应DNA存储文件以及对应的引物序列。数据文件可以为文本形式、图片形式及视频形式等多种类型的信息。通过算法文件对原始数据进行预处理 得到数据文件,预处理采用的算法包括压缩、删冗、加密等预处理算法。In some embodiments, the data files and algorithm files are stored in the in vivo and ex vivo storage media in the form of DNA fragments. When the data needs to be read, the system can find the corresponding DNA storage file and the corresponding primer sequence. Data files can be various types of information such as text, picture, and video. The data files are obtained by preprocessing the original data through the algorithm files. The preprocessing algorithms include compression, redundancy deletion, encryption and other preprocessing algorithms.
步骤S802,对待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,文件格式用于指示数据文件与算法文件之间的索引类型。Step S802, decoding the DNA segment to be decoded to obtain a binary file conforming to a preset file format, where the file format is used to indicate the index type between the data file and the algorithm file.
在一些实施例中,对DNA片段进行解码处理的过程为编码处理的逆运算过程。In some embodiments, the process of decoding the DNA fragments is the inverse of the encoding process.
在一些实施例中,对待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,包括:根据待解码的DNA片段中的引物序列,对待解码的DNA片段进行测序,得到DNA片段的碱基序列;根据预设的解码模型,将DNA片段的碱基序列进行解码,得到二进制文件。In some embodiments, decoding the DNA fragment to be decoded to obtain a binary file conforming to a preset file format includes: sequencing the DNA fragment to be decoded according to the primer sequences in the DNA fragment to be decoded to obtain the DNA fragment The base sequence of the DNA fragment is decoded according to the preset decoding model to obtain a binary file.
与图5对应的解码运算过程,根据引物序列,通过采用PCR技术将DNA片段进行扩增,然后测序,得到数据和算法的碱基序列。预设的解码模型为编码模型的逆运算模型,通过解码模型的转换关系,将数据和算法的碱基序列转换为对应的二进制文件。In the decoding operation process corresponding to Fig. 5, according to the primer sequences, the DNA fragments are amplified by PCR technology, and then sequenced to obtain the base sequence of the data and the algorithm. The preset decoding model is an inverse operation model of the encoding model, and through the conversion relationship of the decoding model, the data and the base sequence of the algorithm are converted into corresponding binary files.
其中,二进制文件为数据文件和算法文件位于同一文件的文件,索引类型为直接索引。如图9所示的本申请一实施例提供的二进制文件的结构示意图。数据和算法位于同一二进制文件,包括数据文件的属性标识位、数据文件的有效数据位以及算法文件的有效数据位。如图9中的(a)图所示的各标识位对应的变量名,数据文件的属性标识位包括数据文件开始标记、数据文件类型、二值属性标记、压缩方式、压缩后数据长度、压缩前数据长度以及数据开始标记等。通过书开始标记字段以及数据文件的有效数据位可以确定算法文件的有效数据位的偏移量。The binary file is a file in which the data file and the algorithm file are located in the same file, and the index type is direct index. FIG. 9 is a schematic structural diagram of a binary file provided by an embodiment of the present application. The data and the algorithm are located in the same binary file, including the attribute identification bits of the data file, the valid data bits of the data file, and the valid data bits of the algorithm file. The variable name corresponding to each identification bit as shown in (a) in Figure 9, the attribute identification bit of the data file includes the data file start mark, data file type, binary attribute mark, compression method, compressed data length, compression Pre-data length and data start marker, etc. The offset of the valid data bits of the algorithm file can be determined by the start of book marker field and the valid data bits of the data file.
其中,如图9中的(b)图所示,二值属性标记的第一位F1指示原始数据是否被压缩,例如F1=0表示原始数据被压缩,F1=1则未被压缩。二值属性标记的第二位F2表示数据文件与算法文件之间的索引类型,F2=0表示直接索引,F2=1表示间接索引。Wherein, as shown in (b) of FIG. 9 , the first bit F1 of the binary attribute flag indicates whether the original data is compressed. For example, F1=0 indicates that the original data is compressed, and F1=1 indicates that the original data is not compressed. The second bit F2 of the binary attribute flag indicates the index type between the data file and the algorithm file, F2=0 indicates the direct index, and F2=1 indicates the indirect index.
在一些实施例中,对待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,包括:根据待解码的DNA片段中的第一片段的第一引物序列,对第一片段进行测序,得到第一碱基序列和第二引物序列;根据第二引物序列,对待解码的DNA片段中的第二片段进行测序,得到第二碱基序列;根据预设的解码模型,将第一碱基序列和第二碱基序列进行解码,得到第一碱基序列对应的第一二进制文件和第二碱基序列对应的第二二进制文件。其中,第一二进制文件对应数据文件,第二二进制文件对应算法文件。In some embodiments, performing decoding processing on the DNA fragment to be decoded to obtain a binary file conforming to a preset file format includes: performing decoding on the first fragment according to the first primer sequence of the first fragment in the DNA fragment to be decoded Sequencing to obtain a first base sequence and a second primer sequence; according to the second primer sequence, sequencing the second fragment in the DNA fragment to be decoded to obtain a second base sequence; according to a preset decoding model, the first The base sequence and the second base sequence are decoded to obtain a first binary file corresponding to the first base sequence and a second binary file corresponding to the second base sequence. The first binary file corresponds to a data file, and the second binary file corresponds to an algorithm file.
在一些实施例中,对应图6所示的DNA片段,在得知第一引物序列的基础上,通过PCR技术,对第一片段进行扩增测序,得到数据1的碱基序列和第二引物序列。通过采用相同的PCR技术,根据第二引物序列,对第二片段进行扩增测序,得到算法文件对应的碱基序列。根据编码模型的逆运算(解码模型),对数据文件的碱基序列和算法文件的碱基序列进行解码处理,得到数据文件的二进制文件和算法文件的二进制文件。In some embodiments, corresponding to the DNA fragment shown in FIG. 6 , on the basis of knowing the sequence of the first primer, PCR technology is used to amplify and sequence the first fragment to obtain the base sequence of data 1 and the second primer. sequence. By using the same PCR technology and according to the second primer sequence, the second fragment is amplified and sequenced to obtain the base sequence corresponding to the algorithm file. According to the inverse operation (decoding model) of the encoding model, the base sequence of the data file and the base sequence of the algorithm file are decoded to obtain the binary file of the data file and the binary file of the algorithm file.
示例性的,对应图6所示的DNA片段的解码过程中,根据第一引物序列1-F、1-R,可以对第一片段进行扩增,然后测序,得到数据文件1的碱基序列,数据文件1的碱基序列包括数据1对应的第一碱基序列和第二引物序列1’-F、1’-R;根据第二引物序列1’-F、1’-R,对第二片段进行扩增,然后测序,得到算法1对应的碱基序列。根据第一引物序列2-F、2-R,可以对第一片段进行扩增,然后测序,得到数据文件2的碱基序列,数据文件2的碱基序列包括数据2对应的第一碱基序列和第二引物序列1’-F、1’-R;根据第二引物序列1’-F、1’-R,对第二片段进行扩增,然后测序,得到算法1对应的碱基序列。根据第一引物序列3-F、3-R,可以对第一片段进行扩增,然后测序,得到数据文件3的碱 基序列,数据文件3的碱基序列包括数据3对应的第一碱基序列和第二引物序列2’-F、2’-R;根据第二引物序列2’-F、2’-R,对第二片段进行扩增,然后测序,得到算法2对应的碱基序列。Exemplarily, in the decoding process corresponding to the DNA fragment shown in FIG. 6 , according to the first primer sequences 1-F and 1-R, the first fragment can be amplified, and then sequenced to obtain the base sequence of the data file 1. , the base sequence of data file 1 includes the first base sequence corresponding to data 1 and the second primer sequence 1'-F, 1'-R; according to the second primer sequence 1'-F, 1'-R, for the first The two fragments are amplified and sequenced to obtain the base sequence corresponding to Algorithm 1. According to the first primer sequences 2-F and 2-R, the first fragment can be amplified and then sequenced to obtain the base sequence of data file 2. The base sequence of data file 2 includes the first base corresponding to data 2 sequence and the second primer sequence 1'-F, 1'-R; according to the second primer sequence 1'-F, 1'-R, the second fragment is amplified, and then sequenced to obtain the base sequence corresponding to algorithm 1 . According to the first primer sequences 3-F and 3-R, the first fragment can be amplified and then sequenced to obtain the base sequence of data file 3. The base sequence of data file 3 includes the first base corresponding to data 3 sequence and the second primer sequence 2'-F, 2'-R; according to the second primer sequence 2'-F, 2'-R, the second fragment is amplified, and then sequenced to obtain the base sequence corresponding to algorithm 2 .
如图10所示的,本申请另一实施例提供的二进制文件的结构示意图。数据文件的二进制文件和算法文件的二进制文件为分开的两个文件,索引类型为间接索引。如图10中的(a)图所示,数据文件对应的第一二进制文件包括数据文件的第一属性标识位和数据文件的第一有效数据位;第一属性标识位包括数据文件开始标记、数据文件类型、二值属性标记、压缩方式、压缩后数据长度、压缩前数据长度及数据开始标记等变量字段。其中,二值属性标记字段包括一个字节,八位,第一位F1表示原始数据是否被预处理,F2表示数据文件与算法文件之间的索引类型。F1=0表示原始数据经过算法的预处理,F1=1表示原始数据未经过预处理;F2=0表示直接索引,F2=1表示间接索引。As shown in FIG. 10 , a schematic structural diagram of a binary file provided by another embodiment of the present application. The binary file of the data file and the binary file of the algorithm file are two separate files, and the index type is indirect index. As shown in (a) in Figure 10, the first binary file corresponding to the data file includes the first attribute identification bit of the data file and the first valid data bit of the data file; the first attribute identification bit includes the start of the data file Variable fields such as tag, data file type, binary attribute tag, compression method, data length after compression, data length before compression, and data start tag. Among them, the binary attribute tag field includes one byte, eight bits, the first bit F1 indicates whether the original data is preprocessed, and F2 indicates the index type between the data file and the algorithm file. F1=0 means that the original data is preprocessed by the algorithm, F1=1 means that the original data is not preprocessed; F2=0 means direct indexing, F2=1 means indirect indexing.
如图10中的(c)图所示的算法文件对应的第二二进制文件,包括算法文件的第二属性标识和算法文件的第二有效数据位。其中第二属性标识位包括算法文件开始标记的字段和算法名称的字段。第二有效数据位表示具体采用的预处理算法。The second binary file corresponding to the algorithm file as shown in (c) of FIG. 10 includes the second attribute identifier of the algorithm file and the second valid data bits of the algorithm file. Wherein the second attribute identification bit includes the field of the algorithm file start marker and the field of the algorithm name. The second significant data bit indicates the specific preprocessing algorithm employed.
其中,第一二进制文件对应数据文件,第二二进制文件对应算法文件。The first binary file corresponds to a data file, and the second binary file corresponds to an algorithm file.
在一些实施例中,对待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,包括:根据待解码的DNA片段中的第三片段的头部引物序列和尾部引物序列,对第三片段进行测序,得到第一碱基序列;根据第三片段的尾部引物序列和所述待解码的DNA片段中的第四片段的通用引物序列,对第四片段进行测序,得到第二碱基序列;根据预设的解码模型,将第一碱基序列和第二碱基序列进行解码,得到第一碱基序列对应的第一二进制文件和第二碱基序列对应的第二二进制文件。In some embodiments, decoding the DNA fragment to be decoded to obtain a binary file conforming to a preset file format includes: according to the head primer sequence and the tail primer sequence of the third fragment in the DNA fragment to be decoded, The third fragment is sequenced to obtain the first base sequence; according to the tail primer sequence of the third fragment and the universal primer sequence of the fourth fragment in the DNA fragments to be decoded, the fourth fragment is sequenced to obtain the second base base sequence; according to the preset decoding model, decode the first base sequence and the second base sequence to obtain the first binary file corresponding to the first base sequence and the second binary file corresponding to the second base sequence binary file.
在一些实施例中,对应图7中的(b)图,外部只需存储数据文件对应的引物序列,通过读取数据文件对应的引物序列,对DNA片段进行测序,同时得到数据文件和算法文件分别对应的碱基序列。In some embodiments, corresponding to (b) in FIG. 7 , the primer sequences corresponding to the data files only need to be stored externally, and the DNA fragments are sequenced by reading the primer sequences corresponding to the data files, and the data files and algorithm files are obtained at the same time. corresponding base sequences.
示例性的,在得知数据文件对应的头部序列、尾部序列及算法文件的通用引物序列的基础上,通过采用PCR技术,同时对第三片段和第四片段进行扩增,然后测序,得到数据文件对应的碱基序列和算法文件对应的碱基序列。例如,通过头部引物序列1-F、尾部引物序列1-R及通用引物序列,对数据1对应的第三片段和算法1对应的第四片段同时进行扩增,然后测序,得到数据1对应的碱基序列和算法1对应的碱基序列。通过对数据文件的碱基序列和算法文件的碱基序列进行解码处理,得到如图10所示文件格式的第一二进制文件和第二二进制文件的。Exemplarily, on the basis of knowing the header sequence, the tail sequence and the universal primer sequence of the algorithm file corresponding to the data file, the third fragment and the fourth fragment are simultaneously amplified by using PCR technology, and then sequenced to obtain The base sequence corresponding to the data file and the base sequence corresponding to the algorithm file. For example, through the head primer sequence 1-F, the tail primer sequence 1-R and the universal primer sequence, the third fragment corresponding to data 1 and the fourth fragment corresponding to algorithm 1 are simultaneously amplified, and then sequenced to obtain the corresponding data 1. The base sequence of and the base sequence corresponding to Algorithm 1. By decoding the base sequence of the data file and the base sequence of the algorithm file, the first binary file and the second binary file in the file format shown in FIG. 10 are obtained.
其中,第一二进制文件对应数据文件,第二二进制文件对应算法文件。The first binary file corresponds to a data file, and the second binary file corresponds to an algorithm file.
步骤S803,读取二进制文件中的数据文件和算法文件,并根据索引类型调用算法文件。Step S803, read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type.
在一些实施例中,如图9所示,数据问价与算法文件之间的索引类型为直接索引时,数据文件的属性标识位包括指示索引类型的标识;读取所述二进制文件中的数据文件、算法文件,并根据索引类型调用算法文件,包括:读取二进制文件的数据文件的属性标识位和有效数据位,并基于数据文件的属性标识位确定索引类型;读取二进制文件的算法文件的有效数据位,并根据索引类型调用算法文件的所述有效数据位。In some embodiments, as shown in FIG. 9 , when the index type between the data query and the algorithm file is a direct index, the attribute identification bit of the data file includes an index indicating the index type; read the data in the binary file file, algorithm file, and calling the algorithm file according to the index type, including: reading the attribute identification bits and valid data bits of the data file of the binary file, and determining the index type based on the attribute identification bit of the data file; reading the algorithm file of the binary file The valid data bits of the file are called according to the index type.
在一些实施例中,如图10所示,数据文件与算法文件之间的索引类型为间接索引时,数据文件的第一属性标识位包括指示索引类型的标识;读取二进制文件中的数据文件和算 法文件,并根据索引类型调用算法文件,包括:读取第一二进制文件中数据文件的第一属性标识位和第一有效数据位,并根据第一属性标识位确定索引类型;读取第二二进制文件中算法文件的第二属性标识位和第二有效数据位,并根据索引类型调用第二二进制文件的第二有效数据位的算法。In some embodiments, as shown in FIG. 10 , when the index type between the data file and the algorithm file is an indirect index, the first attribute identification bit of the data file includes an identification indicating the index type; read the data file in the binary file and the algorithm file, and call the algorithm file according to the index type, including: reading the first attribute identification bit and the first valid data bit of the data file in the first binary file, and determining the index type according to the first attribute identification bit; reading; The second attribute identification bit and the second valid data bit of the algorithm file in the second binary file are obtained, and the algorithm of the second valid data bit of the second binary file is called according to the index type.
步骤S804,根据所述算法文件对所述数据文件进行解析处理,得到所述数据文件对应的原始数据。Step S804: Perform parsing processing on the data file according to the algorithm file to obtain original data corresponding to the data file.
通过本申请实施例,DNA存储在实际应用中需要进行超长期保存,在数据预处理算法可能丢失的情况下,为保证数据在长期不确定的环境中的安全性和完整性,将压缩算法使用特定的文件格式保存在DNA片段中,在控制数据冗余量和简化数据读取的复杂度的基础上,保证数据可自解释、自恢复。Through the embodiments of the present application, DNA storage needs to be stored for a long time in practical applications. In the case that the data preprocessing algorithm may be lost, in order to ensure the security and integrity of the data in the long-term uncertain environment, the compression algorithm is used. A specific file format is stored in DNA fragments, and on the basis of controlling the amount of data redundancy and simplifying the complexity of data reading, it ensures that the data can be self-interpreted and self-recoverable.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
对应于上文实施例所述的基于DNA的数据存储方法,图11示出了本申请实施例提供的基于DNA的数据存储装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the DNA-based data storage method described in the above embodiment, FIG. 11 shows a structural block diagram of the DNA-based data storage device provided by the embodiment of the present application. relevant part.
参照图11,该装置包括:11, the device includes:
第一获取单元111,用于获取待存储的数据文件,所述数据文件为根据算法文件对原始数据进行预处理得到的文件;The first obtaining unit 111 is configured to obtain a data file to be stored, where the data file is a file obtained by preprocessing the original data according to the algorithm file;
第一处理单元112,用于根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;The first processing unit 112 is configured to edit the data file and the algorithm file according to a preset file format, and generate a binary file to be encoded, and the file format is used to indicate the difference between the data file and the algorithm file. the index type;
编码单元113,用于将所述二进制文件进行编码,得到碱基序列,所述碱基序列用于合成存储所述数据文件和所述算法文件的DNA片段。The encoding unit 113 is configured to encode the binary file to obtain a base sequence, and the base sequence is used for synthesizing a DNA fragment storing the data file and the algorithm file.
对应于上文实施例所述的基于DNA的数据恢复方法,图12示出了本申请实施例提供的基于DNA的数据恢复装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the DNA-based data recovery method described in the above embodiment, FIG. 12 shows a structural block diagram of the DNA-based data recovery apparatus provided by the embodiment of the present application. relevant part.
参照图12,该装置包括:12, the device includes:
第二获取单元121,用于获取待解码的DNA片段,所述待解码的DNA片段用于存储数据文件和算法文件;The second obtaining unit 121 is configured to obtain DNA fragments to be decoded, and the DNA fragments to be decoded are used to store data files and algorithm files;
解码单元122,用于对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;The decoding unit 122 is configured to perform decoding processing on the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, where the file format is used to indicate the index type between the data file and the algorithm file ;
第二处理单元123,用于读取所述二进制文件中的所述数据文件和所述算法文件,并根据所述索引类型调用所述算法文件;A second processing unit 123, configured to read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type;
解析单元124,用于根据所述算法文件对所述数据文件进行解析处理,得到所述数据文件对应的原始数据。The parsing unit 124 is configured to perform parsing processing on the data file according to the algorithm file to obtain original data corresponding to the data file.
通过本申请实施例,DNA存储在实际应用中需要进行超长期保存,在数据预处理算法可能丢失的情况下,为保证数据在长期不确定的环境中的安全性和完整性,将压缩算法使用特定的文件格式保存在DNA片段中,在控制数据冗余量和简化数据读取的复杂度的基础上,保证数据可自解释、自恢复。Through the embodiments of the present application, DNA storage needs to be stored for a long time in practical applications. In the case that the data preprocessing algorithm may be lost, in order to ensure the security and integrity of the data in the long-term uncertain environment, the compression algorithm is used. A specific file format is stored in DNA fragments, and on the basis of controlling the amount of data redundancy and simplifying the complexity of data reading, it ensures that the data can be self-interpreted and self-recoverable.
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法 实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information exchange, execution process and other contents between the above-mentioned devices/units are based on the same concept as the method embodiments of the present application. For specific functions and technical effects, please refer to the method embodiments section. It is not repeated here.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
图13为本申请一实施例提供的终端设备的结构示意图。如图13所示,该实施例的终端设备13包括:至少一个处理器130(图13中仅示出一个)处理器、存储器131以及存储在所述存储器131中并可在所述至少一个处理器130上运行的计算机程序132,所述处理器130执行所述计算机程序132时实现上述任意各个方法实施例中的步骤。FIG. 13 is a schematic structural diagram of a terminal device according to an embodiment of the application. As shown in FIG. 13 , the terminal device 13 of this embodiment includes: at least one processor 130 (only one is shown in FIG. 13 ), a processor, a memory 131 , and a processor 131 stored in the memory 131 and available for processing in the at least one processor The computer program 132 running on the processor 130, the processor 130 implements the steps in any of the above method embodiments when the computer program 132 is executed.
所述终端设备13可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。该终端设备可包括,但不仅限于,处理器130、存储器131。本领域技术人员可以理解,图13仅仅是终端设备13的举例,并不构成对终端设备13的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。The terminal device 13 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The terminal device may include, but is not limited to, the processor 130 and the memory 131 . Those skilled in the art can understand that FIG. 13 is only an example of the terminal device 13, and does not constitute a limitation on the terminal device 13, and may include more or less components than the one shown, or combine some components, or different components , for example, may also include input and output devices, network access devices, and the like.
所称处理器130可以是中央处理单元(Central Processing Unit,CPU),该处理器130还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 130 may be a central processing unit (Central Processing Unit, CPU), and the processor 130 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuits) , ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
所述存储器131在一些实施例中可以是所述终端设备13的内部存储单元,例如终端设备13的硬盘或内存。所述存储器131在另一些实施例中也可以是所述终端设备13的外部存储设备,例如所述终端设备13上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器131还可以既包括所述终端设备13的内部存储单元也包括外部存储设备。所述存储器131用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器131还可以用于暂时地存储已经输出或者将要输出的数据。The memory 131 may be an internal storage unit of the terminal device 13 in some embodiments, such as a hard disk or a memory of the terminal device 13 . The memory 131 may also be an external storage device of the terminal device 13 in other embodiments, such as a plug-in hard disk equipped on the terminal device 13, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 131 may also include both an internal storage unit of the terminal device 13 and an external storage device. The memory 131 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, for example, program codes of the computer program, and the like. The memory 131 may also be used to temporarily store data that has been output or will be output.
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.
本申请实施例提供了一种计算机程序产品,当计算机程序产品在移动终端上运行时,使得移动终端执行时实现可实现上述各个方法实施例中的步骤。The embodiments of the present application provide a computer program product, when the computer program product runs on a mobile terminal, the steps in the foregoing method embodiments can be implemented when the mobile terminal executes the computer program product.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可 存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质至少可以包括:能够将计算机程序代码携带到拍照装置/终端设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the present application realizes all or part of the processes in the methods of the above embodiments, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When executed by a processor, the steps of each of the above method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include at least: any entity or device capable of carrying the computer program code to the photographing device/terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media. For example, U disk, mobile hard disk, disk or CD, etc. In some jurisdictions, under legislation and patent practice, computer readable media may not be electrical carrier signals and telecommunications signals.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/网络设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/网络设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it can still be used for the above-mentioned implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the application, and should be included in the within the scope of protection of this application.

Claims (17)

  1. 一种基于DNA的数据存储方法,其特征在于,包括:A DNA-based data storage method, comprising:
    获取待存储的数据文件,所述数据文件为根据算法文件对原始数据进行预处理得到的文件;Obtaining a data file to be stored, the data file is a file obtained by preprocessing the original data according to the algorithm file;
    根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;Edit the data file and the algorithm file according to a preset file format to generate a binary file to be encoded, and the file format is used to indicate the index type between the data file and the algorithm file;
    将所述二进制文件进行编码,得到碱基序列,所述碱基序列用于合成存储所述数据文件和所述算法文件的DNA片段。The binary file is encoded to obtain a base sequence, and the base sequence is used to synthesize the DNA fragments storing the data file and the algorithm file.
  2. 如权利要求1所述的方法,其特征在于,在所述获取待存储的数据文件之前,所述方法还包括:The method according to claim 1, wherein before the acquiring the data file to be stored, the method further comprises:
    根据所述算法文件对所述原始数据进行压缩、删冗或加密的处理,得到所述数据文件。The original data is compressed, redundant or encrypted according to the algorithm file to obtain the data file.
  3. 如权利要求1或2所述的方法,其特征在于,所述根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,包括:The method according to claim 1 or 2, wherein the editing of the data file and the algorithm file according to a preset file format to generate a binary file to be encoded comprises:
    根据预设的所述文件格式,编辑所述数据文件的属性标识位和有效数据位;Edit the attribute identification bits and valid data bits of the data file according to the preset file format;
    根据所述数据文件的所述属性标识位和所述有效数据位,确定所述算法文件相对于所述数据文件的有效数据位的偏移量;Determine the offset of the algorithm file relative to the valid data bits of the data file according to the attribute identification bits and the valid data bits of the data file;
    基于所述偏移量,编辑所述算法文件的有效数据位,得到所述数据文件和所述算法文件位于同一文件的二进制文件。Based on the offset, the effective data bits of the algorithm file are edited to obtain a binary file in which the data file and the algorithm file are located in the same file.
  4. 如权利要求3所述的方法,其特征在于,所述将所述二进制文件进行编码,得到碱基序列,包括:The method of claim 3, wherein the encoding the binary file to obtain a base sequence comprises:
    根据预设的编码模型,将所述二进制文件进行编码,得到所述二进制文件的碱基序列;According to a preset encoding model, the binary file is encoded to obtain the base sequence of the binary file;
    添加引物序列至所述二进制文件的碱基序列的首部和尾部,得到用于合成所述DNA片段的碱基序列。Primer sequences are added to the head and tail of the base sequence of the binary file to obtain base sequences for synthesizing the DNA fragments.
  5. 如权利要求1或2所述的方法,其特征在于,所述根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,包括:The method according to claim 1 or 2, wherein the editing of the data file and the algorithm file according to a preset file format to generate a binary file to be encoded comprises:
    根据预设的所述文件格式,编辑所述数据文件的第一属性标识位和第一有效数据位,得到所述数据文件对应的第一二进制文件;According to the preset file format, edit the first attribute identification bit and the first valid data bit of the data file to obtain the first binary file corresponding to the data file;
    根据预设的所述文件格式,编辑所述算法文件的第二属性标识位和第二有效数据位,得到所述算法文件对应的第二二进制文件;According to the preset file format, edit the second attribute identification bit and the second valid data bit of the algorithm file to obtain the second binary file corresponding to the algorithm file;
    其中,所述第一二进制文件和所述第二二进制文件为相互独立的两个文件。Wherein, the first binary file and the second binary file are two files independent of each other.
  6. 如权利要求5所述的方法,其特征在于,所述将所述二进制文件进行编码,得到碱基序列,包括:The method of claim 5, wherein the encoding the binary file to obtain a base sequence comprises:
    根据预设的编码模型,将所述第一二进制文件和所述第二二进制文件进行编码,得到所述第一二进制文件的第一碱基序列和所述第二二进制文件的第二碱基序列;According to a preset encoding model, the first binary file and the second binary file are encoded to obtain the first base sequence of the first binary file and the second binary file. The second base sequence of the prepared file;
    添加第一引物序列至所述第一碱基序列的首部和尾部,得到用于合成所述DNA片段中的第一片段的碱基序列;adding a first primer sequence to the head and tail of the first base sequence to obtain a base sequence for synthesizing the first fragment of the DNA fragments;
    添加第二引物序列至所述第二碱基序列的首部和尾部,得到用于合成所述DNA片段中的第二片段的碱基序列。A second primer sequence is added to the head and tail of the second base sequence to obtain a base sequence for synthesizing the second fragment of the DNA fragments.
  7. 如权利要求5所述的方法,其特征在于,所述将所述二进制文件进行编码,得到碱基序列,包括:The method of claim 5, wherein the encoding the binary file to obtain a base sequence comprises:
    根据预设的编码模型,将所述第一二进制文件和所述第二二进制文件进行编码,得到所述第一二进制文件的第一碱基序列和所述第二二进制文件的第二碱基序列;According to a preset encoding model, the first binary file and the second binary file are encoded to obtain the first base sequence of the first binary file and the second binary file. The second base sequence of the prepared file;
    添加头部引物序列和尾部引物序列至所述第一碱基序列的首部和尾部,得到用于合成所述DNA片段中的第三片段的碱基序列;adding a head primer sequence and a tail primer sequence to the head and tail of the first base sequence to obtain a base sequence for synthesizing the third fragment in the DNA fragment;
    添加通用引物序列以及与所述第二碱基序列对应的一个或多个第一碱基序列的尾部引物序列至所述第二碱基序列的首部和尾部,得到用于合成所述DNA片段中的第四片段的碱基序列。A universal primer sequence and one or more tail primer sequences of the first base sequence corresponding to the second base sequence are added to the head and tail of the second base sequence to obtain a primer for synthesizing the DNA fragment. The base sequence of the fourth fragment.
  8. 一种基于DNA的数据恢复方法,其特征在于,包括:A DNA-based data recovery method, comprising:
    获取待解码的DNA片段,所述待解码的DNA片段用于存储数据文件和算法文件;Obtaining the DNA fragment to be decoded, the DNA fragment to be decoded is used to store data files and algorithm files;
    对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;Decoding the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, where the file format is used to indicate an index type between the data file and the algorithm file;
    读取所述二进制文件中的所述数据文件和所述算法文件,并根据所述索引类型调用所述算法文件;Read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type;
    根据所述算法文件对所述数据文件进行解析处理,得到所述数据文件对应的原始数据。Perform parsing processing on the data file according to the algorithm file to obtain original data corresponding to the data file.
  9. 如权利要求8所述的方法,其特征在于,所述对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,包括:The method of claim 8, wherein the decoding process is performed on the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, comprising:
    根据所述待解码的DNA片段中的引物序列,对所述待解码的DNA片段进行测序,得到所述DNA片段的碱基序列;According to the primer sequences in the DNA fragment to be decoded, the DNA fragment to be decoded is sequenced to obtain the base sequence of the DNA fragment;
    根据预设的解码模型,将所述DNA片段的碱基序列进行解码,得到所述二进制文件;According to a preset decoding model, the base sequence of the DNA fragment is decoded to obtain the binary file;
    其中,所述二进制文件为所述数据文件和所述算法文件位于同一文件的文件。The binary file is a file in which the data file and the algorithm file are located in the same file.
  10. 如权利要求9所述的方法,其特征在于,所述数据文件的属性标识位包括指示索引类型的标识;The method of claim 9, wherein the attribute identification bit of the data file includes an identification indicating an index type;
    所述读取所述二进制文件中的所述数据文件、所述算法文件,并根据所述索引类型调用所述算法文件,包括:The reading the data file and the algorithm file in the binary file, and calling the algorithm file according to the index type, includes:
    读取所述二进制文件的所述数据文件的属性标识位和有效数据位,并基于所述数据文件的属性标识位确定所述索引类型;Read the attribute identification bits and valid data bits of the data file of the binary file, and determine the index type based on the attribute identification bits of the data file;
    读取所述二进制文件的所述算法文件的有效数据位,并根据所述索引类型调用所述算法文件的所述有效数据位。The valid data bits of the algorithm file of the binary file are read, and the valid data bits of the algorithm file are called according to the index type.
  11. 如权利要求8所述的方法,其特征在于,所述对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,包括:The method of claim 8, wherein the decoding process is performed on the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, comprising:
    根据所述待解码的DNA片段中的第一片段的第一引物序列,对所述第一片段进行测序,得到第一碱基序列和第二引物序列;According to the first primer sequence of the first fragment in the DNA fragments to be decoded, the first fragment is sequenced to obtain a first base sequence and a second primer sequence;
    根据所述第二引物序列,对待解码的DNA片段中的第二片段进行测序,得到第二碱基序列;According to the second primer sequence, the second fragment in the DNA fragment to be decoded is sequenced to obtain a second base sequence;
    根据预设的解码模型,将所述第一碱基序列和所述第二碱基序列进行解码,得到所述第一碱基序列对应的第一二进制文件和所述第二碱基序列对应的第二二进制文件;According to a preset decoding model, the first base sequence and the second base sequence are decoded to obtain the first binary file and the second base sequence corresponding to the first base sequence the corresponding second binary;
    其中,所述第一二进制文件对应所述数据文件,所述第二二进制文件对应所述算法文件。The first binary file corresponds to the data file, and the second binary file corresponds to the algorithm file.
  12. 如权利要求8所述的方法,其特征在于,所述对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,包括:The method of claim 8, wherein the decoding process is performed on the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, comprising:
    根据所述待解码的DNA片段中的第三片段的头部引物序列和尾部引物序列,对所述第三片段进行测序,得到第一碱基序列;According to the head primer sequence and the tail primer sequence of the third fragment in the DNA fragment to be decoded, the third fragment is sequenced to obtain the first base sequence;
    根据所述第三片段的尾部引物序列和所述待解码的DNA片段中的第四片段的通用引物序列,对所述第四片段进行测序,得到第二碱基序列;According to the tail primer sequence of the third fragment and the universal primer sequence of the fourth fragment in the DNA fragments to be decoded, the fourth fragment is sequenced to obtain the second base sequence;
    根据预设的解码模型,将所述第一碱基序列和所述第二碱基序列进行解码,得到所述第一碱基序列对应的第一二进制文件和所述第二碱基序列对应的第二二进制文件;According to a preset decoding model, the first base sequence and the second base sequence are decoded to obtain the first binary file and the second base sequence corresponding to the first base sequence the corresponding second binary;
    其中,所述第一二进制文件对应所述数据文件,所述第二二进制文件对应所述算法文件。The first binary file corresponds to the data file, and the second binary file corresponds to the algorithm file.
  13. 如权利要求11或12所述的方法,其特征在于,所述数据文件的第一属性标识位包括指示索引类型的标识;The method according to claim 11 or 12, wherein the first attribute identification bit of the data file includes an identification indicating an index type;
    所述读取所述二进制文件中的所述数据文件和所述算法文件,并根据所述索引类型调用所述算法文件,包括:The reading the data file and the algorithm file in the binary file, and calling the algorithm file according to the index type, includes:
    读取所述第一二进制文件中所述数据文件的第一属性标识位和第一有效数据位,并根据所述第一属性标识位确定所述索引类型;Read the first attribute identification bit and the first valid data bit of the data file in the first binary file, and determine the index type according to the first attribute identification bit;
    读取所述第二二进制文件中所述算法文件的第二属性标识位和第二有效数据位,并根据所述索引类型调用所述第二二进制文件的所述第二有效数据位的算法。Reading the second attribute identification bit and the second valid data bit of the algorithm file in the second binary file, and calling the second valid data of the second binary file according to the index type bit algorithm.
  14. 一种基于DNA的数据存储装置,其特征在于,包括:A DNA-based data storage device, comprising:
    第一获取单元,用于获取待存储的数据文件,所述数据文件为根据算法文件对原始数据进行预处理得到的文件;a first acquiring unit, configured to acquire a data file to be stored, where the data file is a file obtained by preprocessing the original data according to the algorithm file;
    第一处理单元,用于根据预设的文件格式编辑所述数据文件和所述算法文件,生成待编码的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;The first processing unit is configured to edit the data file and the algorithm file according to a preset file format, and generate a binary file to be encoded, and the file format is used to indicate the relationship between the data file and the algorithm file. index type;
    编码单元,用于将所述二进制文件进行编码,得到碱基序列,所述碱基序列用于合成存储所述数据文件和所述算法文件的DNA片段。The coding unit is used for coding the binary file to obtain a base sequence, and the base sequence is used for synthesizing the DNA fragments storing the data file and the algorithm file.
  15. 一种基于DNA的数据恢复装置,其特征在于,包括:A DNA-based data recovery device, comprising:
    第二获取单元,用于获取待解码的DNA片段,所述待解码的DNA片段用于存储数据文件和算法文件;a second acquiring unit, configured to acquire DNA fragments to be decoded, and the DNA fragments to be decoded are used to store data files and algorithm files;
    解码单元,用于对所述待解码的DNA片段进行解码处理,得到符合预设的文件格式的二进制文件,所述文件格式用于指示所述数据文件与所述算法文件之间的索引类型;a decoding unit, configured to decode the DNA fragment to be decoded to obtain a binary file conforming to a preset file format, where the file format is used to indicate an index type between the data file and the algorithm file;
    第二处理单元,用于读取所述二进制文件中的所述数据文件和所述算法文件,并根据所述索引类型调用所述算法文件;a second processing unit, configured to read the data file and the algorithm file in the binary file, and call the algorithm file according to the index type;
    解析单元,用于根据所述算法文件对所述数据文件进行解析处理,得到所述数据文件对应的原始数据。The parsing unit is configured to perform parsing processing on the data file according to the algorithm file to obtain original data corresponding to the data file.
  16. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项或权利要求8至13任一项所述的方法。A terminal device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the computer program, the process according to claim 1 to 7. The method of any one of claims 8 to 13.
  17. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7任一项或权利要求8至13任一项所述的方法。A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, any one of claims 1 to 7 or any of claims 8 to 13 is implemented. one of the methods described.
PCT/CN2020/134847 2020-12-09 2020-12-09 Dna-based data storage method and apparatus, dna-based data recovery method and apparatus, and terminal device WO2022120626A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/134847 WO2022120626A1 (en) 2020-12-09 2020-12-09 Dna-based data storage method and apparatus, dna-based data recovery method and apparatus, and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/134847 WO2022120626A1 (en) 2020-12-09 2020-12-09 Dna-based data storage method and apparatus, dna-based data recovery method and apparatus, and terminal device

Publications (1)

Publication Number Publication Date
WO2022120626A1 true WO2022120626A1 (en) 2022-06-16

Family

ID=81974106

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/134847 WO2022120626A1 (en) 2020-12-09 2020-12-09 Dna-based data storage method and apparatus, dna-based data recovery method and apparatus, and terminal device

Country Status (1)

Country Link
WO (1) WO2022120626A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116187435B (en) * 2022-12-19 2024-01-05 武汉大学 Method and system for storing information by utilizing DNA (deoxyribonucleic acid) based on large and small fountain codes and MRC (MRC) algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190317684A1 (en) * 2018-04-11 2019-10-17 University-Industry Cooperation Group Of Kyung Hee University Dna digital data storage device and method, and decoding method of dna digital data
CN110431148A (en) * 2017-01-10 2019-11-08 罗斯威尔生命技术公司 Method and system for the storage of DNA data
CN110706751A (en) * 2019-09-25 2020-01-17 东南大学 DNA storage encryption coding method
CN110945595A (en) * 2017-07-25 2020-03-31 南京金斯瑞生物科技有限公司 DNA-based data storage and retrieval

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110431148A (en) * 2017-01-10 2019-11-08 罗斯威尔生命技术公司 Method and system for the storage of DNA data
CN110945595A (en) * 2017-07-25 2020-03-31 南京金斯瑞生物科技有限公司 DNA-based data storage and retrieval
US20190317684A1 (en) * 2018-04-11 2019-10-17 University-Industry Cooperation Group Of Kyung Hee University Dna digital data storage device and method, and decoding method of dna digital data
CN110706751A (en) * 2019-09-25 2020-01-17 东南大学 DNA storage encryption coding method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116187435B (en) * 2022-12-19 2024-01-05 武汉大学 Method and system for storing information by utilizing DNA (deoxyribonucleic acid) based on large and small fountain codes and MRC (MRC) algorithm

Similar Documents

Publication Publication Date Title
CN112527736B (en) DNA-based data storage method, data recovery method and terminal equipment
US10778246B2 (en) Managing compression and storage of genomic data
CN105009067B (en) Managing operations on units of stored data
US6925467B2 (en) Byte-level file differencing and updating algorithms
US20190385702A1 (en) Method and systems for the reconstruction of genomic reference sequences from compressed genomic sequence reads
JP6931050B2 (en) Methods and equipment for encoding and decoding binary data
CN107046812B (en) Data storage method and device
US20130073527A1 (en) Data storage dedeuplication systems and methods
WO2014137585A1 (en) Managing operations on stored data units
WO2021174836A1 (en) Differential package generation method and apparatus, computer device, and storage medium
WO2022120626A1 (en) Dna-based data storage method and apparatus, dna-based data recovery method and apparatus, and terminal device
WO2014137586A1 (en) Managing operations on stored data units
JP2020509474A (en) Methods and systems for reconstructing genomic reference sequences from compressed genomic sequence reads
US9471244B2 (en) Data sharing using difference-on-write
US8463759B2 (en) Method and system for compressing data
CN111104259A (en) Database recovery method and device and storage medium
US20230229633A1 (en) Adding content to compressed files using sequence alignment
US20220236886A1 (en) Securely archiving digital data in dna storage as blocks in a blockchain
US20220237470A1 (en) Storing digital data in dna storage using blockchain and destination-side deduplication using smart contracts
WO2023272499A1 (en) Encoding method, decoding method, apparatus, terminal device, and readable storage medium
WO2019119336A1 (en) Multi-thread compression and decompression methods in generic data gz format, and device
WO2023201782A1 (en) Information coding method and apparatus based on dna storage, and computer device and medium
WO2023206023A1 (en) Encoding method and encoding device for dna storage
WO2022088184A1 (en) Data storage method, electronic device and computer-readable storage medium
US20220415441A1 (en) Method for the Compression of Genome Sequence Data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20964570

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20964570

Country of ref document: EP

Kind code of ref document: A1