DNA storage encoding optimization method based on weight and hybrid mutation strategy of barnacle algorithm
By introducing weight-based position update rules and mixed mutation strategies in DNA encoding design, the problems of local optimization and neighborhood solution are solved, and more efficient DNA encoding optimization and diversity exploration are achieved.
Patent Information
- Application Number
- CN202111299658.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-11-04
AI Technical Summary
Existing DNA encoding design methods are prone to falling into local optimization, and barnacle algorithms may miss neighboring solutions during the iteration process, resulting in insufficient search.
The barnacle algorithm based on weight-based position update rules and mixed mutation strategies is adopted to avoid sequence concentration around the parent through weight-updating rules, and the optimization accuracy and global search capabilities of the algorithm are improved through Gaussian and Cauchy mutation strategies.
Effectively avoid local optimal traps, improve the diversity and optimization performance of DNA coding sets, and be able to search for better number of DNA coding sequences.
Smart Images

Figure CN114067916B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of coding design in DNA storage, and specifically uses a weight-based position update rule and a mixed mutation strategy to improve the performance of a barnacle algorithm to optimize a DNA coding sequence. Background Art
[0002] Digital information stored in floppy disks, optical and electronic media and transmitted via the Internet has promoted the explosive growth of the next generation of science, technology and art. However, the existing storage media are difficult to achieve large-capacity storage, and have problems such as high maintenance costs, limited service life and easy data loss. The storage industry is facing unprecedented opportunities and challenges. It is urgent to find storage media with high density, large capacity and long-term stability.
[0003] Since the beginning of life on Earth, deoxyribonucleic acid (DNA) molecules composed of four bases, adenine (A), thymine (T), guanine (G), and cytosine (C), have stored information about organisms. This method of storing information has been in place for many years. The pairing of A and T, and G and C can form a stable double-stranded chain, which can be used to store binary numbers in either single-stranded or double-stranded form. Compared with traditional storage media, DNA molecules as storage media have the advantages of high storage density, low maintenance cost, and long storage life, and are expected to provide widespread practicality in the future.
[0004] In existing DNA coding design methods, sequences are increasingly concentrated around parental sequences, and new regions cannot be discovered during the search phase, which easily leads to the limitation of local optimality; and the barnacle algorithm is prone to missing neighborhood solutions during the iteration process. Summary of the invention
[0005] The purpose of the present invention is to propose a DNA storage coding optimization method of a barnacle algorithm based on weight and hybrid mutation strategy, which can avoid missing neighborhood solutions during the iteration process and can search for a DNA coding set with a better quantity.
[0006] To achieve the above purpose, the technical solution of the present application is: a DNA storage encoding optimization method of a barnacle algorithm based on weight and hybrid mutation strategy, comprising:
[0007] Step 1: Initialize the parameters, initial set and DNA coding set required by the barnacle algorithm based on weight and hybrid mutation strategy;
[0008] Step 2: Obtain the fitness values of the initial set, sort them, and take the DNA sequence with the best fitness as the optimal solution;
[0009] Step 3: updating the DNA sequences in the initial set, wherein the updated DNA sequences are the offspring sequences, and the DNA sequences before the update are the parent sequences;
[0010] Step 4: The offspring sequences are evaluated and mixed with the parent sequences, and then sorted according to the fitness value, the top 50% of the DNA sequences are selected to be retained, and the bottom 50% of the DNA sequences are eliminated;
[0011] Step 5: When the current number of iterations is less than or equal to half of the maximum number of iterations, the first 50% of the DNA sequences are used as the input of the Gaussian mutation strategy. The DNA sequences are perturbed using the Gaussian mutation strategy, and then the fitness value of the DNA sequence after mutation is obtained. The fitness values of the DNA sequences before and after mutation are compared. If the fitness value of the DNA sequence after mutation is greater than the fitness value of the DNA sequence before mutation, the DNA sequence before mutation is replaced by the DNA sequence after mutation. Otherwise, the DNA sequence will remain unchanged.
[0012] Step 6: When the current number of iterations is greater than half of the maximum number of iterations, the first 50% of the DNA sequences are used as the input of the Cauchy mutation strategy. The DNA sequences are updated using the Cauchy mutation strategy, and then the fitness value of the DNA sequence after the mutation is obtained. The fitness values of the DNA sequences before and after the mutation are compared. If the fitness value of the DNA sequence after the mutation is greater than the fitness value of the DNA sequence before the mutation, the DNA sequence before the mutation is replaced by the DNA sequence after the mutation. Otherwise, the DNA sequence will remain unchanged.
[0013] Step 7: Determine whether the sequence in the initial set meets the constraint condition, and if so, add the DNA sequence to the DNA encoding set;
[0014] Step 8: Determine whether the maximum number of iterations has been reached. If so, proceed to step 9, otherwise return to step 2;
[0015] Step 9: Count all newly added DNA sequences and output the DNA coding set.
[0016] Furthermore, the DNA sequences in the initial set are updated, specifically:
[0017] If the current DNA sequence is within the set penis length pl range, the DNA sequence is updated by the first method; if the current DNA sequence is beyond the set penis length pl range, the DNA sequence is updated by the second method;
[0018] Furthermore, the first method updates the DNA sequence, specifically:
[0019]
[0020]
[0021]
[0022]
[0023]
[0024] Among them, X1 and X2 represent two random DNA sequences; w1 represents the weight of X1, and w2 represents the weight of X2; It means randomly selecting a DNA sequence as the father sequence. It means randomly selecting a sequence as the mother sequence; p represents a random number that conforms to the normal distribution, and q = (1-p).
[0025] Furthermore, the second method updates the DNA sequence, specifically:
[0026]
[0027] Where r represents a random number between 0 and 1. Indicates that a sequence is randomly selected as the mother sequence.
[0028] Furthermore, the Gaussian mutation strategy is used to perturb the DNA sequence, as shown in Formula 7:
[0029] X new (i)=X(i)+X(i)×G(α)i∈{1,...,N} (7)
[0030] Where N represents the number of DNA sequences, X(i) represents the current DNA sequence, and X new (i) represents the mutated DNA sequence, and G(a) is the Gaussian mutation operator.
[0031] Furthermore, the Cauchy mutation strategy is used to update the DNA sequence, as shown in Formula 8:
[0032] X new (i)=X(i)+X(i)×C(γ)i∈{1,...,N} (8)
[0033] Where N represents the number of DNA sequences, X(i) represents the current DNA sequence, and X new (i) represents the DNA sequence obtained after Cauchy perturbation, and C(γ) is the Cauchy operator.
[0034] Furthermore, the constraint conditions include full discontinuity constraint, Hamming distance, and GC content. The Hamming distance is used as the objective function, and the full discontinuity constraint and GC content are used as constraint conditions.
[0035] The present invention adopts the above technical solution, and can achieve the following technical effects:
[0036] 1. Replacing the update formula of the barnacle algorithm with a weighted position update rule can prevent the sequence from becoming increasingly concentrated around the parent sequence. New areas can be discovered during the search phase, making it less likely to fall into local optimality and improving the average fitness of the initial set.
[0037] 2. The hybrid mutation strategy includes two mutation strategies: Gaussian mutation and Cauchy mutation. Gaussian mutation can avoid the disadvantage of the barnacle algorithm that it is easy to miss the neighborhood solution during the iteration process. This mutation not only improves the optimization accuracy of the algorithm, but also helps the original algorithm to jump out of the local optimal area. The barnacle disturbed by the Cauchy mutation strategy not only has the ability to quickly avoid local traps but also has stronger global search capabilities. More importantly, it is also conducive to increasing the diversity of sequence sets, making its exploration range wider;
[0038] 3. The barnacle algorithm based on weight and hybrid mutation strategy proposed in the present invention can search for a relatively optimal number of DNA coding sequences. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flow chart for implementing the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the implementation of the present invention. It can be understood that the described examples are only part of the examples of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0041] There are three constraints involved in the present invention, namely, full discontinuity constraint, Hamming distance, and GC content. The Hamming distance in the constraint is used as the objective function to calculate the fitness value of each sequence in step 2, and the other two are used as constraints. The full discontinuity constraint means that the same bases cannot appear consecutively when adjacent in a DNA sequence; the Hamming distance is expressed as the number of different elements at the same position between two sequences x and y; the GC content constraint means the percentage of guanine (G) and cytosine (C) in any sequence in the DNA sequence set to the total number of sequence bases, which is constrained to 50% in this embodiment.
[0042] Example 1
[0043] The embodiments of the present invention are implemented on the premise of the technical solution of the present invention, and detailed implementation methods and specific operation processes are given, but the protection scope of the present invention is not limited to the following embodiments. In the example, the DNA encoding length n is set to 6, the Hamming distance constraint is set to d≥4, and the full discontinuity constraint and GC content constraint are as described above.
[0044] Step 1: Initialize the parameters, initial set and DNA coding set required by the barnacle algorithm based on weight and hybrid mutation strategy;
[0045] Specifically, 500 DNA coding sequences of length 6 are generated by initialization. The relevant parameters required by the initialization algorithm, such as the penis length pl, are set to 7; first, the 500 DNA coding sequences of length 6 are screened using constraints to obtain an initial set. In this example, a simulation experiment is performed using MATLAB, and the initial set is 43 using the GC content and full discontinuity constraints.
[0046] Step 2: Obtain the fitness values of the initial set, sort them, and take the DNA sequence with the best fitness as the optimal solution;
[0047] Specifically, the fitness value of the initial set is obtained by using the fitness function and the DNA sequences are sorted according to the fitness values by using the sort() function to select the DNA sequences with the best fitness and the worst fitness;
[0048] Step 3: updating the DNA sequences in the initial set, wherein the updated DNA sequences are the offspring sequences, and the DNA sequences before the update are the parent sequences;
[0049] Specifically, 43 6-dimensional DNA sequences are optimized using the barnacle algorithm. For each DNA sequence, a penis length pl is generated. If pl is less than 7, it is updated by formula 1, otherwise it is updated by formula 6;
[0050]
[0051]
[0052]
[0053]
[0054]
[0055] X1 and X2 represent two random DNA sequences; w1 represents the weight of X1, and w2 represents the weight of X2; Randomly select a DNA sequence as the father sequence, A sequence is randomly selected as the mother sequence. p represents a random number that conforms to the normal distribution, and q = (1-p).
[0056]
[0057] Where r represents a random number between 0 and 1. Randomly select a sequence as the mother sequence.
[0058] Step 4: The offspring sequences are evaluated and mixed with the parent sequences, and then sorted according to the fitness value, the top 50% of the DNA sequences are selected to be retained, and the bottom 50% of the DNA sequences are eliminated;
[0059] Step 5: When the current number of iterations is less than or equal to half of the maximum number of iterations, the first 50% of the DNA sequences are used as the input of the Gaussian mutation strategy. The DNA sequences are perturbed using the Gaussian mutation strategy, and then the fitness value of the DNA sequence after mutation is obtained. The fitness values of the DNA sequences before and after mutation are compared. If the fitness value of the DNA sequence after mutation is greater than the fitness value of the DNA sequence before mutation, the DNA sequence before mutation is replaced by the DNA sequence after mutation. Otherwise, the DNA sequence will remain unchanged.
[0060] Specifically, when the number of iterations is ≤500, the first 50% of the DNA sequences are used as the input of the Gaussian mutation strategy, and the DNA sequences are perturbed using the Gaussian mutation strategy, as shown in Formula 7:
[0061] X new (i)=X(i)+X(i)×G(α)i∈{1,...,N} (7)
[0062] Where N represents the number of DNA sequences, X(i) represents the current DNA sequence, and X new (i) represents the mutated DNA sequence, and G(a) is the Gaussian mutation operator.
[0063] Step 6: When the current number of iterations is greater than half of the maximum number of iterations, the first 50% of the DNA sequences are used as the input of the Cauchy mutation strategy. The DNA sequences are updated using the Cauchy mutation strategy, and then the fitness value of the DNA sequence after the mutation is obtained. The fitness values of the DNA sequences before and after the mutation are compared. If the fitness value of the DNA sequence after the mutation is greater than the fitness value of the DNA sequence before the mutation, the DNA sequence before the mutation is replaced by the DNA sequence after the mutation. Otherwise, the DNA sequence will remain unchanged.
[0064] Specifically, when the number of iterations is greater than 500, the first 50% of the DNA sequences are used as the input of the Cauchy mutation strategy, and the DNA sequences are updated using the Cauchy mutation strategy, as shown in Formula 8:
[0065] X new (i)=X(i)+X(i)×C(γ)i∈{1,...,N} (8)
[0066] Where N represents the number of DNA sequences, X(i) represents the current DNA sequence, and X new (i) represents the DNA sequence obtained after Cauchy perturbation, and C(γ) is the Cauchy operator.
[0067] Step 7: Determine whether the sequence in the initial set meets the constraint condition, and if so, add the DNA sequence to the DNA encoding set;
[0068] Step 8: Determine whether the maximum number of iterations has been reached. If so, proceed to step 9, otherwise return to step 2;
[0069] Specifically, determine whether the maximum number of iterations, 1000 generations, is reached. If so, proceed to step 9, otherwise return to step 2;
[0070] Step 9: Count all newly added DNA sequences and output the DNA coding set.
[0071] The present invention proposes a DNA storage coding optimization method based on a barnacle algorithm with weights and hybrid mutation strategies. First, a weighted barnacle algorithm is used to continuously search, and then Gaussian and Cauchy mutation operators are used to continuously search for the optimal sequence to obtain more DNA sequences that meet the GC content and full discontinuity constraints, and finally the obtained maximum DNA coding set is used as the output result. The present invention uses MATLAB to perform simulation experiments on the algorithm under Intel (R) CPU 3.6GHz, 10.0GB memory, and Windows 10 operating environment. The experimental results show that the method results of this embodiment are better than the experimental results of other algorithms.
[0072] Table 1 Initial DNA sequence collection
[0073]
[0074] Table 2 Optimal DNA encoding set when n=6, d≥4
[0075]
[0076] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and modifications without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A DNA storage coding optimization method based on a barnacle algorithm with weight and hybrid mutation strategy, characterized in that: include: Step 1: Initialize the parameters, initial set and DNA coding set required by the barnacle algorithm based on weight and hybrid mutation strategy; Step 2: Obtain the fitness values of the initial set, sort them, and take the DNA sequence with the best fitness as the optimal solution; Step 3: updating the DNA sequences in the initial set, wherein the updated DNA sequences are the offspring sequences, and the DNA sequences before the update are the parent sequences; Step 4: The offspring sequences are evaluated and mixed with the parent sequences, and then sorted according to the fitness value, the top 50% of the DNA sequences are selected to be retained, and the bottom 50% of the DNA sequences are eliminated; Step 5: When the current number of iterations is less than or equal to half of the maximum number of iterations, the first 50% of the DNA sequences are used as the input of the Gaussian mutation strategy. The DNA sequences are perturbed using the Gaussian mutation strategy, and then the fitness value of the DNA sequence after mutation is obtained. The fitness values of the DNA sequences before and after mutation are compared. If the fitness value of the DNA sequence after mutation is greater than the fitness value of the DNA sequence before mutation, the DNA sequence before mutation is replaced by the DNA sequence after mutation. Otherwise, the DNA sequence will remain unchanged. Step 6: When the current number of iterations is greater than half of the maximum number of iterations, the first 50% of the DNA sequences are used as the input of the Cauchy mutation strategy. The DNA sequences are updated using the Cauchy mutation strategy, and then the fitness value of the DNA sequence after the mutation is obtained. The fitness values of the DNA sequences before and after the mutation are compared. If the fitness value of the DNA sequence after the mutation is greater than the fitness value of the DNA sequence before the mutation, the DNA sequence before the mutation is replaced by the DNA sequence after the mutation. Otherwise, the DNA sequence will remain unchanged. Step 7: Determine whether the sequence in the initial set meets the constraint condition, and if so, add the DNA sequence to the DNA encoding set; Step 8: Determine whether the maximum number of iterations has been reached. If so, proceed to step 9, otherwise return to step 2; Step 9: Count all newly added DNA sequences and output the DNA coding set; The DNA sequence in the initial set is updated, specifically: if the current DNA sequence is within the set penis length pl range, the DNA sequence is updated by the first method; if the current DNA sequence exceeds the set penis length pl range, the DNA sequence is updated by the second method; The first method is to update the DNA sequence, specifically: Among them, X1 and X2 represent two random DNA sequences; w1 represents the weight of X1, and w2 represents the weight of X2; It means randomly selecting a DNA sequence as the father sequence. represents randomly selecting a sequence as the mother sequence; p represents a random number that conforms to the normal distribution, q = (1-p); The second method updates the DNA sequence, specifically: Where r represents a random number between 0 and 1. It means randomly selecting a sequence as the mother sequence; The Gaussian mutation strategy is used to perturb the DNA sequence, as shown in Formula 7: X new (i)=X(i)+X(i)×G(α) i∈{1,...,N} (7) Where N represents the number of DNA sequences, X(i) represents the current DNA sequence, and X new (i) represents the mutated DNA sequence, G(a) is the Gaussian mutation operator; The Cauchy mutation strategy is used to update the DNA sequence, as shown in Formula 8: X new (i)=X(i)+X(i)×C(γ) i∈{1,...,N} (8) Where N represents the number of DNA sequences, X(i) represents the current DNA sequence, and X new (i) represents the DNA sequence obtained after Cauchy perturbation, and C(γ) is the Cauchy operator.
2. The DNA storage coding optimization method of the barnacle algorithm based on weight and hybrid mutation strategy according to claim 1 is characterized in that: The constraint conditions include full discontinuity constraint, Hamming distance, and GC content. The Hamming distance is used as the objective function, and the full discontinuity constraint and GC content are used as constraint conditions.
Citation Information
Patent Citations
Damping factor-based DNA storage coding optimization method of multivariate universe algorithm
CN111339635A
DNA sequence design method based on chaotic optimization whale algorithm
CN112348154A