DNA coding method and device with biological constraint

By employing a progressive, phased training strategy and co-design, the floating-point information sources of wireless sensor networks are directly mapped to biological base sequences, solving the cumbersome DNA encoding process in existing technologies, improving the efficiency of DNA data storage, and reducing the error rate.

CN120954503BActive Publication Date: 2026-03-20JIMEI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing DNA encoding processes are cumbersome and have complex hardware implementations when dealing with floating-point information sources in wireless sensor networks, resulting in high error rates and low efficiency, and they cannot be naturally characterized as biological base sequences.

Method used

A progressive, phased training strategy is adopted. Through the collaborative design of centralized encoding, symmetric quantization threshold, and symmetric encoding/decoding network structure, floating-point number sequences are mapped into quaternary compressed codewords. A biological constraint loss function is introduced during training to optimize the GC content and distribution uniformity of the base sequence.

Benefits of technology

It simplifies the DNA encoding process, improves data storage efficiency, reduces the error rate, ensures good base uniformity, and exhibits good distortion performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120954503B_ABST
    Figure CN120954503B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a DNA coding method and device with biological constraints. In the method, a progressive staged training strategy is adopted, the first stage is trained to minimize the distortion of the original source and the reconstructed source, and through the collaborative design of the centralized coding, the symmetrical quantization threshold and the symmetrical network structure, the compression sequence naturally satisfies the ideal GC content when represented as the ATCG base sequence. In the second stage, the loss function of the biological constraint is added to maintain low distortion while making the base sequence satisfy the biological base arrangement characteristics. The present application naturally represents the floating point sequence as the biological base sequence through the structural design, the base distribution has uniformity, and has good distortion performance, improves the efficiency of DNA data storage, and reduces the error rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the cross field of information processing, in particular to the biological information storage and communication coding representation technology, and especially to a DNA coding method and device with biological constraints. BACKGROUND

[0002] The conventional DNA coding process is: first, binary conversion and error correction coding are performed on a digital file; then, the binary data is converted into quaternary coding (0→A, 1→T, 2→C, 3→G), segmented into short fragments, and then chemically synthesized and stored; when reading, the data is restored through PCR amplification and high-throughput sequencing. When this process is applied to processing the converged data of a wireless sensor network, the defects of the "separated" design are particularly prominent. The statistical characteristics of the data collected by multiple sensor nodes in the network (such as temperature, humidity, vibration signals) can be accurately modeled as Gaussian mixture model or Gaussian model sources after convergence at the center node, and these source data are essentially floating-point number sequences.

[0003] However, the existing process requires that these floating-point number sources go through multiple independent and non-cooperative steps such as quantization and binary coding before they can be finally mapped into base sequences, which is cumbersome and complex to implement in hardware. More seriously, the front-end digital coding process is completely decoupled from the back-end biochemical process, and the generated sequence may not meet the "biological constraints" required for DNA synthesis and sequencing, resulting in an increased error rate and reduced efficiency in the physical implementation stage.

[0004] Therefore, how to naturally represent a floating-point number sequence as a biological base sequence, make the base distribution uniform, and have good distortion performance, so as to improve the efficiency of DNA data storage and reduce the error rate, is a problem that needs to be solved by those skilled in the art. SUMMARY

[0005] The embodiment of the present application provides a DNA coding and device with biological constraints, which can improve the efficiency of DNA data storage and reduce the error rate.

[0006] The first aspect of the present application provides a DNA coding method with biological constraints, comprising:

[0007] Obtaining monitoring data collected by multiple sensor nodes in a wireless sensor network, and modeling the monitoring data as an original floating-point number sequence subject to a normal distribution;

[0008] Mapping the original floating-point number sequence into a quaternary compressed code word through a lossy source coding module, wherein the lossy source coding module adopts a cooperative design of centralized coding, symmetric quantization threshold and symmetric coding and decoding network structure, so that the quaternary compressed code word has the basis for natural conversion into an ATCG base sequence;

[0009] reconstruct the quaternary compression codewords into a sequence of reconstructed floating-point numbers through a lossy source decoding module;

[0010] The first stage training determines a distortion loss according to a minimized mean square error between the original floating-point number sequence and the reconstructed floating-point number sequence, iteratively optimizes the lossy source encoding module and the lossy source decoding module until a first preset training round is reached, so that the ATCG base sequence corresponding to the quaternary compression codeword naturally satisfies the GC content requirement of the preset proportion;

[0011] The second stage training introduces a biological constraint loss function, obtains a composite loss function according to a minimized weighted sum of the distortion loss and the biological constraint loss function, iteratively optimizes the lossy source encoding module and the lossy source decoding module until a second preset training round is reached, optimizes the biological characteristics of the quaternary compression codeword through the biological constraint loss function, and obtains the optimized quaternary compression codeword;

[0012] The optimized quaternary compression codeword is converted into an ATCG base sequence for DNA synthesis and storage.

[0013] Optionally, the centralized encoding converts the quaternary codeword {0, 1, 2, 3} into a value set {-1.5, -0.5, 0.5, 1.5} symmetric about zero, wherein the AT base group is mapped to the negative number domain, and the CG base group is mapped to the positive number domain, so that the mean value of the quaternary compression codeword tends to 0, and the GC content naturally satisfies the requirement of the preset proportion.

[0014] Optionally, the symmetric quantization threshold adopts a threshold configuration symmetric about zero, the original floating-point number sequence is mapped into initial log-likelihood ratio information through the encoding network of the lossy source encoding module, the log-likelihood ratio is iteratively updated through the node connection relationship of the original trellis low-density parity check code in the lossy source encoding module to obtain updated log-likelihood ratio information; the value range of the updated log-likelihood ratio information is divided into four intervals symmetric about zero, and each interval corresponds to a quaternary codeword, so that the probabilities of continuous values falling into the positive interval and the negative interval are equal.

[0015] Optionally, the symmetric encoding and decoding network structure adopts a weight initialization method of zero-mean symmetric distribution, and combines a mean square error loss function, so that the distribution of the output quaternary compression codeword naturally tends to zero mean.

[0016] Optionally, the biological constraint loss function includes:

[0017] Based on the adjacent difference value of the numerical difference between adjacent positions in the centralized quaternary sequence, an exponential decay function calculates a homopolymer penalty value;

[0018] The biological constraint loss function is obtained according to the average value of the homopolymer penalty values of all adjacent positions in the batch and sequence dimensions.

[0019] Optionally, the optimized quaternary compression codeword is converted into an ATCG base sequence for DNA synthesis and storage, including:

[0020] The optimized quaternary compression codeword is converted into an ATCG base sequence by using a preset mapping rule, wherein 0 corresponds to A, 1 corresponds to T, 2 corresponds to C, and 3 corresponds to G.

[0021] The second aspect of the present application provides a DNA coding device with biological constraints, comprising:

[0022] The data acquisition module is configured to acquire monitoring data collected by a plurality of sensor nodes in a wireless sensor network, and model the monitoring data as an original floating-point number sequence subject to a normal distribution.

[0023] The lossy source coding module is configured to map the original floating-point number sequence into a quaternary compression codeword, wherein the lossy source coding module adopts a centralized coding, a symmetric quantization threshold, and a collaborative design of a symmetric coding and decoding network structure, so that the quaternary compression codeword has a basis for being naturally converted into an ATCG base sequence.

[0024] The lossy source decoding module is configured to reconstruct the quaternary compression codeword into a reconstructed floating-point number sequence.

[0025] The training module is configured to perform first stage training to minimize the mean square error between the original floating-point number sequence and the reconstructed floating-point number sequence as a reconstruction loss target, iteratively optimize the lossy source coding module and the lossy source decoding module until a first preset training round is reached, so that the ATCG base sequence corresponding to the quaternary compression codeword naturally satisfies the GC content requirement of the preset proportion.

[0026] The second stage training introduces a biological constraint loss function, and iteratively optimizes the lossy source coding module and the lossy source decoding module until a second preset training round is reached, so that the biological constraint loss function optimizes the biological characteristics of the quaternary compression codeword, and obtains an optimized quaternary compression codeword.

[0027] The conversion module is configured to convert the optimized quaternary compression codeword into an ATCG base sequence for DNA synthesis and storage.

[0028] The third aspect of the present application provides a DNA coding device with biological constraints, comprising:

[0029] One or more processors;

[0030] A memory having one or more programs stored thereon.

[0031] The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for DNA coding with biological constraints as claimed in any one of the above.

[0032] The fourth aspect of the present application provides a computer storage medium for storing a program, which, when executed, is used to implement the method for DNA coding with biological constraints as claimed in any one of the above.

[0033] Embodiments of the present application disclose a DNA coding method and device with biological constraints. In the method, a progressive stage-by-stage training strategy is adopted, a first stage is trained with the target of minimizing distortion of original sources and reconstructed sources, and a collaborative design including centralized coding, symmetric quantization threshold and symmetric network structure is used to make the compression sequence naturally satisfy ideal GC content when represented as ATCG base sequence. A loss function of biological constraints is added in a second stage to make the base sequence satisfy biological base arrangement characteristics while keeping low distortion. The present application naturally represents floating-point number sequence as biological base sequence through structural design, the base distribution of which has uniformity and good distortion performance, improves the efficiency of DNA data storage, and reduces error rate. BRIEF DESCRIPTION OF DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0035] Figure 1 A flowchart of a DNA coding method with biological constraints provided by the embodiments of the present application is shown in the figure.

[0036] Figure 2 A flowchart of another DNA coding method with biological constraints provided by the embodiments of the present application is shown in the figure.

[0037] Figure 3 A structural diagram of a DNA coding device with biological constraints provided by the embodiments of the present application is shown in the figure.

[0038] Figure 4 A structural diagram of a DNA coding device with biological constraints provided by the embodiments of the present application is shown in the figure.

[0039] Figure 5 A system performance comparison chart provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION

[0040] The embodiment of the present application provides a DNA coding with biological constraint and a device, which can solve the technical problem of long-term and reliable archiving of massive converged monitoring data in a wireless sensor network, and efficiently represents the floating-point number monitoring data converged by a network center node and modeled as a Gaussian distribution as biological bases, so as to realize the DNA characterization of the floating-point number.

[0041] The present application provides a DNA coding method with biological constraint, which can directly map the floating-point number source data in a sensor network into a quaternary base sequence meeting the biological arrangement requirement, and fundamentally simplifies and improves the steps of DNA coding. Meanwhile, the present application naturally characterizes the floating-point number sequence as a biological base sequence through a structured design, so that the base distribution has uniformity and good distortion performance, and provides a more efficient coding and storage solution for the DNA archiving of large-scale Internet of Things data.

[0042] Referring to Figure 1 The figure is a flowchart of the DNA coding method with biological constraint provided by the embodiment of the present application. The DNA coding method with biological constraint provided by the embodiment of the present application can be realized, for example, through the following steps S101-S106.

[0043] Step S101: Obtain the monitoring data collected by a plurality of sensor nodes in a wireless sensor network, and model the monitoring data as an original floating-point number sequence subject to a normal distribution.

[0044] In the embodiment of the present application, the monitoring data collected by a plurality of sensor nodes in a wireless sensor network is converged, and the converged monitoring data is modeled as an original floating-point number sequence subject to or approximately subject to a standard normal distribution Input lossy source coding module .

[0045] Step S102: Map the original floating-point number sequence into a quaternary compressed code word through a lossy source coding module.

[0046] In the embodiment of the present application, the original floating-point number sequence n is compressed and characterized as a k-dimensional quaternary sequence u, and the source characterization meets the set {0, 1, 2, 3}. The collaborative design of the centralized coding, the symmetric quantization threshold and the symmetric coding and decoding network structure makes the quaternary compressed code word have the basis of being naturally converted into an ATCG base sequence.

[0047] In the embodiments of the present application, the centering encoding includes converting the quaternary code word {0, 1, 2, 3} into a value set { -1.5, -0.5, 0.5, 1.5} symmetric about zero, wherein the AT base group is mapped to the negative number domain, the CG base group is mapped to the positive number domain, the mean value of the quaternary compression code word tends to 0, and the requirement of the GC content being the preset proportion is naturally satisfied. The symmetric quantization threshold adopts the threshold configuration symmetric about zero, the original floating point sequence is mapped into the initial log likelihood ratio information through the full connection neural network of the lossy source encoding module, the log likelihood ratio is iteratively updated through the node connection relationship of the original module low density parity check code in the lossy source encoding module, and the updated log likelihood ratio information is obtained; the value range of the updated log likelihood ratio information is divided into four intervals symmetric about zero, each interval corresponds to a quaternary code word, and the probabilities of the continuous values falling into the positive interval and the negative interval are equal. The symmetric encoding and decoding network structure adopts the weight initialization method of the zero mean symmetric distribution, and combines the mean square error loss function, so that the distribution of the output quaternary compression code word naturally tends to the zero mean.

[0048] Specifically, through a collaborative design including centering encoding, symmetric quantization threshold and symmetric encoding and decoding network structure, the GC content of the output sequence can be naturally stabilized in the preset ideal range without applying additional biological constraints. The centering encoding converts the quaternary code word {0, 1, 2, 3} into a value set { -1.5, -0.5, 0.5, 1.5} symmetric about zero through centering processing, and according to the quaternary and base mapping rule of {0→A, 1→T, 2→C, 3→G}, the AT base group {0, 1} is mapped to the negative number domain, and the CG base group {2, 3} is mapped to the positive number domain. The symmetric quantization threshold adopts the threshold configuration symmetric about zero (for example, T1=-1.0, T2=0.0, T3=1.0), so that the probability of a continuous value falling into the positive interval is equal to the probability of falling into the corresponding negative interval in design. The symmetric encoding and decoding network structure adopts the weight initialization method of the zero mean symmetric distribution (such as Xavier initialization, He initialization or other initialization strategies suitable for the selected network architecture) combined with the MSE loss function, and naturally tends to the zero mean output distribution in the training process. The symmetric network structure ensures that the encoder tends to output the continuous values symmetric about zero in mathematics; the symmetric quantization threshold maps these symmetric continuous values into discrete quaternary code words; and the centering encoding directly associates the mathematical symmetry with the biological characteristics (GC / AT) of the base. It is ensured that the GC content of the quaternary sequence u is in the preset ideal range (for example, 45%-55%) without any specific GC constraint.

[0049] Step S103: reconstruct the quaternary compressed code word into a reconstructed floating-point number sequence by the lossy source decoding module.

[0050] Step S104: determine the distortion loss according to the minimized mean square error of the original floating-point number sequence and the reconstructed floating-point number sequence, and iteratively optimize the lossy source coding module and the lossy source decoding module.

[0051] In the embodiment of the present application, a progressive stage-by-stage training strategy is adopted for end-to-end joint optimization. The training process is divided into two stages. The training in the first stage is for basic capability construction, and the reconstruction distortion loss is adopted for training. The goal is to enable the network to have efficient compression and reconstruction capabilities, and to obtain an ideal GC content basis by means of the cooperative mechanism of step S102.

[0052] In an implementation manner of the embodiment of the present application, based on the adjacent difference value of the numerical difference between adjacent positions in the centralized quaternary sequence, an exponential decay function is used to calculate the homopolymer penalty value; and the biological constraint loss function is obtained according to the average value of the homopolymer penalty values of all adjacent positions in the batch and sequence dimensions.

[0053] Specifically, the centralized coding is implemented for the k-dimensional quaternary sequence u, that is, Based on the centralized sequence , the biological constraint loss for the second training stage is defined as For the centralized compressed sequence with a dimension of (B, L) , the absolute difference value between all adjacent positions is calculated, which is represented as:

[0054] ;

[0055] Wherein, B is the batch size, is the sequence length, and represents the centralized numerical value of the jth position in the ith sample sequence. Based on the adjacent difference value , the homopolymer penalty is calculated by using an exponential decay function, which is represented as:

[0056] ;

[0057] The final calculation of the biological constraint loss function is the average value of the penalty values of all adjacent positions in the batch and sequence dimensions, which is represented as:

[0058] ;

[0059] Wherein, is the decay coefficient, and the present embodiment does not specifically limit the value of the decay coefficient. For example, the value of the decay coefficient can be 5, and the specific value is set according to the actual demand.

[0060] Subsequently, the centralized compressed sequence is input into the lossy source coding module The reconstruction source is obtained, and the system distortion is defined as the reconstruction source The mean square loss of the original source , which is the only objective function of the first stage training, the distortion loss is expressed as:

[0061] .

[0062] Step S105: According to the composite loss function obtained by minimizing the weighted sum of the distortion loss and the biological constraint loss function, the lossy source coding module and the lossy source decoding module are iteratively optimized.

[0063] In the embodiment of the present application, the second stage training is biological constraint fusion, which benefits from the good initial state of the first stage. This stage can focus on homopolymer suppression and base distribution uniformization without additional introduction of GC content control items. The composite loss function is introduced for training, which focuses on optimizing homopolymer suppression and base distribution uniformity while maintaining low distortion. The biological constraint loss function includes the adjacent difference value based on the difference between the values of adjacent positions in the centralized quaternary sequence, and the homopolymer penalty value is calculated by an exponential decay function; the biological constraint loss function is obtained according to the average value of the homopolymer penalty value of all adjacent positions in the batch and sequence dimension.

[0064] Specifically, in the second training stage, while maintaining a low distortion loss , the biological constraint loss based on the penalty of adjacent nucleotide difference is used to optimize the deep encoder and decoder, and the composite loss function is constructed, which is defined as:

[0065] = +

[0066] Wherein, is the weight factor of the biological constraint loss, and the value of the weight factor in the embodiment of the present application is not specifically limited, for example, it can be 5, and the specific value is set according to actual requirements.

[0067] Step S106: The optimized quaternary compressed codeword is converted into an ATCG base sequence for DNA synthesis and storage.

[0068] In the embodiment of the present application, the optimized quaternary compressed codeword is converted into an ATCG base sequence by using a preset mapping rule, wherein 0 corresponds to A, 1 corresponds to T, 2 corresponds to C, and 3 corresponds to G.

[0069] Specifically, after completing the two-stage progressive training, the lossy source coding module The biological target sequence ubio with local diversity and global base distribution uniformity can be obtained, and the compression distortion is minimized in the lossy source coding segment reconstruction, while the GC content is within the preset range, the long homopolymer content is low, and the four base distributions are uniform.

[0070] In order to further verify the encoding efficiency of the present application from the theoretical level, Figure 5 The system performance is further verified under the R-D theory framework. The theoretical limit represents the optimal performance boundary that any compression algorithm can achieve on this kind of source. As Figure 5 shown, Figure 5 A system performance comparison chart is provided for the embodiment of the present application. In order to accurately simulate the intensity value signal collected by the LiDAR sensor and after normalization processing, a source model with corresponding statistical characteristics (mean value is 0, variance ) is used in the experiment. The experimental conditions are set as follows: the P-LDPC benchmark code AR3A is used, and the compression rate R is set to 3 times the code rate RB. The results show that the quaternary system is closer to the theoretical limit, indicating that the quaternary architecture of the present application can more effectively approximate the theoretical optimal performance. This strongly indicates that the quaternary architecture of the present application has higher encoding efficiency and can approximate the optimal compression performance in theory with less performance loss, thereby more fully exploiting and utilizing the effective information in the LiDAR signal.

[0071] The present application will be described below, Figure 2 , and Figure 2 The flowchart of the DNA encoding method with biological constraints provided by the embodiment of the present application clearly shows the end-to-end process of mapping the floating point monitoring data converged by the wireless sensor network into the DNA base sequence satisfying the biological characteristics. The process adopts a gradual phased training strategy, first constructs the basic compression and reconstruction capability, then optimizes the sequence characteristics by fusing biological constraints, and finally outputs the target sequence that can be directly used for DNA synthesis. Figure 1 The process starts with the floating point monitoring data (input source ) converged by the wireless sensor network, generates quaternary compressed code words through lossy source coding, and then reconstructs into floating point sequence through lossy source decoding; then the encoding / decoding module parameters are optimized through two-stage training, and finally the biological target sequence ubio (ATCG base sequence) satisfying the biological constraints is output. The core of the process is the end-to-end collaborative optimization of "floating point source→quaternary code word→biological constraint sequence", which solves the cumbersome problem of traditional DNA encoding "separate design" (binary conversion→error correction→base mapping).

[0072] The starting point of the process is the input source The monitoring data collected by multiple sensor nodes in a wireless sensor network, such as temperature, humidity, and vibration signals. After the data is aggregated at the central node, it is modeled as a sequence of floating-point numbers that follow a standard normal distribution.

[0073] Input source Through the lossy source encoding module Mapping to quaternary compression codewords , The corresponding GC content naturally stabilizes in the ideal range:

[0074] Quaternary codewords Through the lossy source decoding module Reconstruction into a sequence of floating-point numbers (The reconstructed source).

[0075] The original source The mean square error of the reconstructed source is used as the distortion loss to measure the compression effect of encoding / decoding.

[0076] Determine if the training round is reached, if the first stage preset training round is not reached, the reconstructed source is fed back to the lossy source encoding module , the parameters of the lossy source encoding module and the lossy source decoding module are iteratively optimized; if the first stage preset training round is reached, the second stage training is entered.

[0077] Keep the input source unchanged to ensure the continuity of the training.

[0078] Through the lossy source encoding module Generate quaternary codewords , through the lossy source decoding module Reconstruction (consistent with the first stage).

[0079] While maintaining a low distortion loss , the gradient optimization of the deep encoder and decoder generated by the biological constraint loss based on the difference penalty of adjacent nucleotides is used to construct a composite loss function , defined as: = + , is the weight factor of the biological constraint loss.

[0080] Determine if the training round is reached, if the second stage preset training round is not reached, continue to iteratively optimize the lossy source encoding module And a lossy source coding module If the second stage preset training round is reached, the training is ended.

[0081] After the second stage training is ended, the lossy source coding module The generated quaternary code word The optimization is a biological target sequence u bio (ATCG base sequence).

[0082] Based on the method provided in the above embodiment, the embodiment of the present application further provides a DNA coding device with biological constraints, referring to Figure 3 The figure is a structural schematic diagram of a DNA coding device with biological constraints provided by the embodiment of the present application.

[0083] The DNA coding device with biological constraints 300 provided by the embodiment of the present application comprises a data acquisition module 301, a lossy source coding module 302, a lossy source decoding module 303, a training module 304 and a conversion module 305.

[0084] The data acquisition module 301 is used to acquire monitoring data collected by a plurality of sensor nodes in a wireless sensor network, and model the monitoring data into an original floating point number sequence subject to normal distribution.

[0085] The lossy source coding module 302 is used to map the original floating point number sequence into a quaternary compression code word, wherein the lossy source coding module adopts the collaborative design of centralized coding, symmetric quantization threshold and symmetric coding and decoding network structure, so that the quaternary compression code word has the basis of being naturally converted into an ATCG base sequence.

[0086] The lossy source decoding module 303 is used to reconstruct the quaternary compression code word into a reconstructed floating point number sequence.

[0087] The training module 304 is used for first stage training to minimize the mean square error of the original floating point number sequence and the reconstructed floating point number sequence as a reconstruction loss target, iteratively optimize the lossy source coding module and the lossy source decoding module, until a first preset training round is reached, so that the ATCG base sequence corresponding to the quaternary compression code word naturally satisfies the preset proportion of GC content requirement.

[0088] The second stage training introduces a biological constraint loss function, minimizes the weighted sum of the reconstruction loss and the biological constraint loss function as a compound loss target, iteratively optimizes the lossy source coding module and the lossy source decoding module, until a second preset training round is reached, optimizes the biological characteristics of the quaternary compression code word through the biological constraint loss function, and obtains the optimized quaternary compression code word.

[0089] The conversion module 305 is configured to convert the optimized quaternary compression code word into an ATCG base sequence for DNA synthesis and storage.

[0090] In a possible implementation, the lossy source coding module 302 is specifically configured to:

[0091] The centralized coding converts the quaternary code word {0, 1, 2, 3} into a set of values { -1.5, -0.5, 0.5, 1.5} symmetric about zero, wherein the AT base group is mapped to the negative number domain, and the CG base group is mapped to the positive number domain, so that the mean of the quaternary compression code word tends to 0, and the requirement of the GC content being the preset proportion is naturally met.

[0092] In a possible implementation, the lossy source coding module 302 is specifically configured to:

[0093] The symmetric quantization threshold adopts a threshold configuration symmetric about zero, and the original floating-point number sequence is mapped into initial log-likelihood ratio information through the coding network of the lossy source coding module. The initial log-likelihood ratio information is iteratively updated to obtain updated log-likelihood ratio information through the node connection relationship of the preset original module low-density parity check code in the lossy source coding module. The value range of the updated log-likelihood ratio information is divided into four intervals symmetric about zero, and each interval corresponds to a quaternary code word, so that the probabilities of continuous values falling into the positive interval and the negative interval are equal.

[0094] In a possible implementation, the lossy source coding module 302 is specifically configured to:

[0095] The symmetric coding and decoding network structure adopts a weight initialization method of zero-mean symmetric distribution, and combines a mean square error loss function, so that the distribution of the output quaternary compression code word naturally tends to zero mean.

[0096] In a possible implementation, the training module 304 is specifically configured to:

[0097] Based on the adjacent difference value of the difference between the values of adjacent positions in the centralized quaternary sequence, an exponential decay function is used to calculate the homopolymer penalty value.

[0098] The biological constraint loss function is obtained according to the average value of the homopolymer penalty values of all adjacent positions in the batch and sequence dimensions.

[0099] In a possible implementation, the conversion module 305 is specifically configured to:

[0100] A preset mapping rule is used to convert the optimized quaternary compression code word into an ATCG base sequence, wherein 0 corresponds to A, 1 corresponds to T, 2 corresponds to C, and 3 corresponds to G.

[0101] Since the DNA coding device with biological constraints 300 is a device corresponding to the DNA coding method with biological constraints provided in the above method embodiment, the specific implementation of each module of the DNA coding device with biological constraints 300 is the same concept as the above method embodiment, therefore, for the specific implementation of each module of the DNA coding device with biological constraints 300, reference can be made to the description of the DNA coding method with biological constraints in the above method embodiment, which will not be repeated here.

[0102] The embodiment of the present application further provides a DNA coding device with biological constraints, the device comprising a processor and a memory.

[0103] The memory is used for storing instructions.

[0104] The processor is used for executing the instructions in the memory, and executing the DNA coding method with biological constraints mentioned in the above embodiment.

[0105] It should be noted that the hardware structure of the DNA coding device with biological constraints provided in the embodiment of the present application can be the structure as shown in Figure 4 Figure 4 The structure of the DNA coding device with biological constraints provided in the embodiment of the present application.

[0106] Please refer to Figure 4 As shown in the figure, the DNA coding device with biological constraints 400 comprises a processor 410, a communication interface 420 and a memory 430. The number of the processor 410 in the DNA coding device with biological constraints 400 can be one or more, Figure 4 In the embodiment of the present application, the processor 410, the communication interface 420 and the memory 430 can be connected through a bus system or other means, wherein, Figure 4 In the embodiment of the present application, the processor 410, the communication interface 420 and the memory 430 are connected through the bus system 440.

[0107] ​The processor 410 can be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP. The processor 410 can further include a hardware chip. The hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0108] The memory 430 can include a volatile memory (e.g., a random-access memory (RAM)), and can also include a non-volatile memory (e.g., a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD)), or a combination thereof.

[0109] Optionally, the memory 430 stores an operating system and programs, executable modules, or data structures, or a subset thereof, or an extended set thereof, wherein the programs can include various operation instructions for implementing various operations. The operating system can include various system programs for implementing various basic services and processing hardware-based tasks. The processor 410 can read the programs in the memory 430 to implement the DNA coding method with biological constraints provided by the embodiments of the present application.

[0110] The bus system 440 can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus system 440 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 4 In the figure, only one thick line is used to represent the bus system 440, but it does not mean that there is only one bus or only one type of bus.

[0111] The embodiment of the present application further provides a computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method mentioned in the above embodiment.

[0112] The embodiment of the present application further provides a computer program product comprising instructions which, when executed on a computer, cause the computer to perform the method mentioned in the above embodiment.

[0113] Although the present application is specifically shown and described with reference to the preferred embodiments, it is understood that various changes in form and details can be made without departing from the spirit and scope of the application as defined by the appended claims.

Claims

1. A biologically constrained DNA encoding method, characterized in that, include: Acquire monitoring data collected by multiple sensor nodes in a wireless sensor network, and model the monitoring data as a sequence of raw floating-point numbers that follows a normal distribution; The original floating-point sequence is mapped to quaternary compressed codewords through a lossy source coding module. The lossy source coding module adopts a collaborative design of centralized coding, symmetric quantization threshold and symmetric encoding and decoding network structure, so that the quaternary compressed codewords have the basis for natural conversion into ATCG base sequences. The quaternary compressed codeword is reconstructed into a reconstructed floating-point sequence using a lossy source decoding module; The first stage of training determines the distortion loss based on the minimized mean square error between the original floating-point sequence and the reconstructed floating-point sequence, and iteratively optimizes the lossy source coding module and the lossy source decoding module until the first preset training round is reached, so that the ATGG base sequence corresponding to the quaternary compressed codeword naturally meets the preset ratio of GC content requirements. The second stage of training introduces a biological constraint loss function. A composite loss function is obtained by minimizing the weighted sum of the distortion loss and the biological constraint loss function. The lossy source coding module and the lossy source decoding module are iteratively optimized until the second preset training round is reached. The biological characteristics of the quaternary compressed codeword are optimized through the biological constraint loss function to obtain the optimized quaternary compressed codeword. The optimized quaternary compressed codewords are converted into ATCG base sequences for DNA synthesis and storage.

2. The biologically constrained DNA encoding method according to claim 1, characterized in that, The centralized encoding converts the quaternary codeword {0,1,2,3} into a set of values ​​symmetric about zero: {-1.5,-0.5,0.5,1.5}. The AT base set is mapped to the negative number field, and the CG base set is mapped to the positive number field, so that the mean of the quaternary compressed codeword tends to 0, which naturally satisfies the requirement that the GC content is a preset ratio.

3. The biologically constrained DNA encoding method according to claim 1, characterized in that, The symmetric quantization threshold adopts a threshold configuration symmetric about zero. The original floating-point sequence is mapped to initial log-likelihood ratio information through the encoding network of the lossy source coding module. The initial log-likelihood ratio information is iteratively updated through the node connection relationship of the preset original model low-density parity check code in the lossy source coding module to obtain the updated log-likelihood ratio information. The value range of the updated log-likelihood ratio information is divided into four intervals symmetric about zero, each interval corresponding to a quaternary codeword, so that the probability of continuous values ​​falling into the positive interval and the negative interval is equal.

4. The biologically constrained DNA encoding method according to claim 1, characterized in that, The symmetric encoding / decoding network structure adopts a zero-mean symmetric distribution weight initialization method, combined with a mean square error loss function, so that the output quaternary compressed codeword distribution naturally tends to zero mean.

5. The biologically constrained DNA encoding method according to claim 1, characterized in that, The biological constraint loss function includes: The homopolymer penalty value is calculated using the adjacent difference of the numerical difference between adjacent positions in the centered quaternary sequence; The biological constraint loss function is obtained by averaging the homopolymer penalty values ​​of all adjacent positions across the batch and sequence dimensions.

6. The biologically constrained DNA encoding method according to claim 1, characterized in that, The step of converting the optimized quaternary compressed codewords into ATCG base sequences for DNA synthesis and storage includes: The optimized quaternary compressed codeword is converted into an ATCG base sequence using a preset mapping rule, where 0 corresponds to A, 1 corresponds to T, 2 corresponds to C, and 3 corresponds to G.

7. A biologically constrained DNA coding device, characterized in that, include: The data acquisition module is used to acquire monitoring data collected by multiple sensor nodes in a wireless sensor network and model the monitoring data as a sequence of raw floating-point numbers that follows a normal distribution. The lossy source coding module is used to map the original floating-point number sequence into quaternary compressed codewords. The lossy source coding module adopts a collaborative design of centralized coding, symmetric quantization threshold and symmetric encoding and decoding network structure, so that the quaternary compressed codewords have the basis for natural conversion into ATCG base sequences. The lossy source decoding module is used to reconstruct the quaternary compressed codeword into a reconstructed floating-point number sequence; The training module is used for the first stage of training to minimize the mean square error between the original floating-point sequence and the reconstructed floating-point sequence as the reconstruction loss target, and to iteratively optimize the lossy source coding module and the lossy source decoding module until the first preset training round is reached, so that the ATGG base sequence corresponding to the quaternary compressed codeword naturally meets the preset ratio of GC content requirements. The second stage of training introduces a biological constraint loss function, with the goal of minimizing the weighted sum of the reconstruction loss and the biological constraint loss function as the composite loss objective. The lossy source coding module and the lossy source decoding module are iteratively optimized until the second preset training round is reached. The biological characteristics of the quaternary compressed codeword are optimized through the biological constraint loss function to obtain the optimized quaternary compressed codeword. The conversion module is used to convert the optimized quaternary compressed codewords into ATCG base sequences for DNA synthesis and storage.

8. The biologically constrained DNA coding device according to claim 7, characterized in that, The conversion module is specifically used for: The optimized quaternary compressed codeword is converted into an ATCG base sequence using a preset mapping rule, where 0 corresponds to A, 1 corresponds to T, 2 corresponds to C, and 3 corresponds to G.

9. A biologically constrained DNA coding device, characterized in that, The device includes: a processor and a memory; The memory is used to store instructions; The processor is configured to execute the instructions in the memory to perform the method according to any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, Including instructions that, when run on a computer, cause the computer to perform the method described in any one of claims 1-6 above.

Citation Information

Patent Citations

  • Method and device for storing and reading DNA of information

    CN117789788A

  • High-bit-rate DNA coding method and system meeting GC local balance and run constraint

    CN118675625A