Archive storage method, archive reading method, and related device

By generating and verifying signature information in DNA storage technology, and combining archive information and signature information to generate a seal DNA sequence, the security of archive storage is ensured and the problem of archives being destroyed or tampered with during the storage process is solved.

WO2024179113A1PCT designated stage expired Publication Date: 2024-09-06SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/137211
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-01
Filing Date
2023-12-07
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In existing DNA storage technology, files are easily damaged or tampered with during the storage process, resulting in low security.

Method used

By converting the file to be archived into a file DNA sequence and archive information DNA sequence, signature information is generated and converted into a signature information DNA sequence, a seal DNA sequence is generated by combining the archive information and signature information, and DNA molecules are synthesized based on the seal DNA sequence and the file DNA sequence. And ensure data integrity through private key signature and signature verification.

Benefits of technology

Effectively prevent DNA molecules from being damaged or tampered with, and improve the security of archive storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023137211_06092024_PF_FP
    Figure CN2023137211_06092024_PF_FP
Patent Text Reader

Abstract

Disclosed in the present invention is an archive storage method, an archive reading method, and a related device. The archive storage method comprises: converting an acquired file to be archived into a file DNA sequence, and converting acquired archiving information of said file into an archiving information DNA sequence; combining the file DNA sequence and the archiving information DNA sequence to obtain information to be signed; generating a DNA sequence abstract of the information to be signed, signing the DNA sequence abstract according to a pre-generated private key, generating signature information, and converting the signature information into a signature information DNA sequence; then obtaining a seal DNA sequence of said file on the basis of the archiving information DNA sequence and the signature information DNA sequence; and finally, on the basis of the seal DNA sequence and the file DNA sequence, synthesizing a DNA molecule corresponding to said file to complete storage of said file. By means of the solution, DNA molecules can be effectively prevented from being corrupted or tampered with, thereby improving the security of archives during DNA storage.
Need to check novelty before this filing date? Find Prior Art

Description

File storage method, file reading method and related device Technical Field

[0001] The present invention relates to the field of information storage technology, and in particular to an archive storage method, a reading method and related devices. Background Art

[0002] With the rapid growth of global data, DNA storage technology has gradually entered the public eye. As a molecular-level storage method, DNA storage technology uses synthetic deoxyribonucleic acid (DNA) as a storage medium. It has the advantages of high efficiency, large storage capacity, long storage time, easy access, and no maintenance.

[0003] Archives are original records directly generated by people in various social activities, stored in a storage medium. Generally, archives require minimal access and do not require frequent reading. Currently, archives are primarily stored in electronic and paper formats, but the increasing number of archives inevitably requires more storage space and increases storage costs.

[0004] Therefore, the files can be converted into corresponding DNA molecules for storage. However, when the files are currently converted into corresponding DNA molecules for storage, the stored files may be damaged or tampered with, resulting in low security of file storage. Technical issues

[0005] The main purpose of the present invention is to provide a file storage method, file reading and related devices, aiming to solve the problem in the prior art that when files are stored using DNA storage technology, the files may be destroyed or tampered with, resulting in low file storage security. Technical Solutions

[0006] In order to achieve the above object, the present invention provides a file storage method, which comprises:

[0007] Converting the acquired file to be archived into a file DNA sequence, and converting the acquired archiving information of the file to be archived into an archiving information DNA sequence;

[0008] Combining the document DNA sequence and the archived information DNA sequence to obtain information to be signed;

[0009] Generate a DNA sequence summary of the information to be signed, and sign the DNA sequence summary according to a pre-generated private key to generate signature information and convert it into a signature information DNA sequence;

[0010] Obtaining the seal DNA sequence of the document to be archived based on the archiving information DNA sequence and the signature information DNA sequence;

[0011] Based on the seal DNA sequence and the document DNA sequence, a DNA molecule corresponding to the document to be archived is synthesized.

[0012] Optionally, obtaining the seal DNA sequence of the document to be archived based on the archiving information DNA sequence and the signature information DNA sequence specifically includes:

[0013] Obtaining a preset linker DNA sequence;

[0014] The archiving information DNA sequence, the signature information DNA sequence and the preset linker DNA sequence are combined in a preset order to obtain the seal DNA sequence of the document to be archived.

[0015] Optionally, the preset linker DNA sequence includes an upstream linker DNA sequence and a downstream linker DNA sequence.

[0016] Optionally, the archiving information includes at least one of the following: archive number, year, retention period, institution code, item number, and serial number.

[0017] Optionally, converting the acquired file to be archived into a file DNA sequence, and converting the acquired archiving information of the file to be archived into an archiving information DNA sequence, specifically includes:

[0018] Converting the to-be-archived file into a first quaternary sequence, and converting the archiving information into a second quaternary sequence;

[0019] According to a preset mapping relationship between quaternary characters and bases, the first quaternary sequence and the second quaternary sequence are respectively converted into codes to obtain the file DNA sequence of the file to be archived and the archiving information DNA sequence of the archiving information.

[0020] Optionally, the archived information DNA sequence has a preset DNA sequence length.

[0021] Optionally, synthesizing a DNA molecule corresponding to the document to be archived based on the seal DNA sequence and the document DNA sequence specifically includes:

[0022] The seal DNA sequence and the document DNA sequence are used as DNA sequences to be synthesized;

[0023] The DNA synthesizer is controlled to synthesize the DNA molecules corresponding to the file to be archived based on the DNA sequence to be synthesized, thereby completing the storage of the file to be archived.

[0024] Optionally, obtaining the seal DNA sequence of the document to be archived based on the archiving information DNA sequence and the signature information DNA sequence specifically includes:

[0025] Using the archived information DNA sequence and the signature information DNA sequence as DNA sequences to be detected;

[0026] Sequentially dividing the DNA sequence to be detected to obtain a plurality of groups to be detected; wherein each group to be detected includes a preset number of bases;

[0027] Testing each of the groups to be tested to determine the base content of guanine G and cytosine C in each of the groups to be tested;

[0028] According to the base contents of guanine G and cytosine C in the group to be detected, a base is selected from the first set of candidate bases or the second set of candidate bases as an adjustment base, and the base is added to the group to be detected to obtain an updated group to be detected;

[0029] The first candidate base set includes: adenine A and thymine T; the second candidate base set includes: guanine G and cytosine C;

[0030] Based on the updated group to be detected, obtaining an updated DNA sequence of the archive information and an updated DNA sequence of the signature information;

[0031] Based on the updated archiving information DNA sequence and the updated signature information DNA sequence, the seal DNA sequence of the document to be archived is obtained.

[0032] Optionally, selecting a base from the first candidate base set or the second candidate base set as an adjustment base based on the base content of guanine G and cytosine C in the group to be detected, and adding it to the group to be detected to obtain the updated group to be detected, specifically includes:

[0033] If the base contents of guanine G and cytosine C in the to-be-detected group are greater than a preset content threshold, selecting a base from the first set of candidate bases as an adjustment base and adding it to the to-be-detected group to obtain an updated to-be-detected group;

[0034] If the base contents of guanine G and cytosine C in the group to be detected are less than a preset content threshold, a base is selected from the second set of candidate bases and added to the group to be detected as an adjustment base to obtain an updated group to be detected.

[0035] Optionally, if the base content of guanine G and cytosine C in the to-be-detected group is greater than a preset content threshold, selecting a base from the first candidate base set as an adjustment base and adding it to the to-be-detected group specifically includes:

[0036] If the last base in the to-be-detected group exists in the first set of candidate bases, selecting another base from the first set of candidate bases that is different from the last base in the to-be-detected group as the adjustment base;

[0037] If the last base in the group to be detected does not exist in the first set of candidate bases, determining whether the group to be detected is the last group to be detected;

[0038] If the group to be tested is the last group to be tested, arbitrarily selecting a base from the first set of candidate bases as the adjustment base;

[0039] If the group to be detected is not the last group to be detected, determine the first base of the next group to be detected adjacent to the group to be detected, and select another base different from the first base of the next group to be detected from the first set of candidate bases as the adjustment base.

[0040] In order to achieve the above object, the present invention further provides a file reading method, the method comprising:

[0041] Sequencing the DNA molecule to be read in the archive to obtain the DNA sequence to be read of the DNA molecule to be read;

[0042] Wherein, the DNA molecule to be read with the archive stored therein is obtained according to any of the archive storage methods described above;

[0043] Obtaining a file DNA sequence in the DNA sequence of the DNA molecule to be read;

[0044] The DNA sequence of the file is decoded to obtain the file to be read.

[0045] Optionally, in a case where the DNA sequence of the DNA molecule to be read includes a preset linker DNA sequence, obtaining the file DNA sequence in the DNA sequence of the DNA molecule to be read specifically includes:

[0046] According to the preset linker DNA sequence, the document DNA sequence and the seal DNA sequence in the DNA sequence of the DNA molecule to be read are determined by PCR technology;

[0047] Decode the DNA sequence of the file to obtain the corresponding file to be read.

[0048] Optionally, after determining the document DNA sequence and the seal DNA sequence in the DNA sequence of the DNA molecule to be read by PCR technology according to the preset linker DNA sequence, the method further includes:

[0049] Extracting the signature information DNA sequence from the seal DNA sequence according to the preset linker DNA sequence, the archived information DNA sequence, and a preset order;

[0050] Decoding the signature information DNA sequence and converting it into corresponding signature information;

[0051] Verify the signature information according to the preset public key to obtain a verification result;

[0052] The signature verification result is used to indicate whether the DNA sequence to be read has been tampered with.

[0053] In order to achieve the above objectives, the present invention also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the archive storage method described in any one of the above items, or the steps in the archive reading method described in any one of the above items.

[0054] In order to achieve the above-mentioned objectives, the present invention further provides a terminal, comprising: a processor and a memory; the memory stores a computer-readable program executable by the processor; when the processor executes the computer-readable program, the terminal implements the steps of the archive storage method described in any one of the above items, or the steps of the archive reading method described in any one of the above items. Beneficial effects

[0055] The present invention converts the acquired file to be archived into a file DNA sequence, and converts the acquired archiving information of the file to be archived into an archiving information DNA sequence, then combines the file DNA sequence and the archiving information DNA sequence to obtain the information to be signed, and then generates a DNA sequence summary of the information to be signed, and signs the DNA sequence summary according to a pre-generated private key to generate signature information and convert it into a signature information DNA sequence; then, based on the archiving information DNA sequence and the signature information DNA sequence, a seal DNA sequence of the file to be archived is obtained; finally, based on the seal DNA sequence and the file DNA sequence, a DNA molecule corresponding to the file to be archived is synthesized to complete the storage of the file to be archived. When the file to be archived is stored using DNA storage technology, the seal DNA sequence generated based on the archiving information DNA sequence can be used to verify the signature of the DNA molecule corresponding to the file to be archived, thereby effectively preventing the DNA molecule from being destroyed or tampered with, and improving the security of the archive when it is stored in DNA. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] FIG1 is a flow chart of a file storage method provided by an embodiment of the present invention;

[0057] FIG2 is a schematic diagram of the structure of a stamp DNA sequence provided by an embodiment of the present invention;

[0058] FIG3 is a flow chart of step S106 provided in an embodiment of the present invention;

[0059] FIG4 is another flow chart of the file storage method provided by an embodiment of the present invention;

[0060] FIG5 is a flow chart of a file storage method provided by an embodiment of the present invention;

[0061] FIG6 is an example diagram of a file storage method provided by an embodiment of the present invention;

[0062] FIG7 is an example diagram of archiving information provided by an embodiment of the present invention;

[0063] FIG8 is a flowchart of a file reading method provided by an embodiment of the present invention;

[0064] FIG9 is a schematic structural diagram of a terminal provided by an embodiment of the present invention. Modes for Carrying Out the Invention

[0065] In order to make the purpose, technical solutions and advantages of the present invention more clear and distinct, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0066] The present invention provides a file storage method, as shown in FIG1 , which may include at least the following steps:

[0067] S101: Obtain a file to be archived and its archiving information.

[0068] The archiving information of the files to be archived includes at least one of the following: archive number, year, retention period, organization code, file number and serial number.

[0069] The archive number is the number assigned by the archives to the filing unit. The year is the year the archive document was created. The retention period is the length of time the archive is kept, for example: permanent, 10-year period, 30-year period, etc. The institution code is the identifier of the institution that keeps the archive. The file number is the sequential number of each archive within the lowest level of the classification scheme. The sequence number is the number of DNA sequences in a single archive after conversion, which can be determined based on the size of the archived document.

[0070] The above-mentioned archive number, year, storage period, organization code, item number and serial number can be represented by numbers, letters, or a combination of numbers and letters. In addition, they can also be represented in the form of special characters, Chinese characters, etc., which are not specifically limited in the embodiments of this application.

[0071] In an embodiment of the present invention, corresponding compilation rules can be set for the archive number, year, retention period, organization code, document number, and serial number in the archive information to obtain a fixed-length character string. For example, the year is represented by a four-digit number, such as 2013; the organization code is represented by a three-digit Chinese phonetic letter or Arabic numeral identifier, such as TSG.

[0072] It is understandable that the above-mentioned files to be archived and their archiving information can be entered through an input device (such as a keyboard, a scanner, etc.) and stored in a terminal device (such as a computer, etc.).

[0073] S102: Convert the file to be archived into a file DNA sequence, and convert the archiving information of the file to be archived into an archiving information DNA sequence.

[0074] The archived information DNA sequence has a preset DNA sequence length. Since each data in the archived information can be represented by a string of different fixed lengths, the corresponding DNA sequence obtained after the archived information is converted, i.e., the archived information DNA sequence, also has a DNA sequence of the corresponding length.

[0075] Specifically, the file to be archived can be converted into a first quaternary sequence, and the archived information can be converted into a second quaternary sequence; then, according to the preset mapping relationship between quaternary characters and bases, the first quaternary sequence and the second quaternary sequence are respectively encoded and converted to obtain the file DNA sequence of the file to be archived and the archived information DNA sequence of the archived information.

[0076] The DNA sequences mentioned in the embodiments of the present invention (e.g., file DNA sequences, and archived information DNA sequences) are all DNA sequences composed of four deoxyribonucleotides: adenine A, thymine T, cytosine C, and guanine G, and will not be described in detail later.

[0077] In an embodiment of the present invention, since the files to be archived and their archiving information are converted into corresponding quaternary sequences, and through a preset mapping relationship between quaternary characters and bases (for example, A=0, T=1, C=2, G=3), the obtained quaternary sequences can be encoded into corresponding DNA sequences, thereby reducing the encoding complexity, improving the encoding efficiency, and thereby improving the efficiency of data storage.

[0078] In addition, since the files to be archived and their archive information may be represented by different characters, such as text, numbers, letters, special symbols, etc., different encoding methods may be used to convert the files to be archived and their archive information into quaternary representation for different characters in different files to be archived and their archive information, thereby obtaining corresponding quaternary sequences.

[0079] If the data in the archived information exists in pure digital form (such as year, item number, serial number, etc.), it can be treated as a decimal number. The decimal number can be converted into a quaternary number first, and then through a preset mapping relationship (for example: A=0, T=1, C=2, G=3), the converted quaternary number is mapped to four bases to obtain the DNA sequence of the data.

[0080] For example, the year is represented by a 4-digit decimal number, which is converted into a 7-digit quaternary number. According to the corresponding preset rules, each quaternary number can be set to correspond to a different deoxyribonucleotide, and then the 7-digit quaternary number can be converted into a DNA sequence consisting of 7 bases.

[0081] For another example, if the item number is represented by a 4-digit decimal number, you can refer to the above example of the year to first convert the 4-digit decimal number into a 7-digit quaternary number, and then convert the 7-digit quaternary number into a DNA sequence consisting of 7 bases.

[0082] If the data in the archived information exists in a mixed form of letters and numbers (for example, archive number, institution code, etc.), since there are 62 characters (including uppercase and lowercase letters and numbers), the corresponding characters in the data can be treated as sexagenary digits, then converted to quaternary numbers. Then, using a preset mapping relationship (for example: A=0, T=1, C=2, G=3), these are mapped to the corresponding bases to complete the DNA encoding of the data. For example, if a 4-digit mixture of letters and numbers exists, it can be treated as a 4-digit sexagenary digit. After converting it to quaternary numbers, the range is 0-320113200033, with a maximum length of 12 bits. Therefore, the code length can be set to 12 bases, and if the number is less than 12 digits, it is padded with zeros on the left.

[0083] Alternatively, when the data in the archived information exists in the form of a mixture of letters and numbers, or in the form of a mixture of numbers, letters and special characters, each character in the data can be used as an ASCII code, the ASCII code can be converted into a quaternary number, and the corresponding quaternary number can be mapped to the corresponding base through a preset mapping relationship to complete the DNA encoding of the data.

[0084] For example, if the archive number is represented by a string of 4 digits and letters, the characters of the archive number can be converted into 4-digit sixty-binary digits and then into 12-digit 4-base digits, and then transcoded according to preset rules to convert the 4-base digits into a DNA sequence represented by four deoxyribonucleotides: adenine A, thymine T, cytosine C and guanine G, and the DNA sequence consists of 12 bases.

[0085] For example, the institution code is represented by a string of 3 digits and letters. You can refer to the example of the above-mentioned archive number to convert the characters in the institution code into 3 sixty-binary digits, then into 9 quaternary digits, and finally into a DNA sequence consisting of 9 bases.

[0086] For example, the storage period is divided into permanent, periodic 30 years, and periodic 10 years, which can be represented by the three deoxyribonucleotides A, T, and G respectively.

[0087] It can be understood that the above-mentioned archival information DNA sequence is composed of the DNA sequences of the various data of the above-mentioned archival information arranged in a corresponding preset order.

[0088] Similarly, numbers, letters, and special characters in the file to be archived can also be converted into quaternary characters in the same way as the above-mentioned archiving information.

[0089] In actual application scenarios, the files to be archived may mostly consist of text, which can be encoded using UTF-8 encoding and saved as txt text. Each byte in the txt text is then converted into a quaternary number, which is then converted into the corresponding DNA sequence using preset mapping rules.

[0090] S103, combining the file DNA sequence and the archive information DNA sequence to obtain the information to be signed.

[0091] The file DNA sequence and the archive information DNA sequence may be combined in the order of the file DNA sequence first and the archive information DNA sequence last to obtain the information to be signed.

[0092] It is understandable that the above order of combining the file DNA sequence and the archiving information DNA sequence is only exemplary, and the two can be arranged in other orders.

[0093] S104: Generate a DNA sequence summary of the information to be signed.

[0094] The information to be signed is calculated using a preset summary algorithm, such as a hash algorithm, to obtain a DNA sequence summary of the information to be signed.

[0095] S105 , signing the DNA sequence summary according to a preset private key, generating signature information and converting the signature information into a signature information DNA sequence.

[0096] In an embodiment of the present invention, a key pair can be generated using an asymmetric encryption algorithm (such as the RSA encryption algorithm, the Rabin algorithm, the DSS algorithm, etc.), including a private key (i.e., the above-mentioned preset private key) and a public key (i.e., the above-mentioned preset public key). The DNA sequence summary is encrypted using the preset private key to obtain signature information.

[0097] Furthermore, the signature information can be first converted into quaternary characters, and then converted into a corresponding DNA sequence through a mapping relationship to obtain the signature information DNA sequence.

[0098] S106, obtaining the seal DNA sequence of the file to be archived based on the archiving information DNA sequence and the signature information DNA sequence.

[0099] In this embodiment, the seal DNA sequence of the document to be archived can be obtained by combining the archiving information DNA sequence first and the signature information DNA sequence second.

[0100] Furthermore, a preset linker DNA sequence may be obtained first, and then the archiving information DNA sequence, the signature information DNA sequence and the preset linker DNA sequence may be combined in a preset order to obtain the seal DNA sequence of the document to be archived.

[0101] The preset adapter DNA sequence can refer to a preset fixed DNA sequence used to distinguish it from other DNA sequences. Therefore, in this solution, the seal DNA sequence can be distinguished from the file DNA sequence of the document to be archived by the preset adapter DNA sequence, so as to ensure that the information to be read can be accurately located during reading.

[0102] Furthermore, the above-mentioned preset linker DNA sequence may include an upper linker DNA sequence and a lower linker DNA sequence.

[0103] As shown in Figure 2, the upper linker DNA sequence, the archiving information DNA sequence (including the DNA sequence corresponding to the archive number, year, storage period, institution code, item number and serial number), the signature information DNA sequence and the lower linker DNA sequence can be combined to obtain the seal DNA sequence.

[0104] The preset linker DNA sequence includes an upper linker DNA sequence and a lower linker DNA sequence. Compared with a single linker, it can further improve the accuracy of positioning when reading information and quickly locate the DNA sequence to be read.

[0105] In actual applications, excessive guanine G and cytosine C content in a DNA sequence, as well as excessively long single-base repeats, can affect DNA synthesis and sequencing. Therefore, in the case of a linker DNA sequence, base balancing is performed on the archive information DNA sequence and the signature information DNA sequence excluding the linker DNA sequence. Specifically, as shown in FIG3 , the above step S106 may further include at least the following steps:

[0106] S301: Use the archived information DNA sequence and the signature information DNA sequence as DNA sequences to be detected.

[0107] Specifically, the archive information DNA sequence is used as the DNA sequence to be detected, and the signature information DNA sequence is also used as the DNA sequence to be detected, so as to obtain two DNA sequences to be detected.

[0108] S302, dividing the DNA sequence to be detected in sequence to obtain a number of groups to be detected.

[0109] Each to-be-detected group includes a preset number of bases, which can be adaptively adjusted according to actual conditions.

[0110] For example, two DNA sequences to be detected are divided into groups of 5 bases to obtain multiple groups to be detected.

[0111] S303 , testing each to-be-tested group to determine the base content of guanine G and cytosine C in each to-be-tested group.

[0112] The base content of guanine G and cytosine C in the group to be tested refers to the sum of the number of guanine G and cytosine C in the group to be tested divided by the total number of bases in the group to be tested.

[0113] For example, if the sequence to be detected 1 is ATCGC, the base content of guanine G and cytosine C in the sequence to be detected is 3 / 5.

[0114] S304 , selecting a base from the first candidate base set or the second candidate base set as an adjustment base according to the base contents of guanine G and cytosine C in the group to be detected, and adding it to the group to be detected to obtain an updated group to be detected.

[0115] The first candidate base set includes: adenine A and thymine T; the second candidate base set includes: guanine G and cytosine C.

[0116] Specifically, if the base content of guanine G and cytosine C in the to-be-detected group is greater than a preset content threshold, a base is selected from the first candidate base set as an adjustment base and added to the to-be-detected group to obtain an updated to-be-detected group.

[0117] If the base contents of guanine G and cytosine C in the to-be-detected group are less than or equal to the preset content threshold, a base is selected from the second candidate base set as an adjustment base and added to the to-be-detected group to obtain an updated to-be-detected group.

[0118] The above-mentioned preset content threshold can be set and adjusted according to actual conditions. For example, the preset content threshold is 50%.

[0119] For example, if the nucleotide sequence of group 1 to be tested is ACGCT and its preset content threshold is 50%, then group 1 needs to select a base from the first candidate base set as an adjustment base. If the nucleotide sequence of group 2 to be tested is ACGTA and its preset content threshold is 50%, then group 1 needs to select a base from the second candidate base set as an adjustment base.

[0120] In the embodiment of the present invention, the adjusted base is used as the last base of the group to be detected, thereby obtaining an updated group to be detected. For example, if group to be detected 1 is ACGCT and its adjusted base is A, then the updated group to be detected is ACGCTA.

[0121] Furthermore, as shown in FIG4 , if the base contents of guanine G and cytosine C in the to-be-detected group are greater than a preset content threshold, a base is selected from the first candidate base set as an adjustment base and added to the to-be-detected group. This can be achieved by at least the following steps:

[0122] S401, determining whether the last base in the to-be-detected group exists in the first candidate base set.

[0123] Here, whether the last base exists in the first candidate base set refers to whether the last base is the same as the base in the combination with the first candidate base. If they are the same, it exists in the first candidate base set; otherwise, it does not exist in the first candidate base set.

[0124] For example, if the last base of the detection group 1 is guanine G, it does not exist in the first candidate base set; if the last base of the detection group 2 is adenine A, it exists in the first selection base set.

[0125] S402: If the last base in the to-be-detected group exists in the first candidate base set, select another base different from the last base in the to-be-detected group from the first candidate base set as an adjustment base.

[0126] For example, if the last base of the detection group 2 is adenine A, which exists in the first band selection base set, thymine T is selected as the adjustment base.

[0127] S403: If the last base in the group to be detected does not exist in the first set of candidate bases, determine whether the group to be detected is the last group to be detected.

[0128] The last group to be detected mentioned here refers to the last group of archive information DNA sequences and the last group of signature information DNA sequences.

[0129] S404: If the group to be detected is the last group to be detected, randomly select a base from the first set of candidate bases as an adjustment base.

[0130] S405: If the group to be detected is not the last group to be detected, determine the first base of the next group to be detected adjacent to the group to be detected, and select another base different from the first base of the next group to be detected from the first candidate base set as an adjustment base.

[0131] For example, if the group to be detected is 1: ATCTC, and the next group to be detected adjacent to the group to be detected is 2: TCGAC, then adenine A is selected as the adjustment base.

[0132] Furthermore, as shown in FIG5 , if the base contents of guanine G and cytosine C in the to-be-detected group are less than or equal to a preset content threshold, a base is selected from the second set of candidate bases as an adjustment base and added to the to-be-detected group. This can be achieved by at least the following steps:

[0133] S501, determining whether the last base in the to-be-detected group exists in the second candidate base set.

[0134] S502: If the last base in the to-be-detected group exists in the second to-be-selected base set, select another base different from the last base in the to-be-detected group from the second to-be-selected base set as an adjustment base.

[0135] S503: If the last base in the to-be-detected group does not exist in the second set of candidate bases, determine whether the to-be-detected group is the last to-be-detected group.

[0136] S504: If the group to be detected is the last group to be detected, randomly select a base from the second set of candidate bases as an adjustment base.

[0137] S505: If the group to be detected is not the last group to be detected, determine the second base of the next group to be detected adjacent to the group to be detected, and select another base different from the second base of the next group to be detected from the second set of candidate bases as the adjustment base.

[0138] S305 , based on the updated to-be-detected group, obtain an updated archiving information DNA sequence and an updated signature information DNA sequence.

[0139] S306: Obtain the seal DNA sequence of the file to be archived based on the updated archiving information DNA sequence and the updated signature information DNA sequence.

[0140] It can be understood that the seal DNA sequence of the document to be archived is obtained based on the updated archiving information DNA sequence and the updated signature information DNA sequence. Please refer to the above embodiment and no further details will be given.

[0141] In an embodiment of the present invention, by adding adjustment bases, the archiving information DNA sequence and the signature information DNA sequence can be base balanced to avoid excessive local guanine G and cytosine C content and single base duplication, which affects DNA synthesis and sequencing, thereby improving the accuracy of storage of the archived files.

[0142] S107, synthesizing a DNA molecule corresponding to the document to be archived based on the seal DNA sequence and the document DNA sequence.

[0143] Specifically, the seal DNA sequence and the document DNA sequence can be used as the DNA sequences to be synthesized; then the DNA synthesizer is controlled to synthesize the DNA molecules corresponding to the files to be archived based on the DNA sequences to be synthesized, thereby completing the storage of the archives.

[0144] In some embodiments of the present application, when the file to be archived has a sequence number, the file DNA sequence of the file to be archived can be divided according to the sequence number to obtain a number of file DNA sequences corresponding to the sequence number, and then these file DNA sequences and the seal DNA Xu Lei are used as the DNA sequence to be synthesized. After obtaining the DNA sequence to be synthesized, a control instruction can be generated to control the DNA synthesizer to synthesize the DNA molecule corresponding to the file to be archived based on the DNA sequence to be synthesized, thereby completing the storage of the file to be archived.

[0145] As shown in FIG6 , the file storage method proposed by the present invention is described below with an example:

[0146] (1) Obtain a key pair (including a public key and a private key) for signing. The key length is set to 1024.

[0147] Generate a private key as follows:

[0148] -----BEGIN RSA PRIVATE KEY-----

[0149] MIICXAIBAAKBgQCf04943LZTODlJtWCqcIZ+jNRjgqD9f5BpmUtIJ1CktlO9LikmAZB4kSnsss8F7T6yKycspVUgvSyvBTAk04KTwFzzsQo38YxOgF6azyPy9PbSTGJWXv3Fr3T4RoiHV6+RmgyZf0Bg1SuYulnFx4 / s2cO3Xhj6myX9S1 / yjWCFXQIDAQABAoGAHhjzhDGgHhTQ6PoAjagqE6vGlUS0t3gtxE0LWbeZnqL9KvuF4TPbNnEzwXC8vqN6Mogg1O3 / lW46e20RL2YrSQZz72WT+yNQAyJxWv3MiomUL65K2wa3eH2HOS / 7fau28 / rHFF2m3SVSWJ2G8XsxNSanOwKsWxorvEjV0 / GrR6sCQQDFRDtC7WQC6UQuG2w6SOr0UCFYp+oNlN / HbD44ImCEEsfRlp4su0jSPXenyt5C484PlJGW7GgjfaNTH / lyQ / azAkEAz2mfD6bDtH2234MiUbMKx5UbKsoxCxdKbVKEpafyAregKvKPs+dTmjA / tmqf6RiEJKBOx1J0HASwn0qGhYIbrwJAedtgUEOc2D+IooLGJGsO2MT3FHEFoEYqxmITPVHfFTcUwF+ubitzHIxj8f7bta5LiExac0SuP95ImfzSdseNCQJAOXhLoXuUuHso46+jH74bW4e+GlIh2q / eaII3zOrHDOeyUpQZK0EKkiuSS8opet3XJ4rfqSz4jRbjlY+BzJZrcwJBALxUUPXlRRAYGKy0cuHe0IhnYXpk5iGHn / PH / w+91GayuIHxsBeYYB4GiHXW4HgyWB0ggXExlkKj2hspyv / elgQ=

[0150] -----END RSA PRIVATE KEY-----

[0151] The public key is generated as follows:

[0152] -----BEGIN PUBLIC KEY-----

[0153] MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCf04943LZTODlJtWCqcIZ+jNRjgqD9f5BpmUtIJ1CktlO9LikmAZB4kSnsss8F7T6yKycs pVUgvSyvBTAk04KTwFzzsQo38YxOgF6azyPy9PbSTGJWXv3Fr3T4RoiHV6+RmgyZf0Bg1SuYulnFx4 / s2cO3Xhj6myX9S1 / yjWCFXQIDAQAB

[0154] -----END PUBLIC KEY-----

[0155] (2) Obtain the file DNA sequence of the file to be archived.

[0156] Contents of files to be archived:

[0157] Spring River Flower Moonlight Night

[0158] Zhang Ruoxu (Tang Dynasty)

[0159] The spring river tide reaches the sea level, and the bright moon on the sea rises with the tide.

[0160] The moon is shining on the spring river for thousands of miles; there is no moonless spring river!

[0161] The river meanders around the fragrant meadows, and the moonlight shining on the flower forest looks like snow.

[0162] The frost in the air flies without being noticed, and the white sand on the beach cannot be seen.

[0163] The river and the sky are one color without a speck of dust, and a single bright moon hangs in the sky.

[0164] Who first saw the moon by the river? When did the moon by the river first shine on people?

[0165] Life goes on forever, but the moon on the river remains the same every year.

[0166] I don’t know who the moon on the river is waiting for, but I see the Yangtze River sending away the flowing water.

[0167] A white cloud drifts away slowly, and I am filled with sorrow standing on the green maple shore.

[0168] Whose boat is this tonight? Where is the moonlit tower where I long for you?

[0169] The moon is wandering poorly on the building, it should be shining on the mirror of the parting person.

[0170] It cannot be rolled up from the jade curtain, and it keeps brushing against the laundry beater.

[0171] At this moment, we can see each other but cannot hear each other. I wish the moonlight could shine on you.

[0172] The wild geese fly high in the sky without being seen, and the fish and dragons leap in the water, forming words.

[0173] Last night I dreamed of falling flowers in the quiet pond. It’s a pity that I haven’t returned home yet in the middle of spring.

[0174] The river flows and spring is about to end, the moon falls into the river and sets in the west.

[0175] The setting moon is hidden in the sea fog, and there are endless roads from Jieshi to Xiaoxiang.

[0176] I don’t know how many people return home with the moon, the falling moon shakes the emotions of the trees on the river.

[0177] The above-mentioned file to be archived is saved as a txt file using UIF-8 encoding. The file is read in binary format, and the decimal number represented by each byte is converted to a quaternary number. Then, using the mapping rule "A=0, T=1, C=2, G=3", it is converted into a file DNA sequence. The file DNA sequence is as follows:

[0178]

[0179] (3) Convert the archiving information of the file to be archived into the archiving information DNA sequence

[0180] The archiving information of the file to be archived is shown in FIG7 , and the corresponding archiving information DNA sequence is shown below:

[0181] TGGGTTTCGGTTATGGCTCAACCTACCAATGTGTTAAAAAAAT

[0182] (4) Generate signature information DNA sequence

[0183] First, the file DNA sequence and the archived information DNA sequence are combined to obtain the information to be signed. Then, the DNA sequence digest is generated using the MD5 algorithm. Then, the DNA sequence is signed using the private key in (1) above using the RSA algorithm to obtain the signature information. Subsequently, the decimal number represented by each byte in the signature information is converted to a quaternary number, and then converted to a DNA sequence using the preset mapping rule "A=0, T=1, C=2, G=3". The signature information DNA sequence is as follows:

[0184] TCATACGCTTCTTAGTGACGTGTCGCCGGGGTCTTGGTGCACTCACATTGACGCCAAGTTATGGAATGTGTAACCGATCGTAATACATGATATGGCGTCGCCTTGGCATGGCAAAAAGTGTTGACACT TTGATGATTATAACCACGGCGCCACCGTTTTTCGCAAGACCAGAGCACCATGCCCTGGGATTTACCGCTATTGTGTATAGGATGGAAGAACGAAAGAAAACACAGTAACAACCCCTAAGTGTGTCACA GAGCGCGGTCGCTACCTGGCAACGCAGGTTTCGCCCGTGGACATACTTGTTTCGTGGGCGCTAGGATTACCCTGGAATTCTTAGGCAGATTCATTATTATTGAGGGGCGAAACCCTGAAATGAATTTC AGGCCGTGATTAATGTTTACATGGACACAAATTCCACGGCCACGATCGTTTTCATACTTTGTATGATCGAACCTGAACGGTCCTCTACGGTTCCATCTGTCGCTGAACGCTTCAGCTTCCCGTCACCC

[0185] (5) Generate the stamp DNA sequence

[0186] The preset linker DNA sequence, the archiving information DNA sequence and the signature information DNA sequence are combined in the order of 2 above to obtain the corresponding seal DNA sequence.

[0187] (6) Based on the seal DNA sequence and the file DNA sequence, synthesize the DNA molecule corresponding to the file to be archived to complete the storage of the file to be archived.

[0188] The archival storage method provided by the present invention converts a to-be-archived file into a file DNA sequence, converts the archival information of the to-be-archived file into an archival information DNA sequence, then combines the file DNA sequence and the archival information DNA sequence to obtain information to be signed, generates a DNA sequence digest of the information to be signed, and signs the DNA sequence digest according to a pre-generated private key, generates signature information and converts it into a signature information DNA sequence, then obtains a seal DNA sequence of the to-be-archived file based on the archival information DNA sequence and the signature information DNA sequence, and synthesizes a DNA molecule corresponding to the to-be-archived file based on the seal DNA sequence and the file DNA sequence. Through the above scheme, when the to-be-archived file is converted into the corresponding DNA molecule for storage, it can be determined whether the synthesized DNA molecule has been damaged or tampered with based on the seal DNA sequence, thereby improving the security of archival storage and promoting the development of archival storage.

[0189] The present invention also provides a file reading method, as shown in FIG8 , the file reading method may include at least the following steps:

[0190] S801, sequencing the DNA molecule to be read that is stored in the archive to obtain the DNA sequence to be read of the DNA molecule to be read.

[0191] The DNA molecules to be read that store archives are obtained according to the archive storage method provided in the above embodiment.

[0192] S802: Obtain a file DNA sequence in the DNA sequence to be read.

[0193] S803: Decode the file DNA sequence to obtain the file to be read.

[0194] Specifically, when the DNA sequence to be read includes a preset linker DNA sequence, step S803 can be implemented in at least the following ways:

[0195] According to the preset adapter sequence, the seal DNA sequence and the file DNA sequence in the DNA sequence to be read are determined by PCR technology;

[0196] Then decode the file DNA sequence to obtain the corresponding file to be read.

[0197] It should be noted that the process of decoding the DNA sequence of the above-mentioned file is the reverse process of converting the archived file into a DNA sequence, which is not specifically limited in the embodiments of the present application.

[0198] Furthermore, the signature information DNA sequence in the seal DNA sequence can be extracted according to the preset linker DNA sequence, the archive information DNA sequence and the preset order; the signature DNA sequence is then decoded and converted into the corresponding signature information; and the signature information is then verified using the preset public key to obtain the verification result.

[0199] The signature verification result is used to indicate whether the DNA sequence to be read has been tampered with.

[0200] From the above embodiment, it can be seen that the seal DNA sequence is obtained by arranging and combining the preset linker DNA sequence, the archive information DNA sequence and the signature information DNA sequence in a certain order, and the preset linker DNA sequence is fixed, and the archive information DNA sequence has a fixed string length, so that the signature information DNA sequence in the seal DNA sequence can be well extracted, thereby realizing signature verification.

[0201] The file reading method provided by the present invention can verify the signature through the seal DNA sequence, thereby determining whether the DNA molecule to be read has been damaged or tampered with, thereby ensuring the security of file reading.

[0202] Based on the above-mentioned archive storage method and archive reading method, the present invention also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the archive storage method described in the above embodiment or the steps in the archive reading method described in the above embodiment.

[0203] Based on the above-described file storage method and file reading method, the present invention further provides a terminal, as shown in FIG9 , which includes at least one processor 50; a display screen 51; and a memory 51. It may also include a communications interface 53 and a bus 54. The processor 50, display screen 51, memory 51, and communications interface 53 can communicate with each other via bus 54. The display screen 51 is configured to display a preset user guidance interface in the initial setup mode. The communications interface 53 can transmit information. The processor 50 can invoke logic instructions in the memory 51 to execute the steps of the file storage method described in the above-described embodiments, or the file reading method described in the above-described embodiments.

[0204] In addition, the logic instructions in the memory 51 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0205] The memory 51, as a computer-readable storage medium, can be configured to store software programs or computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 50 executes the software programs, instructions, or modules stored in the memory 51 to perform functional applications and data processing, thereby implementing the methods in the above embodiments.

[0206] The memory 51 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the terminal. In addition, the memory 51 may include high-speed random access memory and non-volatile memory. For example, various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, may also be temporary storage media.

[0207] The various embodiments in this application are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device and medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant portions, refer to the descriptions of the method embodiments.

[0208] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects to their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0209] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0210] Of course, those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware (such as a processor, controller, etc.) through a computer program. The program can be stored in a computer-readable storage medium that can be read by a computer. When executed, the program can include the processes in the above-described method embodiments. The computer-readable storage medium can be a memory, a magnetic disk, an optical disk, etc.

[0211] It should be understood that the application of the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A file storage method, characterized in that: The method comprises: Converting the acquired file to be archived into a file DNA sequence, and converting the acquired archiving information of the file to be archived into an archiving information DNA sequence; Combining the file DNA sequence with the archived information DNA sequence to obtain the information to be signed; Generate a DNA sequence summary of the information to be signed, and sign the DNA sequence summary according to a pre-generated private key to generate signature information and convert it into a signature information DNA sequence; Based on the archiving information DNA sequence and the signature information DNA sequence, obtaining the seal DNA sequence of the document to be archived; Based on the seal DNA sequence and the document DNA sequence, a DNA molecule corresponding to the document to be archived is synthesized.

2. The archive storage method according to claim 1, characterized in that: The step of obtaining the seal DNA sequence of the document to be archived based on the archive information DNA sequence and the signature information DNA sequence specifically includes: Obtaining a preset adapter DNA sequence; The archiving information DNA sequence, the signature information DNA sequence and the preset linker DNA sequence are combined in a preset order to obtain the seal DNA sequence of the document to be archived.

3. The file storage method according to claim 2, characterized in that: The preset linker DNA sequence includes an upstream linker DNA sequence and a downstream linker DNA sequence.

4. The archive storage method according to claim 1, characterized in that: Converting the acquired file to be archived into a file DNA sequence, and converting the acquired archiving information of the file to be archived into an archiving information DNA sequence, specifically includes: Converting the to-be-archived file into a first quaternary sequence, and converting the archiving information into a second quaternary sequence; According to a preset mapping relationship between quaternary characters and bases, the first quaternary sequence and the second quaternary sequence are respectively converted into codes to obtain the file DNA sequence of the file to be archived and the archive information DNA sequence of the archive information.

5. The archive storage method according to claim 1, characterized in that: The step of obtaining the seal DNA sequence of the document to be archived based on the archive information DNA sequence and the signature information DNA sequence specifically includes: Using the archive information DNA sequence and the signature information DNA sequence as DNA sequences to be detected; Sequentially dividing the DNA sequence to be detected to obtain a plurality of groups to be detected; wherein each group to be detected includes a preset number of bases; Testing each of the groups to be tested to determine the base content of guanine G and cytosine C in each of the groups to be tested; According to the base contents of guanine G and cytosine C in the group to be detected, a base is selected from the first set of bases to be selected or the second set of bases to be selected as an adjustment base, and is added to the group to be detected to obtain an updated group to be detected; The first candidate base set includes: adenine A and thymine T; the second candidate base set includes: guanine G and cytosine C; Based on the updated group to be detected, obtaining an updated DNA sequence of the archive information and an updated DNA sequence of the signature information; Based on the updated archiving information DNA sequence and the updated signature information DNA sequence, the seal DNA sequence of the document to be archived is obtained.

6. The archive storage method according to claim 5, characterized in that: The step of selecting a base from the first candidate base set or the second candidate base set as an adjustment base according to the base contents of guanine G and cytosine C in the group to be detected, and adding the base to the group to be detected to obtain the updated group to be detected specifically includes: If the base contents of guanine G and cytosine C in the to-be-detected group are greater than a preset content threshold, a base is selected from the first candidate base set as an adjustment base and added to the to-be-detected group to obtain an updated to-be-detected group; If the base contents of guanine G and cytosine C in the group to be detected are less than a preset content threshold, a base is selected from the second set of candidate bases and added to the group to be detected as an adjustment base to obtain an updated group to be detected.

7. The file storage method according to claim 6, characterized in that: If the base contents of guanine G and cytosine C in the to-be-detected group are greater than a preset content threshold, a base is selected from the first candidate base set as an adjustment base and added to the to-be-detected group, specifically including: If the last base in the to-be-detected group exists in the first candidate base set, selecting another base different from the last base in the to-be-detected group from the first candidate base set as the adjustment base; If the last base in the group to be detected does not exist in the first set of candidate bases, determining whether the group to be detected is the last group to be detected; If the group to be detected is the last group to be detected, arbitrarily selecting a base from the first set of candidate bases as the adjustment base; If the group to be detected is not the last group to be detected, determine the first base of the next group to be detected adjacent to the group to be detected, and select another base different from the first base of the next group to be detected from the first set of candidate bases as an adjustment base.

8. A file reading method, characterized in that: The method comprises: Sequencing the DNA molecule to be read in which the archive is stored to obtain the DNA sequence to be read of the DNA molecule to be read; Wherein, the DNA molecule to be read which stores the archive is obtained according to the archive storage method according to any one of claims 1 to 7; Obtaining a file DNA sequence in the DNA sequence of the DNA molecule to be read; The DNA sequence of the file is decoded to obtain the file to be read.

9. The file reading method according to claim 8, characterized in that: After determining the document DNA sequence and the seal DNA sequence in the DNA sequence of the DNA molecule to be read by PCR technology according to the preset joint DNA sequence, the method further comprises: Extracting the signature information DNA sequence from the seal DNA sequence according to the preset linker DNA sequence and the archive information DNA sequence and the preset order; Decoding the signature information DNA sequence and converting it into corresponding signature information; Verify the signature information according to the preset public key to obtain a verification result; The signature verification result is used to indicate whether the DNA sequence to be read has been tampered with.

10. A terminal, characterized in that: include: A processor and a memory; the memory stores a computer-readable program that can be executed by the processor; when the processor executes the computer-readable program, the processor implements the steps of the archive storage method as described in any one of claims 1 to 7, or the steps of the archive reading method as described in any one of claims 8 to 10.

Citation Information

Patent Citations

  • Printed document anti-counterfeiting traceability system and method based on digital signature and document DNA

    CN111008387A

  • DNA storage method and system and electronic equipment

    CN111091876A

  • DNA-based data storage method, data recovery method and terminal equipment

    CN112527736A

  • File storage method, file reading method and related device

    CN116432217A

  • Apparatuses, systems and methods for generating and tracking molecular digital signatures to ensure authenticity and integrity of synthetic DNA molecules

    US20210104301A1