Compression method, decompression method and device for gene sequencing data

CN122514809APending Publication Date: 2026-08-04SHENZHEN HUADA GENE INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN HUADA GENE INST
Filing Date
2024-02-27
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

The existing gene sequencing data compression methods have low compression rates, resulting in increased data storage and transmission costs.

Method used

The base sequence and mass value sequence are predicted using a sequence prediction model, and the entropy coding technology is used to compress it. The training model predicts the contextual relationship and correlation between the sample base sequence and the mass value sequence, improving the prediction accuracy and entropy encoding.

Benefits of technology

The compression rate and decompression accuracy of gene sequencing data are improved, and by improving the prediction accuracy of sequence prediction models, more efficient data compression and decompression effects are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122514809A_ABST
    Figure CN122514809A_ABST
Patent Text Reader

Abstract

Provided are a gene sequencing data compression method, a gene sequencing data decompression method and devices. The gene sequencing data compression method performs sequence prediction on at least one of a base sequence or a quality value sequence in to-be-compressed gene sequencing data based on a sequence prediction model trained based on sample base sequences and corresponding sample quality value sequences, and performs entropy coding on the at least one of the base sequence or the quality value sequence based on a sequence prediction result and a corresponding true value label, to obtain compressed data of the to-be-compressed gene sequencing data. The gene sequencing data decompression method performs sequence prediction on to-be-decompressed gene sequencing data based on a sequence prediction model trained based on sample base sequences and corresponding sample quality value sequences, and obtains decompressed data corresponding to the to-be-decompressed gene sequencing data based on a prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Compression method, decompression method and device for gene sequencing data Technical Field

[0001] The present disclosure relates to the field of bioinformatics, and in particular to a method and device for compressing and decompressing gene sequencing data. Background Art

[0002] With the advancement of gene sequencing technology, the amount of gene sequencing data continues to grow at an increasingly rapid rate. This increase in data volume increases both storage and data transmission costs. To reduce these costs, gene sequencing data can be compressed. Gene sequencing data compression primarily focuses on base sequences and quality score sequences. Current methods for compressing gene sequencing data have low compression rates.

[0003] Summary of the Invention

[0004] The embodiments of the present disclosure provide a method for compressing and decompressing gene sequencing data, and a device thereof, which can improve the compression rate and decompression accuracy of gene sequencing data.

[0005] According to one aspect of the present disclosure, a method for compressing gene sequencing data is provided, comprising:

[0006] Acquire gene sequencing data to be compressed, where the gene sequencing data to be compressed includes a base sequence and a corresponding quality value sequence;

[0007] performing sequence prediction on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on a sample base sequence and a corresponding sample quality value sequence;

[0008] Based on the predicted probability distribution sequence and the corresponding true value label, entropy encoding is performed on at least one of the base sequence or the quality value sequence to obtain compressed data corresponding to the gene sequencing data to be compressed.

[0009] According to one aspect of the present disclosure, a device for compressing gene sequencing data is provided, comprising:

[0010] A first acquisition unit is configured to acquire gene sequencing data to be compressed, wherein the gene sequencing data to be compressed includes a base sequence and a corresponding quality value sequence;

[0011] a first prediction unit, configured to perform sequence prediction on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on a sample base sequence and a corresponding sample quality value sequence;

[0012] An encoding unit is used to perform entropy encoding on at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed.

[0013] In one embodiment, the first prediction unit is specifically configured to:

[0014] Obtaining a predicted reference sequence of at least one of the base sequence or the quality value sequence;

[0015] Based on the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0016] In one embodiment, the first prediction unit is specifically configured to:

[0017] Obtaining a predicted reference sequence of at least one of the base sequence or the quality value sequence and application text data of a gene sequencing application that generates the gene sequencing data to be compressed;

[0018] Based on the application text data and the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0019] In one embodiment, the first prediction unit is specifically configured to:

[0020] Vectorizing the application text data to obtain an application text feature vector;

[0021] The application text feature vector and the predicted reference sequence are input into a preset sequence prediction model, and sequence prediction is performed on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence, the corresponding sample quality value sequence, and the corresponding sample application text feature vector.

[0022] In one embodiment, each of the gene sequencing applications corresponds to one of the sequence prediction models;

[0023] The first prediction unit is specifically configured to:

[0024] Determine a corresponding target sequence prediction model based on the application text data;

[0025] The predicted reference sequence is input into the preset target sequence prediction model, and sequence prediction is performed on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0026] In one embodiment, the sequence prediction model includes an encoder and a decoder;

[0027] The first prediction unit is specifically configured to:

[0028] Determining either the base sequence or the quality value sequence as a reference sequence, and obtaining a predicted context sequence corresponding to the sequence to be predicted based on the determined reference sequence;

[0029] Inputting the reference sequence into the encoder to obtain an encoding result;

[0030] The encoding result and the predicted context sequence are input into the decoder to obtain a predicted probability distribution sequence output by the decoder.

[0031] In one embodiment, the sequence prediction model includes a decoder;

[0032] The first prediction unit is specifically configured to:

[0033] Obtaining a predicted reference sequence corresponding to the base sequence and the quality value sequence;

[0034] The predicted reference sequence is input into the decoder to obtain a predicted probability distribution sequence output by the decoder.

[0035] In one embodiment, the sequence prediction model is trained in the following manner:

[0036] Obtaining the sample base sequence and the corresponding sample quality value sequence;

[0037] Inputting the sample base sequence and the sample quality value sequence into the sequence prediction model to predict a predicted base sequence and a predicted quality value sequence;

[0038] A sample loss is obtained based on the sample base sequence, the sample quality value sequence, the predicted base sequence, and the predicted quality value sequence, and the sequence prediction model is trained based on the sample loss.

[0039] In one embodiment, after obtaining the sample base sequence and the corresponding sample quality value sequence, the training process of the sequence prediction model further includes:

[0040] Obtaining a sequencing reference sequence, and performing sequence alignment using the sample base sequence and the sequencing reference sequence to obtain a sample sequence alignment result;

[0041] Inputting the sample base sequence and the sample quality value sequence into the sequence prediction model to predict a predicted base sequence and a predicted quality value sequence includes:

[0042] The sample base sequence, the sample quality value sequence and the sample sequence comparison result are input into the sequence prediction model to predict a predicted base sequence and a predicted quality value sequence.

[0043] In one embodiment, the predicted probability distribution sequence includes a predicted probability distribution corresponding to each sequence value in at least one of the base sequence or the quality value sequence; the corresponding true value label includes a true sequence value label corresponding to each sequence value in at least one of the base sequence or the quality value sequence;

[0044] The encoding unit is specifically used for:

[0045] For each sequence value of at least one of the base sequence or the quality value sequence, performing entropy coding on each probability value based on the corresponding predicted probability distribution;

[0046] Obtaining, from the entropy coding result corresponding to each of the sequence values, a coding result corresponding to the true sequence value label corresponding to the sequence value;

[0047] Based on the encoding result of the real sequence value label corresponding to each sequence value, compressed data corresponding to the gene sequencing data to be compressed is obtained.

[0048] In one embodiment, the encoding unit is specifically configured to:

[0049] Based on the true value label of each data to be predicted in the sequence to be predicted, determining the probability ranking value of the data to be predicted in the prediction probability distribution sequence;

[0050] The probability ranking value is entropy-encoded to obtain compressed data corresponding to the gene sequencing data to be compressed.

[0051] According to one aspect of the present disclosure, a method for decompressing gene sequencing data is provided, comprising:

[0052] Obtain the above data of the gene sequencing data to be decompressed;

[0053] Perform sequence prediction based on a preset sequence prediction model and the above data to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence and the corresponding sample quality value sequence;

[0054] Determining a target probability sequence in the predicted probability distribution sequence based on the gene sequencing data to be decompressed;

[0055] Decompression results corresponding to the gene sequencing data to be decompressed are determined according to the target probability sequence.

[0056] According to one aspect of the present disclosure, a device for decompressing gene sequencing data is provided, comprising:

[0057] A second acquisition unit is used to obtain the above data of the gene sequencing data to be decompressed;

[0058] a second prediction unit, configured to perform sequence prediction based on a preset sequence prediction model and the above data to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on a sample base sequence and a corresponding sample quality value sequence;

[0059] A first determining unit is configured to determine a target probability sequence in the predicted probability distribution sequence based on the gene sequencing data to be decompressed;

[0060] The second determining unit is configured to determine a decompression result corresponding to the gene sequencing data to be decompressed according to the target probability sequence.

[0061] In one embodiment, the predicted probability distribution sequence includes predicted probability distributions corresponding to multiple sequence values; the gene sequencing data to be decompressed includes compression codes of multiple sequence values;

[0062] The first determining unit is specifically configured to:

[0063] Performing entropy coding on each of the predicted probability distributions in the predicted probability distribution sequence;

[0064] Based on the compression code of each sequence value in the gene sequencing data to be decompressed, a target probability is determined in the entropy encoding result of the corresponding predicted value probability distribution to obtain a target probability sequence.

[0065] According to one aspect of the present disclosure, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned gene sequencing data compression method and decompression method when executing the computer program.

[0066] According to one aspect of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the compression method and decompression method of gene sequencing data as described above are implemented.

[0067] According to one aspect of the present disclosure, a computer program product is provided, which includes a computer program, and the computer program is read and executed by a processor of a computer device, so that the computer device executes the compression method and decompression method of gene sequencing data as described above.

[0068] The method for compressing gene sequencing data in the embodiments of the present disclosure obtains gene sequencing data to be compressed, where the gene sequencing data to be compressed includes a base sequence and a corresponding quality value sequence; performs sequence prediction on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on a sample base sequence and a corresponding sample quality value sequence; performs entropy encoding on at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed.

[0069] In this way, the training process of the sequence prediction model in the embodiment of the present disclosure can learn the contextual relationship in the base sequence through the sample base sequence, learn the contextual relationship in the quality value sequence through the sample quality value sequence, and learn the association between the base value and the quality score value through the sample base sequence and the corresponding quality value score sequence. Therefore, the accuracy of the predicted probability distribution sequence obtained by the trained sequence prediction model for at least one item in the base sequence or the quality value sequence is relatively high. By using the predicted probability distribution sequence and the corresponding true value label to perform entropy coding on at least one item in the base sequence or the quality value sequence, the higher the prediction accuracy, the shorter the length of the entropy coding result. Therefore, the improvement of the prediction accuracy of the sequence prediction model can improve the compression rate of gene sequencing data.

[0070] The decompression method for gene sequencing data in the disclosed embodiments can utilize the same sequence prediction model as used in the compression method above to perform sequence prediction based on the data of the gene sequencing data to be decompressed, thereby obtaining a predicted probability distribution sequence. A target probability sequence is then derived from the predicted probability distribution sequence based on the compressed data, and the decompression result of the gene sequencing data to be decompressed is obtained based on the target probability sequence. Because the prediction accuracy of the sequence prediction model trained in the disclosed embodiments is improved, the accuracy of the target probability sequence obtained is also improved, thereby improving the accuracy of the decompression result.

[0071] Other features and advantages of the present disclosure will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present disclosure. The purposes and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] The accompanying drawings are used to provide a further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation to the technical solution of the present disclosure.

[0073] FIG1 is a system architecture diagram of a method for compressing and decompressing gene sequencing data according to an embodiment of the present disclosure;

[0074] FIG2 is a flow chart of a method for compressing gene sequencing data according to an embodiment of the present disclosure;

[0075] FIG3 is a schematic diagram of a one-to-one correspondence between base sequence values ​​and quality sequence values ​​according to an embodiment of the present disclosure;

[0076] FIG4 is a schematic diagram of a training process of a sequence prediction model according to an embodiment of the present disclosure;

[0077] FIG5A is a schematic diagram of performing sequence prediction on only a base sequence using a sequence prediction model according to an embodiment of the present disclosure;

[0078] FIG5B is a schematic diagram of performing sequence prediction on only a quality value sequence using a sequence prediction model according to an embodiment of the present disclosure;

[0079] FIG6 is a schematic diagram of a detailed process of performing sequence prediction on one of a base sequence and a quality value sequence using a sequence prediction model according to an embodiment of the present disclosure;

[0080] FIG7 is a schematic diagram of using a sequence prediction model to simultaneously predict a base sequence and a quality value sequence according to an embodiment of the present disclosure;

[0081] FIG8 is a schematic diagram of a detailed process of using a sequence prediction model to simultaneously predict base sequences and quality value sequences according to an embodiment of the present disclosure.

[0082] FIG9 is a schematic diagram of a process of performing entropy coding on a prediction probability distribution according to an embodiment of the present disclosure;

[0083] FIG10A is a schematic diagram of performing sequence compression only on a base sequence according to an embodiment of the present disclosure;

[0084] FIG10B is a schematic diagram of performing sequence compression on only a quality value sequence according to an embodiment of the present disclosure;

[0085] FIG10C is a schematic diagram of simultaneously compressing a base sequence and a quality value sequence according to an embodiment of the present disclosure;

[0086] FIG11 is a schematic diagram of entropy coding according to probability ranking values ​​of true value labels in predicted probability distribution according to one embodiment of the present disclosure;

[0087] FIG12A is another schematic diagram of performing sequence compression only on base sequences according to an embodiment of the present disclosure;

[0088] FIG12B is another schematic diagram of performing sequence compression on only a quality value sequence according to one embodiment of the present disclosure;

[0089] FIG12C is another schematic diagram of simultaneously compressing a base sequence and a quality value sequence according to an embodiment of the present disclosure;

[0090] FIG13 is a flow chart of a method for decompressing gene sequencing data according to an embodiment of the present disclosure;

[0091] FIG14A is a schematic diagram of decompressing only the base sequence to be decompressed according to an embodiment of the present disclosure;

[0092] FIG14B is a schematic diagram of decompressing only a sequence of quality values ​​to be decompressed according to an embodiment of the present disclosure;

[0093] FIG14C is a schematic diagram of simultaneously decompressing a base sequence to be decompressed and a quality value sequence to be decompressed according to an embodiment of the present disclosure;

[0094] FIG15 is a schematic diagram of the structure of a device for compressing gene sequencing data according to an embodiment of the present disclosure;

[0095] FIG16 is a schematic diagram of the structure of a decompression device for gene sequencing data according to an embodiment of the present disclosure;

[0096] FIG17 is a diagram illustrating a terminal structure for implementing various methods according to an embodiment of the present disclosure;

[0097] FIG18 is a diagram of a server structure for implementing various methods according to an embodiment of the present disclosure. DETAILED DESCRIPTION

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

[0099] Before further explaining the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are explained. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations:

[0100] Gene sequencing: Analyzes the base sequence of a specific gene fragment, specifically the arrangement of adenine (A), thymine (T), cytosine (C), and guanine (G). Gene sequencing data stores the analysis results of the gene fragment. Gene sequencing data generally stores identifiers, base sequences, and quality value sequences. The identifier is used to identify the gene sequencing data; the base sequence is a sequence consisting of A, T, C, G, and N, representing the base sequence of the sequenced gene fragment; the quality value sequence is the same length as the base sequence, and each quality value indicates the reliability of each base in the base sequence.

[0101] Entropy coding: A method of lossless data compression. One major type of entropy coding creates and assigns a unique prefix code to each input symbol. The data is then compressed by replacing each fixed-length input symbol with a corresponding variable-length prefix-independent output codeword. The length of each codeword is approximately proportional to the negative logarithm of the probability. Therefore, the symbols with the highest probability use the shortest code.

[0102] System architecture of the application of the embodiments of the present disclosure

[0103] 1 is a system architecture diagram of a method for compressing and decompressing gene sequencing data according to an embodiment of the present disclosure, which includes a terminal 140, the Internet 130, a gateway 120, a server 110, and the like.

[0104] Terminal 140 includes various forms, such as desktop computers, laptops, PDAs (Personal Digital Assistants), mobile phones, in-vehicle terminals, home theater terminals, and dedicated terminals. Furthermore, it can be a single device or a collection of multiple devices. Terminal 140 can communicate with Internet 130 via wired or wireless means to exchange data.

[0105] Server 110 is a computer system that provides certain services to terminal 140. Compared to ordinary terminal 140, server 110 has higher requirements in terms of stability, security, and performance. Server 110 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a portion of a high-performance computer (such as a virtual machine), or a combination of portions of multiple high-performance computers (such as virtual machines).

[0106] Gateway 120, also known as a gateway or protocol converter, implements network interconnection at the transport layer and is a computer system or device that performs a conversion function. It acts as a translator between two systems using different communication protocols, data formats, languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent from terminal 140 to server 110 are sent through gateway 120 to the corresponding server 110. Messages sent from server 110 to terminal 140 are also sent through gateway 120 to the corresponding terminal 140.

[0107] The compression method and decompression method of the gene sequencing data in the embodiments of the present disclosure can be completely implemented in the terminal 140; can be completely implemented in the server 110; or can be implemented partially in the terminal 140 and the other part in the server 110.

[0108] General description of the embodiments of the present disclosure

[0109] According to one embodiment of the present disclosure, a method for compressing gene sequencing data is provided.

[0110] FIG2 is a flow chart of a method for compressing gene sequencing data provided by the present disclosure. The method can be applied to a device for compressing gene sequencing data. The method for compressing gene sequencing data may include:

[0111] Step 210: Obtain gene sequencing data to be compressed, where the gene sequencing data to be compressed includes a base sequence and a corresponding quality value sequence;

[0112] Step 220: Perform sequence prediction on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence and the corresponding sample quality value sequence;

[0113] Step 230: Perform entropy coding on at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed.

[0114] In step 210, gene sequencing data to be compressed is obtained, where the gene sequencing data to be compressed includes a base sequence and a corresponding quality value sequence.

[0115] Gene sequencing data to be compressed refers to the gene sequencing data that needs to be compressed and can include a base sequence and a corresponding quality value sequence. The base sequence can be composed of A (adenine), T (thymine), C (cytosine), and G (guanine). In rare cases, other characters may appear. Each quality value in the quality value sequence represents an integer mapping of the probability of incorrectly identifying the base at the corresponding position in the base sequence, indicating the accuracy of the base. Higher quality values ​​indicate more accurate base identification.

[0116] When determining the quality value of a base, the quality score can be obtained based on the probability of the base being misidentified, and then the corresponding ASCII code is found in the table based on the quality score as the quality value of the base. The quality score obtained based on the probability of the base being misidentified can be expressed as Formula 1: Q = -10*log 10 p (Formula 1).

[0117] In Formula 1, p represents the probability of a base being called incorrectly, and Q represents the quality score. For example, if the probability of a base being called incorrectly is 1%, then the base quality score is 20.

[0118] ASCII code is a computer code. Mapping quality scores to ASCII codes to represent base quality values ​​makes quality values ​​more readable during data transmission. When using a quality score lookup table to find the corresponding ASCII code as the base quality value, add 33 to the base score and then look up the corresponding ASCII code in the table. For example, if the base quality score is 20, the corresponding quality value for this base is '5'.

[0119] Figure 3 shows an example of a base sequence and a quality value sequence. The base sequence is "GGGTGATGGCCGCTGCCGATGGCGTCAAATCCCACC," and the quality value sequence is "IIIIIIIIIIIIIIIIIIIIIIIIIIIIII9IG9IC." Each base in the base sequence corresponds to a quality value in the quality value sequence. During gene sequencing, differences in the values ​​of the bases preceding and following a base can lead to differences in the sequencing reaction, thus affecting the quality assessment of that base. Conversely, the quality assessment of a base value not only verifies the accuracy of the base identification, but also indirectly verifies the accuracy of the base values ​​preceding and following it. Therefore, there is a strong correlation between the base sequence and the quality value sequence.

[0120] In step 220, sequence prediction is performed on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence, wherein the sequence prediction model is obtained by jointly training the sample base sequence and the corresponding sample quality value sequence.

[0121] The preset sequence prediction model can perform sequence prediction on at least one of the base sequence or the quality value sequence based on the context association of the base sequence, the context association of the quality value sequence, and the correlation between the base sequence and the quality value sequence to obtain a predicted probability distribution sequence.

[0122] The sequence prediction model can be a neural network model based on the Transformer as a basic unit. When training the sequence prediction model, a self-supervised learning task can be constructed to learn the association between the sample base sequence and the corresponding sample quality value sequence, the contextual association of the sample base sequence, and the contextual association of the sample quality value sequence. The sample base sequence is the base sequence obtained by sequencing the gene fragment, and the sample quality value sequence is the quality value sequence corresponding to the sample base sequence.

[0123] In one embodiment, the sequence prediction model is trained by:

[0124] Obtaining the sample base sequence and the corresponding sample quality value sequence;

[0125] Inputting the sample base sequence and the sample quality value sequence into the sequence prediction model to obtain the predicted base sequence and the predicted quality value sequence;

[0126] The sample loss is obtained based on the sample base sequence, the sample quality value sequence, the predicted base sequence and the predicted quality value sequence, and a sequence prediction model is trained based on the sample loss.

[0127] In this embodiment, as shown in Figure 4, a sample base sequence and a corresponding sample quality value sequence are obtained, and the sample base sequence and the sample quality value sequence are vectorized and input into a sequence prediction model. The sample base sequence and the sample quality value sequence can be obtained through FASTQ data. FASTQ is a text format that stores biological sequences (usually base sequences) and corresponding quality evaluations. Using a large amount of FASTQ data to train the sequence prediction model is conducive to improving the generalization ability of the sequence prediction model. The sequence prediction model can perform sequence prediction based on the context association of the sample base sequence, the context association of the sample quality value sequence, and the correlation relationship between the sample base sequence and the sample quality value sequence to obtain a predicted base sequence and a predicted quality value sequence.

[0128] The predicted base sequence can be the following base sequence predicted based on the first n bases in the sample base sequence and the sample quality value sequence, where the value of n is greater than 0 and less than the length of the sample base sequence. For example, the sample base sequence is "AATTCGAAT...". After the sample base sequence is input into the sequence prediction model, the sequence prediction model can predict each subsequent sequence value one by one based on the first sequence value 'A' and the sample quality value sequence. For example, based on the first sequence value "A" and the sample quality value sequence, the second sequence value is predicted to be "A"; based on the first sequence value and the second sequence value "AA" and the sample quality value sequence, the third sequence value is predicted to be 'T'; based on the first three sequence values ​​"AAT" and the sample quality value sequence, the fourth sequence value is predicted to be "G"; and so on, the final predicted base sequence is "AATGCCACT...".

[0129] The predicted quality value sequence can be a subsequent quality value sequence predicted based on the first n quality values ​​in the sample quality value sequence and the sample base sequence, where n is greater than 0 and less than the length of the sample quality value sequence. For example, the sample quality value sequence is "!#&HJ!&@!...". After the sample quality value sequence and the sample base sequence are input into the sequence prediction model, the sequence prediction model can predict each subsequent sequence value based on the first sequence value "!" in the sample quality value sequence and the sample base sequence. For example, based on the first sequence value "!" and the sample base sequence, the second sequence value is predicted to be "#"; based on the first two sequence values ​​"!#" and the sample base sequence, the third sequence value is predicted to be "&"; based on the first three sequence values ​​"!#&" and the sample base sequence, the fourth sequence value is predicted to be "!"; and so on, the final predicted quality value sequence is "!#&!J!&H!...".

[0130] After obtaining the predicted base sequence and the predicted quality value sequence, the sample loss is calculated using the differences between the sample base sequence and the predicted base sequence, as well as the differences between the sample quality value sequence and the predicted quality value sequence. A smaller sample loss indicates that the predicted base sequence and the predicted quality value sequence are closer to the sample base sequence and the sample quality value sequence, and the sequence prediction model is more accurate. Therefore, the process of using sample loss to train a sequence prediction model is to reduce sample loss by adjusting the parameters in the sequence prediction model.

[0131] Using sample base sequences, sample quality value sequences, predicted base sequences and predicted quality value sequences to train a sequence prediction model can enable the trained prediction model to fully learn the contextual associations of bases in base sequences, the contextual associations of quality values ​​in quality value sequences, and the associations between base sequences and quality value sequences, thereby improving the prediction accuracy of the sequence prediction model.

[0132] In another embodiment, after obtaining the sample base sequence and the corresponding sample quality value sequence, the training process of the sequence prediction model further includes:

[0133] Obtain a sequencing reference sequence, and use the sample base sequence to perform sequence alignment with the sequencing reference sequence to obtain a sample sequence alignment result;

[0134] The sample base sequence and the sample quality value sequence are input into the sequence prediction model to obtain the predicted base sequence and the predicted quality value sequence, including:

[0135] The sample base sequence, sample quality value sequence and sample sequence comparison results are input into the sequence prediction model to predict the predicted base sequence and predicted quality value sequence.

[0136] The sequencing reference sequence is used as a reference for aligning the sequence being sequenced. When using the sequencing reference sequence for base sequence alignment, a shorter subsequence is extracted from the base sequence and perfectly matched to the sequencing reference sequence. Dynamic alignment is then performed on both ends of the matching position. Base sequences that can be matched to the subsequence in the sequencing reference sequence have a higher confidence level and, therefore, a higher quality score.

[0137] The sample sequence alignment result obtained by performing sequence alignment on the sample base sequence and the sequencing reference sequence indicates the alignment information in the sample base sequence that can be matched to the sequencing reference sequence. For sub-base sequences that can be matched to the sequencing reference sequence, the corresponding quality value will also be higher; for sub-base sequences that cannot be matched to the sequencing reference sequence, the corresponding quality value will also be lower. Therefore, the sample base sequence, the sample quality value sequence, and the sample sequence alignment result are input into the sequence prediction model. Based on the sample sequence alignment result, the sequence prediction model can obtain more strong correlation information between the sample base sequence and the sample quality value sequence, and make predictions based on the contextual correlation of the sample base sequence, the contextual correlation of the sample quality value sequence, and the strong correlation information between the sample base sequence and the sample quality value sequence.

[0138] It can be seen that after using the sequencing reference sequence to align the sample base sequence, using the sample sequence alignment results to train the sequence prediction model can allow the sequence prediction model to learn more correlation information between the sample base sequence and the sample quality value sequence, thereby improving the prediction accuracy of the trained sequence prediction model.

[0139] In another embodiment, obtaining a sample base sequence and a corresponding sample quality value sequence includes:

[0140] Obtaining a sample base sequence, a corresponding sample quality value sequence, and sample application text data of a gene sequencing application that generates the sample base sequence and the corresponding sample quality value sequence;

[0141] The step of inputting the sample base sequence and the sample quality value sequence into the sequence prediction model to obtain the predicted base sequence and the predicted quality value sequence includes:

[0142] The sample base sequence, sample quality value sequence and sample application text data are input into the sequence prediction model to predict the predicted base sequence and the predicted quality value sequence.

[0143] In this embodiment, the sample application text data is data related to a gene sequencing application that sequences gene fragments and generates sample base sequences and sample quality value sequences. It can be text data of the gene sequencing application name or identification data of the gene sequencing application.

[0144] Because sequencing results vary across different gene sequencing applications, when training a sequence prediction model, the sample base sequence, sample quality score sequence, and corresponding sample application text data can be input into the model. This allows the model to learn the contextual association between the sample base sequence and the sample quality score generated by the corresponding gene sequencing application, as well as the correlation between the sample base sequence and the sample quality score. Before inputting the sample application text data into the model, the sample application text data can also be vectorized to facilitate rapid access by the model.

[0145] It can be seen that using sample application text data to train the sequence prediction model can enable the sequence prediction model to perform targeted sequence predictions for different gene sequencing applications, so as to cope with the sequencing results of different gene sequencing applications, which is conducive to improving the accuracy of sequence predictions for base sequences and quality value sequences generated by different gene sequencing applications.

[0146] After training the sequence prediction model, sequence prediction is performed based on the sequence prediction model to obtain a predicted probability distribution sequence.

[0147] The predicted probability distribution sequence may include the predicted probability distribution corresponding to each sequence value in at least one of the base sequence or quality value sequence. For example, the predicted probability distribution sequence of a base sequence is {(A:0.5, C:0.2, G:0.1, T:0.1, N:0.1), (A:0.3, C:0.1, G:0.2, T:0.4, N:0), (A:0.1, C:0.3, G:0.5, T:0.1, N:0)}. In this predicted probability distribution sequence, the predicted probability distribution of the first base sequence value is (A:0.5, C:0.2, G:0.1, T:0.1, N:0). The predicted probability distribution of the first base sequence value is (A:0.3, C:0.1, G:0.2, T:0.4, N:0), which means that the probability of this base sequence value being "A" is 0.5, the probability of "C" is 0.2, the probability of "G" is 0.1, and so on; the predicted probability distribution of the second base sequence value is (A:0.3, C:0.1, G:0.2, T:0.4, N:0); the predicted probability distribution of the third base sequence value is (A:0.1, C:0.3, G:0.5, T:0.1, N:0).

[0148] In one embodiment, sequence prediction is performed on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence, including:

[0149] Obtaining a predicted reference sequence of at least one of a base sequence or a quality value sequence;

[0150] Based on the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0151] In this embodiment, to perform sequence prediction on at least one of the base sequence or the quality value sequence, a predicted reference sequence for at least one of the base sequence or the quality value sequence can be obtained as an input value for a sequence prediction model. Depending on the target for sequence prediction, the corresponding predicted reference sequence can be different, and the sequence prediction model used for sequence prediction can also be different.

[0152] In one embodiment, the sequence prediction model includes an encoder and a decoder;

[0153] Obtaining a predicted reference sequence for at least one of a base sequence or a quality value sequence, including:

[0154] Determine either the base sequence or the quality value sequence as a reference sequence, and obtain a predicted context sequence corresponding to the sequence to be predicted based on the determined reference sequence;

[0155] Based on the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, including:

[0156] Input the reference sequence into the encoder to obtain the encoding result;

[0157] The encoding result and the predicted context sequence are input into the decoder to obtain the predicted probability distribution sequence output by the decoder.

[0158] In this embodiment, the sequence to be predicted is either a base sequence or a quality value sequence. In other words, sequence prediction is performed only on the base sequence or the quality value sequence. In this case, the sequence prediction model used for sequence prediction includes an encoder and a decoder. The encoder performs context-integrated encoding on the input sequence to fully capture the context sequence features of the input sequence. The decoder performs sequence prediction.

[0159] The predicted reference sequence can be determined based on the sequence to be predicted, specifically including a reference sequence and a predicted preceding sequence. When determining the sequence to be predicted based on a base sequence, the reference sequence is a complete quality value sequence, and the predicted preceding sequence is the preceding sequence corresponding to the sequence to be predicted determined based on the base sequence. Using a sequence prediction model, each base sequence value after the predicted preceding sequence can be predicted based on the quality value sequence and the predicted preceding sequence to obtain a corresponding probability distribution. The sequence prediction model includes an encoder and a decoder. The reference sequence (quality value sequence) is input into the encoder. The encoder can fully integrate the features of each quality value to obtain the context-related features of the quality value sequence and obtain an encoding result. The encoding result and the predicted preceding sequence in the base sequence are input into the decoder. The decoder can predict each base sequence value after the predicted preceding sequence based on the context-related features of the quality value sequence and the predicted preceding sequence. For example, as shown in Figure 5A, the predicted preceding sequence in the base sequence is "A" and the quality value sequence is "!#&HJ!&@!&@!!@&...", where "A" in the predicted preceding sequence can correspond to the first quality value "!" in the quality value sequence. The quality value sequence is input into the encoder of the sequence prediction model to obtain the encoding result. The encoding result and the predicted previous sequence are input into the decoder together, and the predicted probability distribution of the next base value of "A" is obtained as (A: 0.5, C: 0.1, G: 0.2, T: 0.2, N: 0). The prediction is performed backward one by one to obtain the predicted probability distribution of each base sequence value after the predicted previous sequence, and finally a predicted probability distribution sequence is obtained.

[0160] When determining the sequence to be predicted based on the quality value sequence, the reference sequence is a complete base sequence, and the predicted above sequence is the above sequence corresponding to the sequence to be predicted determined based on the quality value sequence. The sequence prediction model can be used to predict each quality value after the predicted above sequence based on the base sequence and the predicted above sequence to obtain the corresponding probability distribution. Specifically, the base sequence can be input into the encoder to obtain the encoding result; the encoder and the predicted above sequence in the quality value sequence are input into the decoder to obtain the probability distribution corresponding to each quality value after the predicted above sequence. For example, as shown in Figure 5B, the predicted above sequence in the quality value sequence is "!", and the base sequence is "AATTCGAATCATGC...", where the "!" in the predicted above sequence is the quality value corresponding to the first base "A" in the base sequence. The base sequence is input into the encoder of the sequence prediction model to obtain the encoding result. The encoding result and the predicted previous sequence are input into the decoder together, and the predicted probability distribution of the next quality value of "!" is obtained as ('#': 0.21, '!': 0.05, '@': 0.08, 'H': 0.11, '%': 0.06, ...). Based on this, backward prediction is performed one by one to obtain the predicted probability distribution of each quality value after the predicted previous sequence, and finally the predicted probability distribution sequence of quality value sequences is obtained.

[0161] The specific process of predicting one of the base sequence and quality value sequence using a sequence prediction model comprising an encoder and decoder can be illustrated in Figure 6. First, the reference sequence and predicted context sequence are input into an embedding layer for vectorization. Positional encoding is then added to the reference sequence vector and the predicted context sequence vector, enabling the model to understand the positional information of each value in the sequence. The reference sequence vector is then input into the multi-head attention mechanism layer within the encoder, allowing the encoder to fully understand the multiple correlations between sequence values ​​in the reference sequence and fully learn the contextual information within the reference sequence. The reference sequence vector is then concatenated with the vector encoded by the multi-head attention mechanism using residual connections and a normalization layer, and then normalized. The normalized result is then input into a feedforward layer for full connection. The input vector and output vector of the feedforward layer are then concatenated using residual connections and a normalization layer, and then normalized, resulting in the encoder's encoding of the reference sequence. If the sequence prediction model has multiple encoders, the above encoding process is repeated multiple times to obtain the final encoding result.

[0162] The predicted context sequence vector is input to the first multi-head attention layer in the decoder, allowing the decoder to understand the contextual information in the predicted context sequence. The input and output of the first multi-head attention layer are connected and normalized using residual connections and a normalization layer. The normalized result and the encoded result from the encoder are input to the second multi-head attention layer, allowing the decoder to fuse the contextual associations of the reference sequence with those of the predicted context sequence. The input and output of the second multi-head attention layer are again connected and normalized using residual connections and a normalization layer. The normalized result is then fed into the feedforward layer in the decoder for full connection. The input and output vectors of the feedforward layer are again connected and normalized using residual connections and a normalization layer, resulting in the decoded result. If the sequence prediction model has multiple decoders, the encoded result can be fed into each decoder, and the above process is repeated multiple times across the connected decoders to obtain the final decoded result. The decoded results are then passed through fully connected layers and activation function layers to obtain the predicted probability distribution sequence output by the sequence prediction model.

[0163] In one of the aforementioned embodiments, the sequence prediction model is trained by inputting a sample base sequence and a sample quality value sequence into the sequence prediction model to predict a predicted base sequence and a predicted quality value sequence, and then training the sequence prediction model based on the sample base sequence, the sample quality value sequence, and the sample loss between the predicted base sequence and the predicted quality value sequence. Based on this, the sequence prediction model including the encoder and decoder can be specifically trained through the following process:

[0164] Either the sample base sequence or the sample quality value sequence is used as the sample reference sequence, and the other is used as the sample prediction sequence;

[0165] Inputting the sample reference sequence into the encoder to obtain an encoding result, and inputting the encoding result and the first predetermined number of sequence values ​​of the sample prediction sequence into the decoder to obtain a prediction result sequence;

[0166] The sample loss is determined based on the sample prediction sequence and the prediction result sequence, and the sample loss is used to train the encoder and decoder in the sequence prediction model.

[0167] When training the sequence prediction model, both the encoder and the decoder need to be trained. One of the sample base sequence and the sample quality value sequence is used as the sample reference sequence, and the other is used as the sample prediction sequence. For example, if the sample base sequence is used as the sample reference sequence, then the sample quality value sequence is the sample prediction sequence. The sample reference sequence is input into the encoder, and the encoding result and the first predetermined number of sequence values ​​of the sample quality value sequence are input into the decoder. The decoder can obtain the prediction result sequence after the first predetermined number of sequence values. The sample loss between the sample prediction sequence and the prediction result sequence is used to train the encoder and decoder in the sequence prediction model. The specific training process has been described in detail in the aforementioned embodiment and will not be repeated here.

[0168] When performing sequence prediction on one of the base sequence and the quality value sequence, the sequence prediction model including the encoder and the decoder can fully learn the context association of the reference sequence, thereby improving the accuracy of sequence prediction.

[0169] In another embodiment, the sequence prediction model includes a decoder;

[0170] Obtaining a predicted reference sequence for at least one of a base sequence or a quality value sequence, including:

[0171] Obtaining a predicted reference sequence corresponding to the base sequence and the quality value sequence;

[0172] Based on the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, including:

[0173] The predicted reference sequence is input into the decoder to obtain the predicted probability distribution sequence output by the decoder.

[0174] In this embodiment, it is necessary to perform sequence prediction on both the base sequence and the quality value sequence. In this case, the sequence prediction model used for sequence prediction includes a decoder for predicting the sequence context based on the sequence context.

[0175] When performing sequence prediction on a base sequence and a quality value sequence, the prediction reference sequence includes: the context sequence in the base sequence and the context sequence in the quality value sequence. Sequence prediction on the base sequence and the quality value sequence is performed using a sequence prediction model based on the predicted reference sequence. This can involve inputting the context sequence and the quality value context sequence into a decoder within the sequence prediction model, predicting each base value following the context sequence to obtain a predicted probability distribution corresponding to the base value, and predicting each quality value following the quality value context sequence to obtain a predicted probability distribution corresponding to the quality value. For example, as shown in FIG7 , the context sequence of the base is "A" and the context sequence of the quality value sequence is "!". Input the base sequence context and the quality value context into the decoder, and the predicted probability distribution of the next base value of "A" is obtained as (A: 0.5, C: 0.1, G: 0.2, T: 0.2, N: 0). The predicted probability distribution of the next quality value of "!" is ('#': 0.21, '!': 0.05, '@': 0.08, 'H': 0.11, '%': 0.06, ...). Prediction is performed backward one by one to obtain the predicted sequence probability distribution of each base value after the base context and the predicted sequence probability distribution of each quality value after the quality value context, ultimately obtaining the predicted probability distribution sequence of the base sequence and the predicted probability distribution sequence of the quality value sequence.

[0176] The specific process of performing sequence prediction for base sequences and quality value sequences using a sequence prediction model including a decoder can be illustrated in Figure 8. First, the base context sequence and the quality value context sequence are input into the embedding layer for vectorization, and positional encoding is added to each of the base context sequence vector and the quality value context sequence vector. The positionally encoded base context vector sequence is concatenated with the quality value context sequence vector. This concatenated vector is input into the multi-head attention mechanism layer in the decoder, allowing the decoder to learn contextual information about the base context sequence, contextual information about the quality value context sequence, and strong correlations between the base context sequence and the quality value context sequence. The input vector and output vector of the multi-head attention mechanism are concatenated and normalized using residual connections and a normalization layer. The normalized result is input into the feedforward layer for full connection. The input vector and output vector of the feedforward layer are again concatenated and normalized using a reference connection and a normalization layer to obtain the decoded result of the decoder. If there are multiple decoders in the sequence prediction model, the above process can be repeated multiple times based on the serially connected decoders to obtain the final decoding result. The decoding results pass through the fully connected layer and the activation function layer in sequence to obtain the predicted probability distribution sequence corresponding to the base sequence output by the sequence prediction model and the predicted probability distribution sequence corresponding to the quality value sequence.

[0177] When using the sample base sequence and the sample quality value sequence to train the required prediction model including the decoder, it can specifically include: inputting the first predetermined number of sequence values ​​of the sample base sequence and the first predetermined number of sequence values ​​of the sample quality value sequence into the decoder in the sequence prediction model to obtain the predicted base sequence and the predicted quality value sequence; training the sequence prediction model based on the sample base sequence, the sample quality value sequence, and the sample loss between the predicted base sequence and the predicted quality value sequence.

[0178] When training the sequence prediction model, only the decoder may be trained. The detailed training process is the same as the training process of the sequence prediction model in the aforementioned embodiment and will not be repeated here.

[0179] When performing sequence prediction on both the base sequence and the quality value sequence simultaneously, the sequence prediction model including the decoder can simultaneously learn the contextual association information of the base sequence and the quality value sequence and the strong correlation between the sequences, which is conducive to improving the accuracy of simultaneous sequence prediction on the base sequence and the quality value sequence.

[0180] By using the predicted reference sequence of at least one of the base sequence or the quality value sequence to perform sequence prediction, a corresponding predicted probability distribution sequence can be obtained. Different inputs can be flexibly obtained according to different sequence prediction requirements of the base sequence and the quality value sequence, so that the sequence prediction model can fully perform corresponding sequence prediction based on the context association of the sequence and the association between the base sequence and the quality value sequence, thereby improving the accuracy and flexibility of sequence prediction.

[0181] In another embodiment, obtaining a predicted reference sequence of at least one of a base sequence or a quality value sequence includes:

[0182] Obtaining a predicted reference sequence of at least one of a base sequence or a quality value sequence and application text data of a gene sequencing application for generating gene sequencing data to be compressed;

[0183] Based on the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, including:

[0184] Based on the application text data and the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0185] In this embodiment, in addition to obtaining a predicted reference sequence for at least one of the base sequence and the quality value sequence, application text data for the gene sequencing application that generates the gene sequencing data to be compressed is also obtained. This application text data has been described in detail in the previous embodiment and will not be repeated here. Based on the application text data and the predicted reference sequence, a sequence prediction model is used to perform sequence prediction and obtain a predicted probability distribution sequence.

[0186] In one of the aforementioned embodiments, the sequence prediction model is trained based on sample base sequences, sample quality value sequences, and corresponding sample application text data. Based on this, in one embodiment, a sequence prediction is performed on at least one of the base sequences or quality value sequences using a preset sequence prediction model based on the application text data and the predicted reference sequence to obtain a predicted probability distribution sequence, including:

[0187] Vectorize the application text data to obtain the application text feature vector;

[0188] The application text feature vector and the predicted reference sequence are input into a preset sequence prediction model, and sequence prediction is performed on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence, the corresponding sample quality value sequence and the corresponding sample application text feature vector.

[0189] The application text feature vector and the predicted reference sequence are input into a preset sequence prediction model to perform sequence prediction on at least one of the base sequence and the quality value sequence. The resulting predicted probability distribution sequence is based on the sequencing method of the gene sequencing application, the contextual association of the base sequence or the quality value sequence, and the association between the base sequence and the quality value sequence. The specific training process of the sequence prediction model has been described in the previous embodiment and will not be repeated here.

[0190] Sequence prediction is performed based on the application of text feature vectors to predict reference sequences, which enables the use of one model to predict base sequences or quality value sequences of gene sequencing data from different gene sequencing applications, with high prediction efficiency.

[0191] In another embodiment, each gene sequencing application corresponds to a sequence prediction model;

[0192] Based on the application text data and the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, including:

[0193] Determine the corresponding target sequence prediction model based on the application text data;

[0194] The predicted reference sequence is input into a preset target sequence prediction model, and sequence prediction is performed on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0195] In this embodiment, each gene sequencing application corresponds to a sequence prediction model. After obtaining the application text data, a target sequence prediction model corresponding to the gene sequencing application can be determined based on the application text data. The target sequence prediction model can be trained based on sample base sequences and corresponding sample quality value sequences from the corresponding gene sequencing application. The specific training process is the same as the sequence prediction model training process in the aforementioned embodiment and will not be repeated here.

[0196] After obtaining the target sequence prediction model, the predicted reference sequence is input into the target sequence prediction model to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence. The sequence prediction process has been described in detail above and will not be repeated here.

[0197] Using the sequence prediction model corresponding to the gene sequencing application for sequence prediction can make the sequence prediction process more consistent with the sequencing principle of the corresponding gene sequencing application, and the predicted probability distribution sequence obtained by sequence prediction is more accurate.

[0198] Since the sequencing results obtained by different gene sequencing applications are different, sequence prediction based on application text data and predicted reference sequences can make the compression process of gene sequencing data applicable to different gene sequencing applications, thereby improving the compression rate of gene sequencing data to be compressed from different gene sequencing applications.

[0199] In one of the aforementioned embodiments, the sequence prediction model is trained using the sample base sequence, the sample quality value sequence, and the sample sequence alignment results. Based on this, in one embodiment, after obtaining a predicted reference sequence for at least one of the base sequence or the quality value sequence, the method further includes:

[0200] Obtaining a sequencing reference sequence of the base sequence, and performing a sequence alignment between the base sequence and the sequencing reference sequence to obtain a sequence alignment result;

[0201] Based on the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, including:

[0202] Based on the predicted reference sequence and the sequence alignment result, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0203] The process of using the base sequence to align with the sequencing reference sequence is the same as the process of using the sample base sequence to align with the sequencing reference sequence in the aforementioned sequence prediction model training process, and will not be repeated here.

[0204] Based on the comparison results between the predicted reference sequence and the sequence, the sequence prediction model can perform sequence prediction based on the strong correlation between the base sequence and the quality value sequence, and the obtained predicted probability distribution sequence has a high accuracy.

[0205] In step 230, entropy encoding is performed on at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed.

[0206] The predicted probability distribution sequence may include the predicted probability distribution corresponding to each sequence value in at least one of the base sequence or the quality value sequence. The true value label may include the true sequence value label corresponding to each sequence value in at least one of the base sequence or the quality value sequence. The true sequence value label is the true value of the sequence value. For example, the base sequence is "AT", and the predicted probability distribution sequence obtained by sequence prediction of the base sequence is {(A:0.3, C:0.1, G:0.4, T:0.2, N:0), (A:0.1, C:0.1, G:0.2, T:0.5, N:0.1)}, and "A" and "T" are the true sequence value labels corresponding to the two predicted probability distributions in the predicted probability distribution sequence.

[0207] Entropy coding is a lossless data compression code that can preserve the amount of information in the genetic sequencing data to be compressed during the compression process.

[0208] In one embodiment, entropy encoding is performed on at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed, including:

[0209] For each sequence value of at least one of the base sequence or the quality value sequence, entropy encoding each probability value based on the corresponding predicted probability distribution;

[0210] In the entropy coding result corresponding to each sequence value, obtain the coding result corresponding to the true sequence value label corresponding to the sequence value;

[0211] Based on the encoding result of the real sequence value label corresponding to each sequence value, the compressed data corresponding to the gene sequencing data to be compressed is obtained.

[0212] Performing entropy coding on at least one of the base sequence or the quality value sequence may be performing entropy coding on each sequence value in at least one of the base sequence or the quality value sequence. Taking entropy coding on the base sequence as an example, the predicted probability distribution sequence corresponding to the base sequence is {(A: 0.5, C: 0.2, G: 0.1, T: 0.1, N: 0.1), (A: 0.3, C: 0.1, G: 0.2, T: 0.4, N: 0), (A: 0.1, C: 0.3, G: 0.5, T: 0.1, N: 0)}. Each predicted probability distribution in the predicted probability distribution sequence corresponds to a sequence value in the base sequence. For each sequence value, entropy coding is performed on each probability value therein based on the predicted probability distribution sequence.

[0213] In one embodiment, for each sequence value of at least one of the base sequence or the quality value sequence, entropy encoding is performed on each probability value based on the corresponding predicted probability distribution, including:

[0214] For each sequence value of at least one of the base sequence or the quality value sequence, an entropy coding algorithm is used to perform entropy coding on each probability value based on the corresponding predicted probability distribution.

[0215] There are various entropy coding algorithms, including Huffman coding and arithmetic coding. Taking Huffman coding as an example, the predicted probability distribution corresponding to a sequence value is (A: 0.3, C: 0.1, G: 0.2, T: 0.4, N: 0). The entropy coding process using Huffman coding is shown in Figure 9. The probability values ​​in the predicted probability distribution, arranged in ascending order, are N: 0, C: 0.1, G: 0.2, A: 0.3, and T: 0.4. According to the principle of Huffman coding, first assign codeword 1 to N with the smallest probability value, assign codeword 0 to C, and add the probabilities corresponding to N and C to get a sum of 0.1; continue to sort the sum of N and C (0.1) with the other three probability values, the smallest is the sum of N and C (0.1), followed by G (0.2), so assign codeword 1 to 0.1, assign codeword 0 to G, and add the sum of N and C and the probability of G to get a sum of 0.3; sort N, C and The sum of G (0.3) is sorted with the other two probability values. The smallest values ​​are the sum of N, C, and G (0.3) and A (0.3). Therefore, the codeword 1 can be assigned to the sum of N, C, and G (0.3), and the codeword 0 can be assigned to A. The sum of the sum of N, C, and G and the probability of A is added to 0.6. After comparing 0.6 with the remaining probability T (0.4), the codeword 1 is assigned to T, which has the smaller probability value, and the codeword 0 is assigned to the sum of N, C, G, and A. Based on the above process, a Huffman tree corresponding to the predicted probability distribution is generated. Starting from the root node of the Huffman tree, the entropy coding result corresponding to each probability value can be obtained layer by layer. The entropy coding result of T (0.4) is 1, the entropy coding result of A (0.3) is 00, the entropy coding result of G (0.2) is 010, the entropy coding result of C (0.1) is 0110, and the entropy coding result of N (0) is 0111.

[0216] Using an entropy coding algorithm to perform entropy coding on each probability value can improve the accuracy of entropy coding.

[0217] After obtaining the entropy coding result corresponding to each sequence value, the encoding result corresponding to the actual sequence value tag corresponding to the sequence value is obtained. For example, the entropy coding result corresponding to a sequence value is (T:1, A:00, G:010, C:0110, N:0111). If the actual sequence value tag corresponding to this sequence value is A, then the encoding result corresponding to the actual sequence value tag is 00. Since a base sequence value occupies 1 byte, each unit in the encoding result occupies 1 bit. Therefore, the encoding result can be used as the compression result corresponding to the base sequence value. For example, compressing A to 00 means compressing 1 byte of data into 2 bits of data.

[0218] After obtaining the encoding results of the true sequence value labels corresponding to each sequence value, the encoding results corresponding to each sequence value are concatenated to obtain the compressed data corresponding to the gene sequencing data to be compressed. For example, the true value label of the base sequence is "AAC", where the encoding result corresponding to the first base value "A" is 1, the encoding result corresponding to the second base value "A" is 00, and the encoding result corresponding to the third base value "C" is 01. Therefore, the compressed data corresponding to this base sequence is "10001".

[0219] The compressed data corresponding to the gene sequencing data to be compressed may be compressed data obtained by compressing the base sequence alone; may be compressed data obtained by compressing the quality value sequence alone; or may be compressed data obtained by compressing both the base sequence and the quality value sequence.

[0220] When only the base sequence in the gene sequencing data to be compressed is compressed, the compression process can be shown as in Figure 10A. For each base value in the base sequence, a predicted probability distribution for the current base is obtained based on the previous sequence in the base sequence and the complete quality value sequence; the entropy coding result of each probability value is obtained based on the predicted probability distribution of the current base; and the corresponding entropy coding result is obtained from the entropy coding results of multiple probability values ​​using the true sequence value label of the current base, and is used as the compressed value of the current base. By obtaining the compressed value corresponding to each base value in the base sequence in the above manner, compressed data is obtained by compressing only the base sequence in the gene sequencing data to be compressed.

[0221] When only the quality value sequence in the gene sequencing data to be compressed is compressed, the compression process can be shown as in Figure 10B. For each quality value in the quality value sequence, a predicted probability distribution of the current quality value is obtained based on the previous sequence in the quality value sequence and the complete base sequence. The entropy coding result of each probability value is obtained based on the predicted probability distribution of the current quality value. The corresponding entropy coding result is obtained from the entropy coding results of the multiple probability values ​​using the true sequence value label of the current quality value, and is used as the compressed value of the current quality value. By obtaining the compressed value corresponding to each quality value in the quality value sequence in the above manner, compressed data is obtained by compressing only the quality value sequence in the gene sequencing data to be compressed.

[0222] When compressing the base sequence and quality value sequence in the gene sequencing data to be compressed at the same time, the compression process can be shown as in Figure 7C. For each base value in the base sequence and each quality value in the quality value sequence, the predicted probability distribution of the current base and the predicted probability distribution of the current quality value are obtained based on the previous sequence in the base sequence and the previous sequence in the quality value sequence; the entropy coding result corresponding to each probability value is obtained based on the predicted probability distribution of the current base, and the entropy coding result corresponding to each probability value is obtained based on the predicted probability distribution of the current quality value; the corresponding entropy coding result is determined using the real sequence value label of the current base, and the corresponding entropy coding result is determined using the real sequence value label of the current quality value. The compression value corresponding to each base value and the compression value corresponding to each quality value are obtained in the above manner, and finally the compressed data in which the base sequence and the quality value sequence are compressed at the same time in the gene sequencing data to be compressed is obtained.

[0223] In the above embodiment, for each sequence value of at least one item in the base sequence or the quality value sequence, each probability value is entropy encoded based on the corresponding predicted probability distribution. Since entropy coding maps each probability value to codes of different lengths based on the size of the probability value, the larger the probability value, the shorter the code, and the shorter the compression length. Therefore, if the probability value corresponding to the true sequence value label corresponding to the sequence value in the corresponding predicted probability distribution is larger, the amount of data after the true sequence value label is compressed is smaller. Therefore, the embodiment of the present disclosure improves the probability value of the true sequence value label in the corresponding predicted probability distribution by improving the accuracy of sequence prediction by the sequence prediction model, and then reduces the amount of data of the compressed value corresponding to each sequence value by using entropy coding. Based on the compressed value corresponding to each sequence value, compressed data of the gene sequencing data to be compressed is obtained. Therefore, the amount of compressed data of the gene sequencing data to be compressed is reduced, and the compression rate of the gene sequencing data to be compressed is improved.

[0224] In another embodiment, entropy encoding is performed on at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed, including:

[0225] Based on the true value label of each data to be predicted in the sequence to be predicted, determine the probability ranking value of the data to be predicted in the prediction probability distribution sequence;

[0226] The probability ranking values ​​are entropy encoded to obtain compressed data corresponding to the gene sequencing data to be compressed.

[0227] The predicted probability distribution sequence contains the predicted probability distribution corresponding to each data point to be predicted, and each predicted probability distribution can be sorted. For each data point to be predicted, the probability ranking value can be determined based on the ranking of the true value label in the corresponding predicted probability distribution ranking. By performing entropy coding on the probability ranking value corresponding to each data point to be predicted, the compressed data corresponding to the gene sequencing data to be compressed is obtained. Entropy coding the probability ranking value can convert the probability ranking value into the corresponding binary value. Therefore, the result of entropy coding a probability ranking value of 0 is 0, the result of entropy coding a probability ranking value of 1 is 1, and the result of entropy coding a probability ranking value of 2 is 10.

[0228] For example, the predicted probability distribution corresponding to a data to be predicted in the predicted probability distribution sequence is (A: 0.3, C: 0.1, G: 0.4, T: 0.2, N: 0). The sorted result is shown in Figure 11, which is G, A, T, C, and N. The corresponding true value label of the data to be predicted is A, which ranks second in the sorted result. Then the probability ranking value of the true value label can be 1 (starting from 0), and the result of entropy encoding of the probability ranking value is 1.

[0229] When only the base sequences in the gene sequencing data to be compressed are compressed, the compression process can be illustrated as shown in Figure 12A. For each base value, a predicted probability distribution for the current base is obtained based on the previous sequence in the base sequence and the complete quality value sequence; the probability ranking value of the current base's true value label in the predicted probability distribution of the current base is obtained; and the probability ranking value is entropy encoded to obtain the compressed value of the current base.

[0230] When only the quality value sequence in the gene sequencing data to be compressed is compressed, the compression process can be as shown in Figure 12B. For each quality value, the predicted probability distribution of the current quality value is obtained based on the previous sequence in the quality value sequence and the complete base sequence; the probability ranking value of the true value label of the current quality value in the predicted probability distribution of the current quality value is obtained; and the probability ranking value is entropy encoded to obtain the compressed value of the current quality value.

[0231] When compressing the quality value sequence and the base sequence in the gene sequencing data to be compressed at the same time, the compression process can be as shown in Figure 12C. For each base value in the base sequence and each quality value in the quality value sequence, the previous sequence in the base sequence and the previous sequence in the quality value sequence are used to obtain the predicted probability distribution of the current base and the predicted probability distribution of the current quality value; the probability ranking value of the true value label of the current base in the corresponding predicted probability distribution and the probability ranking value of the true value label of the current quality value in the corresponding predicted probability distribution are obtained; the probability ranking value corresponding to the current base is entropy encoded as the compressed value of the current base, and the probability ranking value corresponding to the current quality value is entropy encoded as the compressed value of the current quality value.

[0232] Entropy encoding is performed on the probability ranking values ​​of the true value labels in the corresponding predicted probability distribution to produce a compressed value for each sequence value. The greater the probability corresponding to the true value label, the smaller the probability ranking value, and the shorter the compressed value obtained by entropy encoding. Furthermore, compared to entropy coding algorithms, entropy encoding of the probability ranking values ​​produces a shorter compressed value. Therefore, using the probability ranking values ​​for entropy encoding can further improve the compression rate. Directly entropy encoding the probability ranking values ​​can also significantly improve compression efficiency.

[0233] According to another embodiment of the present disclosure, a method for decompressing gene sequencing data is provided.

[0234] FIG13 is a flow chart of a method for decompressing gene sequencing data provided by the present disclosure. This method can be applied to a device for decompressing gene sequencing data. The method for decompressing gene sequencing data may include:

[0235] Step 1310: Obtain the above data of the gene sequencing data to be decompressed;

[0236] Step 1320: Perform sequence prediction based on a preset sequence prediction model and the above data to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence and the corresponding sample quality value sequence;

[0237] Step 1330: determining a target probability sequence in the predicted probability distribution sequence based on the gene sequencing data to be decompressed;

[0238] Step 1340: Determine the decompression result corresponding to the gene sequencing data to be decompressed according to the target probability sequence.

[0239] In step 1310, the above data of the gene sequencing data to be decompressed is obtained.

[0240] The gene sequencing data to be decompressed may be at least one of a base sequence to be decompressed and a corresponding quality value sequence to be decompressed. If the gene sequencing data to be decompressed is a base sequence to be decompressed, the above data includes the above sequence of the corresponding base sequence and the quality value sequence corresponding to the base sequence that does not need to be decompressed. If the gene sequencing data to be decompressed is a quality value sequence to be decompressed, the above data includes the above sequence of the corresponding quality value sequence and the base sequence corresponding to the quality value sequence that does not need to be decompressed. If the gene sequencing data to be decompressed is a base sequence to be decompressed and a quality value sequence, the above data includes the above sequence of the corresponding base sequence and the above sequence of the corresponding quality value sequence.

[0241] In step 1320, sequence prediction is performed based on a preset sequence prediction model and the above data to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence and the corresponding sample quality value sequence.

[0242] The preset sequence prediction model can be a neural network model based on the Transformer as a basic unit. The sample base sequence is the base sequence obtained by sequencing the gene fragment, and the sample quality value sequence is the quality value sequence corresponding to the sample base sequence. The training process of the sequence prediction model can be the same as the training process of the sequence prediction model in the aforementioned gene sequencing data compression method and will not be repeated here.

[0243] Sequence prediction is performed based on a preset sequence prediction model and the above data. Sequence prediction can be performed by inputting the above data into the preset sequence prediction model. The predicted probability distribution sequence can be a probability distribution sequence of candidate values ​​corresponding to each sequence value in the gene sequencing data to be decompressed. For example, the gene sequencing data to be decompressed is a base sequence to be decompressed, and the above sequence includes the above sequence of the base sequence to be decompressed and the corresponding quality value sequence that does not need to be decompressed, wherein the above sequence of the base sequence to be decompressed is "A" and the quality value sequence is "!#H". The predicted probability distribution sequence obtained based on the above data is {(A:0.5, C:0.2, G:0.1, T:0.1, N:0.1), (A:0.3, C:0.1, G:0.2, T:0.4, N:0), (A:0.1, C:0.3, G:0.5, T:0.1, N:0)}, which represents the predicted probability distribution of candidate values ​​corresponding to each base value in the base sequence to be decompressed. Among them, the first predicted probability distribution (A:0.5, C:0.2, G:0.1, T:0.1, N:0.1) means that the probability of the next base of the above sequence "A" being "A" is 0.5, the probability of it being C is 0.2, and so on.

[0244] The process of performing sequence prediction using a sequence prediction model may be the same as the process of performing sequence prediction using a sequence prediction model in the aforementioned gene sequencing data compression method, and will not be described in detail here.

[0245] Since the gene sequencing data to be decompressed can be at least one of the base sequence to be decompressed and the corresponding quality value sequence to be decompressed. Therefore, the same as the compression method of the aforementioned gene sequencing data, when the gene sequencing data to be decompressed only contains one of the base sequence to be decompressed and the quality value sequence to be decompressed, the sequence prediction model includes an encoder and a decoder. The process of using the encoder and the decoder for sequence prediction is the same as the aforementioned embodiment and will not be repeated here. When the gene sequencing data to be decompressed includes the base sequence to be decompressed and the quality value sequence to be decompressed, the sequence prediction model includes a decoder. The process of using the decoder for sequence prediction is the same as the aforementioned embodiment and will not be repeated here.

[0246] In step 1330 , a target probability sequence is determined in the predicted probability distribution sequence based on the gene sequencing data to be decompressed.

[0247] Because the predicted probability distribution sequence can contain predicted probability distributions corresponding to multiple sequence values, the to-be-decompressed gene sequencing data can contain compressed codes for multiple sequence values. For example, the to-be-decompressed gene sequencing data "00 010 10 1" contains compressed codes for four sequence values, and the predicted probability distribution sequence contains the predicted probability distributions corresponding to these four sequence values. The target probability sequence can be a sequence consisting of the probabilities corresponding to the compressed codes of each sequence value in the predicted probability distribution.

[0248] In one embodiment, determining a target probability sequence in a probability distribution sequence based on the gene sequencing data to be decompressed includes:

[0249] Performing entropy coding on each predicted probability distribution in the predicted probability distribution sequence;

[0250] Based on the compression code of each sequence value in the gene sequencing data to be decompressed, the target probability is determined in the entropy coding result of the corresponding predicted value probability distribution to obtain a target probability sequence.

[0251] Entropy coding maps each probability value in the predicted probability distribution to a code of varying length, based on its magnitude. The larger the probability value, the shorter the code. Entropy coding can be performed on each probability value using an entropy coding algorithm, such as Huffman coding or arithmetic coding. The decompression process can use the same entropy coding algorithm as the compression process to achieve the same entropy coding result as the compression process, resulting in accurate decompression results.

[0252] After entropy encoding each predicted probability distribution, the probability value corresponding to the compression code of each sequence value in the decompressed genetic data is determined from the entropy encoding result of the corresponding predicted probability distribution. For example, the compression code of a sequence value in the decompressed base sequence is "00", and the entropy encoding of the probability prediction distribution corresponding to this sequence value is (0.4:1, 0.3:00, 0.2:010, 0.1:0110, 0:0111). Based on this compression code, the corresponding target probability is determined to be 0.3 from the entropy encoding result of this probability prediction distribution.

[0253] The above process determines the target probability corresponding to the compression code of each sequence value, forming a target probability sequence. For example, if the gene sequencing data to be decompressed is "00 010 10 1", the target probability sequence formed by the target probability corresponding to each compression code is (0.3, 0.1, 0.25, 0.5).

[0254] After determining the target probability in the entropy coding result of the corresponding predicted probability distribution for the compression code of each sequence value, a target probability sequence is obtained, thereby improving the accuracy of determining the target probability sequence.

[0255] In another embodiment, determining a target probability sequence in a predicted probability distribution sequence based on the gene sequencing data to be decompressed comprises:

[0256] Perform entropy coding on each data to be decoded in the gene sequencing data to be decompressed to obtain a predicted ranking value of the data to be decompressed;

[0257] A target probability sequence is determined in the predicted probability distribution sequence based on the predicted ranking values ​​and the ranking of the probability values ​​in each predicted probability distribution in the predicted probability distribution sequence.

[0258] In one embodiment of the aforementioned gene sequencing data compression method, the gene sequencing data is entropy encoded based on the probability ranking of the true value labels of the data to be predicted within the predicted probability distribution sequence. Therefore, the decompression process of the gene sequencing data to be decompressed can also be decoded based on the probability ranking.

[0259] Specifically, entropy encoding is first performed on each data point in the decompressed gene sequencing data to obtain a predicted ranking value for the data. The entropy encoding method used during data decompression is the same as the entropy encoding method used during data compression. For example, when compressing data, entropy encoding is performed by converting decimal numbers into binary numbers. When decompressing data, entropy encoding is performed by converting binary numbers into decimal numbers. For example, if the data point to be decompressed is 10, the predicted ranking value obtained by entropy encoding is 2.

[0260] Sort the probability values ​​in each predicted probability distribution in the predicted probability distribution sequence from largest to smallest, and obtain the target probability corresponding to the predicted ranking value from the sorting. For example, if the predicted probability distribution is (A:0.3, C:0.1, G:0.2, T:0.4, N:0), the sorted result is (T:0.4, A:0.3, G:0.2, C:0.1, N:0). Since the predicted ranking value corresponding to the data to be decompressed is 2 (starting from 0), the target probability corresponding to the predicted ranking value of 2 obtained from the sorting result is 0.2 (G).

[0261] For example, if the sequence of gene sequencing data to be decompressed is "0 10 0 1," the corresponding predicted probability distribution sequence is {(A:0.3, C:0.1, G:0.2, T:0.4, N:0), (A:0.2, C:0.3, G:0.1, T:0.4, N:0), (A:0.1, C:0.5, G:0.2, T:0.1, N:0.1), (A:0.1, C:0.3, G:0.4, T:0.2, N:0)}. By performing entropy coding on each piece of the sequence data to be decompressed, the corresponding probability ranking values ​​are 0, 2, 0, and 1. In the first predicted probability distribution sequence, the target probability for a probability ranking value of 0 is 0.4; in the second predicted probability distribution, the target probability for a probability ranking value of 2 is 0.2. By analogy, the target probability sequence is (0.4, 0.2, 0.5, 0.3).

[0262] By using the predicted ranking value corresponding to each to-be-decoded data and the ranking of the probability values ​​in the corresponding predicted probability distribution to determine the target probability sequence, the efficiency of determining the target probability sequence can be improved.

[0263] In step 1340 , the decompression result corresponding to the to-be-decompressed gene sequencing data is determined according to the target probability sequence.

[0264] Since the target probability sequence can be a sequence composed of the probabilities corresponding to the predicted probability distribution of the compressed code of each sequence value in the to-be-decompressed genetic sequencing data, the decompression result corresponding to the to-be-decompressed genetic sequencing data can be determined based on the target probability sequence by determining the candidate value corresponding to each probability value in the predicted probability distribution corresponding to each sequence value, and then obtaining the decompression result corresponding to the to-be-decompressed genetic sequencing data based on the candidate value corresponding to each probability value.

[0265] For example, a base sequence to be decompressed is "00 010 10 1", the corresponding target probability sequence is (0.3, 0.1, 0.25, 0.5), and the predicted probability distribution sequence is {(A:0.5, C:0.3, G:0.1, T:0.1, N:0.0), (A:0.3, C:0.2, G:0.1, T:0.4, N:0), (A:0.1, C:0.25, G:0.5, T:0.1, N:0.05), (A:0.5, C:0.1, G:0.35, T:0.05, N:0)}. The candidate value corresponding to 0.3 in the target probability sequence in the predicted probability distribution (A:0.5,C:0.3,G:0.1,T:0.1,N:0.0) is C, so the decompression result corresponding to the compressed code "00" is C; the candidate value corresponding to 0.1 in the target probability sequence in the predicted probability distribution (A:0.3,C:0.2,G:0.1,T:0.4,N:0) is G, so the decompression result corresponding to the compressed code "010" is G; The candidate value corresponding to 0.25 in the target probability sequence in the predicted probability distribution (A:0.1, C:0.25, G:0.5, T:0.1, N:0.05) is C, so the decompression result corresponding to the compressed code "10" is C. The candidate value corresponding to 0.5 in the target probability sequence in the predicted probability distribution (A:0.5, C:0.1, G:0.35, T:0.05, N:0) is A, so the decompression result corresponding to the compressed code "1" is A. Therefore, the decompression result corresponding to the base sequence to be decompressed "00 010 10 1" is "CGCA".

[0266] Since the gene sequencing data to be decompressed can be at least one of a base sequence to be decompressed and a quality value sequence to be decompressed, the process of decompressing the gene sequencing data using steps 1310 to 1340 is divided into the following three cases:

[0267] When the gene sequencing data to be decompressed is a base sequence to be decompressed, as shown in FIG14A , for each base value in the base sequence to be decompressed, the predicted probability distribution of the current base is determined using the context sequence of the base sequence to be decompressed and the complete quality value sequence; after determining the target probability corresponding to the compression value of the current base in the predicted probability distribution, the decompression result of the current base is determined based on the target probability.

[0268] When the gene sequencing data to be decompressed is a quality value sequence to be decompressed, as shown in FIG14B , for each quality value in the quality value sequence to be decompressed, the predicted probability distribution of the current quality value is determined using the context sequence of the quality value sequence to be decompressed and the complete base sequence; after determining the target probability corresponding to the compression value of the current quality value in the predicted probability distribution, the decompression result of the current quality value is determined based on the target probability.

[0269] When the gene sequencing data to be decompressed is a base sequence and a quality value sequence to be decompressed, as shown in FIG14C , for the base value and the quality value corresponding to each position, the context sequence of the base sequence to be decompressed and the context sequence of the quality value sequence to be decompressed are used to determine the predicted probability distribution of the base at the current position and the predicted probability distribution of the quality value at the current position; after determining the target probability corresponding to the compression value of the current base in the predicted probability distribution of the base, the decompression result of the current base is determined based on the target probability; after determining the target probability corresponding to the compression value of the current quality value in the predicted probability distribution of the quality value, the decompression result of the current quality value is determined based on the target probability.

[0270] In the embodiment of steps 1310-1340, the sequence prediction model trained based on the sample base sequence and the corresponding sample quality value sequence can perform sequence prediction based on the contextual association between the base sequence and the quality value sequence, as well as the association between the base sequence and the quality value sequence, resulting in a highly accurate predicted probability distribution sequence. Therefore, the target probability sequence corresponding to the to-be-decompressed gene sequence data determined from the predicted probability distribution sequence is relatively high, thereby achieving a highly accurate decompression result.

[0271] The embodiments of the present disclosure are described in detail in conjunction with specific application scenarios.

[0272] The present disclosure provides a method for compressing gene sequencing data, which specifically includes the following stages:

[0273] Modeling stage: The compression method of the gene sequencing data of the embodiment of the present disclosure can construct a neural network model with transformer as the basic unit for sequence prediction. During the training stage of the neural network model, a self-supervised learning task can be constructed for the sample base sequence and the corresponding sample quality value sequence, so that the neural network model can learn the strong correlation between the base sequence and the quality value sequence. The training process can refer to Figure 4, and the sample loss between the sample base sequence, the sample quality value sequence, the predicted base sequence and the predicted quality value sequence is used to train the neural network model. The sample data used to train the model can be obtained based on FASTQ data.

[0274] Since the gene sequencing data of the disclosed embodiments can be compressed for either the base sequence or the quality value sequence, or both simultaneously, the structure of the neural network model varies depending on the compression requirements. When compressing either the base sequence or the quality value sequence, the structure of the neural network model can refer to FIG6 , which includes an encoder and a decoder. When training this neural network model, the first predetermined number of quality values ​​of the sample base sequence and the sample quality value sequence can be input, and the neural network model is trained by predicting the subsequent quality value sequence and calculating the loss between the sample quality value sequence and the predicted quality value sequence. Alternatively, the first predetermined number of base values ​​of the sample quality value sequence and the sample base sequence can be input, and the neural network model is trained by predicting the subsequent base sequence and calculating the loss between the sample quality value sequence and the predicted base sequence. When compressing both the base sequence and the quality value sequence, the structure of the neural network model can refer to FIG8 , which includes a decoder. When training this neural network model, the first predetermined number of base values ​​of the sample base sequence and the first predetermined number of quality values ​​of the sample quality value sequence can be input, and the subsequent base sequence and quality value sequence can be predicted. The neural network model is trained by calculating the sample loss between the sample base sequence and the predicted base sequence, and the sample loss between the sample quality value sequence and the predicted quality value sequence.

[0275] During the training of the neural network model, the neural network model can also learn the application characteristics of the genetic sequencing application corresponding to the genetic sequencing data to improve the generalization ability of the disclosed embodiment in applying to different genetic sequencing applications; after performing sequence alignment on the sample base sequences, the neural network model can also be trained based on the sequence alignment results so that the neural network model can learn more correlations between the base sequences and the quality value sequences, thereby improving the prediction accuracy of the neural network model.

[0276] Prediction phase: The neural network model trained in the modeling phase is used to predict the base sequence and quality value sequence. The prediction phase is divided into two cases: predicting only the base sequence or the quality value sequence; and predicting both the base sequence and the quality value sequence.

[0277] When only the base sequence or the quality value sequence is predicted, the neural network model includes an encoder and a decoder, and the model structure is shown in Figure 6. When only the base sequence is predicted, referring to Figure 5A, the predicted previous sequence of the data to be predicted and the complete quality value sequence can be obtained. The quality value sequence is input into the encoder, and the encoding result and the predicted previous sequence are input into the decoder to obtain the predicted probability distribution of various possibilities for the subsequent bases of the predicted previous sequence. When only the quality value sequence is predicted, referring to Figure 5B, the predicted previous sequence of the data to be predicted and the complete base sequence can be obtained. The base sequence is input into the encoder, and the encoding result and the predicted previous sequence are input into the decoder to obtain the predicted probability distribution of various possibilities for the subsequent quality values ​​of the predicted sequence.

[0278] When predicting both the base sequence and the quality value sequence simultaneously, the structure of the neural network model, including the decoder, can be seen in FIG8 . The sequence prediction process is shown in FIG7 . A base context sequence and a quality value context sequence are obtained and input into the neural network model to obtain a predicted probability distribution for various possible subsequent bases in the base context sequence and a predicted probability distribution for various possible subsequent quality values ​​in the quality value context sequence.

[0279] Compression phase: Initialize the result stream to store the compressed data. For each base and quality value at each position in the gene sequencing data, compression encoding is performed based on the predicted probability distribution obtained in the prediction phase, and the encoding results are written to the corresponding result stream. Compression ends after all positions have been traversed.

[0280] For the base and quality value at each position, a compression method can perform entropy coding based on the predicted probability distribution obtained in the prediction stage, and write the codeword of the real character corresponding to the predicted probability distribution into the result code stream. The entropy coding algorithm can be Huffman coding, arithmetic coding, etc. The input of the compression stage is consistent with the input of the prediction stage, and can be specifically referred to Figures 10A-10C. In Figure 10A, the predicted probability distribution of the base at the current position is obtained based on the above sequence in the base sequence and the quality value sequence prediction. After the predicted probability distribution is entropy coded, the codeword corresponding to the real sequence value label of the current base is written as the compressed value of the current base into the result code stream corresponding to the base sequence. In Figure 10B, the predicted probability distribution of the quality value at the current position is obtained based on the above sequence in the base sequence and the quality value sequence prediction. After the predicted probability distribution is entropy coded, the codeword corresponding to the real sequence value label of the current quality value is written as the compressed value of the current quality value into the result code stream corresponding to the quality value sequence. In FIG10C , the predicted probability distribution of the base at the current position and the predicted probability distribution of the quality value are predicted based on the previous sequence in the base sequence and the previous sequence in the quality value sequence. After entropy coding is performed on these two predicted probability distributions, the codeword corresponding to the true sequence value label of the current base is written as the compressed value of the current base into the result codestream corresponding to the base sequence, and the codeword corresponding to the true sequence value label of the current quality value is written as the compressed value of the current quality value into the result codestream corresponding to the quality value sequence.

[0281] Another compression method for the base and quality value at each position is to encode based on the ranking of the probability values ​​corresponding to the real characters in the predicted probability distribution. For details, please refer to Figures 12A-12C. In Figure 12A, the predicted probability distribution of the base at the current position is obtained based on the previous sequence in the base sequence and the complete quality value sequence. The probability ranking value of the real value label corresponding to the current base in the probability distribution is encoded, and the encoding result is written to the result code stream corresponding to the base sequence. In Figure 12B, the predicted probability distribution of the quality value at the current position is obtained based on the complete base sequence and the previous sequence in the quality value sequence. The probability ranking value of the real value label corresponding to the current quality value in the probability distribution is encoded, and the encoding result is written to the result code stream corresponding to the quality value sequence. In Figure 12C, the predicted probability distribution of the base and quality value at the current position is obtained based on the previous sequence in the base sequence and the previous sequence in the quality value sequence. The probability ranking value of the real value label of the current base in the corresponding probability distribution is encoded, and the encoding result is written to the result code stream corresponding to the base sequence. The probability ranking value of the true value label of the current quality value in the corresponding probability distribution is encoded, and the encoding result is written into the result code stream corresponding to the quality value sequence.

[0282] Experimental verification shows that the compression method of the embodiment of the present disclosure can be used to compress gene sequencing data, and the compression rate can be increased by nearly 30% compared with the compression method in the related art.

[0283] The present disclosure provides a method for decompressing gene sequencing data. The modeling and prediction stages included in the decompression process are the same as those in the compression process and will not be described in detail here.

[0284] The decompression process specifically includes a decompression phase. During the decompression phase, the compressed bitstream is read. The compression results for each position in the compressed bitstream are restored based on the predicted probability distribution corresponding to the base and quality value at each position obtained in the prediction phase. The specific process can be seen in Figures 14A-14C. In Figure 14A, the decompressed bitstream is a base sequence. For each base position in the decompressed base sequence, the decompression result corresponding to the compression value of the current base is determined from the corresponding predicted probability distribution. In Figure 14B, the decompressed bitstream is a quality value sequence. For each quality value at each position in the decompressed quality value sequence, the decompression result corresponding to the compression value of the current quality value is determined from the corresponding predicted probability distribution. In Figure 14C, the decompressed bitstream includes a base sequence and a quality value sequence. For each base position and quality value, the decompression result corresponding to the compression value of the current base is determined from the predicted probability distribution corresponding to the base, and the decompression result corresponding to the compression value of the current quality value is determined from the predicted probability distribution corresponding to the quality value.

[0285] Description of the apparatus and device of the present disclosure

[0286] It is to be understood that, although the steps in the above-mentioned flowcharts are shown in sequence according to the arrow representations, these steps are not necessarily performed in sequence according to the order represented by the arrows. Unless otherwise specified in the present embodiment, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0287] It should be noted that in each specific embodiment of the present disclosure, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object, such as the target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of such data will comply with the relevant laws, regulations and standards of the relevant region. In addition, when the embodiment of the present application needs to obtain the attribute information of the target object, the target object's separate permission or separate consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the target object's separate permission or separate consent, the necessary target object-related data for the normal operation of the embodiment of the present application will be obtained.

[0288] FIG15 is a schematic diagram of the structure of a gene sequencing data compression device 1500 provided in an embodiment of the present disclosure. The gene sequencing data compression device 1500 includes:

[0289] A first acquiring unit 1510 is configured to acquire gene sequencing data to be compressed, where the gene sequencing data to be compressed includes a base sequence and a corresponding quality value sequence;

[0290] A first prediction unit 1520 is configured to perform sequence prediction on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence and the corresponding sample quality value sequence;

[0291] The encoding unit 1530 is used to perform entropy encoding on at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed.

[0292] In one embodiment, the first prediction unit 1520 is specifically configured to:

[0293] Obtaining a predicted reference sequence of at least one of a base sequence or a quality value sequence;

[0294] Based on the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0295] In one embodiment, the first prediction unit 1520 is specifically configured to:

[0296] Obtaining a predicted reference sequence of at least one of a base sequence or a quality value sequence and application text data of a gene sequencing application for generating gene sequencing data to be compressed;

[0297] Based on the application text data and the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0298] In one embodiment, the first prediction unit 1520 is specifically configured to:

[0299] Vectorize the application text data to obtain the application text feature vector;

[0300] The application text feature vector and the predicted reference sequence are input into a preset sequence prediction model, and sequence prediction is performed on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence, the corresponding sample quality value sequence and the corresponding sample application text feature vector.

[0301] In one embodiment, each gene sequencing application corresponds to a sequence prediction model;

[0302] The first prediction unit 1520 is specifically configured to:

[0303] Determine the corresponding target sequence prediction model based on the application text data;

[0304] The predicted reference sequence is input into a preset target sequence prediction model, and sequence prediction is performed on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

[0305] In one embodiment, the sequence prediction model includes an encoder and a decoder;

[0306] The first prediction unit 1520 is specifically configured to:

[0307] Determine either the base sequence or the quality value sequence as a reference sequence, and obtain a predicted context sequence corresponding to the sequence to be predicted based on the determined reference sequence;

[0308] Input the reference sequence into the encoder to obtain the encoding result;

[0309] The encoding result and the predicted context sequence are input into the decoder to obtain the predicted probability distribution sequence output by the decoder.

[0310] In one embodiment, the sequence prediction model includes a decoder;

[0311] The first prediction unit 1520 is specifically configured to:

[0312] Obtaining a predicted reference sequence corresponding to the base sequence and the quality value sequence;

[0313] The predicted reference sequence is input into the decoder to obtain the predicted probability distribution sequence output by the decoder.

[0314] In one embodiment, the sequence prediction model is trained by:

[0315] Obtaining the sample base sequence and the corresponding sample quality value sequence;

[0316] Inputting the sample base sequence and the sample quality value sequence into the sequence prediction model to obtain the predicted base sequence and the predicted quality value sequence;

[0317] The sample loss is obtained based on the sample base sequence, the sample quality value sequence, the predicted base sequence and the predicted quality value sequence, and a sequence prediction model is trained based on the sample loss.

[0318] In one embodiment, after obtaining the sample base sequence and the corresponding sample quality value sequence, the sequence prediction model training process further includes:

[0319] Obtain a sequencing reference sequence, and use the sample base sequence to perform sequence alignment with the sequencing reference sequence to obtain a sample sequence alignment result;

[0320] The sample base sequence and the sample quality value sequence are input into the sequence prediction model to obtain the predicted base sequence and the predicted quality value sequence, including:

[0321] The sample base sequence, sample quality value sequence and sample sequence comparison results are input into the sequence prediction model to predict the predicted base sequence and predicted quality value sequence.

[0322] In one embodiment, the predicted probability distribution sequence includes a predicted probability distribution corresponding to each sequence value in at least one of the base sequence or the quality value sequence; the corresponding true value label includes a true sequence value label corresponding to each sequence value in at least one of the base sequence or the quality value sequence;

[0323] The encoding unit 1530 is specifically configured to:

[0324] For each sequence value of at least one of the base sequence or the quality value sequence, entropy encoding each probability value based on the corresponding predicted probability distribution;

[0325] In the entropy coding result corresponding to each sequence value, obtain the coding result corresponding to the true sequence value label corresponding to the sequence value;

[0326] Based on the encoding result of the real sequence value label corresponding to each sequence value, the compressed data corresponding to the gene sequencing data to be compressed is obtained.

[0327] In one embodiment, the encoding unit 1530 is specifically configured to:

[0328] Based on the true value label of each data to be predicted in the sequence to be predicted, determine the probability ranking value of the data to be predicted in the prediction probability distribution sequence;

[0329] The probability ranking values ​​are entropy encoded to obtain compressed data corresponding to the gene sequencing data to be compressed.

[0330] FIG16 is a schematic diagram of the structure of a gene sequencing data decompression device 1600 provided in an embodiment of the present disclosure. The gene sequencing data decompression device 1600 includes:

[0331] The second acquiring unit 1610 is configured to acquire the above data of the gene sequencing data to be decompressed;

[0332] A second prediction unit 1620 is configured to perform sequence prediction based on a preset sequence prediction model and the above data to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence and the corresponding sample quality value sequence;

[0333] A first determining unit 1630 is configured to determine a target probability sequence in the predicted probability distribution sequence based on the gene sequencing data to be decompressed;

[0334] The second determining unit 1640 is configured to determine a decompression result corresponding to the to-be-decompressed gene sequencing data according to the target probability sequence.

[0335] In one embodiment, the predicted probability distribution sequence includes predicted probability distributions corresponding to multiple sequence values; the gene sequencing data to be decompressed includes compression codes of multiple sequence values;

[0336] The first determining unit 1630 is specifically configured to:

[0337] Performing entropy coding on each predicted probability distribution in the predicted probability distribution sequence;

[0338] Based on the compression code of each sequence value in the gene sequencing data to be decompressed, the target probability is determined in the entropy coding result of the corresponding predicted value probability distribution to obtain a target probability sequence.

[0339] Referring to FIG17 , FIG17 is a block diagram of the structure of a portion of a terminal 140 that implements the gene sequencing data compression and decompression methods according to an embodiment of the present disclosure. The terminal 140 includes components such as a radio frequency (RF) circuit 1710, a memory 1715, an input unit 1730, a display unit 1740, a sensor 1750, an audio circuit 1760, a wireless fidelity (WiFi) module 1770, a processor 1780, and a power supply 1790. Those skilled in the art will appreciate that the structure of the terminal 140 shown in FIG17 does not limit the structure to a mobile phone or a computer, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0340] The RF circuit 1710 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 1780 for processing. In addition, the designed uplink data is sent to the base station.

[0341] The memory 1715 may be used to store software programs and modules. The processor 1780 executes various functional applications of the terminal and identifies lane change points by running the software programs and modules stored in the memory 1715 .

[0342] The input unit 1730 may be configured to receive input digital or character information and generate key signal input related to the terminal's settings and function control. Specifically, the input unit 1730 may include a touch panel 1731 and other input devices 1732 .

[0343] The display unit 1740 may be configured to display input information or provided information and various menus of the terminal. The display unit 1740 may include a display panel 1741 .

[0344] The audio circuit 1760 , the speaker 1761 , and the microphone 1762 may provide an audio interface.

[0345] In this embodiment, the processor 1780 included in the terminal 140 can execute the gene sequencing data compression method and decompression method of the previous embodiment.

[0346] The terminal 140 of the embodiment of the present disclosure includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The embodiment of the present invention can be applied to various scenarios, including but not limited to gene sequencing, etc.

[0347] Figure 18 is a block diagram of the structure of a portion of the server 110 that implements the compression method and decompression method of gene sequencing data according to an embodiment of the present disclosure. The server 110 may vary greatly due to different configurations or performances, and may include one or more central processing units (CPUs) 1822 (e.g., one or more processors) and a storage device 1832, and one or more storage media 1830 (e.g., one or more massive storage devices) storing application programs 1842 or data 1844. The storage device 1832 and the storage medium 1830 may be temporary storage or permanent storage. The program stored in the storage medium 1830 may include one or more modules (not shown), each module of which may include a series of instruction operations on the server 110. Furthermore, the central processing unit 1822 may be configured to communicate with the storage medium 1830 to execute a series of instruction operations in the storage medium 1830 on the server 110.

[0348] The server 110 may also include one or more power supplies 1826, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1858, and / or one or more operating systems 1841, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0349] The central processing unit 1822 in the server 110 can be used to execute the compression method and decompression method of the gene sequencing data of the embodiment of the present disclosure.

[0350] The embodiments of the present disclosure also provide a computer-readable storage medium for storing program code, and the program code is used to execute the compression method and decompression method of the gene sequencing data of the aforementioned embodiments.

[0351] The present disclosure also provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device implements the above-mentioned gene sequencing data compression method and decompression method.

[0352] The terms "first," "second," "third," "fourth," and the like (if any) in the specification of the present disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present disclosure described herein, for example, can be implemented in orders other than those illustrated or described herein. In addition, the terms "comprises" and "comprising," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.

[0353] It should be understood that in the present disclosure, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0354] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to exclude the number itself, and above, below, within, etc. are understood to include the number itself.

[0355] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0356] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0357] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0358] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program code.

[0359] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.

[0360] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.

Claims

1. A method for compressing gene sequencing data, characterized in that: include: Acquire gene sequencing data to be compressed, where the gene sequencing data to be compressed includes a base sequence and a corresponding quality value sequence; performing sequence prediction on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on a sample base sequence and a corresponding sample quality value sequence; Based on the predicted probability distribution sequence and the corresponding true value label, entropy encoding is performed on at least one of the base sequence or the quality value sequence to obtain compressed data corresponding to the gene sequencing data to be compressed.

2. The method according to claim 1, characterized in that The performing sequence prediction on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence includes: Obtaining a predicted reference sequence of at least one of the base sequence or the quality value sequence; Based on the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

3. The method according to claim 2, characterized in that The obtaining of a predicted reference sequence of at least one of the base sequence or the quality value sequence includes: Obtaining a predicted reference sequence of at least one of the base sequence or the quality value sequence and application text data of a gene sequencing application that generates the gene sequencing data to be compressed; Based on the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, including: Based on the application text data and the predicted reference sequence, a preset sequence prediction model is used to perform sequence prediction on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

4. The method according to claim 3, characterized in that The step of performing sequence prediction on at least one of the base sequence or the quality value sequence based on the application text data and the predicted reference sequence using a preset sequence prediction model to obtain a predicted probability distribution sequence includes: Vectorizing the application text data to obtain an application text feature vector; The application text feature vector and the predicted reference sequence are input into a preset sequence prediction model, and sequence prediction is performed on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence, the corresponding sample quality value sequence, and the corresponding sample application text feature vector.

5. The method according to claim 3, characterized in that Each of the gene sequencing applications corresponds to one of the sequence prediction models; The step of performing sequence prediction on at least one of the base sequence or the quality value sequence based on the application text data and the predicted reference sequence using a preset sequence prediction model to obtain a predicted probability distribution sequence includes: Determine a corresponding target sequence prediction model based on the application text data; The predicted reference sequence is input into the preset target sequence prediction model, and sequence prediction is performed on at least one of the base sequence or the quality value sequence to obtain a predicted probability distribution sequence.

6. The method according to claim 2, characterized in that The sequence prediction model includes an encoder and a decoder; The obtaining of a predicted reference sequence of at least one of the base sequence or the quality value sequence includes: Determining either the base sequence or the quality value sequence as a reference sequence, and obtaining a predicted context sequence corresponding to the sequence to be predicted based on the determined reference sequence; The performing sequence prediction on at least one of the base sequence or the quality value sequence using a preset sequence prediction model based on the predicted reference sequence to obtain a predicted probability distribution sequence includes: Inputting the reference sequence into the encoder to obtain an encoding result; The encoding result and the predicted context sequence are input into the decoder to obtain a predicted probability distribution sequence output by the decoder.

7. The method according to claim 2, characterized in that The sequence prediction model includes a decoder; The obtaining of a predicted reference sequence of at least one of the base sequence or the quality value sequence includes: Obtaining a predicted reference sequence corresponding to the base sequence and the quality value sequence; The performing sequence prediction on at least one of the base sequence or the quality value sequence using a preset sequence prediction model based on the predicted reference sequence to obtain a predicted probability distribution sequence includes: The predicted reference sequence is input into the decoder to obtain a predicted probability distribution sequence output by the decoder.

8. The method according to claim 1, characterized in that The sequence prediction model is trained in the following way: Obtaining the sample base sequence and the corresponding sample quality value sequence; Inputting the sample base sequence and the sample quality value sequence into the sequence prediction model to predict a predicted base sequence and a predicted quality value sequence; A sample loss is obtained based on the sample base sequence, the sample quality value sequence, the predicted base sequence, and the predicted quality value sequence, and the sequence prediction model is trained based on the sample loss.

9. The method according to claim 8, characterized in that After obtaining the sample base sequence and the corresponding sample quality value sequence, the training process of the sequence prediction model further includes: Obtaining a sequencing reference sequence, and performing sequence alignment using the sample base sequence and the sequencing reference sequence to obtain a sample sequence alignment result; Inputting the sample base sequence and the sample quality value sequence into the sequence prediction model to predict a predicted base sequence and a predicted quality value sequence includes: The sample base sequence, the sample quality value sequence and the sample sequence comparison result are input into the sequence prediction model to predict a predicted base sequence and a predicted quality value sequence.

10. The method according to claim 1, characterized in that The predicted probability distribution sequence includes the predicted probability distribution corresponding to each sequence value in at least one of the base sequence or the quality value sequence; the corresponding true value label includes the true sequence value label corresponding to each sequence value in at least one of the base sequence or the quality value sequence; The entropy encoding of at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed includes: For each sequence value of at least one of the base sequence or the quality value sequence, performing entropy coding on each probability value based on the corresponding predicted probability distribution; Obtaining, from the entropy coding result corresponding to each of the sequence values, a coding result corresponding to the true sequence value label corresponding to the sequence value; Based on the encoding result of the real sequence value label corresponding to each sequence value, compressed data corresponding to the gene sequencing data to be compressed is obtained.

11. The method according to claim 1, wherein The entropy encoding of at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed includes: Based on the true value label of each data to be predicted in the sequence to be predicted, determining the probability ranking value of the data to be predicted in the prediction probability distribution sequence; The probability ranking value is entropy-encoded to obtain compressed data corresponding to the gene sequencing data to be compressed.

12. A method for decompressing gene sequencing data, characterized in that: include: Obtain the above data of the gene sequencing data to be decompressed; Perform sequence prediction based on a preset sequence prediction model and the above data to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on the sample base sequence and the corresponding sample quality value sequence; Determining a target probability sequence in the predicted probability distribution sequence based on the gene sequencing data to be decompressed; Decompression results corresponding to the gene sequencing data to be decompressed are determined according to the target probability sequence.

13. The method according to claim 12, characterized in that The predicted probability distribution sequence includes predicted probability distributions corresponding to multiple sequence values; the gene sequencing data to be decompressed includes compression codes of multiple sequence values; Determining a target probability sequence in the predicted probability distribution sequence based on the to-be-decompressed gene sequencing data includes: Performing entropy coding on each of the predicted probability distributions in the predicted probability distribution sequence; Based on the compression code of each sequence value in the gene sequencing data to be decompressed, a target probability is determined in the entropy encoding result of the corresponding predicted value probability distribution to obtain a target probability sequence.

14. A gene sequencing data compression device, characterized in that: include: A first acquisition unit is configured to acquire gene sequencing data to be compressed, wherein the gene sequencing data to be compressed includes a base sequence and a corresponding quality value sequence; a first prediction unit, configured to perform sequence prediction on at least one of the base sequence or the quality value sequence based on a preset sequence prediction model to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on a sample base sequence and a corresponding sample quality value sequence; An encoding unit is used to perform entropy encoding on at least one of the base sequence or the quality value sequence based on the predicted probability distribution sequence and the corresponding true value label to obtain compressed data corresponding to the gene sequencing data to be compressed.

15. A gene sequencing data decompression device, characterized in that: include: A second acquisition unit is used to obtain the above data of the gene sequencing data to be decompressed; a second prediction unit, configured to perform sequence prediction based on a preset sequence prediction model and the above data to obtain a predicted probability distribution sequence, wherein the sequence prediction model is trained based on a sample base sequence and a corresponding sample quality value sequence; A first determining unit is configured to determine a target probability sequence in the predicted probability distribution sequence based on the gene sequencing data to be decompressed; The second determining unit is configured to determine a decompression result corresponding to the gene sequencing data to be decompressed according to the target probability sequence.

16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for compressing gene sequencing data according to any one of claims 1 to 11 and the method for decompressing gene sequencing data according to any one of claims 12 to 13 are implemented.

17. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method for compressing gene sequencing data according to any one of claims 1 to 11 and the method for decompressing gene sequencing data according to any one of claims 12 to 13 are implemented.

18. A computer program product, comprising a computer program, wherein the computer program is read and executed by a processor of a computer device, so that the computer device executes the gene sequencing data compression method according to any one of claims 1 to 11 and the gene sequencing data decompression method according to any one of claims 12 to 13.