Data processing method and apparatus, electronic device, and readable storage medium
By acquiring and analyzing genomic data of organisms and species, and utilizing semantic features and variation detection models, the origin information of diseases can be accurately determined, solving the problem of inaccurate disease origin information in existing technologies and improving the efficiency of health management.
Patent Information
- Application Number
- PCT/CN2026/090561
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-06
- Filing Date
- 2026-04-14
- Publication Date
- 2026-11-12
AI Technical Summary
Existing technologies struggle to accurately determine variation information in an organism's genome when processing sequencing data, thus affecting the accuracy of disease origin information and causing difficulties for healthcare professionals in managing an organism's health.
By acquiring the first reference data and the first sequencing data, using the semantic feature extraction model to determine the variation information, and combining the methylation detection model and the variation detection model, the origin information of the disease can be predicted, thus achieving accurate analysis of the organism's genome.
It improves the accuracy of information on the origin of diseases, helps medical staff better manage the health of organisms, and reduces work pressure.
Smart Images

Figure CN2026090561_12112026_PF_FP_ABST
Abstract
Description
Data processing methods, apparatus, electronic devices and readable storage media
[0001] This application claims priority to Chinese Patent Application No. 202510586636.7, filed on May 6, 2025, entitled "Data Processing Method, Apparatus, Electronic Device and Readable Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of molecular biology technology, and in particular to a data processing method, apparatus, electronic device, and readable storage medium. Background Technology
[0003] In the field of molecular biology, sequencing technology is a widely used technique. Sequencing technology allows for the sequencing of an organism's gene sequence, yielding sequencing data. Because sequencing data carries a wealth of information, the methods used to process it are particularly important. Summary of the Invention
[0004] This application provides a data processing method, apparatus, electronic device, and readable storage medium that can determine the origin information of a disease based on the sequencing data of an organism, thereby ensuring high accuracy of the disease origin information. The technical solution includes the following:
[0005] On one hand, a data processing method is provided, the method being executed by an electronic device, the method comprising:
[0006] Obtain first reference data and first sequencing data, wherein the first reference data represents a first gene sequence in the genome of the species to which the first organism belongs, and the first sequencing data represents a second gene sequence in the genome of the first organism that corresponds to the first gene sequence;
[0007] Based on the first reference data and the first sequencing data, semantic features are determined, wherein the semantic features characterize the semantics of the first reference data and the semantics of the first sequencing data determined when information interaction is performed between the first reference data and the first sequencing data.
[0008] Based on the semantic features, variation information is determined, wherein the variation information characterizes at least one variation that occurs in the second gene sequence relative to the first gene sequence;
[0009] Based on the mutation information, the disease origin information is determined, and the disease origin information characterizes the factors that cause the disease to occur in the first organism.
[0010] On the other hand, a data processing apparatus is provided, the apparatus comprising:
[0011] An acquisition module is used to acquire first reference data and first sequencing data, wherein the first reference data represents a first gene sequence in the genome of the species to which the first organism belongs, and the first sequencing data represents a second gene sequence in the genome of the first organism that corresponds to the first gene sequence.
[0012] A determination module is configured to determine semantic features based on the first reference data and the first sequencing data, wherein the semantic features characterize the semantics of the first reference data and the semantics of the first sequencing data determined when information interaction is performed between the first reference data and the first sequencing data.
[0013] The determining module is further configured to determine variation information based on the semantic features, wherein the variation information characterizes at least one variation that occurs in the second gene sequence relative to the first gene sequence;
[0014] The determining module is further configured to determine the disease origin information based on the mutation information, wherein the disease origin information characterizes the factors that cause the disease to occur in the first organism.
[0015] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, which is loaded and executed by the processor to enable the electronic device to implement any of the data processing methods described above.
[0016] On the other hand, a non-volatile computer-readable storage medium is also provided, wherein at least one computer program is stored in the non-volatile computer-readable storage medium, the at least one computer program being loaded and executed by a processor to enable an electronic device to implement any of the data processing methods described above.
[0017] On the other hand, a computer program is also provided, wherein the computer program is at least one, and the at least one computer program is loaded and executed by a processor to enable the electronic device to implement any of the above-described data processing methods.
[0018] On the other hand, a computer program product is also provided, which stores at least one computer program, which is loaded and executed by a processor to enable an electronic device to implement any of the above-described data processing methods.
[0019] In the technical solution provided in this application, semantic features are determined based on first reference data and first sequencing data. Since semantic features are determined through information interaction between the first reference data and the first sequencing data, they can reflect the global information of gene sequences in the genomes of species and organisms, and can more accurately characterize the semantics of the first reference data and the first sequencing data. Because semantic features characterize the semantics of the first reference data and the first sequencing data, and because semantic features have high accuracy, determining variation information based on semantic features enables a semantic comparison of gene sequences in the genomes of species and organisms, thus more accurately determining the variations that have occurred in the gene sequences of organisms.
[0020] Determining the origin of a disease by analyzing mutation information allows us to identify the factors contributing to disease development based on variations in an organism's gene sequence. This approach enables us to pinpoint the causes of disease at the genetic level, resulting in highly accurate information about disease origins. Furthermore, this information can assist healthcare professionals in better managing an organism's health, reducing their workload. Attached Figure Description
[0021] Figure 1 is a schematic diagram of the structure of a computer system provided in an embodiment of this application;
[0022] Figure 2 is a flowchart of a data processing method provided in an embodiment of this application;
[0023] Figure 3 is a schematic diagram of obtaining first reference data and first sequencing data according to an embodiment of this application;
[0024] Figure 4 is a schematic diagram of mutation information detection provided in an embodiment of this application;
[0025] Figure 5 is a schematic diagram of the structure of a large model provided in an embodiment of this application;
[0026] Figure 6 is a schematic diagram of the structure of a feature processing block provided in an embodiment of this application;
[0027] Figure 7 is a schematic diagram of another feature processing block provided in an embodiment of this application;
[0028] Figure 8 is a schematic diagram of training a basic model provided in an embodiment of this application;
[0029] Figure 9 is a schematic diagram of methylation information detection provided in an embodiment of this application;
[0030] Figure 10 is a schematic diagram illustrating the determination of disease diagnosis information and disease origin information provided in an embodiment of this application;
[0031] Figure 11 is a schematic diagram of the framework of a data processing method provided in an embodiment of this application;
[0032] Figure 12 is a schematic flowchart of a data processing method provided in an embodiment of this application;
[0033] Figure 13 is a flowchart illustrating another data processing method provided in an embodiment of this application;
[0034] Figure 14 is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0035] Figure 15 is a structural schematic diagram of a terminal device provided in an embodiment of this application;
[0036] Figure 16 is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0038] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0039] First, the abbreviations and key terms involved in the embodiments of this application are defined.
[0040] Genome: The sum of all genetic information in an organism. Since both DNA (Deoxyribonucleic acid) and RNA (ribonucleic acid) can serve as carriers of genetic information, the genome can include all genes and non-coding sequences in DNA and RNA. Genes, also called hereditary factors, are the complete nucleotide sequence in DNA or RNA required to produce a polypeptide chain or functional RNA. Non-coding sequences refer to all information in DNA or RNA other than that required to encode proteins. Although non-coding sequences cannot directly encode proteins, they play important roles in regulating gene expression and maintaining chromosome structure.
[0041] Whole Genome Sequence (WGS) technology is an experimental technique used to determine the complete genome of an organism. WGS includes high-throughput sequencing technology. High-throughput sequencing, also known as next-generation sequencing, can sequence a large number of nucleic acid sequences in parallel; these nucleic acid sequences refer to segments of DNA or RNA. Through whole-genome sequencing, a vast amount of sequencing data can be obtained. By analyzing and processing this data, researchers can study the entire genome of an organism, understanding the location, number, structure, function, and interactions of genes within the genome. Whole-genome sequencing technology has been widely applied in various fields such as genetic disease research, personalized medicine, disease prevention, drug development, evolutionary biology, and ecology.
[0042] Variation, also called gene mutation, is a result of genetic analysis. Generally, by analyzing sequencing data, variations in genes can be identified. Gene variations include, but are not limited to: single-nucleotide polymorphisms (SNPs), small insertions and deletions (INDELs), structural variations, and copy number variations.
[0043] Methylation: A biochemical process that typically involves the addition of a methyl (-CH3) group to a location on DNA, optionally at the carbon atom of cytosine. Methylation is an epigenetic phenomenon. It can alter gene activity but not the gene itself. Methylation plays a crucial role in biological processes such as development, gene expression regulation, X chromosome inactivation, and gene printing. If a gene is methylated, it is turned off, or its expression is suppressed. Abnormal gene methylation has been linked to numerous diseases, including various types of cancer. Studying DNA methylation and demethylation is of great significance for understanding and treating diseases.
[0044] CpG site: also called CG site, is a methylation detection site. Specifically, the CpG site is the region in DNA where cytosine (C) appears immediately after guanine (G).
[0045] Methylation Status Prediction: This is an epigenetic analysis technique used to analyze sequencing data and obtain the methylation status of detection sites. In the embodiments of this application, the methylation status of detection sites can be understood in at least the following ways: (1) The detection site is highly methylated or hypomethylated. High methylation means the probability of the detection site being methylated is higher than or equal to a threshold, while low methylation means the probability of the detection site being methylated is lower than or equal to a threshold. (2) The detection site is methylated or unmethylated. (3) The degree of methylation of the detection site. Generally, the methylation index of the detection site is used to characterize the degree of methylation. The higher the methylation index, the higher the degree of methylation. In other words, the methylation index of the detection site is positively correlated with the degree of methylation.
[0046] As shown in Figure 1, which is a schematic diagram of a computer system according to an embodiment of this application, the computer system includes a terminal device 101 and a server 102. The terminal device 101 has a client installed and running, and the server 102 provides background services to the client. The data processing method provided in this embodiment can be executed by the terminal device 101, by the server 102, or by both the terminal device 101 and the server 102; this embodiment does not limit the execution of this method.
[0047] In one possible implementation, server 102 undertakes the primary computational work, while terminal device 101 undertakes the secondary computational work. Alternatively, server 102 undertakes the secondary computational work, while terminal device 101 undertakes the primary computational work. Or, terminal device 101 and server 102 collaborate on computation using a distributed computing architecture.
[0048] Optionally, terminal device 101 can be any electronic device product capable of human-computer interaction with a user through one or more methods such as a keyboard, touchpad, remote control, voice interaction, or handwriting device. For example, terminal device 101 can be a mobile phone or a computer, wherein mobile phones include, but are not limited to, smartphones, foldable phones, slider phones, or flip phones, and computers include, but are not limited to, tablets, laptops, desktop computers, PPCs (Pocket PCs), or PCs (Personal Computers). In practical applications, terminal device 101 may also include smart speakers, smartwatches, PDAs (Personal Digital Assistants), wearable devices, smart car systems, smart TVs, etc.
[0049] Terminal device 101 can refer to one of a plurality of terminal devices. This embodiment uses terminal device 101 as an example. Those skilled in the art will know that the number of terminal devices 101 can be more or less. For example, there may be only one terminal device 101, or there may be dozens or hundreds of terminal devices 101, or more. This application embodiment does not limit the number or type of terminal devices 101.
[0050] Server 102 can be a single server, a server cluster consisting of multiple servers, or any of the following: a cloud computing platform or a virtualization center. This embodiment of the application does not limit this. Server 102 communicates directly or indirectly with terminal device 101 via a wired or wireless network. Server 102 has data receiving, data processing, and data sending functions. Of course, server 102 may also have other functions, which are not limited in this embodiment of the application.
[0051] Those skilled in the art should understand that the terminal device 101 and server 102 described above are merely illustrative examples. Other existing or future terminal devices or servers that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.
[0052] As mentioned above, the data processing method can be executed by at least one of the terminal device 101 or the server 102. The following description uses the server 102 executing the data processing method as an example. Specifically, as shown in Figure 1, the data processing method includes the following steps.
[0053] Step 1: Predict methylation and mutation information.
[0054] Server 102 can acquire whole-genome sequencing data of an organism and whole-genome sequencing data of the species to which the organism belongs. Whole-genome sequencing data of a species represents the genome of that species, while whole-genome sequencing data of an organism represents the genome of that organism.
[0055] Server 102 can determine first reference data 103-1 from the whole-genome sequencing data of a species. First reference data 103-1 represents the first gene sequence in the genome of the species. Based on the location and length of the first gene sequence in the genome of the organism, first sequencing data 103-2 is determined from the whole-genome sequencing data of the organism. First sequencing data 103-2 represents the second gene sequence in the genome of the organism, and the length of the second gene sequence is the same as the length of the first gene sequence. The location of the second gene sequence in the genome of the organism corresponds to the location of the first gene sequence in the genome of the species.
[0056] The first sequencing data 103-2 includes at least two alignment data, each of which represents the entire sequence or a portion of the second gene sequence. As shown in Figure 1, the first sequencing data 103-2 includes four alignment data, which represent different subsequences in the second gene sequence.
[0057] Server 102 uses the first reference data 103-1 and the first sequencing data 103-2 as input data 103 for model 104. Model 104 includes a methylation detection model, which determines methylation information based on the input data 103. This methylation information characterizes the methylation status of the detection sites on the second gene sequence. Model 104 also includes a variant detection model, which determines variant information based on the input data 103. This variant information characterizes the variations that occur in the second gene sequence compared to the first gene sequence.
[0058] Step 2: Predict cancer origin information and cancer diagnosis information.
[0059] Server 102 can acquire information other than methylation and mutation information; for example, server 102 can acquire disease diagnosis information of an organism. Methylation information, mutation information, and other information are determined as input information for model 105.
[0060] Model 105 includes a diagnostic information determination model, which determines cancer diagnostic information based on input information. Cancer diagnostic information represents the probability of an organism being healthy, or the probability of an organism developing at least one type of cancer. For example, cancer diagnostic information includes the probability of an organism being healthy, the probability of an organism developing lung cancer, the probability of an organism developing liver cancer, and so on.
[0061] Model 105 also includes an origin information determination model, which determines cancer origin information based on input information. Cancer origin information characterizes factors that cause cancer in an organism, such as gene methylation or gene copy number variation.
[0062] This application provides a data processing method that can be applied to the aforementioned computer system and executed by at least one of terminal device 101 or server 102. For ease of description, terminal device 101 and server 102 are collectively referred to as electronic devices. That is, the method of this application embodiment is executed by an electronic device. As shown in FIG2, the method includes the following steps.
[0063] Step 201: Obtain first reference data and first sequencing data. The first reference data represents a first gene sequence in the genome of the species to which the first organism belongs, and the first sequencing data represents a second gene sequence in the genome of the first organism that corresponds to the first gene sequence.
[0064] An organism is an individual capable of carrying out life activities. An organism is a living entity, which can be alive or inanimate. An organism can be, but is not limited to, a person, a cat, a ginkgo tree, a fungus, etc. Every organism belongs to a species; different organisms may correspond to the same species or different species. A species refers to a group of organisms that are capable of interbreeding and producing fertile offspring under natural conditions. For example, a species can be humans, animals, plants, bacteria, fungi, or protozoa, etc.
[0065] There is at least one primary organism, and all primary organisms correspond to the same species. For example, the species is human, and different primary organisms are different humans. A primary organism possesses a genome, which is the sum of all genetic information of the organism, including all genes and non-coding sequences in DNA and RNA. Optionally, the genome includes cell-free DNA. Cell-free DNA, also called cell-free DNA (cfDNA), refers to DNA fragments that exist outside of cells. Generally, cfDNA can exist in bodily fluids such as blood, lymph, breast milk, urine, and amniotic fluid.
[0066] Technicians can collect biological samples from a first organism. This application does not limit the type of biological sample; for example, biological samples include bodily fluids such as blood, lymph, milk, urine, or amniotic fluid. Biological samples include nucleic acids (i.e., at least one of DNA or RNA), and nucleic acids are the carriers of the genome. Based on this, whole-genome sequencing can be performed on nucleic acids in a laboratory environment to obtain the whole-genome sequencing data of the first organism. The whole-genome sequencing data of the first organism characterizes the genome of the first organism. Electronic devices can determine at least one first sequencing data point from the whole-genome sequencing data of the first organism; different first sequencing data points correspond to different segments in the genome of the first organism. For ease of description, the segment corresponding to the first sequencing data is referred to as the second gene sequence.
[0067] Optionally, the whole-genome sequencing data of the first organism may be preprocessed to improve its quality. The preprocessing method is not limited here. For example, preprocessing may include deduplication, correction, and trimming. Deduplication of the whole-genome sequencing data involves removing redundant fragments from the repetitive segments, retaining only one fragment. Correction of the whole-genome sequencing data involves correcting erroneous segments to correct fragments. Trimming the whole-genome sequencing data involves modifying or cutting target fragments (e.g., sequencing head fragments, fragments shorter than a pre-set threshold, or fragments where the proportion of a certain base, such as cytosine, is higher or lower than a threshold).
[0068] In some cases, whole-genome sequencing data of a species is stored in public databases, such as GenBank (a public database of nucleic acid sequences) or Ensembl (a database for storing information related to vertebrate genomes). Based on this, electronic devices retrieve the species' whole-genome sequencing data from these public databases. The whole-genome sequencing data of a species characterizes its genome. Electronic devices can determine at least one first reference data point from the species' whole-genome sequencing data; different first reference data points correspond to different segments in the species' genome. For ease of description, the segment corresponding to the first reference data is referred to as the first gene sequence.
[0069] It should be noted that there is a one-to-one correspondence between the first reference data and the first sequencing data. That is, each first reference data has a corresponding first sequencing data. The length of the first gene sequence corresponding to the first reference data is the same as the length of the second gene sequence corresponding to the first sequencing data, and the position of the first gene sequence in the genome of the species is the same as the position of the second gene sequence in the genome of the organism.
[0070] Since both the first reference data and the first sequencing data are nucleic acid sequencing data, and nucleic acids are composed of bases, both the first reference data and the first sequencing data include at least one base. Bases include adenine (A), guanine (G), cytosine (C), thymine (T), or uracil (U), etc. Each base is used to characterize information such as the type, position, structure, number, and function of the base.
[0071] In practical applications, the first reference data and the first sequencing data may also include other data. The content of other data is not limited in the embodiments of this application. For example, other data may be chromosome data, location data, length data, etc. Chromosome data represents the chromosome on which the first gene sequence and the second gene sequence are located, location data represents the position of the first gene sequence and the second gene sequence in the genome, and length data represents the length of the first gene sequence and the second gene sequence.
[0072] In an exemplary embodiment, step 201, “obtaining first reference data”, includes: obtaining whole-genome sequencing data of the species to which the first organism belongs; and determining first reference data from the whole-genome sequencing data of the species to which the first organism belongs based on at least one of a reference window or a reference position.
[0073] The reference window is a parameter used to determine the length of a gene sequence. Optionally, since a gene sequence consists of bases, its length can be represented by the number of bases or base pairs. For example, bp (base pair) is a unit of length representing the number of base pairs; therefore, assuming a gene sequence length of 300bp, 300bp represents a gene sequence containing 300 base pairs. Similarly, nt (nucleotide) is also a unit of length representing the number of bases; therefore, assuming a gene sequence length of 2000nt, 2000nt represents a gene sequence containing 2000 bases. Furthermore, kb (kilobase) is also a unit of length, representing kilobase pairs, i.e., 1kb = 1000bp.
[0074] A reference position is a parameter used to determine the location of a gene sequence. Typically, the location of a gene sequence can be characterized by the length between a point on the gene sequence (such as an endpoint or center point) and an endpoint of the nucleic acid containing the gene. For example, the location of a gene sequence can be described as: the gene sequence is located 300 kb from one end of the DNA.
[0075] The electronic device can determine first reference data from whole-genome sequencing data of a species based on at least one of a reference location or a reference window. In this case, the length of the first gene sequence characterized by the first reference data conforms to the reference window, and / or, the position of the first gene sequence in the genome of the species conforms to the reference location.
[0076] Similarly, step 201, “obtaining first sequencing data”, includes: obtaining whole genome sequencing data of a first organism; and determining the first sequencing data from the whole genome sequencing data of the first organism based on at least one of a reference window or a reference location.
[0077] An electronic device can determine first sequencing data from whole-genome sequencing data of a first organism based on at least one of a reference location or a reference window. In this case, the length of the second gene sequence characterized by the first sequencing data conforms to the reference window, and / or, the position of the second gene sequence in the genome of the first organism conforms to the reference location.
[0078] Optionally, the first gene sequence and the second gene sequence are located at the same position in their respective genomes, and the first gene sequence and the second gene sequence are also of the same length.
[0079] Optionally, the center of the reference window is the location of the detection site in the species' genome, and the width of the reference window is not less than the length of the sequence containing the detection site in the species' genome. This configuration ensures that the first and second gene sequences determined based on the reference window can contain the complete sequence containing the detection site. For example, the length of the sequence containing the detection site in the species' genome is typically 200 bp to 500 bp. Assuming the width of the reference window is 512 bp, then both the first and second gene sequences will be 512 bp in length, which can include the complete sequence containing the detection site. Subsequently, when determining methylation information based on the first and second gene sequences, the accuracy of the methylation information can be ensured.
[0080] Typically, the first sequencing data includes at least one alignment data point, where each alignment data point represents the entire sequence or a portion of the second gene sequence. Therefore, any two alignment data points can correspond to sequences of the same or different lengths. Furthermore, any two alignment data points can correspond to the same subsequence within the second gene sequence or to different subsequences.
[0081] As shown in Figure 3, Figure 3 is a schematic diagram illustrating the acquisition of first reference data and first sequencing data according to an embodiment of this application. In this example, a technician can obtain a biological sample 301 from a first organism. The biological sample 301 includes nucleic acids, which can be DNA or RNA. The nucleic acid includes at least one base 302, and any two bases 302 can correspond to the same type or different types.
[0082] Under laboratory conditions, whole-genome sequencing was performed on biological sample 301 to obtain the whole-genome sequencing data of the first organism. Comparison analysis of the whole-genome sequencing data of the first organism with the whole-genome sequencing data of the species to which the first organism belongs yielded first reference data 303 and first sequencing data 304. As shown in Figure 3, the first gene sequence corresponding to first reference data 303 and the second gene sequence corresponding to first sequencing data 304 are sequences of the same length at the same location in the genome. Furthermore, first sequencing data 304 includes multiple alignment data, which may be identical or different; all these alignment data correspond to subsequences within the second gene sequence.
[0083] Step 202: Determine semantic features based on the first reference data and the first sequencing data. The semantic features characterize the semantics of the first reference data and the first sequencing data determined when information interaction is performed between the first reference data and the first sequencing data.
[0084] Since the first reference data represents the first gene sequence and the first sequencing data represents the second gene sequence, electronic devices can perform feature extraction on the first reference data and the first sequencing data to obtain semantic features. These semantic features can characterize the semantics of the first reference data, which is the semantics of the first gene sequence in the species' genome. Semantic features can also characterize the semantics of the first sequencing data, which is the semantics of the second gene sequence in the organism's genome.
[0085] In this example, the first and second gene sequences are considered as a "language." The semantics of a gene sequence include, but are not limited to: the syntax and rules followed by the gene sequence, the types and functions of each base in the gene sequence, and the structure and function of specific segments within the gene sequence. The syntax and rules followed by the gene sequence refer to the biochemical rules that the arrangement of bases in the gene sequence must follow (e.g., codon tables, splicing signals, etc.). A specific segment is a segment formed by at least two bases arranged in a specific manner. For example, a specific segment is a CGN segment (i.e., a segment composed of C, G, and N arranged in sequence) or an NCG segment (i.e., a segment composed of N, C, and G arranged in sequence), where N represents any one of A, C, G, or T, A represents adenine, C represents cytosine, G represents guanine, and T represents thymine.
[0086] It should be noted that during feature extraction from the first reference data and the first sequencing data, information exchange is required between them, and the method of exchange is not limited here. For example, convolutional layers can be used to perform convolution processing on the first reference data and the first sequencing data, or attention layers can be used to perform attention processing on the first reference data and the first sequencing data.
[0087] A convolutional layer is a network layer used to extract local features. A convolutional layer includes a convolutional kernel, which acts like a sliding window. Electronic devices can concatenate first reference data before or after the first sequencing data, or above or below the first sequencing data, to obtain sequence data. By sliding the convolutional kernel across the sequence data and performing local feature extraction on the data within the window, the convolutional processing result is obtained, and semantic features are determined based on this result.
[0088] An attention layer is a network layer with an attention mechanism. The attention mechanism mimics the human visual and cognitive system, allowing the network model to focus its attention on relevant parts when processing input data. By introducing the attention mechanism, the network model can automatically learn and selectively focus on important information in the input, improving model performance and generalization ability. Based on this, electronic devices can concatenate first reference data before or after first sequencing data, or above or below first sequencing data, to obtain sequence data. By performing attention processing on the sequence data through the attention layer, global feature extraction is achieved, yielding the attention processing result, and semantic features are determined based on this result.
[0089] By performing information interaction between the first reference data and the first sequencing data, semantic features are obtained. These semantic features are obtained after integrating the global information of the first and second gene sequences, and have stronger representation capabilities and higher accuracy, which is beneficial to improving the accuracy of variation information.
[0090] In practical applications, step 202 can be achieved using a mutation detection model. The structure, number of parameters, and data processing methods of the mutation detection model are limited. For example, the mutation detection model can be a convolutional neural network or a large model based on Transformer (feature processing block). Understandably, different mutation detection models lead to different methods for determining mutation information. The following explanation uses a large mutation detection model based on Transformer as an example to illustrate the principle of semantic feature determination.
[0091] In one possible implementation, step 202 includes: performing feature processing on the input data of the i-th feature processing block to obtain the output data of the i-th feature processing block; determining semantic features based on the output data of the N-th feature processing block; wherein i is any positive integer from 1 to N, the input data of the 1-th feature processing block includes the first reference data and the first sequencing data, and the input data of any feature processing block from the 2nd to the Nth feature processing blocks includes the output data of the previous feature processing block.
[0092] In this example, the mutation detection model comprises N feature processing blocks, where N is a positive integer. Each feature processing block performs feature processing on its input data to obtain output data, which represents the features of the input data.
[0093] In this system, the feature processing methods corresponding to any two feature processing blocks can be the same or different. In practical applications, this can be flexibly set according to the application scenario or requirements. N can be equal to 1 or a positive integer greater than 1. If N is a positive integer greater than 1, such as N equals 2 or N equals 8, then the N feature processing blocks are concatenated.
[0094] Assuming N equals 1, meaning the variant detection model includes one feature processing block, then the electronic device can use the first reference data and the first sequencing data as input data for this feature processing block, and perform feature processing on the input data through the feature processing block to obtain output data.
[0095] Assuming N is a positive integer greater than 1, meaning the mutation detection model includes two or more feature processing blocks, then: the electronic device uses the first reference data and the first sequencing data as input data for the first feature processing block, performs feature processing on the input data through the first feature processing block, and obtains the output data of the first feature processing block; the output data of the first feature processing block is used as input data for the second feature processing block, performs feature processing on the input data through the second feature processing block, and obtains the output data of the second feature processing block; the output data of the second feature processing block is used as input data for the third feature processing block, performs feature processing on the input data through the third feature processing block, and obtains the output data of the third feature processing block; and so on, until the output data of the Nth feature processing block is obtained.
[0096] In this example, the output data of any feature processing block may include features characterizing the first reference data and features characterizing the first sequencing data. Alternatively, the output data of any feature processing block may be features characterizing the results obtained by fusing the semantics of the first reference data and the semantics of the first sequencing data. A feature is a vector, generally represented in matrix form, and the matrix size is not limited here.
[0097] By performing feature processing on the first reference data and the first sequencing data at least once, the features of the first reference data and the first sequencing data are continuously extracted, which improves the characterization ability and accuracy of the features, and makes the accuracy of the variant information more accurate when determining variant information based on the features.
[0098] In practical applications, the first reference data includes at least one base, and the first sequencing data also includes at least one base. The variant detection model also includes a coding layer. The coding layer is used to encode each base in the first reference data to obtain the coding features of each base. Similarly, the coding layer is also used to encode each base in the first sequencing data to obtain the coding features of each base. The coding features of the base data can be used to characterize at least one of the following: base type, position, function, etc.
[0099] Optionally, as shown in Figure 5, the mutation detection model 503 is a large model, including a coding layer, N feature processing blocks, and a prediction layer, and these network layers are cascaded. The input data of the large model includes first reference data 501 and first sequencing data 502. The first sequencing data 502 includes alignment data 502-2 to alignment data 502-M. That is, the first sequencing data 502 includes M-1 alignment data, where M is a positive integer greater than 1.
[0100] As explained above, the lengths of the first reference data 501 and the comparison data, as well as any two comparison data, can be the same or different. In practical applications, data padding can be used to make the first reference data 501, the comparison data, and any two comparison data of the same length. Optionally, padding markers can be used to indicate the padding data in the first reference data 501 and the comparison data. The form of the padding markers is not limited here; for example, the padding markers can be the marker "...". <pad>".
[0101] Suppose that the first reference data 501 and all the alignment data are padded to the same length. In this case, the padded first reference data 501 and each alignment data can be represented as a matrix: x∈R M×L Where x represents the padded first reference data 501 and each alignment data, R represents a real number, M represents the sum of the number of the first reference data 501 and the alignment data, and L represents the length of the padded first reference data 501 and the length of each padded alignment data. An element {x} in the matrix... m,l } can represent the l-th base data in the m-th data in the matrix. Where m = 1, the element {x} m,l } represents the l-th base data in the first reference data 501; m = any positive integer from 2 to M, element {x m,l The l-th base data in the alignment data 502-m is characterized.
[0102] For ease of description, a first reference data 501 and its corresponding M-1 aligned data are referred to as a set of sequence data. Assuming the batch size of the large model's input is B, meaning that B sets of sequence data can be input into the large model together, then the input data X of the large model can be represented as: X = x1,…,x B ∈R B×M×L Where x1,…,x B The sequence data from group 1 to group B are represented sequentially. It can be understood that any two groups of sequence data can correspond to the same first organism or different first organisms.
[0103] As shown in Figure 5, the encoding layer is also called the tokenization and embedding module. Tokenization refers to processing the input data into "words." In this example, the input data includes at least one set of sequence data, and "words" refer to base data. Embedding refers to mapping the input data to embeddings. In this example, embeddings refer to encoding features. That is, since the first reference data 501 and any alignment data each include at least one base data, the electronic device maps each base data to its corresponding embedding through the encoding layer, obtaining the encoding features of each base data. The encoding features of the first reference data 501 include the encoding features of each base data in the first reference data 501. The encoding features of any alignment data include the encoding features of each base data in any alignment data.
[0104] Optionally, the encoding features of the first reference data 501 and the encoding features of any comparison data include features of special markers. Special markers include, but are not limited to, start markers, end markers, mask markers, and padding markers. The form of each marker is not limited here. For example, the start marker, located before the input data, can be " <cls>The end marker is placed after the input data and can be "". <eos>The mask marker is used to indicate mask data and can be " <mask>The fill mark is used to indicate fill data and can be "". <pad>In practical applications, the type and number of markers can be flexibly set according to the scenario. For example, depending on the scenario, they can also be set as follows: <unk>Other tags such as "".
[0105] Optionally, after encoding the input data X through the encoding layer, the encoded feature E of the input data X is obtained, which can be expressed as: E = Embedding(X). Where E ∈ R B×M×L×d d represents the dimension of the encoded features of the first reference data 501, or the dimension of the encoded features of any of the compared data. Embedding(·) represents the encoding layer. The explanation of the remaining parameters can be found in the description of the input data X above, and will not be repeated here.
[0106] The feature processing block is also called the Unified Sequence Model (USM) Transformer Block. There are N feature processing blocks. The parameter USMT(·) represents the processing performed by each feature processing block, and the parameter g(·) represents the processing performed by the N feature processing blocks. The prediction layer, also called the prediction head, is concatenated after the Nth feature processing block. The parameter φ(·) represents the processing performed by the prediction head.
[0107] The encoded features of the first reference data 501 and the encoded features of each alignment data are used as input data for the first feature processing block. The first feature processing block processes the input data to obtain its output data. The output data of the first feature processing block is then used as input data for the second feature processing block, which in turn processes the input data to obtain its output data. This process continues until the output data of the Nth feature processing block is obtained. Finally, a prediction layer maps the output data of the Nth feature processing block to mutation information.
[0108] Optionally, the encoded feature E is input into the first feature processing block. After processing the encoded feature E through N feature processing blocks and the prediction layer, the output data can be obtained. and Wherein, USMT(·) represents the processing performed by the feature processing block, block = N represents the number of feature processing blocks N, where N is a positive integer, g(·) represents the processing performed by N feature processing blocks, and φ(·) represents the processing performed by the prediction layer. E represents the coding features output by the coding layer, which include the coding features of the first reference data 501 and the coding features of the first sequencing data 502. Represents variation information.
[0109] Since the input batch size of the large model is B, the encoded features E include the encoded features of B sets of sequence data; therefore, the output data... This includes group B variation information, with each set of variation information corresponding to a set of sequence data.
[0110] It should be noted that any two feature processing blocks in the mutation detection model can correspond to the same processing method or different processing methods. The processing method of any feature processing block can be set based on experience or application requirements, and this application embodiment does not limit this. Assuming that all feature processing blocks correspond to the same processing method, for ease of description, the corresponding processing method will be described from the perspective of any one feature processing block below.
[0111] In this example, any feature processing block is the i-th feature processing block, where i takes any positive integer from 1 to N. Feature processing is performed on the input data of the i-th feature processing block to obtain the output data of the i-th feature processing block, including: performing self-attention processing on the input data of the i-th feature processing block to obtain self-attention features; and performing mapping processing on the self-attention features to obtain the output data of the i-th feature processing block.
[0112] The i-th feature processing block includes a self-attention layer, which performs the following self-attention processing on the input data of the i-th feature processing block: First, the input data of the i-th feature processing block is mapped three times to obtain the query matrix (Query, Q), the key matrix (Key, K), and the value matrix (Value, V). Next, the similarity between the query matrix (Q) and the key matrix (K) is calculated to obtain the attention weights. Then, the value matrix (V) is weighted according to the attention weights to obtain the self-attention features.
[0113] Optionally, the self-attention layer includes a Rotary Position Embedding (RoPE) layer. The RoPE layer performs rotational position encoding, which maps the original positional information to a high-dimensional space, performs rotation operations in that space, and obtains new positional information. By using rotational position encoding, the relative and absolute positional relationships between features can be captured, improving model performance.
[0114] In this example, the self-attention layer including the RoPE layer performs the following self-attention processing: First, the input data of the i-th feature processing block is mapped three times to obtain the query matrix (Q), key matrix (K), and value matrix (V). Next, rotational position encoding is performed on both the query matrix (Q) and the key matrix (K), and attention weights are determined based on the encoding results. Then, a weighted calculation is performed on the value matrix (V) according to the attention weights to obtain the self-attention features. By using rotational position encoding to capture relative and absolute positional relationships, the model's long context addressing and extrapolation capabilities are enhanced, improving model performance.
[0115] The self-attention processing described above can be understood as self-attention processing for a single head. In practical applications, the self-attention layer can be a multi-head self-attention layer. In this case, each head in the multi-head self-attention layer can perform the above self-attention processing to obtain self-attention features. Then, the self-attention features of each head are concatenated, or the self-attention features of each head are averaged to obtain the self-attention features of the multi-head self-attention layer.
[0116] In one possible implementation, performing self-attention processing on the input data of the i-th feature processing block to obtain self-attention features includes: performing self-attention processing on the input data of the i-th feature processing block in the row direction to obtain a first processing result; and performing self-attention processing on the first processing result in the column direction to obtain self-attention features.
[0117] The input data for the i-th feature processing block is a single feature. Since a feature is a vector, it is represented as a matrix, and a matrix contains elements with multiple rows and columns. Therefore, the input data for the i-th feature processing block contains elements with multiple rows and columns.
[0118] In this example, for the m-th row element in the input data of the i-th feature processing block, this row element includes features of each base data in the first reference data, or, this row element includes features of each base data in any alignment data. Optionally, this row element also includes features with special markings, such as features with padding markings. The self-attention layer includes a row attention layer, which performs row attention processing on the m-th row element to obtain the row attention features of the m-th row element.
[0119] Row attention processing is a type of self-attention processing, which can be understood as follows: performing three mappings on the elements of the m-th row to obtain the query matrix (Q), key matrix (K), and value matrix (V) respectively; calculating the similarity between the query matrix (Q) and key matrix (K) to obtain the attention weight; and weighting the value matrix (V) according to the attention weight to obtain the attention feature of the elements of the m-th row.
[0120] The first processing result, also called the row attention feature, includes the attention features of each row element. The row attention feature is also represented in matrix form. That is, the row attention feature is a matrix containing multiple rows and columns of elements. For the j-th column element in the row attention feature, this column element includes the features of the j-th base data in the first reference data and the features of the j-th base data in each alignment data. Optionally, this column element also includes features with special markers, such as padding markers. The self-attention layer includes a column attention layer. Through the column attention layer, column attention processing is performed on the j-th column element to obtain the column attention feature of the j-th column element.
[0121] Column attention processing is a type of self-attention processing, which can be understood as follows: performing three mappings on the elements of the j-th column to obtain the query matrix (Q), key matrix (K), and value matrix (V), respectively; calculating the similarity between the query matrix (Q) and key matrix (K) to obtain the attention weight; and weighting the value matrix (V) according to the attention weight to obtain the attention feature of the elements of the j-th column.
[0122] Column attention features include the attention features of each column element. Column attention features can be used directly as self-attention features, or they can be further processed to obtain self-attention features.
[0123] In another possible implementation, self-attention processing is performed on the input data of the i-th feature processing block to obtain self-attention features, including: performing self-attention processing on the input data of the i-th feature processing block in the column direction to obtain a second processing result; and performing self-attention processing on the second processing result in the row direction to obtain self-attention features.
[0124] The input data for the i-th feature processing block comprises multiple rows and columns of elements. In this example, for the j-th column element in the input data of the i-th feature processing block, this column element includes features of the j-th base data in the first reference data and features of the j-th base data in each alignment data. Optionally, this column element also includes features with special markings, such as features with padding markings. The self-attention layer includes a column attention layer, through which column attention processing is performed on the j-th column element to obtain the attention features of the j-th column element.
[0125] The second processing result, also called column attention features, includes the attention features of each column element. Column attention features are represented in matrix form. That is, a column attention feature is a matrix containing multiple rows and columns of elements. For the m-th row element in the column attention features, this row element includes the features of each base data in the first reference data, or, this row element includes the features of each base data in any alignment data. Optionally, this row element also includes features of special markers, such as padding markers. The self-attention layer includes a row attention layer. Through the row attention layer, row attention processing is performed on the m-th row element to obtain the attention features of the m-th row element.
[0126] Among them, row attention features include the attention features of each row element. Row attention features can be used directly as self-attention features, or they can be further processed to obtain self-attention features.
[0127] It is worth noting that performing column attention processing on the j-th column element is equivalent to: first performing transpose processing on the j-th column element to convert the column element into a row element; then, following the mechanism of performing row attention processing on the m-th row element, performing row attention processing on the row element obtained by converting the j-th column element to obtain the attention features of the row element; and finally, performing inverse transpose processing on the attention features of the row element to convert the row element into a column element to obtain the attention features of the column element.
[0128] Since the j-th column element in the input data of the i-th feature processing block includes the features of the j-th base data in the first reference data and the features of the j-th base data in each alignment data, self-attention processing is performed on the j-th column element. This enables the comparison of bases at the same position in different sequences, focusing on the same and different bases at the same position in different sequences, which is beneficial to enhancing the characterization ability of self-attention features.
[0129] Since the elements in the m-th row of the input data of the i-th feature processing block include features of each base data in the first reference data or features of each base data in any alignment data, self-attention processing is performed on the elements in the m-th row to focus on bases at different positions in the same sequence. This improves the model's understanding of the sequence and thus enhances the accuracy of self-attention features.
[0130] Because self-attention features have high accuracy and strong representational power, the output data (i.e., features) of the i-th feature processing block possesses strong representational power and high accuracy. Subsequently, mapping the output data of the i-th feature processing block to mutation information can improve the accuracy of the mutation information.
[0131] Optionally, self-attention processing is performed on the input data of the i-th feature processing block in the column direction to obtain a second processing result, including: performing self-attention processing on the input data of the i-th feature processing block in the column direction to obtain a third processing result; and performing pooling processing on the third processing result in the column direction to obtain the second processing result.
[0132] The input data of the i-th feature processing block consists of multiple rows and columns of elements. For the j-th column element in the input data of the i-th feature processing block, this column element includes the features of the j-th base data in the first reference data and the features of the j-th base data in each alignment data. The self-attention layer includes a column attention layer, through which column attention processing is performed on the j-th column element to obtain the attention features of the j-th column element.
[0133] The third processing result is also called the column attention feature, which includes the attention features of each column element. Pooling can be performed on the attention feature of the j-th column element to obtain the pooled feature of the j-th column element. The second processing result can be the column pooling feature, which includes the pooling features of each column element.
[0134] Column pooling features can be viewed as pooling features that include all elements in each row. Self-attention processing can be performed on the pooling feature of the m-th row element to obtain the attention feature of the m-th row element. The self-attention feature includes the attention features of all elements in each row.
[0135] By performing pooling processing on column attention features, we can summarize column information, retain important information, and remove redundant information, thereby improving the representational power and reducing the dimensionality of column pooling features. Because column pooling features have strong representational power and low dimensionality, they can improve the speed and effectiveness of subsequent self-attention processing, thus increasing the accuracy of variation information.
[0136] The computational complexity of column attention processing is O(hdLM²). Here, h is the number of attention heads, d represents the dimension of the encoded features, L represents the length of the padded first reference data 501, and the length of each padded alignment data. M represents the sum of the number of alignment data included in the first reference data and the first sequencing data. By applying pooling processing in the column direction to summarize column information, and then performing row attention processing, the computational complexity of row attention processing is reduced from O(hdLM²) to O(hdL²), achieving fast execution of row attention processing. This setup improves the computational speed of the base model and the ability to increase parameter size.
[0137] In this example, the i-th feature processing block also includes a feedforward layer. A feedforward layer, also known as a multilayer perceptron (MLP), is a unidirectional neural network consisting of multiple layers of neurons. Each layer of neurons is fully connected, meaning that each neuron is connected to all neurons in the next layer. The feedforward layer is used to perform linear or non-linear mappings on the self-attention features to obtain the output data for the i-th feature processing block.
[0138] By performing self-attention processing on the input data of the i-th feature processing block, important information in the first reference data and the first sequencing data is focused on, thus improving the representational power of the self-attention features. By performing mapping on the self-attention features through a feedforward layer, each part of the self-attention features can be independently mapped linearly or nonlinearly, improving the model's expressive power and generalization ability.
[0139] It is understood that the i-th feature processing block may include other network layers besides the self-attention layer and the feedforward layer. For example, the i-th feature processing block may also include at least one of the following: a normalization layer, a convolutional layer, and an activation layer. The order of the network layers is not limited in this embodiment.
[0140] Optionally, as shown in FIG6, FIG6 is a schematic diagram of the structure of a feature processing block provided in an embodiment of the present application. The feature processing block 601 includes three parts.
[0141] The first part consists of a cascaded normalization layer and a column attention layer. The normalization layer performs normalization processing on the input data to obtain the result. Optionally, the normalization layer is a root mean square error layer (RMSNorm) layer, which performs normalization processing on the input data according to the root mean square error function to obtain the result. The column attention layer performs self-attention processing on the result of the normalization layer in the column aspects to obtain column attention features. Optionally, the column attention layer includes a cascaded transpose layer, a multi-head self-attention layer, and a transpose layer. The first transpose layer transposes column elements into row elements, the multi-head self-attention layer performs self-attention processing on row elements from multiple heads and merges the results, and the second transpose layer reverses the row elements into column elements. The input data of the normalization layer and the output data of the column attention layer (i.e., the column attention processing result) are added together to obtain the summed result, thereby realizing skip connections and reducing the degree of information loss. The summed result is the output data of the first part.
[0142] The second part consists of a concatenated column pooling layer, a normalization layer, and a row attention layer. The column pooling layer performs pooling processing on the output data (i.e., the summed result) from the first part in the column aspect, obtaining column pooled features. The normalization layer performs normalization processing on the column pooled features, obtaining the processed result. Optionally, the normalization layer is a root mean square error normalization (RMSNorm) layer, which performs normalization processing on the column pooled features according to the root mean square error function, obtaining the processed result. The row attention layer can be a multi-head self-attention layer, which performs multi-head self-attention processing on the processing result of the normalization layer in the row aspect and merges the results of the multi-head self-attention processing to obtain the row attention processing result. The input data of the column pooling layer and the output data of the row attention layer (i.e., the row attention processing result) are added together to obtain the sum, thereby realizing skip connections and reducing the degree of information loss. The sum is the output data of the second part.
[0143] The third part consists of a normalization layer and a feed-forward network (FFN). The normalization layer performs normalization processing on the output data (i.e., the summed result) of the second part, obtaining the processed result. Optionally, the normalization layer is a root mean square error normalization (RMSNorm) layer, which performs normalization processing on the output data (i.e., the summed result) of the second part according to the root mean square error function, obtaining the processed result. The feed-forward layer performs linear or nonlinear mapping on the processing result of the normalization layer, obtaining the mapped result.
[0144] Optionally, the feedforward layer includes a SwiGLU function (a non-linear activation function) to perform non-linear activation processing on the processing result or mapping result of the normalization layer, resulting in a mapping result with a dimension of approximately 8d / 3. Here, d represents the dimension of the encoded features of the first reference data 501, or the dimension of the encoded features of any alignment data. To improve training efficiency, the dimension of the mapping result can be adjusted, for example, by making it a multiple of 256.
[0145] The input data of the normalization layer and the output data of the feedforward layer are added together to obtain the sum, thereby realizing skip connections and reducing the degree of information loss. This sum is the output data of the third part. The sum of the third part is the output data of feature processing block 601.
[0146] Optionally, as shown in FIG7, FIG7 is a schematic diagram of another feature processing block provided in an embodiment of the present application. Feature processing block 701 also includes three parts.
[0147] The first part consists of a cascaded normalization layer and a row attention layer. The normalization layer performs normalization processing on the input data to obtain the result. Optionally, the normalization layer is a layer normalization layer (LayerNorm Layer), which performs layer normalization processing on the input data to obtain the result. The row attention layer performs self-attention processing on the result of the normalization layer in the row direction to obtain the row attention result. The input data of the normalization layer and the output data of the row attention layer (i.e., the row attention result) are added together to obtain a summed result, thereby achieving skip connections and reducing information loss. This summed result is the output data of the first part.
[0148] The second part consists of a concatenated normalization layer and a column attention layer. The normalization layer performs normalization on the output data of the first part (i.e., the summed result), obtaining the processed result. Optionally, the normalization layer is a LayerNorm layer, which performs layer normalization on the output data of the first part, obtaining the processed result. The column attention layer performs self-attention processing on the result of the normalization layer along the columns, obtaining column attention features. The input data of the normalization layer and the output data of the column attention layer (i.e., the column attention processing result) are added together to obtain a summed result, thereby achieving skip connections and reducing information loss. This summed result is the output data of the second part.
[0149] The third part includes a normalization layer and a feedforward layer. The normalization layer performs normalization processing on the output data of the second part (i.e., the summed result) to obtain the processed result. Optionally, the normalization layer is a LayerNorm Layer, which performs layer normalization processing on the output data of the second part to obtain the processed result. The feedforward layer performs linear or nonlinear mapping on the processing result of the normalization layer to obtain the mapping result. The input data of the normalization layer and the output data of the feedforward layer are added to obtain the summed result, thereby realizing skip connections and reducing the degree of information loss. This summed result is the output data of the third part. The summed result of the third part is the output data of feature processing block 701.
[0150] Following the above method, after the electronic device determines the output data of each feature processing block, it can use the output data of that feature processing block as the input data of the next feature processing block. The next feature processing block then performs the above processing to obtain the output data of the next feature processing block. This process continues until the output data of the last feature processing block is obtained.
[0151] Optionally, the output data of the last feature processing block can be directly used as the semantic features mentioned above. Alternatively, semantic features can be obtained by further processing the output data of the last feature processing block; the processing method is not limited here.
[0152] For example, there are at least two first reference data sets, with different first reference data sets corresponding to different first gene sequences in the genome of the species. Each first gene sequence has a corresponding second gene sequence in the genome of the first organism. Based on this, each first reference data set corresponds to one first sequencing data set. For each pair of data (including a first reference data set and the first sequencing data set corresponding to that first reference data set), the output data of the last feature processing block can be determined in the manner described above, based on which at least two pairs of data output data can be obtained. Global attention processing can be performed on the output data of at least two pairs of data to obtain semantic features. Through global attention processing, the information of each pair of data is fused, improving the representational power and accuracy of the semantic features.
[0153] Step 203: Determine variation information based on semantic features. Variation information represents at least one variation that occurs in the second gene sequence relative to the first gene sequence.
[0154] In this example, the mutation detection model further includes a first prediction layer, which is a prediction layer used to predict mutation information and can map semantic features to mutation information. This embodiment does not limit the structure of the first prediction layer. Exemplarily, the first prediction layer includes an MLP (Multi-Level Processing) for performing linear or non-linear mappings on semantic features to obtain mutation information. Optionally, the last feature processing block is connected to the first prediction layer. The output data of the last feature processing block is the semantic feature. The first prediction layer receives the semantic feature and maps it to mutation information.
[0155] Variation information is used to characterize variations in the second gene sequence relative to the first gene sequence. The form of the variation information is not limited here. For example, variation information may include at least one of the following: the number of variations, the type of variation, the segment in the second gene sequence that has undergone the variation, the segment in the first gene sequence corresponding to the mutated segment, etc.
[0156] Variations in the second gene sequence relative to the first gene sequence include, but are not limited to: small insertion variation, small deletion variation, SNP variation, structural variation, copy number variation, inversion variation, and translocation variation.
[0157] Small insertion variants refer to the insertion of at least one base into the sequence, while small deletion variants refer to the deletion of at least one base into the sequence. Generally, the number of bases inserted in a small insertion variant and the number of bases deleted in a small deletion variant are both less than a certain threshold. The size of this threshold is not limited here; in practical applications, it can be set based on experience, or it can be a value conforming to the standards of molecular biology. It is understood that the second gene sequence, relative to the first gene sequence, can have at least one small insertion variant and / or at least one small deletion variant.
[0158] SNPs refer to the substitution of a single base in a sequence. For example, if the first gene sequence is adenine (A) and the second gene sequence is thymine (T), the substitution of adenine (A) for thymine (T) results in an SNP in the second gene sequence compared to the first. Similarly, if the first gene sequence is cytosine (C) and the second gene sequence is guanine (G), the substitution of cytosine (C) for guanine (G) also results in an SNP in the second gene sequence compared to the first.
[0159] Structural variation refers to a variation in which the number of mutated bases in a sequence exceeds a certain threshold. The size of this threshold is not limited here; in practical applications, it can be set based on experience or a value conforming to the standards of molecular biology. Mutated bases include inserted bases, deleted bases, inverted bases, and translocated bases. An inversion refers to the phenomenon where, after a sequence is broken into two fragments, at least one fragment is inverted by 180 degrees, and the two fragments rejoin. Bases in a sequence with an inversion are called inverted bases. A translocation refers to the rejoining of a sequence within a chromosome after breakage to another location on the same chromosome, or the transfer of a sequence from one chromosome to another between two homologous or non-homologous chromosomes. Bases in a translocated sequence are called translocated bases.
[0160] Copy number variation is a variation caused by genomic rearrangement, including an increase or decrease in the copy number of large fragments. Large fragments refer to fragments with a length not less than a certain threshold. The value of the threshold is not limited here. In practical applications, the threshold can be set based on human experience, or it can be a value that conforms to the standards of molecular biology.
[0161] The second gene sequence contains at least one variation relative to the first gene sequence. For example, the second gene sequence contains a small insertion variation and a small deletion variation relative to the first gene sequence, or the second gene sequence contains an SNP variation and a small deletion variation relative to the first gene sequence.
[0162] As shown in Figure 4, the electronic device can acquire first reference data 402 and first sequencing data 403, both of which include multiple base data 401. The first reference data 402 and the first sequencing data 403 correspond to the same window width, ensuring that the first gene sequence represented by the first reference data 402 and the second gene sequence represented by the first sequencing data 403 have the same length and the same position. The first sequencing data 403 includes multiple alignment data; the number of alignment data is also referred to as the depth of the first sequencing data 403. The window width corresponding to any alignment data is less than or equal to the window width corresponding to the first sequencing data 403.
[0163] The electronic device inputs the first reference data 402 and the first sequencing data 403 into the variant detection model 404, and outputs variant information through the variant detection model 404. The variant information includes the variant type, the mutated segment in the second gene sequence, and the corresponding segment in the first gene sequence. Specifically, label 405 shows the information representation of the segments in the second gene sequence that have SNP variants, small deletion variants, and small insertion variants, respectively, and their corresponding segments in the first gene sequence. Label 406 shows the information representation of the segments in the second gene sequence that have SNP variants, small deletion variants, and small insertion variants.
[0164] Comparing the information shown in label 405 and label 406, we can see that SNP variations are substitutions of a single base, such as replacing "A" with "T", "A" with "C", or "G" with "A". Small deletion variations refer to the deletion of some bases, such as the deletion of "C", "A", and "T". Small insertion variations refer to the insertion of some bases, such as the insertion of "C" and "TT".
[0165] As mentioned above, mutation information is determined by a mutation detection model based on the first reference data and the first sequencing data. This mutation detection model comprises a base model and a first prediction layer. Based on the above explanation of the mutation detection model, the base model includes N feature processing blocks. Optionally, the base model also includes a coding layer. The base model is a trained model; the training method for the base model is described below.
[0166] In this example, the method of this application embodiment further includes step S1 (not shown in the figure).
[0167] Step S1: Obtain second sequencing data, which characterizes the third gene sequence related to variation in the genome of the second organism; perform masking processing on the second sequencing data to obtain first masked data, which characterizes the sequence obtained after masking at least one base in the third gene sequence; reconstruct the first masked data using a first model to obtain first reconstructed data; train the first model based on the first reconstructed data and the second sequencing data to obtain a basic model.
[0168] The second organism can be the same as the first organism, or they can be different organisms. There can be at least one second organism, and different second organisms can belong to the same species or different species. The electronic device can acquire the second sequencing data in the same way as the first sequencing data, and the content of the second sequencing data is similar to that of the first sequencing data, which will not be described in detail here.
[0169] The second sequencing data includes at least one base. An electronic device can replace a portion of the base data in the second sequencing data with mask data, thereby masking the second sequencing data and transforming it into the first masked data. The first masked data includes the unmasked base data and the masked data obtained from the masking. For example, if the second sequencing data includes 100 bases, and the electronic device replaces the first 30 bases with mask data, then the first masked data includes 30 mask data and 70 bases. The content of the mask data is not limited here; in practical applications, the mask data can be specific data such as "*", "0", "--", or other formats. <mask>" etc. mask markup.
[0170] In an exemplary embodiment, the second sequencing data includes at least two alignment data; performing masking processing on the second sequencing data to obtain first masked data includes performing at least one of global random masking or column random masking on the at least two alignment data to obtain first masked data.
[0171] The second sequencing data characterizes the third gene sequence. The second sequencing data includes at least two alignment data sets, each representing the entire or a portion of the third gene sequence. Any two alignment data sets can correspond to sequences of the same length or sequences of different lengths. In this example, the electronic device employs at least one strategy, either column-based random masking or global random masking, to perform masking processing on at least two alignment data sets.
[0172] Specifically, for the global random masking strategy: the electronic device randomly determines at least one base from all the base data included in each alignment data, and replaces each determined base data with mask data, thereby performing global random masking processing on the alignment data to obtain the masked alignment data. The first masked data includes each of the masked alignment data.
[0173] For example, one set of alignment data includes base data 1 to 30. An electronic device randomly determines base data 2, 7, and 29, and replaces them with mask data 2, 7, and 29, resulting in masked alignment data. The masked alignment data includes: base data 1, mask data 2, base data 3 to 6, mask data 7, base data 8 to 28, mask data 29, and base data 30. Another set of alignment data includes base data 1 to 9. An electronic device randomly determines base data 1 and 7, and replaces them with mask data 1 and 7, resulting in masked alignment data. The masked alignment data includes: mask data 1, base data 2 to 6, mask data 7, and base data 8 to 9.
[0174] The strategy for random column masking is as follows: Since each alignment data includes at least one base, at least two alignment data can be considered as multi-row, multi-column base data. One row of base data represents one alignment data, and one column of base data represents base data at the same position in the third gene sequence belonging to different alignment data. The electronic device can randomly determine the column data based on the length of the third gene sequence. There is at least one column data, each column representing a specific column of base data, and different columns corresponding to different columns of base data. The base data corresponding to the column data in all alignment data is replaced with mask data, thereby performing random column masking on at least two alignment data to obtain the first masked data, which includes all the masked alignment data.
[0175] It is understandable that all alignment data includes base data corresponding to a specific position in the third gene sequence. Alternatively, some alignment data includes base data corresponding to a specific position in the third gene sequence, while the remaining alignment data does not. Alternatively, none of the alignment data includes base data corresponding to a specific position in the third gene sequence. When replacing the base data corresponding to the column data in all alignment data with mask data, if an alignment data does not include the base data corresponding to the column data, the replacement with mask data will not be performed.
[0176] For example, the third gene sequence includes bases 1 to 20. Assume the first alignment data includes bases 1 to 7, and the second alignment data includes bases 1 to 15. Based on this, if the electronic device randomly determines column 3, then: the electronic device can replace the base data corresponding to base 3 in the first alignment data with mask data to obtain masked alignment data, which includes: bases 1 to 2, the mask data corresponding to base 3, and bases 4 to 7; and replace the base data corresponding to base 3 in the second alignment data with mask data to obtain masked alignment data, which includes: bases 1 to 2, the mask data corresponding to base 3, and bases 4 to 15. If the electronic device randomly determines column data as 9, then: since the first alignment data does not include the base data corresponding to base 9, the first alignment data is the masked alignment data, and the masked alignment data includes: the base data corresponding to bases 1 to 7; replace the base data corresponding to base 9 in the second alignment data with mask data to obtain the masked alignment data, and the masked alignment data includes: the base data corresponding to bases 1 to 8, the mask data corresponding to base 9, and the base data corresponding to bases 10 to 15.
[0177] By performing global random masking on at least two alignment datasets, base data is randomly masked, which facilitates the subsequent reconstruction of the masked base data using a model. The reconstructed base data is then used to train the model, thereby improving the model's ability to understand sequencing data.
[0178] Given that the second sequencing data includes at least two alignments, and the base data are typically identical along the column direction, performing column random masking on at least two alignments can enhance the model's learning ability from the sequencing data, thereby improving model performance.
[0179] Optionally, masking processing is performed on the second sequencing data to obtain first masked data, including: performing masking processing on the second sequencing data according to a masking ratio to obtain first masked data, wherein the masking ratio is negatively correlated with the number of training iterations of the first model. That is, as the number of training iterations of the first model gradually increases, the masking ratio gradually decreases.
[0180] The electronic device can determine the occlusion ratio based on the number of training iterations of the first model; the method of determination is not limited here. For example, an initial value for the occlusion ratio can be preset, and the occlusion ratio can be adjusted downwards after a certain number of training iterations of the first model. Alternatively, a function describing the relationship between the occlusion ratio and the number of training iterations can be preset, and the electronic device can determine the occlusion ratio based on this function and the number of training iterations of the first model.
[0181] After determining the masking ratio, the electronic device identifies the base data that meets the masking ratio from all base data included in the second sequencing data. This identified base data is then replaced with masked data to obtain the first masked data. By reducing the masking ratio during training, the model can converge faster, improving its training performance.
[0182] In practical applications, global random occlusion and column random occlusion can correspond to the same or different occlusion ratios. Optionally, the occlusion processing includes both global random occlusion and column random occlusion, with the occlusion ratio corresponding to the global random occlusion being greater than that corresponding to the column random occlusion. For example, the occlusion ratio corresponding to the global random occlusion is 30%, while the occlusion ratio corresponding to the column random occlusion is 5%.
[0183] Understandably, column-based random occlusion requires a higher level of learning capability from the model compared to global random occlusion. Therefore, by ensuring that the occlusion ratio corresponding to global random occlusion is greater than that corresponding to column-based random occlusion, the training effectiveness of both strategies can be guaranteed, thereby improving the performance of the base model.
[0184] Furthermore, the occlusion ratio corresponding to global random occlusion processing can gradually decrease with the number of training iterations of the first model. For example, during the training of the first model, as the number of training iterations gradually increases, the occlusion ratio corresponding to global random occlusion processing gradually decreases. For instance, when the first model starts training, the occlusion ratio corresponding to global random occlusion processing is 30%. As the number of training iterations of the first model gradually increases, the occlusion ratio corresponding to global random occlusion processing gradually decreases. After the first model is trained, the occlusion ratio corresponding to global random occlusion processing decreases to 15%. Since the occlusion ratio corresponding to column random occlusion processing is relatively small, it can remain fixed during the training of the first model. For example, during the training of the first model, the occlusion ratio corresponding to column random occlusion processing is maintained at 5%. Alternatively, the occlusion ratio corresponding to column random occlusion processing can also decrease slightly.
[0185] After determining the first occlusion data, the electronic device can input the first occlusion data into the first model. Since the first model is used to train the base model, it is similar to the base model in structure and function, but differs in parameters. Based on this, the electronic device can use the first occlusion data as input data for the first feature processing block in the first model, and use the output data of the previous feature processing block as input data for the next feature processing block. Each feature processing block performs feature processing on its input data to obtain output data. In this way, the output data of the last feature processing block can be determined; this output data is used to characterize the features of the first occlusion data.
[0186] The first model also includes a prediction network. The structure of the prediction network is not limited here; for example, it could be a Softmax network. Since the first masking data includes each unmasked base and each masked data obtained from the masking process, the features of the first masking data (i.e., the output data of the last feature processing block) include the features of each unmasked base and the features of each masked data obtained from the masking process. Through the prediction network, the masking data can be reconstructed based on the features of each unmasked base in the output data of the last feature processing block and the features of any masked data obtained from the masking process, thus obtaining the base data. It can be understood that the process of performing feature processing on the first masking data is the process by which the first model learns and analyzes the semantics of the gene sequence of the first masking data. Since gene sequences follow syntax and rules, by learning and analyzing the semantics of the gene sequence of the first masking data, the base data obtained when the masked data was obtained can be reconstructed. That is to say, theoretically, the base data obtained by reconstructing the masking data is the same as the base data obtained when the masked data was obtained. Following the above method, each mask data can be reconstructed to obtain the reconstructed base data.
[0187] For example, a dictionary is pre-configured, containing multiple base data points. For each mask data point, a prediction network determines the probability that the mask data corresponds to any base data point in the dictionary, based on the features of each unmasked base data point and the features of the masked data point. The highest probability is then selected from these probabilities. The base data point corresponding to the highest probability is used as the base data reconstructed from the mask data.
[0188] By reconstructing each mask data using a predictive network, the first reconstructed data can be obtained. The first reconstructed data includes each unmasked base data and each reconstructed base data.
[0189] Next, the electronic device determines the loss value of the first model based on the first reconstructed data and the second sequencing data, or based on the base data reconstructed from the first reconstructed data and the masked base data from the second sequencing data (i.e., the base data corresponding to each masked data). The first model is then trained based on the loss value to obtain the trained first model. The trained first model includes the base model mentioned above.
[0190] Alternatively, according to the objective function: Determine the loss value for the first model. Here, X can represent the second sequencing data, which includes at least two alignment data points. This can represent the first reconstructed data. In this example, the first model is also called a Masked Language Model (MLM), therefore, the objective function is the loss function of the MLM. Based on this, θ represents the loss value of the first model, and θ represents the model parameters of the first model. Mask can represent the set of masked base data in the second sequencing data. m,l It can characterize the masked l-th base data in the m-th alignment data included in the set. This can be characterized by the fact that, during the process of reconstructing the first data using the first model, the masked base data X is reconstructed. m,l The probability of the corresponding base data.
[0191] The second sequencing data includes multiple alignment data points, each containing multiple base pairs; therefore, it is two-dimensional data. The two-dimensional data consists of M rows and N columns, where M and N are both positive integers greater than 1. Each row represents one alignment data point, and M is the number of alignment data points included in the second sequencing data. Since the length of the alignment data points is less than or equal to the length of the second sequencing data, padding can be used to make the length of the alignment data points consistent with the length of the second sequencing data. Based on this, one data point in a row represents one base pair or padding marker, and N is the number of base pairs in the second sequencing data. Training the first model using the second sequencing data falls under the category of training the first model based on a two-dimensional receptive field. By using the variant-related second sequencing data to train the first model, the first model can learn information about gene sequences associated with variants, thereby improving the accuracy of the model's variant predictions.
[0192] Optionally, the step of training the first model to obtain the base model based on the first reconstruction data and the second sequencing data includes step S2 (not shown in the figure).
[0193] Step S2: Obtain second reference data, which represents the fourth gene sequence in the genome of the species; perform masking processing on the second reference data to obtain second masked data, which represents the sequence obtained by masking at least one base in the fourth gene sequence; reconstruct the second masked data using the first model to obtain second reconstructed data; train the first model to obtain the base model based on the second reconstructed data, the second reference data, the first reconstructed data, and the second sequencing data.
[0194] The electronic device can acquire the second reference data in the same way as the first reference data. The content of the second reference data is similar to that of the first reference data, and will not be repeated here. It should be noted that the fourth gene sequence represented by the second reference data can be a gene sequence of any position and any length in the genome of a species.
[0195] The second reference data includes at least one base. An electronic device can replace a portion of the base data in the second reference data with mask data, thereby performing a masking process on the second reference data, transforming it into second masked data. The second masked data includes the unmasked base data and the masked data obtained from the masking.
[0196] It is understood that the masking strategy applied to the second reference data may be the same as or different from the masking strategy applied to the second sequencing data. For example, the second reference data may be masked using a globally random masking strategy, with the masking ratio gradually decreasing during the training of the first model.
[0197] The electronic device can input the second occlusion data into the first model. The second occlusion data serves as the input data for the first feature processing block in the first model, and the output data of the previous feature processing block in the first model serves as the input data for the next feature processing block. Feature processing is performed on the input data by each feature processing block to obtain output data. In this way, the output data of the last feature processing block is determined, and this output data represents the second occlusion data.
[0198] The prediction network can reconstruct the mask data based on the features of each unmasked base in the output data of the last feature processing block, thus obtaining the reconstructed base data. In other words, the prediction network reconstructs the mask data to obtain second reconstructed data, which includes both the unmasked base data and the reconstructed base data.
[0199] Subsequently, the electronic device can determine the loss value of the first model based on the second reconstructed data and the second reference data, or based on the reconstructed base data from the second reconstructed data and the masked base data from the second reference data (i.e., the base data corresponding to each masked data), and train the first model based on the loss value to obtain the base model. In the objective function mentioned above, X can also represent the second reference data. It can also characterize the second reconstructed data. Mask can also characterize the set of masked base data formed in the second reference data, X m,l It can also characterize the l-th base data that is masked in the second reference data included in the set. This can be characterized by the fact that, during the process of reconstructing the second reconstructed data using the first model, the masked base data X is reconstructed. m,l The probability of the corresponding base data.
[0200] The second reference data consists of multiple base pairs and is one-dimensional data, comprising one row and N columns, where N is a positive integer greater than 1. Each row represents one piece of the second reference data, and each data point within a row represents one base pair. N is the number of base pairs in the second reference data. Training the first model using the second reference data falls under the category of training the first model based on a one-dimensional receptive field. Since gene sequences of a species are crucial reference resources in genetics and genomics research, offering high accuracy, training the first model using the second reference data allows it to learn information from the species' gene sequences, thereby improving the model's accuracy.
[0201] In practical applications, you can execute step S2 first and then step S1, or you can execute step S1 and step S2 simultaneously, or you can execute step S1 first and then step S2.
[0202] Optionally, during the training of the first model, step S1 is executed more often than step S2. For example, an electronic device might be configured to execute step S1 with a 75% probability and step S2 with a 25% probability. This configuration allows the model more opportunities to learn gene sequences related to mutations, improving the accuracy of subsequent mutation information.
[0203] For example, as shown in Figure 8, in one possible implementation, the electronic device trains the first model 809 in two stages.
[0204] The first stage is the process of training the first model based on the data shown in (1-1) and (1-2). Specifically, the electronic device first acquires the input data for the first stage, which includes the second reference data. The second reference data includes multiple base data 801. The electronic device can replace some of the base data 801 in the second reference data with mask data 803 according to the global random masking processing strategy, obtaining the second masked data 802. The second masked data 802 is the input data for the first stage. The input data is then input into the first model 809, and the first model 809 obtains the output data, which includes the second reconstructed data 810. The electronic device can train the first model based on the second reconstructed data 810 and the second reference data.
[0205] Next, the electronic device acquires the input data for the second stage, which is the process of retraining the first model based on the data shown in (2-1) and (2-2). The input data for the second stage includes the second sequencing data and the corresponding reference data 804. Reference data 804 includes multiple base pairs, and the electronic device can determine the column data based on the number of base pairs included in the reference data 804, according to a column random masking strategy.
[0206] Specifically, the second sequencing data includes multiple alignment datasets, the number of which represents the alignment depth. The base data corresponding to the columns in the multiple alignment datasets are replaced with mask data 806, thereby performing column random masking on the second sequencing data. Furthermore, for any given alignment dataset, the electronic device replaces a portion of the base data with mask data 803, thereby performing global random masking on the alignment dataset. After performing column random masking and global random masking on the second sequencing data, the first masked data 805 is obtained. The input data for the second stage includes the first masked data 805.
[0207] The first masking data 805 is input into the first model 809, and the first model 809 obtains output data, which includes the first reconstructed data 812 and the corresponding reference data 811. The reference data 811 is identical to the reference data 804. The electronic device can retrain the first model based on the first reconstructed data 812 and the second sequencing data.
[0208] The first model can be trained using the above method, resulting in the trained first model. The trained first model includes a base model; the electronic device can then add a prediction layer after the base model to construct the model to be trained. For ease of description, this model is referred to as the second model. By training the second model, the mutation detection model is obtained.
[0209] Specifically, the electronic device acquires a first dataset, which includes reference data, sequencing data, and tags. The reference data represents gene sequences in the genome of a species, the sequencing data represents gene sequences in the organism's genome corresponding to the gene sequences in the reference data, and the tags represent variations in the gene sequences in the sequencing data relative to the gene sequences in the reference data. The electronic device inputs the reference data and sequencing data into a second model, which predicts variation information representing variations in the gene sequences in the sequencing data relative to the gene sequences in the reference data. The second model is trained using the tags and the predicted variation information to obtain a variation detection model. Subsequently, the variation detection model determines the variation information based on the first reference data and the first sequencing data.
[0210] Step 204: Based on the variation information, determine the disease origin information. The disease origin information represents the factors that cause the disease to occur in the first organism.
[0211] Electronic devices can acquire origin information to determine the model. Variation information is input into the origin information determination model, which then outputs disease origin information. This application does not limit the structure, number of parameters, or data processing method of the origin information determination model. For example, the origin information determination model may be a strategy tree model such as XGBoost, or it may be a large model based on Transformer.
[0212] Taking the origin information determination model as an example, which is a large Transformer-based model, the model includes at least one Transformer network and a second prediction layer. Each Transformer network includes a self-attention layer and a feedforward layer. The self-attention layer performs self-attention processing on the input data to obtain self-attention features. The feedforward layer performs linear or non-linear mapping on the self-attention features to obtain mapped features. These mapped features can be directly used as the output data of the Transformer network. Alternatively, the Transformer network may include other network layers, such as a normalization layer, or it may use skip connections to connect the network layers. In this case, the output data of the Transformer network can be determined based on the mapped features.
[0213] The input data for the origin information determination model includes variation information. Assuming the origin information determination model includes at least one Transformer network and a second prediction layer, then: the input data of the first Transformer network is processed by the first Transformer network to obtain its output data; the output data of the first Transformer network is used as the input data of the second Transformer network, and processed by the second Transformer network to obtain its output data; the output data of the second Transformer network is used as the input data of the third Transformer network, and processed by the third Transformer network to obtain its output data. This process continues until the output data of the last Transformer network is obtained. The output data of the last Transformer network is then mapped to the disease origin information through the second prediction layer. The structure and processing method of the origin information determination model are similar to those of the mutation detection model. Please refer to the descriptions of steps 202 and 203, which will not be repeated here.
[0214] Optionally, multiple factors can be pre-configured. The specific content and number of these factors are not limited here. For example, factors may include gene methylation and gene variation. Other factors may include genetic factors, environmental factors, and age factors. The origin information determination model can determine the indicators of each factor based on variation information. The indicator of any factor characterizes the probability that the factor will cause disease in the first organism. Generally, the larger the indicator of a factor, the higher the probability that the factor will cause disease in the first organism. The electronic device can determine the largest indicator from the indicators of each factor, or determine the indicator greater than a threshold from the indicators of each factor, and take the factor corresponding to the determined indicator as the factor causing disease in the first organism, thereby obtaining disease origin information. Optionally, the disease includes cancer; therefore, the disease origin information may include cancer origin information.
[0215] In one possible implementation, step 204 includes: determining at least one first feature based on the variation information, wherein any first feature represents statistical information of a variation; and determining disease origin information based on the at least one first feature.
[0216] Since variation information represents at least one variation that occurs in the second gene sequence relative to the first gene sequence, and the first and second gene sequences are considered as a pair of sequences, in practical applications, there are at least one pair of sequences. Based on this, electronic devices can acquire variations from multiple pairs of sequences. Each pair of sequences corresponds to at least one variation, and each variation belongs to a variation type. Any two variations can correspond to variations of the same type or variations of different types. The number, type, etc., of variations corresponding to any two pairs of sequences can be the same, different, or partially the same and partially different.
[0217] Electronic devices can statistically analyze the variation information of each pair of sequences to obtain at least one first feature. A first feature represents statistical information about a type of variation. For example, one first feature represents at least one of the following: the distribution frequency of small insertion variations, the number of small insertion variations, and the proportion of small insertion variations to the total variation. Another first feature represents at least one of the following: the distribution frequency of small deletion variations, the number of small deletion variations, and the proportion of small deletion variations to the total variation. Yet another first feature represents at least one of the following: the distribution frequency of SNP variations, the number of SNP variations, and the proportion of SNP variations to the total variation.
[0218] Optionally, the first gene sequence is segmented into fixed-length bins. The length of the bins is not limited here; for example, a bin can be 1M (i.e., containing 1 trillion bases). Generally, a 1M bin is also called a 1Mbin. Since the first gene sequence is segmented, the variation information corresponding to the first gene sequence is also segmented into variation information corresponding to each bin. The variation information corresponding to each bin can be statistically analyzed to obtain at least one first feature.
[0219] Subsequently, the electronic device uses each primary feature as input data for the origin information determination model, which then determines the disease origin information based on the input data. By using variation information to determine the primary feature, which is used to characterize a variation, the dimensionality of the data is reduced. This allows for a reduction in the amount of data processing and improved efficiency when determining the disease origin information based on the primary feature.
[0220] Optionally, determining the origin information of the disease based on at least one first feature includes: obtaining at least one of a second feature, a third feature, or a fourth feature, wherein the second feature represents statistical information on the methylation status of the detection site in the genome of the first organism, the third feature represents the disease diagnosis status of the first organism, and the fourth feature represents disease statistics of the species to which the first organism belongs; and determining the origin information of the disease based on at least one of the second feature, the third feature, or the fourth feature, and at least one first feature.
[0221] Electronic devices can acquire methylation information. Methylation information characterizes the methylation status of detection sites in the genome of a first organism. The methylation status of detection sites can be characterized in the following ways: (1) the detection site is methylated, or the detection site is not methylated. (2) the detection site is hypermethylated, or the detection site is hypomethylated. (3) the degree of methylation of the detection site.
[0222] The method of obtaining methylation information is not limited here. For example, technicians can extract nucleic acids from bodily fluid samples of a first organism and perform quantitative methylation analysis on the nucleic acids in a laboratory environment to obtain methylation information.
[0223] For example, a prediction layer can be concatenated after the base model to obtain a third model to be trained. The electronic device acquires a second dataset, which includes reference data, sequencing data, and labels. The reference data represents the gene sequence containing the detection site in the species' genome, the sequencing data represents the gene sequence containing the detection site in the organism's genome, and the labels represent the methylation state of the detection site. The electronic device inputs the reference data and sequencing data into the third model, predicts methylation information through the third model, and this methylation information represents the methylation state of the detection site. The third model is trained using the labels and the predicted methylation information to obtain a methylation detection model, which includes a base model and a third prediction layer. Subsequently, the first reference data and the first sequencing data can be input into the methylation detection model, the semantic features are determined through the base model, and the semantic features are mapped to methylation information through the third prediction layer. This application does not limit the structure of the third prediction layer. Exemplarily, the third prediction layer includes an MLP, used to perform linear or nonlinear mapping on the semantic features to obtain methylation information. The first gene sequence represented by the first reference data includes the detection site, and the second gene sequence represented by the first sequencing data also includes the detection site.
[0224] As shown in Figure 9, the electronic device can acquire first reference data 902, which includes multiple base data 901. Additionally, the electronic device can acquire first sequencing data 903, which includes multiple alignment data. The first reference data 902 and the first sequencing data 903 are input into a methylation detection model 904, which outputs methylation information. The methylation information characterizes the methylation state of the detection site; for example, methylation information 905 indicates that the detection site is not methylated, and methylation information 906 indicates that the detection site is methylated.
[0225] In related technologies, biological samples are typically collected from organisms and sent to a laboratory where they undergo complex chemical processing to obtain methylation information. Compared to determining methylation information in a laboratory environment, this application's embodiment uses a methylation detection model to determine methylation information based on first reference data and first sequencing data. This reduces operational complexity and experimental costs, shortens the time required to obtain methylation information, and further reduces the time required to obtain disease origin and diagnostic information. Because disease origin and diagnostic information can be obtained relatively quickly, the method of this application embodiment is suitable for large-scale biological screening, enabling the screening of more organisms in a shorter time. This allows organisms with diseases to receive timely diagnosis and treatment, reducing the possibility of disease deterioration and improving treatment outcomes.
[0226] The first and second gene sequences are considered as a pair of sequences; in practical applications, there can be at least one pair. Based on this, the electronic device acquires methylation information from multiple pairs of sequences, where the methylation information of any pair represents the methylation state of at least one detection site. A second feature is obtained by statistically analyzing the methylation information of multiple pairs of sequences. This second feature represents the statistical information of the methylation state of the detection site; for example, it represents the frequency distribution of the methylation state of the detection site.
[0227] Optionally, the first gene sequence is segmented into fixed-length bins, for example, into 1M bins of length. Since the first gene sequence is segmented, the methylation information corresponding to the first gene sequence is also segmented into methylation information corresponding to each bin. The methylation information corresponding to each bin can be statistically analyzed to obtain at least one second feature.
[0228] Furthermore, the electronic device can acquire a third feature characterizing the disease diagnosis status of the first organism. For example, the third feature includes the disease diagnosis report of the first organism. The electronic device can also acquire a fourth feature characterizing disease statistics of the species to which the first organism belongs. For example, the fourth feature includes the regional distribution of diseases within the species. The electronic device uses at least one of the second, third, or fourth features, along with the first feature, as input data to the origin information determination model, so that the origin information determination model can determine the origin information of the disease based on the input data.
[0229] By using at least one of the second, third, and fourth features, along with the first feature, the origin information of a disease is determined. This enables the identification of factors contributing to disease occurrence in an organism based on multidimensional information, improving the accuracy of disease origin information. Furthermore, the second, third, and fourth features require significantly less data compared to the original data. For example, the statistical information on the methylation state of each detection site (i.e., the second feature) requires far less data than the original data (the methylation state of each detection site). Since the origin information determination model relies on a smaller amount of data to determine the disease origin, it saves data processing time and improves data processing efficiency.
[0230] In practical applications, the input data for origin information determination models can include not only the first, second, third, and fourth features, but also other features. For example, the input data can also include a fifth feature to characterize the age and sex of the first organism, a sixth feature to characterize omics information of the gene sequence, and so on.
[0231] As mentioned above, the origin information of the disease is determined based on the variation information and methylation information. Methylation information characterizes the methylation status of the detection site in the genome of the first organism. Methylation information is determined by the methylation detection model, which is determined based on the basic model.
[0232] Based on this, the method in this application embodiment further includes: acquiring third sequencing data, the third sequencing data representing a fifth gene sequence related to methylation in the genome of a second organism; performing masking processing on the third sequencing data to obtain third masked data, the third masked data representing a sequence obtained by masking at least one base in the fifth gene sequence; reconstructing the third masked data using a first model to obtain third reconstructed data; and training the first model to obtain a base model based on the third reconstructed data and the third sequencing data.
[0233] The electronic device can acquire the third sequencing data in the same way as the first sequencing data. The content of the third sequencing data is similar to that of the first sequencing data, and will not be described again here. It should be noted that the fifth gene sequence represented by the third sequencing data is the sequence containing the detection site in the genome of the second organism. This detection site is related to methylation, can be located at any position in the genome, and its length can be arbitrary.
[0234] The third sequencing data includes at least one base. An electronic device can replace a portion of the base data in the third sequencing data with mask data, thereby performing masking processing on the third sequencing data, transforming it into third-masked data. The third-masked data includes the unmasked base data and the masked data obtained from the masking. It is understood that the strategy for performing masking processing on the third sequencing data can be the same as or different from the strategy for performing masking processing on the second sequencing data. For example, at least one strategy, such as global random masking or column random masking, can be used to perform masking processing on the third sequencing data.
[0235] The electronic device can input the third masking data into the first model. The third masking data serves as the input data for the first feature processing block in the first model, and the output data of the previous feature processing block in the first model serves as the input data for the next feature processing block. Feature processing is performed on the input data by each feature processing block to obtain output data. In this way, the output data of the last feature processing block is determined, and this output data represents the semantics of the third masking data. Each masking data can be reconstructed using a prediction network based on the semantics of each unmasked base in the output data, resulting in each reconstructed base. That is, the prediction network can determine the third reconstructed data, which includes each unmasked base and each reconstructed base.
[0236] Subsequently, the electronic device can determine the loss value of the first model based on the third reconstructed data and the third sequencing data, or based on the base data reconstructed from the third reconstructed data and the masked base data from the third sequencing data (i.e., the base data corresponding to each masked data), and train the first model based on the loss value to obtain the base model. In the objective function mentioned above, X can also represent the third sequencing data. It can also characterize third-order reconstructed data. Mask can also characterize the set of masked base data formed in third-order sequencing data, X. m,l It can also characterize the masked l-th base data in the third sequencing data included in the set. This can be characterized by the masked base data X obtained during the process of reconstructing the third reconstruction data through the first model. m,l The probability of the corresponding base data.
[0237] The third sequencing data comprises multiple alignment data points, each containing multiple base pairs; therefore, it is two-dimensional data. Two-dimensional data consists of M rows and N columns, where M and N are both positive integers greater than 1. Each row represents one alignment data point, and M is the number of alignment data points included in the third sequencing data. Since the length of the alignment data points is less than or equal to the length of the third sequencing data, padding can be used to make the length of the alignment data points consistent with the length of the third sequencing data. Based on this, each data point in a row represents one base pair or a padding marker, and N is the number of base pairs in the third sequencing data. Training the first model using the third sequencing data falls under the category of training the first model based on a two-dimensional receptive field. Training the first model with the third sequencing data allows it to learn information about methylation-related gene sequences, improving the base model's understanding of gene sequences and enhancing the accuracy of subsequent methylation information determination based on the base model.
[0238] Alternatively, as shown in Figure 8, in one possible implementation, the electronic device trains the first model 809 in three stages.
[0239] The first stage is the process of training the first model based on the data shown in (1-1) and (1-2). Specifically, the electronic device first acquires the input data for the first stage, which includes the second reference data. The second reference data includes multiple base data 801. The electronic device can replace some of the base data 801 in the second reference data with mask data 803 according to the global random masking processing strategy, obtaining the second masked data 802. The second masked data 802 is the input data for the first stage. The input data is input into the first model 809, and the first model 809 obtains the output data, which includes the second reconstructed data 810. The electronic device can train the first model based on the second reconstructed data 810 and the second reference data. Next, the electronic device acquires the input data for the second stage, which includes the second sequencing data and the corresponding reference data. The reference data corresponding to the second sequencing data includes multiple base data 804. The electronic device can determine the column data according to the number of base data 804 according to the column random masking processing strategy.
[0240] The second stage involves retraining the first model based on the data shown in (2-1) and (2-2). Specifically, the second sequencing data includes multiple alignment datasets, the number of which represents the alignment depth. The base data corresponding to the column data in the multiple alignment datasets is replaced with mask data 806, thereby performing column random masking on the second sequencing data. Furthermore, for any alignment dataset, the electronic device replaces a portion of the base data with mask data 803, thereby performing global random masking on the alignment dataset. After performing column random masking and global random masking on the second sequencing data, the first masked data 805 is obtained. The first masked data 805 is the input data for the second stage. The input data is input into the first model 809, and the first model 809 produces output data, including the first reconstructed data 812 and the corresponding reference data 811. Reference data 811 is identical to reference data 804. The electronic device can then retrain the first model based on the first reconstructed data 812 and the second sequencing data.
[0241] The third stage involves retraining the first model based on the data shown in (3-1) and (3-2). Specifically, the third sequencing data includes multiple alignment datasets, the number of which represents the alignment depth. The base data corresponding to the column data in the multiple alignment datasets is replaced with mask data 806, thereby performing column random masking on the third sequencing data. Furthermore, for any alignment dataset, the electronic device replaces a portion of the base data with mask data 803, thereby performing global random masking on the alignment dataset. After performing column random masking and global random masking on the third sequencing data, the third masked data 808 is obtained. The third masked data 808 is the input data for the second stage. The input data is fed into the first model 809, and the first model 809 produces output data, including the third reconstructed data 814 and the corresponding reference data 813. Reference data 813 is identical to reference data 807. The electronic device can then retrain the first model based on the third reconstructed data 814 and the third sequencing data 808.
[0242] In an exemplary embodiment, the method of this application further includes: determining disease diagnosis information based on at least one first feature; or determining disease diagnosis information based on at least one of a second feature, a third feature, or a fourth feature, and at least one first feature. The disease diagnosis information characterizes the likelihood that the first organism is healthy or has developed at least one disease.
[0243] Electronic devices can acquire diagnostic information to determine a model. The electronic device uses at least one first feature, or at least one of a second, third, fourth, or other feature, along with at least one first feature, as input data to the diagnostic information determination model. After processing the input data, the diagnostic information determination model obtains the disease diagnosis information. The structure, parameter quantization, and data processing methods of the diagnostic information determination model are not limited here. For example, the diagnostic information determination model can be a large model based on Transformer, or a policy tree model such as XGBoost.
[0244] Taking a large Transformer-based model as an example, the diagnostic information determination model includes at least one Transformer network and a fourth prediction layer. Each Transformer network includes a self-attention layer and a feedforward layer. The self-attention layer performs self-attention processing on the input data to obtain self-attention features. The feedforward layer performs linear or non-linear mapping on the self-attention features to obtain mapped features. These mapped features can be directly used as the output data of the Transformer network. Alternatively, the Transformer network may include other network layers, such as a normalization layer, or it may use skip connections to connect the network layers. In this case, the output data of the Transformer network can be determined based on the mapped features.
[0245] The input data for the diagnostic information determination model includes a first feature, or the input data for the diagnostic information determination model includes at least one of a second feature, a third feature, a fourth feature, or other features, plus the first feature. Assuming the diagnostic information determination model includes at least one Transformer network and a fourth prediction layer, then: the input data of the first Transformer network is processed by the first Transformer network to obtain the output data of the first Transformer network; the output data of the first Transformer network is used as the input data of the second Transformer network, and the input data of the second Transformer network is processed by the second Transformer network to obtain the output data of the second Transformer network; the output data of the second Transformer network is used as the input data of the third Transformer network, and the input data of the third Transformer network is processed by the third Transformer network to obtain the output data of the third Transformer network. This process continues until the output data of the last Transformer network is obtained. The output data of the last Transformer network is mapped to disease diagnostic information through the fourth prediction layer. The structure and processing method of the diagnostic information determination model are similar to those of the variant detection model. Please refer to the descriptions of steps 202 and 203, which will not be repeated here.
[0246] Optionally, multiple disease types can be pre-configured. The specific content and number of disease types are not limited here. For example, taking cancer as an example, cancer types include at least one of the following: lung cancer, liver cancer, colon cancer, breast cancer, pancreatic cancer, ovarian cancer, stomach cancer, etc. The diagnostic information determination model can determine indicators for various disease types based on the input data. An indicator for any disease type represents the probability that the first organism will develop the corresponding disease. Generally, the larger the indicator for a disease type, the higher the probability that the first organism will develop the corresponding disease. The electronic device can determine the largest indicator from the indicators of each disease type, or determine an indicator greater than a threshold from the indicators of each disease type. Based on the disease type corresponding to the determined indicator, the disease experienced by the first organism is determined, thereby obtaining disease diagnostic information. Optionally, the disease includes cancer; therefore, the disease diagnostic information includes cancer diagnostic information.
[0247] Optionally, the disease diagnosis information also includes health indicators, which characterize the likelihood of a first organism being healthy. The electronic device determines the disease diagnosis information based on these health indicators and indicators for each disease category.
[0248] As shown in Figure 10, the electronic device can acquire WGS data 1001 of an organism, determine multiple first sequencing data 1002 based on the WGS data 1001, and acquire first reference data corresponding to each first sequencing data 1002. For each first reference data and corresponding first sequencing data 1002, on the one hand, methylation information 1003 is determined based on the first reference data and corresponding first sequencing data 1002; on the other hand, variation information 1004 is determined based on the first reference data and corresponding first sequencing data 1002. Furthermore, the electronic device can acquire other information 1005, such as the organism's disease diagnosis status and species disease statistics.
[0249] Model 1006 includes a diagnostic information determination model. Based on methylation information 1003, variation information 1004, and other information 1005, the diagnostic information determination model can determine cancer diagnostic information 1007. Cancer diagnostic information 1007 includes the probability of an organism being healthy, the probability of an organism developing lung cancer, the probability of an organism developing breast cancer, the probability of an organism developing colon cancer, the probability of an organism developing liver cancer, the probability of an organism developing stomach cancer, and so on.
[0250] Model 1006 also includes an origin information determination model. Based on methylation information 1003, mutation information 1004, and other information 1005, the origin information determination model can determine cancer origin information 1008. Cancer origin information 1008 includes the probability that cancer originates from factor 1, the probability that cancer originates from factor 2, the probability that cancer originates from factor 3, the probability that cancer originates from factor 4, the probability that cancer originates from factor 5, the probability that cancer originates from factor 6, and so on.
[0251] In related technologies, the detection of diseases using imaging equipment is easily affected by factors such as image clarity and the presentation of the disease, which reduces the accuracy of the test results. The embodiments of this application determine disease diagnostic information and disease origin information at the gene level through a model, which can improve the accuracy of test results and significantly reduce testing costs, thereby alleviating the pressure on public health resources.
[0252] Optionally, after determining the origin and diagnosis of the disease, the electronic device can automatically generate reports based on these information, transforming complex analytical results into easily understandable clinical reports. This allows healthcare professionals to quickly access key information. The reports, along with interpretive and decision-making information derived from them, can be displayed on the healthcare professional's client device, helping them develop personalized treatment plans. Simultaneously, the reports, along with risk assessments and health management recommendations derived from them, can be displayed on the organism's client device, assisting the organism in managing its health.
[0253] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant regions. For example, the sequencing data and disease diagnosis information involved in this application were obtained with full authorization.
[0254] In the above method, semantic features are determined based on first reference data and first sequencing data. Since semantic features are determined through information interaction between the first reference data and the first sequencing data, they can reflect the global information of gene sequences in the species genome and the organism genome, and can more accurately characterize the semantics of the first reference data and the first sequencing data. Because semantic features characterize the semantics of the first reference data and the first sequencing data, and because semantic features have high accuracy, determining variation information based on semantic features enables a semantic comparison of gene sequences in the species genome and the organism genome, thus more accurately determining the variations that have occurred in the organism's gene sequences.
[0255] Determining the origin of a disease by analyzing mutation information allows us to identify the factors contributing to disease development based on variations in an organism's gene sequence. This approach enables us to pinpoint the causes of disease at the genetic level, resulting in highly accurate information about disease origins. Furthermore, this information can assist healthcare professionals in better managing an organism's health, reducing their workload.
[0256] The above describes the data processing method of this application embodiment from the perspective of method steps. The following is a systematic and comprehensive explanation. The method of this application embodiment can be applied to medical scenarios. In a medical scenario, as shown in Figure 11, the electronic device can acquire a basic model. On one hand, it acquires a methylation detection model based on the basic model and determines methylation information through the methylation detection model. On the other hand, it acquires a mutation detection model based on the basic model and determines mutation information through the mutation detection model. In addition, the electronic device can acquire other information such as disease diagnosis reports of organisms and disease statistics of species. Then, the electronic device can determine cancer diagnosis information and cancer origin information based on methylation information, mutation information, and other information. Specifically, as shown in Figure 12, the data processing method of this application embodiment includes the following steps.
[0257] Step 1201: Obtain whole genome sequencing data of the organism.
[0258] Specifically, as shown in Figure 13, technicians can collect a biological sample 1302 from an organism 1301. The biological sample 1302 can be a bodily fluid sample such as blood or urine. The biological sample 1302 can be placed in a specialized preservation device 1303 and transported to a laboratory using this device. The biological sample 1302 includes nucleic acids such as cfDNA, which are used to carry the organism's genome. In a laboratory environment, technicians perform sequencing on the organism's genome to obtain whole-genome sequencing data 1304.
[0259] Step 1202: Determine variant information based on whole-genome sequencing data using a variant detection model.
[0260] As shown in Figure 13, the electronic device can acquire reference sequencing data, which represents the whole genome of the species to which organism 1301 belongs (i.e., human). The electronic device can determine first reference data from the reference sequencing data, and use the first reference data to represent the first gene sequence in the whole genome of the species. Next, the electronic device determines first sequencing data 1305 from the whole genome sequencing data 1304, and uses the first sequencing data 1305 to represent the second gene sequence in the genome of the organism corresponding to the first gene sequence. The large model 1306 includes a variant detection model, which determines variant information 1308 based on the first reference data and the first sequencing data 1305. The variant information 1308 is used to represent variants such as small deletions, small insertions, and SNPs that occur in the second gene sequence compared to the first gene sequence.
[0261] Step 1203: Determine methylation information based on whole-genome sequencing data using a methylation detection model.
[0262] As shown in Figure 13, the electronic device can determine first reference data from reference sequencing data, which characterizes a first gene sequence in the whole genome of a species, wherein the first gene sequence includes a detection site. Next, the electronic device determines first sequencing data 1305 from whole genome sequencing data 1304, which characterizes a second gene sequence in the organism's genome corresponding to the first gene sequence, wherein the second gene sequence also includes a detection site. The large model 1306 includes a methylation detection model, which determines methylation information 1307 based on the first reference data and the first sequencing data 1305. The methylation information 1307 is used to characterize the methylation state of the detection site.
[0263] Step 1204: Obtain additional information.
[0264] Step 1205: Determine the cancer origin information by using the origin information model based on methylation information, mutation information, and other information.
[0265] Step 1206: Determine the model based on diagnostic information, including methylation information, mutation information, and other information, to determine cancer diagnostic information.
[0266] As shown in Figure 13, the large model 1306 includes a diagnostic information determination model. Based on methylation information 1307, variation information 1308, and other information, the diagnostic information determination model determines cancer diagnostic information. Cancer diagnostic information can characterize the likelihood of an organism being healthy. In this example, if the likelihood of an organism being healthy is higher than a threshold, the organism is considered healthy; if the likelihood of an organism being healthy is lower than the threshold, the organism is considered to have cancer. Based on this, the electronic device can obtain cancer screening results 1309 based on the cancer diagnostic information of each organism, and the cancer screening results 1309 can characterize whether each organism has cancer. Furthermore, cancer diagnostic information can characterize the likelihood of an organism developing at least one type of cancer. Based on this, the electronic device can obtain cancer classification information 1310 based on the cancer diagnostic information of each organism, and the cancer classification information 1310 can characterize the type of cancer that has occurred in each organism.
[0267] The basic model used in this application's embodiments was obtained through self-supervised training on sequence data exceeding 1 trillion base pairs. The structure and training method of the basic model have been described in detail above and will not be repeated here. The methylation detection model built based on this basic model achieves an AUC (Area Under Curve) of 0.911 and an accuracy of 0.931 under low coverage conditions. The variant detection model built based on this basic model achieves an F1 score of 0.991 for detecting SNP variants under low coverage conditions, and an F1 score of 0.932 for detecting small insertions and small deletions (INDELs) variants under 20-fold coverage conditions.
[0268] This application embodiment also verifies the effectiveness of the above data processing method based on 1260 organisms. Any organism can be either cancerous or healthy. The 1260 organisms correspond to 9 types of cancer. After verification, the AUC of cancer diagnostic information reached 0.983, and the sensitivity was 83.9% with a specificity of 98.0%. The accuracy of cancer origin information was approximately 0.834 to 0.952. Therefore, the data processing method of this application embodiment can efficiently and accurately analyze the genome of organisms to obtain cancer diagnostic information and cancer origin information, enabling early detection and classification of multiple cancers, thereby improving treatment outcomes and reducing cancer care expenditures.
[0269] Figure 14 is a schematic diagram of a data processing device provided in an embodiment of this application. As shown in Figure 14, the device includes:
[0270] The acquisition module 1401 is used to acquire first reference data and first sequencing data. The first reference data represents a first gene sequence in the genome of the species to which the first organism belongs, and the first sequencing data represents a second gene sequence in the genome of the first organism that corresponds to the first gene sequence.
[0271] The determination module 1402 is used to determine semantic features based on the first reference data and the first sequencing data. The semantic features characterize the semantics of the first reference data and the semantics of the first sequencing data determined when information interaction is performed between the first reference data and the first sequencing data.
[0272] The determination module 1402 is further configured to determine variation information based on semantic features, wherein the variation information characterizes at least one variation that occurs in the second gene sequence relative to the first gene sequence;
[0273] The determination module 1402 is also used to determine the disease origin information based on the variation information. The disease origin information characterizes the factors that cause the disease to occur in the first organism.
[0274] In one possible implementation, the determining module 1402 is used to determine at least one first feature based on the variation information, wherein any first feature represents statistical information of a variation; and to determine the origin information of the disease based on the at least one first feature.
[0275] In one possible implementation, the determining module 1402 is used to obtain at least one of a second feature, a third feature, or a fourth feature, wherein the second feature represents statistical information on the methylation status of a detection site in the genome of the first organism, the third feature represents the disease diagnosis status of the first organism, and the fourth feature represents disease statistics of the species to which the first organism belongs; and the disease origin information is determined based on at least one of the second feature, the third feature, or the fourth feature, and at least one first feature.
[0276] In one possible implementation, the determining module 1402 is further configured to determine disease diagnosis information based on at least one first feature; or, to determine disease diagnosis information based on at least one of a second feature, a third feature, or a fourth feature, and at least one first feature; wherein the disease diagnosis information characterizes the likelihood of the first organism being healthy or experiencing at least one disease.
[0277] In one possible implementation, mutation information is determined by a mutation detection model, which is determined based on a base model.
[0278] The acquisition module 1401 is also used to acquire second sequencing data, which characterizes the third gene sequence related to variation in the genome of the second organism;
[0279] The device also includes:
[0280] A masking module is used to perform masking processing on the second sequencing data to obtain first masked data, wherein the first masked data represents the sequence obtained after masking at least one base in the third gene sequence;
[0281] The reconstruction module is used to reconstruct the first occlusion data using the first model to obtain the first reconstructed data;
[0282] The training module is used to train the first model to obtain the base model based on the first reconstruction data and the second sequencing data.
[0283] In one possible implementation, the second sequencing data includes at least two alignment data; a masking module is used to perform at least one of global random masking or column random masking on the at least two alignment data to obtain the first masked data.
[0284] In one possible implementation, a masking module is used to perform masking processing on the second sequencing data according to a masking ratio to obtain the first masked data, wherein the masking ratio is negatively correlated with the number of training iterations of the first model.
[0285] In one possible implementation, the occlusion process includes global random occlusion and column random occlusion, with the occlusion ratio corresponding to global random occlusion being greater than that corresponding to column random occlusion.
[0286] In one possible implementation, a training module is used to acquire second reference data, which represents the fourth gene sequence in the genome of a species; perform masking processing on the second reference data to obtain second masked data, which represents the sequence obtained by masking at least one base in the fourth gene sequence; reconstruct the second masked data using a first model to obtain second reconstructed data; and train the first model to obtain a base model based on the second reconstructed data, the second reference data, the first reconstructed data, and the second sequencing data.
[0287] In one possible implementation, the disease origin information is determined based on variation information and methylation information. The methylation information characterizes the methylation status of the detection site in the genome of the first organism. The methylation information is determined by a methylation detection model, which is determined based on a base model.
[0288] The acquisition module 1401 is also used to acquire third sequencing data, which characterizes the fifth gene sequence related to methylation in the genome of the second organism;
[0289] The device also includes:
[0290] The masking module is used to perform masking processing on the third sequencing data to obtain third masked data, which represents the sequence obtained by masking at least one base in the fifth gene sequence.
[0291] The reconstruction module is used to reconstruct the third occlusion data using the first model to obtain the third reconstructed data.
[0292] The training module is used to train the first model to obtain the base model based on the third reconstruction data and the third sequencing data.
[0293] In one possible implementation, the determining module 1402 is used to perform feature processing on the input data of the i-th feature processing block to obtain the output data of the i-th feature processing block; and to determine semantic features based on the output data of the N-th feature processing block; wherein i is any positive integer from 1 to N, the input data of the 1st feature processing block includes the first reference data and the first sequencing data, and the input data of any feature processing block from the 2nd to the Nth feature processing blocks includes the output data of the previous feature processing block.
[0294] In one possible implementation, the determining module 1402 is used to perform self-attention processing on the input data of the i-th feature processing block to obtain self-attention features; and to perform mapping processing on the self-attention features to obtain the output data of the i-th feature processing block.
[0295] In one possible implementation, the determining module 1402 is used to perform self-attention processing on the input data of the i-th feature processing block in the row direction to obtain a first processing result; perform self-attention processing on the first processing result in the column direction to obtain a self-attention feature; or, perform self-attention processing on the input data of the i-th feature processing block in the column direction to obtain a second processing result; perform self-attention processing on the second processing result in the row direction to obtain a self-attention feature.
[0296] In one possible implementation, the determining module 1402 is used to perform self-attention processing on the input data of the i-th feature processing block in the column direction to obtain a third processing result; and to perform pooling processing on the third processing result in the column direction to obtain a second processing result.
[0297] In one possible implementation, the acquisition module 1401 is used to acquire whole genome sequencing data of the species to which the first organism belongs; and to determine first reference data from the whole genome sequencing data of the species to which the first organism belongs based on at least one of a reference window or a reference position.
[0298] In one possible implementation, the acquisition module 1401 is used to acquire whole genome sequencing data of a first organism; and to determine first sequencing data from the whole genome sequencing data of the first organism based on at least one of a reference window or a reference location.
[0299] In the aforementioned apparatus, semantic features are determined based on first reference data and first sequencing data. Since semantic features are determined through information interaction between the first reference data and the first sequencing data, they can reflect the global information of gene sequences in the genomes of both species and organisms, and can more accurately characterize the semantics of the first reference data and the first sequencing data. Because semantic features characterize the semantics of both the first reference data and the first sequencing data, and because semantic features have high accuracy, determining variation information based on semantic features enables a semantic-level comparison of gene sequences in the genomes of both species and organisms, allowing for a more accurate determination of variations in the organism's gene sequences.
[0300] Determining the origin of a disease by analyzing mutation information allows us to identify the factors contributing to disease development based on variations in an organism's gene sequence. This approach enables us to pinpoint the causes of disease at the genetic level, resulting in highly accurate information about disease origins. Furthermore, this information can assist healthcare professionals in better managing an organism's health, reducing their workload.
[0301] It should be understood that the device shown in Figure 14 above is only illustrated by the division of the above-described functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0302] Figure 15 shows a structural block diagram of a terminal device 1500 provided in an exemplary embodiment of this application. The terminal device 1500 includes a processor 1501 and a memory 1502.
[0303] Processor 1501 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1501 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1501 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1501 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1501 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0304] The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1502 are used to store at least one computer program, which is executed by the processor 1501 to implement the data processing method provided in the method embodiments of this application.
[0305] In some embodiments, the terminal device 1500 may also optionally include a display screen 1505. The display screen 1505 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof.
[0306] Those skilled in the art will understand that the structure shown in FIG15 does not constitute a limitation on the terminal device 1500, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0307] Figure 16 is a schematic diagram of the server structure provided in an embodiment of this application. The server 1600 can vary considerably due to different configurations or performance. It may include one or more processors 1601 and one or more memories 1602. The one or more memories 1602 store at least one computer program, which is loaded and executed by the one or more processors 1601 to implement the data processing methods provided in the above-described method embodiments. For example, the processor 1601 is a CPU. Of course, the server 1600 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 1600 may also include other components for implementing device functions, which will not be elaborated here.
[0308] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, which stores at least one computer program. This at least one computer program is loaded and executed by a processor to enable an electronic device to implement any of the aforementioned data processing methods. Optionally, the aforementioned non-volatile computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, or optical data storage device, etc.
[0309] In an exemplary embodiment, a computer program is also provided, which is at least one such computer program, loaded and executed by a processor to enable the electronic device to implement any of the above-described data processing methods. In an exemplary embodiment, a computer program product is also provided, which stores at least one computer program, loaded and executed by a processor to enable the electronic device to implement any of the above-described data processing methods.
[0310] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0311] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0312] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.< / mask> < / unk> < / pad> < / mask> < / eos> < / cls> < / pad>
Claims
1. A data processing method, wherein, The method is performed by an electronic device, and the method includes: Obtain first reference data and first sequencing data, wherein the first reference data represents a first gene sequence in the genome of the species to which the first organism belongs, and the first sequencing data represents a second gene sequence in the genome of the first organism that corresponds to the first gene sequence; Based on the first reference data and the first sequencing data, semantic features are determined, wherein the semantic features characterize the semantics of the first reference data and the semantics of the first sequencing data determined when information interaction is performed between the first reference data and the first sequencing data. Based on the semantic features, variation information is determined, wherein the variation information characterizes at least one variation that occurs in the second gene sequence relative to the first gene sequence; Based on the mutation information, the disease origin information is determined, and the disease origin information characterizes the factors that cause the disease to occur in the first organism.
2. The method according to claim 1, wherein, The step of determining the origin information of the disease based on the mutation information includes: Based on the mutation information, at least one first feature is determined, and any first feature represents the statistical information of a mutation; Based on the at least one first feature, the origin information of the disease is determined.
3. The method according to claim 2, wherein, Determining the origin information of the disease based on at least one first feature includes: Obtain at least one of a second feature, a third feature, or a fourth feature, wherein the second feature characterizes statistical information on the methylation status of the detection site in the genome of the first organism, the third feature characterizes the disease diagnosis status of the first organism, and the fourth feature characterizes statistical information on diseases of the species to which the first organism belongs. Based on at least one of the second feature, the third feature, or the fourth feature, and the at least one first feature, the disease origin information is determined.
4. The method according to any one of claims 1 to 3, wherein, The method further includes: Based on at least one primary feature, determine the diagnostic information for the disease; Alternatively, the disease diagnosis information may be determined based on at least one of the second, third, or fourth features, and the at least one first feature; The disease diagnosis information represents the likelihood that the first organism is healthy or has developed at least one disease.
5. The method according to any one of claims 1 to 4, wherein, The mutation information is determined by a mutation detection model, which is determined based on a base model; the method further includes: Acquire second sequencing data, which characterizes the third gene sequence related to variation in the genome of the second organism; The second sequencing data is masked to obtain first masked data, which represents the sequence obtained by masking at least one base in the third gene sequence. The first occlusion data is reconstructed using the first model to obtain the first reconstructed data; The first model is trained based on the first reconstruction data and the second sequencing data to obtain the base model.
6. The method according to claim 5, wherein, The second sequencing data includes at least two alignment data; the masking process performed on the second sequencing data to obtain the first masked data includes: Perform at least one of global random masking or column random masking on the at least two comparison data to obtain the first masked data.
7. The method according to claim 5 or 6, wherein, The masking process performed on the second sequencing data to obtain the first masked data includes: The second sequencing data is masked according to the masking ratio to obtain the first masked data, wherein the masking ratio is negatively correlated with the number of training iterations of the first model.
8. The method according to claim 7, wherein, The occlusion process includes global random occlusion and column random occlusion, wherein the occlusion ratio corresponding to the global random occlusion is greater than the occlusion ratio corresponding to the column random occlusion.
9. The method according to any one of claims 5 to 8, wherein, The step of training the first model to obtain the base model based on the first reconstructed data and the second sequencing data includes: Obtain second reference data, which characterizes a fourth gene sequence in the genome of the species; The second reference data is masked to obtain the second masked data, which represents the sequence obtained by masking at least one base in the fourth gene sequence. The second reconstructed data is obtained by reconstructing the second occlusion data using the first model; The first model is trained based on the second reconstructed data, the second reference data, the first reconstructed data, and the second sequencing data to obtain the base model.
10. The method according to any one of claims 1 to 9, wherein, The disease origin information is determined based on the variation information and methylation information, wherein the methylation information characterizes the methylation status of the detection site in the genome of the first organism, and the methylation information is determined by a methylation detection model, which is determined based on a baseline model; the method further includes: Acquire third sequencing data, which characterizes the fifth gene sequence related to methylation in the genome of the second organism; The third sequencing data is masked to obtain third masked data, which represents the sequence obtained by masking at least one base in the fifth gene sequence. The third reconstructed data is obtained by reconstructing the third occlusion data using the first model; The first model is trained based on the third reconstruction data and the third sequencing data to obtain the base model.
11. The method according to any one of claims 1 to 10, wherein, The step of determining semantic features based on the first reference data and the first sequencing data includes: Perform feature processing on the input data of the i-th feature processing block to obtain the output data of the i-th feature processing block; Based on the output data of the Nth feature processing block, determine the semantic features; Wherein, i is any positive integer from 1 to N, the input data of the first feature processing block includes the first reference data and the first sequencing data, and the input data of any feature processing block from the second to the Nth feature processing blocks includes the output data of the previous feature processing block.
12. The method according to claim 11, wherein, The step of performing feature processing on the input data of the i-th feature processing block to obtain the output data of the i-th feature processing block includes: Perform self-attention processing on the input data of the i-th feature processing block to obtain self-attention features; The self-attention features are subjected to mapping processing to obtain the output data of the i-th feature processing block.
13. The method according to claim 12, wherein, The self-attention processing of the input data of the i-th feature processing block to obtain self-attention features includes: Self-attention processing is performed on the input data of the i-th feature processing block in the row direction to obtain a first processing result; self-attention processing is performed on the first processing result in the column direction to obtain a self-attention feature. Alternatively, self-attention processing is performed on the input data of the i-th feature processing block in the column direction to obtain a second processing result; self-attention processing is then performed on the second processing result in the row direction to obtain a self-attention feature.
14. The method according to claim 13, wherein, The input data of the i-th feature processing block is subjected to self-attention processing in the column direction to obtain a second processing result, including: Self-attention processing is performed on the input data of the i-th feature processing block in the column direction to obtain the third processing result; The third processing result is subjected to pooling processing in the column direction to obtain the second processing result.
15. The method according to any one of claims 1 to 14, wherein, The acquisition of the first reference data includes: Obtain the whole genome sequencing data of the species to which the first organism belongs; First reference data is determined from the whole genome sequencing data of the species to which the first organism belongs, based on at least one of a reference window or a reference location.
16. The method according to any one of claims 1 to 15, wherein, Obtain the first sequencing data, including: Obtain the whole genome sequencing data of the first organism; First sequencing data are determined from the whole genome sequencing data of the first organism based on at least one of a reference window or a reference location.
17. A data processing apparatus, wherein, The device includes: An acquisition module is used to acquire first reference data and first sequencing data, wherein the first reference data represents a first gene sequence in the genome of the species to which the first organism belongs, and the first sequencing data represents a second gene sequence in the genome of the first organism that corresponds to the first gene sequence. A determination module is configured to determine semantic features based on the first reference data and the first sequencing data, wherein the semantic features characterize the semantics of the first reference data and the semantics of the first sequencing data determined when information interaction is performed between the first reference data and the first sequencing data. The determining module is further configured to determine variation information based on the semantic features, wherein the variation information characterizes at least one variation that occurs in the second gene sequence relative to the first gene sequence; The determining module is further configured to determine the disease origin information based on the mutation information, wherein the disease origin information characterizes the factors that cause the disease to occur in the first organism.
18. An electronic device, wherein, The electronic device includes a processor and a memory, the memory storing at least one computer program, which is loaded and executed by the processor to enable the electronic device to implement the data processing method as described in any one of claims 1 to 16.
19. A non-volatile computer-readable storage medium, wherein, The non-volatile computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the electronic device to implement the data processing method as described in any one of claims 1 to 16.
20. A computer program product, wherein, The computer program product stores at least one computer program, which is loaded and executed by a processor to enable the electronic device to implement the data processing method as described in any one of claims 1 to 16.
21. A computer program, wherein, The computer program is at least one, and the at least one computer program is loaded and executed by a processor to enable the electronic device to implement the data processing method as described in any one of claims 1 to 16.
