Method and apparatus for acquiring detection result, and electronic device and readable storage medium

By acquiring reference data and sequencing data of sample subjects, and using a methylation detection model to determine the methylation status of detection sites, the problem of high detection time and cost in existing technologies is solved, achieving efficient and accurate disease detection results and reducing the workload of medical staff.

WO2026233102A1PCT designated stage Publication Date: 2026-11-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/091910
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-06
Filing Date
2026-04-21
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently and accurately determine disease detection results based on sequencing data, particularly in the analysis of gene methylation status, leading to high detection time and costs.

Method used

By acquiring reference data and sequencing data of sample objects, the methylation status of detection sites is determined using a methylation detection model, and the disease detection result is determined based on this. Information interaction is performed by combining convolutional layers and attention layers to improve detection accuracy.

Benefits of technology

It reduces the time and cost of methylation detection, improves the accuracy of methylation status at detection sites, thereby accurately determining the disease detection results of sample subjects and assisting medical staff in better managing health.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026091910_12112026_PF_FP_ABST
    Figure CN2026091910_12112026_PF_FP_ABST
Patent Text Reader

Abstract

A method and apparatus for acquiring a detection result, and an electronic device and a readable storage medium, which belong to the technical field of biomedicine. The method comprises: acquiring reference data, and sequencing data of a sample object, wherein the reference data represents a sequence of a detection site in a reference genome of a species to which the sample object belongs, and the sequencing data represents a sequence of the detection site in a genome of the sample object; on the basis of the reference data and the sequencing data, determining a methylation state of the detection site; and on the basis of the methylation state of the detection site, determining a disease detection result of the sample object. The method can determine a methylation state of a detection site at a gene level, such that the accuracy of the methylation state is improved, and thus a disease detection result of a sample object can be accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, devices, electronic equipment, and readable storage media for acquiring test results

[0001] This application claims priority to Chinese Patent Application No. 202510579518.3, filed on May 6, 2025, entitled "Method, Apparatus, Electronic Device and Readable Storage Medium for Obtaining Detection Results", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of biomedical technology, and in particular to a method, apparatus, electronic device, and readable storage medium for acquiring detection results. Background Technology

[0003] In the field of biomedical technology, the development of some diseases is closely related to genes; for example, cancer is closely linked to genes. With the emergence and development of sequencing technology, it is now possible to sequence the genes of organisms and obtain sequencing data. How to obtain disease detection results based on sequencing data has become an urgent problem to be solved. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and readable storage medium for obtaining detection results. It allows for the determination of the methylation status of detection sites based on sequencing data, and then the determination of the disease detection result of the sample based on the methylation status. The technical solution includes the following:

[0005] On the one hand, a method for obtaining detection results is provided, the method being executed by an electronic device, the method comprising:

[0006] Obtain reference data and sequencing data of the sample object, wherein the reference data represents the sequence of the detection site in the reference genome of the species to which the sample object belongs, and the sequencing data represents the sequence of the detection site in the genome of the sample object;

[0007] Based on the reference data and the sequencing data, the methylation status of the detection site is determined;

[0008] The disease detection result of the sample object is determined based on the methylation status of the detection site.

[0009] On the other hand, a device for acquiring detection results is provided, the device comprising:

[0010] An acquisition module is used to acquire reference data and sequencing data of a sample object. The reference data represents the sequence of the detection site in the reference genome of the species to which the sample object belongs, and the sequencing data represents the sequence of the detection site in the genome of the sample object.

[0011] A determination module is used to determine the methylation status of the detection site based on the reference data and the sequencing data;

[0012] The determining module is also used to determine the disease detection result of the sample object based on the methylation status of the detection site.

[0013] 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 above-described methods for obtaining detection results.

[0014] On the other hand, a computer-readable storage medium is also provided, wherein at least one computer program is stored in the 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 above-described methods for obtaining detection results.

[0015] 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-mentioned methods for obtaining detection results.

[0016] On the other hand, a computer program product is also provided, wherein at least one computer program is stored in the computer program product, and the at least one computer program is loaded and executed by a processor to enable an electronic device to implement any of the above-mentioned methods for obtaining detection results.

[0017] The technical solution provided in this application determines the methylation status of the detection site based on reference data and sequencing data. This not only reduces the time and cost of methylation detection but also allows for comparison of the sequences containing the detection site in the genome of the species and the sequences containing the detection site in the genome of the sample, determining the methylation status of the detection site at the gene level and improving the accuracy of the methylation status. Subsequently, by using the methylation status of the detection site, the disease detection results of the sample can be accurately determined, thereby assisting medical personnel in better managing the health of the sample and reducing their workload. Attached Figure Description

[0018] Figure 1 is a schematic diagram of the structure of a computer system provided in an embodiment of this application;

[0019] Figure 2 is a flowchart of a method for obtaining detection results provided in an embodiment of this application;

[0020] Figure 3 is a schematic diagram illustrating the acquisition of reference data and sequencing data according to an embodiment of this application;

[0021] Figure 4 is a schematic diagram of methylation detection provided in an embodiment of this application;

[0022] Figure 5 is a schematic diagram of a methylation detection model provided in an embodiment of this application;

[0023] Figure 6 is a schematic diagram of sequence data processing provided in an embodiment of this application;

[0024] Figure 7 is a schematic diagram of the structure of a feature processing network provided in an embodiment of this application;

[0025] Figure 8 is a schematic diagram of training a neural network model provided in an embodiment of this application;

[0026] Figure 9 is a flowchart illustrating the determination of a detection result according to an embodiment of this application;

[0027] Figure 10 is a flowchart of another detection result determination provided by an embodiment of this application;

[0028] Figure 11 is a schematic diagram of the structure of a device for obtaining detection results according to an embodiment of this application;

[0029] Figure 12 is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0030] Figure 13 is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation

[0031] 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.

[0032] 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.

[0033] First, the abbreviations and key terms involved in the embodiments of this application are defined.

[0034] 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.

[0035] 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.

[0036] 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 (C). 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.

[0037] CpG site: also called CG site, is a methylation detection site. Optionally, a CpG site is a region in a gene (such as DNA) where cytosine (C) appears immediately after guanine (G).

[0038] 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.

[0039] 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 method for obtaining detection results 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.

[0040] 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.

[0041] 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.

[0042] 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.

[0043] 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.

[0044] 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.

[0045] In one possible implementation, the server 102 executes the method for obtaining the detection results according to the embodiments of this application, which includes the following steps.

[0046] Step 1: Predict methylation information.

[0047] Server 102 can acquire data 103. Data 103 includes reference data 103-1 and sequencing data 103-2. Reference data 103-1 represents the sequence containing the detection site in the genome of the species to which the sample belongs, while sequencing data 103-2 represents the sequence containing the detection site in the genome of the sample. Sequencing data 103-2 includes at least two alignment data points, as shown in Figure 1, which includes four alignment data points. Reference data 103-1 and sequencing data 103-2 can be used as input data for a methylation detection model. The methylation detection model determines methylation information based on data 103. Methylation information represents the methylation status of the detection site on the sequence corresponding to sequencing data 103-2.

[0048] Step 2: Predict the results of disease detection.

[0049] Server 102 can input methylation information into detection result determination model 105, and the detection result determination model 105 determines the disease detection result based on the methylation information. The disease detection result characterizes the sample subject's probability of being healthy, or the sample subject's probability of developing a certain type of cancer. For example, the cancer detection result includes the sample subject's probability of being healthy, the sample subject's probability of developing lung cancer, and the sample subject's probability of developing liver cancer.

[0050] This application provides a method for obtaining detection results, which 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 or 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.

[0051] Step 201: Obtain reference data and sequencing data of the sample object. The reference data represents the sequence of the detection site in the reference genome of the species to which the sample object belongs, and the sequencing data represents the sequence of the detection site in the genome of the sample object.

[0052] 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.

[0053] There must be at least one sample object, and all sample objects must correspond to the same species. For example, the species is human, and different sample objects represent different people. Each sample object possesses a genome, which is the sum of all genetic information of an 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.

[0054] Technicians can collect biological samples from a sample object. 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 sample object. The whole-genome sequencing data of the sample object characterizes the genome of the sample object. Electronic devices can determine at least one sequencing data point from the whole-genome sequencing data of the sample object; different sequencing data points correspond to different fragments in the genome of the sample object. For ease of description, the fragment corresponding to the sequencing data is referred to as the second gene sequence.

[0055] Testing via bodily fluid samples such as blood avoids the invasiveness and discomfort associated with traditional cancer detection methods. This non-invasive nature makes cancer screening more convenient, increases the acceptability of samples, and helps improve screening coverage and frequency.

[0056] Optionally, the whole-genome sequencing data of the sample subjects can be preprocessed to improve the quality of the whole-genome sequencing data. The preprocessing method is not limited here. For example, preprocessing includes deduplication, correction, and trimming. Deduplication of the whole-genome sequencing data involves removing redundant fragments from the whole-genome sequencing data, retaining only one fragment. Correction of the whole-genome sequencing data involves correcting erroneous fragments into 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, fragments where the proportion of a certain base, such as cytosine, is higher or lower than a threshold).

[0057] 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 reference sequence from the species' whole-genome sequencing data; different reference sequences correspond to different segments within the species' genome. For ease of description, the segment corresponding to the reference sequence is referred to as the first gene sequence.

[0058] It should be noted that there is a one-to-one correspondence between the reference data and the sequencing data. That is, each reference data set has a corresponding sequencing data set. The length of the first gene sequence corresponding to the reference data set is the same as the length of the second gene sequence corresponding to the sequencing data set, 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.

[0059] Since both the reference data and sequencing data are nucleic acid sequencing data, and nucleic acids are composed of bases, both the reference data and sequencing data include at least one base. Bases include adenine (A), guanine (G), cytidine (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.

[0060] In practical applications, reference data and sequencing data may also include other data. The content of other data is not limited in this embodiment. 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.

[0061] In an exemplary embodiment, step 201, “obtaining reference data”, includes: obtaining whole-genome sequencing data of the species to which the sample object belongs, wherein the whole-genome sequencing data of the species to which the sample object belongs characterizes the genome of the species to which the sample object belongs; and determining reference data from the whole-genome sequencing data of the species to which the sample object belongs based on at least one of a reference window or a reference location.

[0062] 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.

[0063] 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.

[0064] The electronic device can determine reference data from whole-genome sequencing data of the species to which the sample object belongs, 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 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.

[0065] Optionally, the reference location includes the position of the detection site within a reference genome. Determining reference data from the whole-genome sequencing data of the species to which the sample belongs, based on the reference location, includes: determining reference data from the whole-genome sequencing data of the species to which the sample belongs based on the position of the detection site within the reference genome. The reference data is data of a predetermined length (e.g., 300 bp) centered on the position of the detection site within the reference genome in the whole-genome sequencing data of the species to which the sample belongs.

[0066] Optionally, reference data is determined from the whole-genome sequencing data of the species to which the sample belongs, based on the location of the detection site in the reference genome. This includes: an electronic device determining reference data from the whole-genome sequencing data of the species to which the sample belongs, according to the location of the detection site in the reference genome and following a reference window. The center of the reference window is the location of the detection site in the reference genome, and the width of the reference window is not less than the length of the sequence in which the detection site is located in the reference genome.

[0067] Similarly, step 201, “obtaining sequencing data of the sample object”, includes: obtaining whole-genome sequencing data of the sample object, wherein the whole-genome sequencing data of the sample object characterizes the genome of the sample object; and determining the sequencing data of the sample object from the whole-genome sequencing data of the sample object according to at least one of a reference window or a reference position.

[0068] The electronic device can determine the sequencing data of a sample object from its whole-genome sequencing data based on at least one of a reference position or a reference window. In this case, the length of the second gene sequence characterized by the sequencing data of the sample object conforms to the reference window, and / or, the position of the second gene sequence in the genome of the sample object conforms to the reference position.

[0069] Optionally, the reference location includes the location of the detection site within a reference genome. Determining the sequencing data of the sample subject from the whole-genome sequencing data based on the reference location includes: determining the sequencing data of the sample subject from the whole-genome sequencing data based on the location of the detection site within the reference genome.

[0070] Optionally, sequencing data of the sample object is determined from the whole genome sequencing data of the sample object based on the location of the detection site in the reference genome, including: an electronic device determines reference data from the whole genome sequencing data of the sample object according to the location of the detection site in the reference genome and a reference window, wherein the center of the reference window is the location of the detection site in the reference genome and the width of the reference window is not less than the length of the sequence in the reference genome in which the detection site is located.

[0071] 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.

[0072] Optionally, the center of the reference window is the location of the detection site in the reference genome, and the width of the reference window is not less than the length of the sequence containing the detection site in the reference 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.

[0073] Typically, 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.

[0074] As shown in Figure 3, Figure 3 is a schematic diagram illustrating the acquisition of reference data and sequencing data according to an embodiment of this application. In this example, a technician can obtain a biological sample 301 of the sample object. 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.

[0075] Under laboratory conditions, whole-genome sequencing was performed on biological sample 301 to obtain whole-genome sequencing data. The whole-genome sequencing data of the sample was compared with the whole-genome sequencing data of the species to which the sample belonged, yielding reference data 303 and sequencing data 304. As shown in Figure 3, the first gene sequence corresponding to reference data 303 and the second gene sequence corresponding to sequencing data 304 are sequences of the same length at the same location in the genome. Furthermore, sequencing data 304 includes multiple alignments, which may be identical or different; all these alignments correspond to subsequences within the second gene sequence.

[0076] Step 202: Determine the methylation status of the detection site based on reference data and sequencing data.

[0077] Electronic devices can input reference data and sequencing data into a methylation detection model, determine semantic features through the methylation detection model, and determine methylation information based on the semantic features. Semantic features can characterize the semantics of the reference data, which is the semantics of the gene sequences in the species' genome. Semantic features can also characterize the semantics of the sequencing data, which is the semantics of the gene sequences in the organism's genome. Optionally, semantic features characterize the semantics of the reference data and the sequencing data determined when information interaction is performed between the reference data and the sequencing data.

[0078] In this example, the gene sequence is considered a "language." The semantics of the 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 in the gene sequence. The syntax and rules followed by the gene sequence refer to the fact that the arrangement of bases in the gene sequence must follow biochemical rules (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 in sequence) or an NCG segment (i.e., a segment composed of N, C, and G 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.

[0079] It should be noted that during feature extraction from the reference data and sequencing data, the two data need to interact, and the interaction method is not limited here. For example, convolutional layers can be used to perform convolutional processing on the reference data and sequencing data, or attention layers can be used to perform attention processing on the reference data and sequencing data.

[0080] 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 reference data before or after sequencing data, or above or below 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.

[0081] 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 reference data before or after sequencing data, or above or below 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.

[0082] By performing information interaction between reference data and sequencing data, semantic features are obtained. These semantic features are derived from the global information of gene sequences in the genomes of both species and organisms, resulting in stronger characterization capabilities and higher accuracy, which is beneficial for improving the accuracy of methylation information.

[0083] Methylation information characterizes the methylation status of the detection site. The methylation status of the detection site 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 at the detection site.

[0084] Optionally, the methylation information is the methylation index, which characterizes the degree of methylation of the detection site. The higher the methylation index of the detection site, the higher the degree of methylation of the detection site. In other words, the methylation index of the detection site is positively correlated with the degree of methylation of the detection site.

[0085] As shown in Figure 4, the electronic device can acquire reference data 402, which includes multiple base data 401. Additionally, the electronic device can acquire sequencing data 403, which includes multiple alignment data. The number of base data 401 is also called the window width, and the number of alignment data is also called the depth. The reference data 402 and sequencing data 403 are input into a methylation detection model 404, which outputs methylation information. The methylation information characterizes the methylation state of the detection site; for example, methylation information 405 indicates that the detection site is not methylated, and methylation information 406 indicates that the detection site is methylated.

[0086] In one possible implementation, step 202 includes: performing feature extraction on the input features of the i-th feature extraction network to obtain the output features of the i-th feature extraction network; and determining the methylation state of the detection site based on the output features (i.e., semantic features) of the N-th feature extraction network.

[0087] Where i is any positive integer from 1 to N, the input features of the first feature extraction network are determined based on reference data and sequencing data, and the input features of any feature extraction network from the second to the Nth feature extraction networks include the output features of the previous feature extraction network.

[0088] In this example, the methylation detection model comprises N feature extraction networks and a first prediction layer concatenated after the Nth feature extraction network. Each feature extraction network performs feature extraction on its input features to obtain features characterizing those input features. The feature extraction methods of any two feature extraction networks can be the same or different; this can be flexibly configured according to the application scenario or requirements. The first prediction layer maps its input features to methylation information. N is a positive integer, for example, N equals 1 or N is a positive integer greater than 1. When N is a positive integer greater than 1, the N feature extraction networks are concatenated.

[0089] Assuming N equals 1, meaning the methylation detection model includes one feature extraction network, then: the electronic device uses reference data and sequencing data as input features to this feature extraction network, extracts features from the input features, and obtains output features. Then, the first prediction layer maps the output features to methylation information.

[0090] Assuming N is a positive integer greater than 1, meaning the methylation detection model includes two or more feature extraction networks, the electronic device uses reference data and sequencing data as input features to the first feature extraction network. The first feature extraction network extracts features from these input features, yielding its output features. The output features of the first feature extraction network are then used as input features to the second feature extraction network, which extracts features from these input features, yielding its output features. This process continues until the output features of the Nth feature extraction network are obtained. Next, the first prediction layer maps the output features of the Nth feature extraction network to methylation information.

[0091] In this example, the output features of any feature extraction network include features representing the reference data and features representing the sequencing data. Alternatively, the output features of any feature extraction network can be used to represent features obtained by fusing the semantics of the reference data and the sequencing data. A feature is a vector, generally represented in matrix form, and the matrix size is not limited here.

[0092] By performing feature extraction at least once on the reference data and sequencing data, features of the reference data and sequencing data are continuously extracted, improving the characterization ability and accuracy of the features. This allows for improved accuracy of methylation information when subsequently determining methylation information based on the features.

[0093] In practical applications, both reference data and sequencing data include at least one base. The methylation detection model also includes a coding layer. The coding layer encodes each base in the reference data to obtain the coding features of each base. Similarly, the coding layer also encodes each base in the sequencing data to obtain the coding features of each base. The coding features of the base data are characteristics used to characterize at least one of the following: base type, position, function, etc.

[0094] Optionally, as shown in Figure 5, the methylation detection model 501 is a large model, including a coding layer, N feature extraction networks, and a prediction layer, with these network layers connected in series. The input data for the large model includes reference data and sequencing data, with the sequencing data including at least one alignment data.

[0095] The reference data and the comparison data, as well as any two comparison data sets, can have the same or different lengths. In practical applications, data padding can be used to make the reference data, the comparison data, and any two comparison data sets have the same length. Optionally, padding markers can be used to indicate the padding data in the reference data and the comparison data. The form of the padding markers is not limited here; for example, the padding markers can be the marker "". <pad>".

[0096] Suppose that the reference data and all alignment data are padded to the same length. In this case, the padded reference data and each alignment data can be represented as a matrix: x∈R M×L Where x represents the padded reference data and each alignment data, R represents a real number, M represents the sum of the number of reference data and alignment data, and L represents the length of the padded reference data 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 a matrix. For example, if m = 1, then the element {x} m,l } represents the l-th base data in the reference data; m = any positive integer from 2 to M, then the element {x} m,l The l-th base data in the alignment data is characterized.

[0097] For ease of description, a reference dataset and its corresponding alignment datasets are referred to as a set of sequence data. Assume the batch size of the input to the large model 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 sample object or different sample objects.

[0098] The encoding layer is also called the token embedding module. Token segmentation refers to dividing the input data into "words" for processing. 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 encoded features. That is, the reference data or any alignment data includes at least one base data. The encoding layer maps each base data to its corresponding feature, obtaining the encoded features of each base data. The encoded features of the reference data, or the encoded features of any alignment data, include the encoded features of these base data.

[0099] 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 reference data, or the dimension of the encoded features of any of the paired data. Embedding(·) represents the encoding layer.

[0100] Optionally, the encoding features of the reference data and any of the alignment data also 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 "".

[0101] The feature extraction network is also called a Transformer Block, optionally a Unified Sequence Model (USM) Transformer Block. There are N feature extraction networks, each characterized by the parameter USMT(·), and the N feature extraction networks can be characterized by the parameter g(·). A prediction layer, also called a prediction head, is concatenated after the Nth feature extraction network and can be characterized by the parameter φ(·). After inputting the encoded features of the reference data and the encoded features of each alignment data into the first feature extraction network, these encoded features are continuously extracted through the N feature extraction networks. Then, the prediction layer maps the extracted input to methylation information.

[0102] Optionally, the encoded feature E is input into the first feature extraction network. After processing the encoded feature E through N feature extraction networks and a prediction layer, the output data can be obtained. and In this context, USMT(·) represents the processing performed by the feature extraction network, block = N represents the number of feature extraction networks (N is a positive integer), g(·) represents the processing performed by the N feature extraction networks, 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 reference data and the coding features of the sequencing data. Characterize methylation information.

[0103] Since the input batch size of the large model is B, the encoded features E include the encoded features of B reference data and the encoded features of M-1 alignment data corresponding to each reference data. Therefore, the output data... It includes B methylation information entries. Each methylation information entry corresponds to one reference data entry and M-1 corresponding alignment data entries.

[0104] The methylation detection model includes at least one feature extraction network. Any two feature extraction networks can correspond to the same feature processing method or different feature processing methods. The feature processing method of any feature extraction network can be set based on experience or flexibly adjusted according to needs, and this application embodiment does not limit this. For ease of description, the following uses the example of any two feature extraction networks corresponding to the same feature processing method to illustrate the feature processing method corresponding to any one feature extraction network.

[0105] For example, the i-th feature extraction network can be any feature extraction network. Performing feature extraction on the input features of the i-th feature extraction network to obtain its output features includes: performing self-attention processing on the input features of the i-th feature extraction network to obtain first attention features; performing mapping processing on the first attention features to obtain mapped features; and determining the output features of the i-th feature extraction network based on the mapped features.

[0106] The i-th feature extraction network includes a self-attention layer. Through this layer, the input features of the i-th network undergo three mappings to obtain the query matrix (Q), key matrix (K), and value matrix (V). Next, the self-attention layer calculates the similarity between the query matrix (Q) and the key matrix (K) to obtain attention weights. Finally, the self-attention layer weights the value matrix (V) according to these attention weights to obtain the first attention feature.

[0107] 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.

[0108] In this example, the self-attention layer including the RoPE layer performs the self-attention processing as follows: First, the input features of the i-th feature extraction network are 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 first attention feature. 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.

[0109] 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 first attention feature.

[0110] Optionally, performing self-attention processing on the input features of the i-th feature extraction network to obtain first attention features includes: performing self-attention processing on the input features of the i-th feature extraction network 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 first attention features.

[0111] The input feature of the i-th feature extraction network is a single feature. Since a feature is a vector, it is represented in matrix form. Therefore, the input feature of the i-th feature extraction network is a matrix containing elements with multiple rows and columns.

[0112] In this example, for the m-th row element in the input features of the i-th feature extraction network, this row element includes features of each base data in the reference data or features of each base data in any alignment data. Optionally, this row element also includes features with special labels, such as features with padding labels. The self-attention layer includes a row attention layer. Through the row attention layer, the m-th row element is mapped three times to obtain the query matrix (Q), key matrix (K), and value matrix (V), respectively. The similarity between the query matrix (Q) and key matrix (K) is calculated to obtain the attention weights. The value matrix (V) is weighted according to the attention weights to obtain the attention features of the m-th row element. The first processing result, also called the row attention features, includes the attention features of each row element.

[0113] Row attention features are represented in matrix form. That is, a row attention feature is a matrix containing multiple rows and columns of elements. For the j-th column element of the row attention feature, this column element includes the features of the j-th base data in the reference data and the 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 the column attention layer, three mappings are performed on the j-th column element to obtain the query matrix (Q), key matrix (K), and value matrix (V), respectively. The similarity between the query matrix (Q) and key matrix (K) is calculated to obtain the attention weight. The value matrix (V) is then weighted according to the attention weight to obtain the attention feature of the j-th column element. Column attention features include the attention features of each column element. Column attention features can be directly used as the first attention feature, or further processing can be performed on the column attention features to obtain the first attention feature.

[0114] In another possible implementation, self-attention processing is performed on the input features of the i-th feature extraction network to obtain the first attention feature, including: performing self-attention processing on the input features of the i-th feature extraction network in the column direction to obtain the second processing result; and performing self-attention processing on the second processing result in the row direction to obtain the first attention feature.

[0115] The input features of the i-th feature extraction network consist of multiple rows and columns of elements. In this example, for the j-th column element in the input features of the i-th feature extraction network, this column element includes the features of the j-th base data in the reference data and the features of the j-th base data in each alignment data. Optionally, this column element also includes features with special labels, such as features with padding labels. The self-attention layer includes a column attention layer. Through the column attention layer, the j-th column element is mapped three times to obtain the query matrix (Q), key matrix (K), and value matrix (V), respectively. The similarity between the query matrix (Q) and key matrix (K) is calculated to obtain the attention weights. The value matrix (V) is weighted according to the attention weights to obtain the attention features of the j-th column element. The second processing result, also called column attention features, includes the attention features of each column element.

[0116] Column attention features can also be represented as matrices. That is, a column attention feature is a matrix containing multiple rows and columns of elements. For the m-th row element of the column attention feature, this row element includes the features of each base data in the reference data or the features of each base data in any alignment data. Optionally, this row element also includes features with special markers, such as padding markers. The self-attention layer includes a row attention layer. Through the row attention layer, three mappings are performed on the m-th row element to obtain the query matrix (Q), key matrix (K), and value matrix (V), respectively. The similarity between the query matrix (Q) and key matrix (K) is calculated to obtain the attention weight. The value matrix (V) is then weighted according to the attention weight to obtain the attention feature of the m-th row element. The row attention feature includes the attention features of each row element. The row attention feature can be directly used as the first attention feature, or processing can be performed on the row attention feature to obtain the first attention feature.

[0117] It is worth noting that performing self-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 self-attention processing on the m-th row element, performing self-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.

[0118] Since the j-th column element in the input features of the i-th feature extraction network includes the features of the j-th base data in the 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 representational ability of self-attention features.

[0119] Since the elements in the m-th row of the input features of the i-th feature extraction network include features of each base in the reference data or features of each base 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.

[0120] Because self-attention features have high accuracy and strong representational ability, the output features of the i-th feature extraction network possess strong representational ability and high accuracy. Subsequently, mapping the output features of the i-th feature extraction network to methylation information can improve the accuracy of the methylation information.

[0121] Optionally, self-attention processing is performed on the input features of the i-th feature extraction network in the column direction to obtain a second processing result, including: performing self-attention processing on the input features of the i-th feature extraction network in the column direction to obtain a second attention feature; and performing pooling processing on the second attention feature in the column direction to obtain a second processing result.

[0122] The input features of the i-th feature extraction network consist of multiple rows and columns of elements. For the j-th column element in the input features of the i-th feature extraction network, this column element includes the features of the j-th base data in the 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.

[0123] The second attention feature, also called the column attention feature, 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 result of this second processing can be the column pooling feature, which includes the pooling features of each column element.

[0124] Column pooling features can also be viewed as pooling features that include the elements of each row. Self-attention processing can be performed on the pooling features of the m-th row to obtain the attention features of the m-th row. The first attention feature includes the attention features of each row.

[0125] 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. Since column pooling features have good representational power and low dimensionality, they can improve the speed and effectiveness of subsequent self-attention processing, enhance the representational power of the first attention feature, and thus improve the accuracy of methylation information.

[0126] The computational complexity of column attention processing is O(hdLM²), where h is the number of attention heads, d represents the dimension of the encoded features, L represents the length of the padded reference data and the length of each padded alignment data, and M represents the sum of the number of alignment data included in the reference data and sequencing data. By applying pooling along 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²), enabling fast execution of row attention processing. This setup improves the computational speed of the base model and the ability to increase parameter size.

[0127] In this example, the i-th feature extraction network also includes a feedforward layer. A feedforward layer is a unidirectional neural network consisting of multiple layers of neurons. The neurons in each layer are fully connected, meaning each neuron is connected to all neurons in the next layer. The feedforward layer performs linear or non-linear mapping on the first attention features to obtain the output features of the i-th feature extraction network.

[0128] By performing self-attention processing on the input features of the i-th feature extraction network, important information in the reference and sequencing data is focused, improving the representational power of the first attention feature. By performing mapping on the first attention feature through a feedforward layer, each part of the first attention feature is independently mapped linearly or nonlinearly, improving the model's expressive and generalization abilities.

[0129] It is understood that the i-th feature extraction network may include other network layers besides the self-attention layer and the feedforward layer. For example, the i-th feature extraction network 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.

[0130] For example, as shown in Figure 5, the feature extraction network 502 consists of three parts.

[0131] 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 layer normalization (RMSNorm) layer, which performs normalization processing on the input features 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 aspect to obtain column attention features.

[0132] The structure of the column attention layer is shown in label 503. The column attention layer includes a series of transpose functions, multi-head self-attention, and transpose functions. The first transpose function transposes column elements into row elements; the multi-head self-attention performs self-attention processing on row elements using multiple heads and merges the results; and the second transpose function reverses the row elements into column elements.

[0133] Furthermore, the input features of the normalization layer and the output features 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 the degree of information loss. This summed result is the output data of the first part.

[0134] The second part includes a concatenated column pooling layer, a normalization layer, and a row attention layer. Column pooling performs pooling processing on the output features (i.e., the summed results) of the first part in the column aspect, resulting in 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.

[0135] The structure of the multi-head self-attention layer is shown in reference numeral 504. Multi-head self-attention performs one-head self-attention processing on the row-wise processing result of the normalization layer, including: performing a linear transformation on the row-wise processing result of the normalization layer to obtain a query (Q) matrix, a key (K) matrix, and a value (V) matrix; performing Rotary Position Embedding (RoPE) on the query matrix to obtain the processed query matrix; performing RoPE on the key matrix to obtain the processed key matrix; multiplying the processed query matrix and the processed key matrix to obtain the multiplication result; and performing a normalization exponentiation operation on the multiplication result using a normalization exponentiation function to obtain the operation result. Optionally, the normalization exponentiation function is a Softmax function, and the Softmax function is used to perform the normalization exponentiation operation on the multiplication result to obtain the operation result. The operation result and the value matrix are multiplied to obtain the multiplication result, and a linear transformation is performed on the multiplication result to obtain the self-attention processing result of a head.

[0136] Furthermore, the input features of the column pooling layer and the output features of the row attention layer (i.e., the row attention processing result) are added together to obtain a summed result, thereby achieving skip connections and reducing the degree of information loss. This summed result is the output data of the second part.

[0137] The third part comprises 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, used to normalize the output features (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. Optionally, the feed-forward layer includes a nonlinear activation layer, which performs nonlinear activation processing on the processing result or the mapped result of the normalization layer.

[0138] Optionally, the feedforward layer includes a SwiGLU function (a nonlinear activation function), the operations of which are shown in reference numeral 505. The activation operations performed by the SwiGLU function include: linear transformation, activation operations performed using the SiLU activation function, and dot product.

[0139] In other words, the SwiGLU function performs nonlinear activation processing on the normalization layer's processing results, including: performing a linear transformation on the normalization layer's processing results to obtain a linear transformation result; performing activation processing on the linear transformation result using an activation function (SiLU) to obtain an activation processing result; performing a dot product operation on the linear transformation result and the activation processing result to obtain a dot product operation result; and performing a linear transformation on the dot product operation result to obtain a nonlinear activation processing result.

[0140] In this process, the input features of the normalization layer and the output features of the feedforward layer are added together to obtain a summed result, thereby achieving skip connections and reducing the degree of information loss. This summed result is the output data of the third part, and the summed result of the third part is the output feature of the feature extraction network 501.

[0141] It should be noted that, based on the feature extraction network shown in label 502, as shown in Figure 6, for sequence data (including reference data and sequencing data), firstly, the feature extraction network 502 performs column attention processing on the sequence data, that is, it performs self-attention processing on each column of data 601 in the sequence data; then, the feature extraction network 502 performs column pooling on the column attention processing results; after that, the feature extraction network 502 performs row attention processing on the sequence data, that is, it performs self-attention processing on each row of data 602 in the sequence data.

[0142] In practical applications, feature extraction networks can also have other structures. For example, for sequence data (including reference data and sequencing data), firstly, feature extraction network 502 performs self-attention processing on each row of data in the sequence data, and then performs self-attention processing on each column of data in the sequence data. Specifically, as shown in Figure 7, which is a schematic diagram of another feature extraction network structure provided in an embodiment of this application, feature extraction network 701 also includes three parts.

[0143] The first part consists of a cascaded normalization layer (LayerNorm) and a row attention layer (Row Attention). The normalization layer performs normalization processing on the input features, yielding the result. The row attention layer performs self-attention processing on the result of the normalization layer along the rows, yielding the row attention result. The input features of the normalized layer and the output features of the row attention layer (i.e., the row attention result) are added together to obtain a summed result, thus achieving skip connections and reducing information loss. This summed result is the output data of the first part.

[0144] The second part consists of a cascaded normalization layer (LayerNorm) and a column attention layer. The normalization layer normalizes the output features of the first part (i.e., the summed result), yielding a processed value. The column attention layer performs self-attention processing on the normalization layer's result along the columns, resulting in column attention features. The input features of the normalization layer and the output features of the column attention layer (i.e., the column attention processing result) are added together to obtain a summed result, thus achieving skip connections and reducing information loss. This summed result is the output data of the second part.

[0145] The third part consists of a normalization layer (LayerNorm) and a feedforward layer. The normalization layer normalizes the output features of the second part (i.e., the summed result), obtaining the processed result. The feedforward layer performs linear or nonlinear mapping on the normalization layer's processed result, obtaining the mapped result. The input features of the normalized layer and the output features of the feedforward layer are added together to obtain the summed result, thereby achieving skip connections and reducing information loss. This summed result is the output data of the third part. The summed result of the third part is the output feature of the feature extraction network 701.

[0146] Following the above method, after the electronic device determines the output feature of each feature extraction network, it can use that output feature as the input feature of the next feature extraction network. The next feature extraction network then performs the same processing to obtain its output feature. This process continues until the output feature of the last feature extraction network is obtained.

[0147] Optionally, the last feature extraction network is connected to the prediction layer. The prediction layer used to predict methylation information can be referred to as the first prediction layer. The first prediction layer processes the output features of the last feature extraction network to obtain methylation information. This application does not limit the structure of the first prediction layer. For example, the first prediction layer includes an MLP (Multilayer Perceptron) used to perform linear or nonlinear mapping on the output data of the last feature processing block to obtain methylation information.

[0148] In one possible implementation, there are at least two detection sites, each corresponding to an output feature of the Nth feature extraction network; the methylation state of the detection sites is determined based on the output features of the Nth feature extraction network, including: performing global attention processing on at least two output features of the Nth feature extraction network to obtain global attention features; and determining the methylation state of each detection site based on the global attention features.

[0149] In this example, the methylation detection model consists of a backbone model and a first prediction layer. A global attention layer is connected between the backbone model and the first prediction layer, and this global attention layer is concatenated after the backbone model. The first prediction layer is then concatenated after the global attention layer.

[0150] The backbone model consists of N (N is a positive integer) cascaded feature extraction networks. For each detection site, the output features of the Nth feature extraction network can be determined by the backbone model based on reference data and sequencing data.

[0151] Next, the output features of the Nth feature extraction network corresponding to each detection site are used as input data for the global attention layer. The global attention layer processes the input data as follows: it performs three mappings on the input data to obtain the query matrix (Q), key matrix (K), and value matrix (V). Then, the similarity between the query matrix (Q) and the key matrix (K) is calculated to obtain the attention weights. Finally, the value matrix (V) is weighted according to the attention weights through the self-attention layer to obtain the global attention features.

[0152] Subsequently, the first prediction layer performs linear or nonlinear mapping on the global attention features to obtain methylation information for each detection site. By performing global attention processing on the features corresponding to each detection site, the importance of detection sites and the relationships between them can be analyzed from a global perspective. This gives the global attention features stronger representational capabilities and higher accuracy, thus improving the accuracy of methylation information when subsequently determined using global attention features.

[0153] Based on the above explanation of the backbone model, it can be seen that the backbone model includes N feature extraction networks, and optionally, it also includes an encoding layer. The backbone model is a model obtained through training, and the training method of the backbone model is described below.

[0154] In this example, the method of this application embodiment further includes step S1 (not shown in the figure).

[0155] Step S1: Obtain first training data, which represents the sequence containing methylation-related detection sites in the genome of the training object; perform masking processing on the first training data to obtain first masked data, which represents the sequence obtained by masking at least one base in the sequence represented by the first training data; reconstruct the first masked data through a neural network model to obtain first reconstructed data; train the neural network model to obtain the backbone model based on the first reconstructed data and the first training data.

[0156] The training object and the sample object can be the same organism or different organisms. There can be at least one training object, and different training objects can belong to the same species or different species. The electronic device can acquire the first training data in the same way as the reference data and sequencing data, and the content of the first training data is similar to the content of the reference data and sequencing data, which will not be described in detail here.

[0157] The first training data includes at least one base. An electronic device can replace a portion of the base data in the first training data with mask data, thereby performing masking processing on the first training data, transforming it into first masked data. The first masked data includes the unmasked base data and the masked data obtained from the masking. For example, if the first training data includes 100 base data, and the electronic device replaces the first 30 base data with mask data, then the first masked data includes 30 mask data and 70 base data. The content of the mask data is not limited here; in practical applications, the mask data can be specified data such as "*", "0", "--", etc., or it can be... <mask>" etc. mask markup.

[0158] In an exemplary embodiment, the first training data includes at least two alignment data; performing occlusion processing on the first training data to obtain first occluded data includes performing at least one of global random occlusion or column random occlusion processing on the at least two alignment data to obtain first occluded data.

[0159] The first training data includes at least two alignment data sets, where each alignment data set represents all or part of the sequence in the sequence corresponding to the first training data. The 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 the at least two alignment data sets.

[0160] 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.

[0161] 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.

[0162] 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 consists of bases at the same position in the sequence corresponding to the first training data, belonging to different alignment data. The electronic device can randomly determine the column data based on the length of the sequence corresponding to the first training data, replacing the bases corresponding to the column data in all alignment data with mask data. This achieves random column masking processing on at least two alignment data, resulting in first masked data, which includes all the masked alignment data.

[0163] Understandably, in one implementation, all alignment data includes the base data corresponding to a specific position in the sequence corresponding to the first training data; in another implementation, some alignment data includes the base data corresponding to a specific position in the sequence corresponding to the first training data, while the remaining alignment data does not include the base data corresponding to that position; in yet another implementation, all alignment data does not include the base data corresponding to a specific position in the sequence corresponding to the first training data. 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 operation will not be performed.

[0164] 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.

[0165] By performing global random masking on at least two alignment datasets, base data is randomly masked. This facilitates subsequent reconstruction of the masked base data using the model, which is then trained based on the reconstructed data, thus improving the model's understanding of sequencing data. Given that the initial training data includes at least two alignment datasets, the base data in the column direction is typically identical. Therefore, performing column random masking on at least two alignment datasets enhances the model's learning ability from sequencing data, thereby improving model performance.

[0166] Optionally, occlusion processing is performed on the first training data to obtain first occluded data, including: performing occlusion processing on the first training data according to an occlusion ratio to obtain first occluded data, wherein the occlusion ratio is negatively correlated with the number of training iterations of the neural network model. That is, as the number of training iterations of the first model gradually increases, the occlusion ratio gradually decreases.

[0167] Electronic devices can determine the masking ratio based on the number of training iterations of the neural network model; the method of determination is not limited here. For example, an initial value for the masking ratio can be preset, and the masking ratio can be adjusted downwards after each training iteration of the neural network model. Alternatively, a function describing the relationship between the masking ratio and the number of training iterations can be preset, and the electronic device can determine the masking ratio based on this function and the number of training iterations of the neural network model. From all the base data included in the first training data, base data that meets the masking ratio is determined, and the determined base data is replaced with mask data to obtain the first masked data. By reducing the masking ratio during training, the model can converge faster, improving the training effect.

[0168] In practical applications, global random occlusion processing and column random occlusion processing correspond to the same or different occlusion ratios. Optionally, occlusion processing includes global random occlusion processing and column random occlusion processing, and the occlusion ratio corresponding to global random occlusion processing is greater than the occlusion ratio corresponding to column random occlusion processing. For example, the occlusion ratio corresponding to global random occlusion processing is 30%, while the occlusion ratio corresponding to column random occlusion processing is 5%.

[0169] 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 backbone model.

[0170] Furthermore, the occlusion ratio corresponding to global random occlusion can gradually decrease as the neural network model is trained. For example, during the training process of the neural network model, as the number of training iterations gradually increases, the occlusion ratio corresponding to global random occlusion gradually decreases. For instance, when the neural network model starts training, the occlusion ratio corresponding to global random occlusion is 30%. As the number of training iterations gradually increases, the occlusion ratio corresponding to global random occlusion gradually decreases, and after the neural network model is trained, the occlusion ratio corresponding to global random occlusion decreases to 15%. The occlusion ratio corresponding to column random occlusion can remain constant. For example, during the training process of the neural network model, the occlusion ratio corresponding to column random occlusion can be maintained at 5%. Alternatively, the occlusion ratio corresponding to column random occlusion can also decrease slightly.

[0171] After determining the first occlusion data, the electronic device can input this data into a neural network model. The neural network model and the backbone model are similar in structure and function, but differ in their parameters. Therefore, the first occlusion data can be used as the input data for the first feature extraction network in the neural network model, and the output data of the previous feature extraction network can be used as the input data for the next feature extraction network. Each feature extraction network performs feature processing on its input data to obtain the output data. In this way, the output data of the last feature extraction network can be determined; this output data represents the semantic features of the first occlusion data.

[0172] The neural network model also includes a prediction 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 semantics of each unmasked base in the output data 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 a process of the neural network model learning and analyzing 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 masking data can be reconstructed to obtain each reconstructed base data.

[0173] For example, a dictionary is pre-configured, containing multiple base data. For each mask data, a prediction network determines the probability that the mask data corresponds to any base data in the dictionary, based on the features of each unmasked base data and the features of the masked data. The highest probability is then selected. The base data corresponding to the highest probability is used as the base data reconstructed from the mask data.

[0174] The first reconstructed data can be determined by the prediction network. The first reconstructed data includes the unmasked base data and the reconstructed base data.

[0175] Then, the electronic device can determine the loss value of the neural network model based on the first reconstructed data and the first training data, or based on the base data reconstructed from the first reconstructed data and the masked base data (i.e., the base data corresponding to each masked data) from the first training data. The electronic device then trains the neural network model based on the loss value to obtain the trained neural network model. The trained neural network model includes a backbone model and a trained prediction network.

[0176] Alternatively, according to the objective function: Determine the loss value for the neural network model. Here, X can represent the first training data, which includes at least two comparison data sets. This can represent the first reconstructed data. In this example, the neural network model is also called a Masked Language Model (MLM), therefore, the objective function is the loss function of the MLM. Based on this, The loss value represents the neural network model, and θ represents the model parameters. Mask can represent the set of masked base data in the first training data. X 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 masked base data X obtained during the process of reconstructing the first reconstructed data through a neural network model. m,l The probability of the corresponding base data.

[0177] By training a neural network model using first training data related to methylation, the model can learn information about gene sequences related to methylation, thereby improving the accuracy of the model in predicting methylation information.

[0178] Optionally, training a neural network model to obtain a backbone model based on the first reconstructed data and the first training data includes: acquiring second training data, the second training data representing sequences in the genome of the species to which the training object belongs; performing masking processing on the second training data to obtain second masked data, the second masked data representing sequences obtained by masking at least one base in the sequences represented by the second training data; reconstructing the second masked data using a neural network model to obtain second reconstructed data; and training a neural network model to obtain a backbone model based on the second reconstructed data, the second training data, the first reconstructed data, and the first reconstructed data.

[0179] The electronic device can acquire the second training data in the same way as the first training data. The content of the second training data is similar to that of the first training data, and will not be described again here. It should be noted that the second training data can represent gene sequences of any position and length in the genome of a species.

[0180] The second training data includes at least one base. An electronic device can replace a portion of the base data in the second training data with mask data, thereby performing masking processing on the second training data, transforming it into second masked data. The second 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 second training data can be the same as or different from the strategy for performing masking processing on the first training data. For example, a globally random masking strategy can be used to perform masking processing on the second training data, with the masking ratio gradually decreasing during the training of the neural network model.

[0181] Electronic devices can input second masking data into a neural network model. This second masking data serves as input to the first feature extraction network in the neural network model, while the output data of the previous feature extraction network serves as input to the next. Each feature extraction network performs feature processing on its input data to obtain output data. In this way, the output data of the last feature extraction network is determined, and this output data represents the semantics of the second masking data. A prediction network can then reconstruct each masking data based on the semantics of each unmasked base in the output data, obtaining each reconstructed base. That is, the prediction network can determine the second reconstructed data, which includes both the unmasked base data and the reconstructed base data.

[0182] Subsequently, the electronic device can determine the loss value of the neural network model based on the second reconstructed data and the second training data, or based on the base data reconstructed from the second reconstructed data and the masked base data from the second training data (i.e., the base data corresponding to each masked data), and train the neural network model based on the loss value to obtain the backbone model. In the objective function mentioned above, X can also represent the second training data. It can also characterize the second reconstructed data. Mask can also characterize the set of masked base data formed in the second training data, X. ml It can also characterize the masked l-th base data in the second training data included in the set. This can be characterized by the masked base data X obtained during the reconstruction of the second reconstructed data through a neural network model. m,l The probability of the corresponding base data.

[0183] Since gene sequences of a species are crucial reference resources with high accuracy in research such as genetics and genomics, training a neural network model with secondary training data allows the model to learn information from the species' gene sequences, thereby improving the model's accuracy.

[0184] In practical applications, step S2 can be executed first, followed by step S1; steps S1 and S2 can be executed simultaneously; or step S1 can be executed first, followed by step S2. Optionally, during the training of the neural network model, step S1 can be 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.

[0185] For example, as shown in Figure 8, in one possible implementation, the electronic device trains the neural network model 809 in two stages.

[0186] The first stage is the process of training a neural network 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 training data. The second training data includes multiple base data 801. The electronic device can replace some of the base data 801 in the second training data with mask data 803 according to a 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 neural network model 809, and the output data is obtained through the neural network model 809. The output data includes the second reconstructed data 810. The electronic device can train the neural network model based on the second reconstructed data 810 and the second training data.

[0187] Next, the electronic device acquires the input data for the second stage, which includes the first training data and the corresponding reference data. The reference data corresponding to the first training data includes multiple base data 804s. The electronic device can determine the column data based on the number of base data 804s according to the column random masking processing strategy.

[0188] The second stage is the process of retraining the neural network model based on the data shown in (2-1) and (2-2). Specifically, the first training data includes multiple alignment data, the number of which represents the depth of the alignment data. The base data corresponding to the column data in the multiple alignment data are replaced with mask data 806, thereby performing column random masking on the first training data. Furthermore, for any alignment data, the electronic device replaces some base data in the alignment data with mask data 803, thereby performing global random masking on the alignment data. After performing column random masking and global random masking on the first training 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 neural network model 809, and the output data is obtained through the neural network model 809. The output data includes the first reconstructed data 812 and the corresponding reference data 811. The reference data 811 is the same as the reference data 804. The electronic device can retrain the neural network model based on the first reconstructed data 812 and the first training data.

[0189] The neural network model can be trained using the above method, resulting in a trained neural network model. The neural network model includes a backbone model, and electronic devices can add prediction layers after the backbone model to construct the model to be trained. By training the model to be trained, a methylation detection model is obtained.

[0190] For example, electronic devices can acquire third training data, which includes reference data, sequencing data, and tags. Reference data represents the gene sequence containing the detection site in the species' genome, sequencing data represents the gene sequence containing the detection site in the training object's genome, and tags represent the methylation status of the detection site. The electronic device inputs the reference data and sequencing data into the model to be trained, and the model predicts methylation information, which represents the methylation status of the detection site. The model is then trained using the tags and the predicted methylation information to obtain a methylation detection model, which includes a backbone model and a prediction layer. Subsequently, the reference data and sequencing data can be input into the methylation detection model to determine the methylation information. The gene sequences represented by the reference data include the detection site, and the gene sequences represented by the sequencing data also include the detection site.

[0191] Step 203: Determine the disease detection result of the sample subject based on the methylation status of the detection site. The disease detection result includes at least one of a first result or a second result. The first result represents the likelihood of the sample subject being healthy, and the second result represents the likelihood of the sample subject developing at least one type of cancer.

[0192] Electronic devices can acquire detection results to determine the model. These devices can use methylation information (i.e., the methylation state of the detection site) as input data to the model.

[0193] Optionally, the gene sequence characterized by the reference data and the gene sequence characterized by the sequencing data can be considered as a pair of sequences. In practical applications, there can be at least one pair of sequences. Based on this, the electronic device acquires methylation information from multiple pairs of sequences, where the methylation information of any pair of sequences represents the methylation state of at least one detection site. By statistically analyzing the methylation information of multiple pairs of sequences, methylation features are obtained. Methylation features represent the statistical information of the methylation state of the detection site; for example, methylation features represent the distribution frequency of the methylation state of the detection site. Methylation features can be used as input data for determining the detection result model.

[0194] Optionally, the gene sequence characterized by the reference data is segmented into fixed-length bins, for example, into 1M bins of length. Since the gene sequence characterized by the reference data is segmented, the methylation information corresponding to the gene sequence characterized by the sequencing data 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 methylation feature.

[0195] The detection result determination model processes the input data to obtain the disease detection result. The structure, parameter quantization, and data processing methods of the detection result determination model are not limited here. For example, the detection result determination model may be a large model based on Transformer, or a policy tree model such as XGBoost.

[0196] Taking a large Transformer-based model as an example, the detection result determination 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.

[0197] Assuming the detection result determination model includes at least one Transformer network and a second prediction layer, then: the input data of the first Transformer network is processed through 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 through 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 through 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 detection result through the second prediction layer. The structure and processing methods of the detection result determination model are similar to those of the variant detection model, as described in step 202, and will not be repeated here.

[0198] 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 detection result 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 sample object has the corresponding disease of that type. Generally, the larger the indicator for a disease type, the higher the probability that the sample object has 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 of the sample object is determined, thus obtaining the disease detection result. Optionally, diseases include cancer; therefore, the disease detection result includes cancer detection results.

[0199] Optionally, the disease detection result includes a first result and a second result, whereby the first result characterizes the probability that the sample subject is healthy, and the second result characterizes the probability that the sample subject has at least one disease. Determining the disease detection result of the sample subject based on the methylation status of the detection site includes: determining the first result based on the methylation status of the detection site; and determining the second result based on the methylation status of the detection site when the probability characterized by the first result is below a threshold.

[0200] In this example, the detection result determination model includes a first model. The structure and number of parameters of the first model are not limited here. For example, the first model could be a large model based on Transformer, or a policy tree model such as XGBoost. The electronic device can use methylation information or methylation features as input data for the first model. Following the data processing method for the detection result determination model described above, the first model determines the first result based on the input data. The first result characterizes the probability of the sample object being healthy. Generally, the larger the first result, the higher the probability of the sample object being healthy.

[0201] If the probability of the sample being healthy is higher than a threshold, the electronic device uses the first result as the disease detection result. If the probability of the sample being healthy is lower than the threshold, the electronic device uses methylation information or methylation features as input data for the second model. The detection result determination model includes the second model. The structure and number of parameters of the second model are not limited here. For example, the second model is a large model based on Transformer, or a policy tree model such as XGBoost. The electronic device can use methylation information or methylation features as input data for the second model. Following the data processing method for the detection result determination model described above, the second model determines the second result based on the input data. The second result characterizes the probability that the sample has at least one disease.

[0202] Optionally, the second result includes indicators for various disease types. The electronic device can determine the largest indicator from the indicators for each disease type, or determine the indicator greater than a threshold from the indicators for each disease type, and determine the disease occurring in the sample object based on the disease type corresponding to the determined indicator, thereby obtaining the disease detection result.

[0203] By determining the probability of a sample having at least one disease only when the probability of the sample being healthy is below a threshold, invalid data processing is avoided, thereby enabling the determination of disease detection results for more subjects within a certain period of time, and achieving large-scale disease screening.

[0204] Optionally, after confirming the symptom test results, the electronic device can automatically generate reports based on these results, transforming complex analytical results into easily understandable clinical reports, facilitating rapid access to key information for healthcare professionals. The reports, along with interpretive and decision-making information derived from them, can be displayed on the healthcare professional's client interface, 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 interface, assisting the organism in managing its health.

[0205] The method in this application embodiment has the following characteristics:

[0206] (1) Improve the early diagnosis rate. The embodiments of this application can provide timely diagnostic evidence in the early stage of cancer. By detecting subtle changes in methylation patterns, cancer can be identified in the early stage that cannot be detected by traditional imaging and biomarker detection, providing a key time window for early intervention.

[0207] (2) Reduce misdiagnosis rate. The embodiments of this application utilize large-scale methylation data and advanced deep learning algorithms to significantly improve screening accuracy, reduce false positive and false negative rates, thereby reducing the risk of sample subjects receiving unnecessary treatment and ensuring that patients who truly need treatment receive timely intervention.

[0208] (3) Non-invasive testing. Testing only requires samples of bodily fluids such as blood, avoiding the invasiveness and discomfort of traditional cancer detection methods. This non-invasive characteristic makes the cancer screening process more convenient, increases the acceptance of samples, and helps improve screening coverage and frequency.

[0209] (4) Rapid results. The embodiments of this application combine whole-genome sequencing and methylation status analysis, which can provide test results in a short time, thereby facilitating timely clinical decision-making, helping to reduce the psychological stress of sample subjects, and improving the early intervention rate.

[0210] (5) Simultaneous screening for multiple cancer types. By screening for multiple cancer types, efficiency is improved and overall costs are reduced. This "one test, multiple cancer screening" model makes large-scale population screening possible.

[0211] (6) Personalized risk assessment. By analyzing individual-specific methylation patterns, more accurate personalized cancer risk assessments are provided, which helps to develop personalized screening and prevention strategies and achieve precision medicine.

[0212] 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, training data, and reference data involved in this application were all obtained with full authorization.

[0213] The above method, by determining the methylation status of the detection site based on reference and sequencing data, not only reduces the time and cost of methylation detection but also allows for comparison of the sequences containing the detection site in the species genome and the sequences containing the detection site in the sample's genome. This enables the determination of the methylation status of the detection site at the gene level, improving its accuracy. Subsequently, the methylation status of the detection site can be used to accurately determine the disease detection results of the sample, thereby assisting medical personnel in better managing the health of the sample and reducing their workload.

[0214] The above describes the method for obtaining detection results in 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, an electronic device can acquire a backbone model and, based on the backbone model, acquire a methylation detection model to determine methylation information. Subsequently, the electronic device can determine the disease detection result based on the methylation information. Specifically, as shown in Figure 9, the method of this application embodiment includes the following steps.

[0215] Step 901: Obtain whole genome sequencing data of the sample object and whole genome sequencing data of the species.

[0216] Technicians can collect biological samples such as blood, urine, or tissue sections from specimens. In a laboratory setting, technicians perform sequencing on these biological samples to obtain whole-genome sequencing data. Additionally, electronic devices can retrieve whole-genome sequencing data of species from databases.

[0217] Step 902: Using a methylation detection model, determine the methylation status of each detection site based on the whole genome sequencing data of the sample object and the whole genome sequencing data of the species.

[0218] As shown in Figure 10, the electronic device can determine reference data 1002 from the whole-genome sequencing data of a species based on the window width. The reference data represents a segment of the sequence containing the detection site within the species' whole genome. Reference data 1002 includes multiple base data 1001, which represent bases in the sequence. Furthermore, the electronic device determines sequencing data 1003 from the whole-genome sequencing data of the sample object based on the window width and the reference data. Sequencing data 1003 represents a segment of the sequence containing the detection site within the sample object's genome. Typically, sequencing data 1003 includes at least one alignment data point; the number of alignment data points is also referred to as the depth of sequencing data 1003.

[0219] Reference data 1002 and sequencing data 1003 are input into the methylation detection model 1004, which outputs methylation information 1005. Methylation information 1005 characterizes the methylation status of the detection sites. Generally, reference data 1002 and sequencing data 1003 are considered as one set of data. In practical applications, multiple sets of data are input into the methylation detection model 1004 to determine the methylation information 1005, which includes the methylation status of multiple detection sites.

[0220] Step 903: Determine the model based on the detection results, and determine the disease detection results based on the methylation status of each detection site.

[0221] As shown in Figure 10, the electronic device inputs methylation information 1005 into the detection result determination model 1006, and determines the disease detection result 1007 through the detection result determination model 1006.

[0222] The backbone model used in this application embodiment was obtained through self-supervised training on sequence data of over 1 trillion base pairs. The structure and training method of the backbone model have been described in detail above and will not be repeated here. The methylation detection model built based on this backbone model can achieve an AUC (Area Under Curve) of 0.911 and an accuracy of 0.931 under low coverage conditions.

[0223] This application embodiment also verifies the effectiveness of the above-mentioned method for obtaining detection results 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 the cancer detection results reached 0.983, and the sensitivity was 83.9% at a specificity of 98.0%. Therefore, the data processing method of this application embodiment can efficiently and accurately analyze the genome of organisms to obtain cancer detection results, achieving early detection and classification of multiple cancers, thereby improving treatment outcomes and reducing cancer care expenditures.

[0224] The method in this application has the following three key points:

[0225] (1) Efficient data processing. Based on location and window, massive amounts of WGS data are transformed into data suitable for model processing, while retaining key genetic data.

[0226] (2) Accurate prediction of methylation status. High-precision prediction of methylation status was achieved by making full use of the genomes of the sample subjects and the species.

[0227] (3) Early cancer diagnosis. Cancer detection results are predicted by methylation information, enabling personalized cancer risk assessment.

[0228] Through close collaboration among these three key aspects, an end-to-end solution has been formed, enabling efficient, accurate, and economical methylation prediction and early cancer diagnosis. This not only significantly reduces the cost and time of methylation testing but also improves the accuracy and accessibility of early cancer diagnosis, demonstrating broad clinical application prospects and significant social value.

[0229] Figure 11 is a schematic diagram of a detection result acquisition device provided in an embodiment of this application. As shown in Figure 11, the device includes:

[0230] The acquisition module 1101 is used to acquire reference data and sequencing data of the sample object. The reference data represents the sequence of the detection site in the reference genome of the species to which the sample object belongs, and the sequencing data represents the sequence of the detection site in the genome of the sample object.

[0231] The determination module 1102 is used to determine the methylation status of the detection site based on reference data and sequencing data;

[0232] The determination module 1102 is also used to determine the disease detection result of the sample object based on the methylation status of the detection site.

[0233] In one possible implementation, the acquisition module 1101 is used to acquire whole-genome sequencing data, which characterizes the genome of the sample object; and to determine the sequencing data from the whole-genome sequencing data based on the location of the detection site in the reference genome.

[0234] In one possible implementation, the acquisition module 1101 is used to determine sequencing data from whole-genome sequencing data according to the location of the detection site in the reference genome and according to a reference window, wherein the center of the reference window is the location of the detection site in the reference genome and the width of the reference window is not less than the length of the sequence in the reference genome in which the detection site is located.

[0235] In one possible implementation, the acquisition module 1101 is used to acquire whole-genome sequencing data of the species to which the sample object belongs, the whole-genome sequencing data of the species to which the sample object belongs characterizes the genome of the species to which the sample object belongs; and to determine reference data from the whole-genome sequencing data of the species to which the sample object belongs based on the position of the detection site in the reference genome.

[0236] In one possible implementation, the acquisition module 1101 is used to determine reference data from the whole genome sequencing data of the species to which the sample object belongs, according to the location of the detection site in the reference genome and a reference window, wherein the center of the reference window is the location of the detection site in the reference genome, and the width of the reference window is not less than the length of the sequence in the reference genome in which the detection site is located.

[0237] In one possible implementation, the symptom detection result includes a first result and a second result, wherein the first result characterizes the probability that the sample object is healthy and the second result characterizes the probability that the sample object has at least one symptom.

[0238] The determination module 1102 is used to determine a first result based on the methylation state of the detection site; and to determine a second result based on the methylation state of the detection site when the probability characterized by the first result is lower than a threshold.

[0239] In one possible implementation, the methylation state of the detection site is determined by a methylation detection model, which is determined based on a backbone model.

[0240] The acquisition module 1101 is also used to acquire first training data, which characterizes the sequence of the methylation-related detection site in the genome of the training object;

[0241] The device also includes:

[0242] A masking module is used to perform masking processing on the first training data to obtain first masked data. The first masked data represents the sequence obtained by masking at least one base in the sequence represented by the first training data.

[0243] The reconstruction module is used to reconstruct the first occlusion data through a neural network model to obtain the first reconstructed data.

[0244] The training module is used to train the neural network model to obtain the backbone model based on the first reconstructed data and the first training data.

[0245] In one possible implementation, the first training data includes at least two alignment data;

[0246] The masking module is used to perform at least one of the following processing methods on at least two comparison data: global random masking or column random masking, to obtain the first masked data.

[0247] In one possible implementation, a masking module is used to perform masking processing on the first training 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 neural network model.

[0248] 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.

[0249] In one possible implementation, a training module is used to acquire second training data, which represents sequences in the genome of the species to which the training object belongs; perform masking processing on the second training data to obtain second masked data, which represents sequences obtained by masking at least one base in the sequences represented by the second training data; reconstruct the second masked data through a neural network model to obtain second reconstructed data; and train the neural network model to obtain a backbone model based on the second reconstructed data, the second training data, the first reconstructed data, and the first reconstructed data.

[0250] In one possible implementation, the determining module 1102 is used to perform feature extraction on the input features of the i-th feature extraction network to obtain the output features of the i-th feature extraction network; and to determine the methylation state of the detection site based on the output features of the N-th feature extraction network.

[0251] Where i is any positive integer from 1 to N, the input features of the first feature extraction network are determined based on reference data and sequencing data, and the input features of any feature extraction network from the second to the Nth feature extraction networks include the output features of the previous feature extraction network.

[0252] In one possible implementation, there are at least two detection sites, and each detection site corresponds to an output feature of the Nth feature extraction network.

[0253] The determination module 1102 is used to perform global attention processing on at least two output features of the Nth feature extraction network to obtain global attention features; and to determine the methylation state of each detection site based on the global attention features.

[0254] In one possible implementation, the determining module 1102 is used to perform self-attention processing on the input features of the i-th feature extraction network to obtain first attention features; perform mapping processing on the first attention features to obtain mapped features; and determine the output features of the i-th feature extraction network based on the mapped features.

[0255] In one possible implementation, the determining module 1102 is used to perform self-attention processing on the input features of the i-th feature extraction network 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 first attention feature; or, perform self-attention processing on the input features of the i-th feature extraction network 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 first attention feature.

[0256] In one possible implementation, the determining module 1102 is used to perform self-attention processing on the input features of the i-th feature extraction network in the column direction to obtain the second attention features; and to perform pooling processing on the second attention features in the column direction to obtain the second processing result.

[0257] In the aforementioned device, the methylation status of the detection site is determined based on reference data and sequencing data. This not only reduces the time and cost of methylation detection but also allows for comparison of the sequences containing the detection site in the species' genome and the sequences containing the detection site in the sample's genome. This enables the determination of the methylation status of the detection site at the gene level, improving its accuracy. Subsequently, the methylation status of the detection site can be used to accurately determine the disease detection results of the sample, thereby assisting medical personnel in better managing the health of the sample and reducing their workload.

[0258] It should be understood that the device shown in Figure 11 is only illustrated by the division of the above-described functional modules. In practical applications, the 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. Furthermore, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0259] Figure 12 shows a structural block diagram of a terminal device 1200 provided in an exemplary embodiment of this application. The terminal device 1200 includes a processor 1201 and a memory 1202.

[0260] Processor 1201 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1201 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 1201 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 1201 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0261] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 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 1202 are used to store at least one computer program, which is executed by the processor 1201 to implement the method for obtaining detection results provided in the method embodiments of this application.

[0262] In some embodiments, the terminal device 1200 may also optionally include a display screen 1205. The display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof.

[0263] Those skilled in the art will understand that the structure shown in FIG12 does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0264] Figure 13 is a schematic diagram of the server structure provided in an embodiment of this application. The server 1300 can vary considerably due to different configurations or performance. It may include one or more processors 1301 and one or more memories 1302. The one or more memories 1302 store at least one computer program, which is loaded and executed by the one or more processors 1301 to implement the detection result acquisition method provided in the above-described method embodiments. For example, the processor 1301 is a CPU. Of course, the server 1300 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 1300 may also include other components for implementing device functions, which will not be elaborated here.

[0265] In an exemplary embodiment, a non-volatile computer-readable storage medium 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 methods for obtaining detection results.

[0266] 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, and optical data storage device, etc.

[0267] 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 methods for obtaining detection results.

[0268] In an exemplary embodiment, a computer program product is also provided, which stores at least one computer program that is loaded and executed by a processor to enable an electronic device to implement any of the above-described methods for obtaining detection results.

[0269] 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.

[0270] 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.

[0271] 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 method of obtaining a test result, wherein, The method is performed by an electronic device, and the method comprises: obtaining reference data and sequencing data of a sample object, the reference data representing sequences of a detection site in a reference genome of a species to which the sample object belongs, and the sequencing data representing sequences of the detection site in a genome of the sample object; determining a methylation state of the detection site according to the reference data and the sequencing data; determining a disease detection result of the sample object according to the methylation state of the detection site.

2. The method of claim 1, wherein, The method for obtaining the sequencing data of the sample object comprises: obtaining whole genome sequencing data of the sample object, the whole genome sequencing data of the sample object representing a genome of the sample object; determining the sequencing data from the whole genome sequencing data of the sample object according to a position of the detection site in the reference genome.

3. The method of claim 2, wherein, The method for determining the sequencing data from the whole genome sequencing data of the sample object according to the position of the detection site in the reference genome comprises: determining the sequencing data from the whole genome sequencing data of the sample object according to a reference window, the center of the reference window being the position of the detection site in the reference genome, and the width of the reference window not being less than the length of a sequence in which the detection site is located in the reference genome.

4. The method according to any one of claims 1 to 3, wherein, The method for obtaining the reference data comprises: obtaining whole genome sequencing data of a species to which the sample object belongs, the whole genome sequencing data of the species to which the sample object belongs representing a genome of the species to which the sample object belongs; determining reference data from the whole genome sequencing data of the species to which the sample object belongs according to a position of the detection site in the reference genome.

5. The method of claim 4, wherein, The method for determining the reference data from the whole genome sequencing data of the species to which the sample object belongs according to the position of the detection site in the reference genome comprises: determining the reference data from the whole genome sequencing data of the species to which the sample object belongs according the reference window, the center of the reference window being the position of the detection site in the reference genomic, and the width of the reference window not being less than the length of a sequence in which detection site is located in the reference genome.

6. The method according to any one of claims 1 to 5, wherein, The disease detection result comprises a first result and a second result, the first result representing a possibility of the sample object being healthy, and the second result representing a possibility of the sample object having at least one disease; The method for determining the disease detection result of the sample object according to the methylation state of the detection site comprises: determining the first result according to the methylation state of the detection site; when the possibility represented by the first result is lower than a threshold value, determining the second result according to the methylation state of the detection site.

7. The method according to any one of claims 1 to 6, wherein, The methylation state of the detection site is determined by a methylation detection model, and the methylation detection model is determined according to a backbone model; the method further comprises: obtaining first training data, the first training data representing a sequence in which a detection site related to methylation is located in a genome of a training object; Performing a masking process on the first training data to obtain first masking data, the first masking data representing a sequence obtained by masking at least one base in a sequence represented by the first training data; Reconstructing the first masking data by the neural network model to obtain first reconstruction data; Training the neural network model according to the first reconstruction data and the first training data to obtain the backbone model.

8. The method of claim 7, wherein, The first training data comprises at least two alignment data; the performing a masking process on the first training data to obtain first masking data comprises: Performing at least one of global random masking or column random masking on the at least two alignment data to obtain first masking data.

9. The method of claim 7 or 8, wherein, The performing a masking process on the first training data to obtain first masking data comprises: Performing a masking process on the first training data according to a masking ratio to obtain first masking data, the masking ratio being negatively correlated with the number of training times of the neural network model.

10. The method of claim 9, wherein, The masking process comprises global random masking and column random masking, and the corresponding masking ratio of the global random masking is greater than the corresponding masking ratio of the column random masking.

11. The method according to any one of claims 7 to 10, wherein, The training the neural network model according to the first reconstruction data and the first training data to obtain the backbone mode comprises: Obtaining second training data representing a sequence in a genome of a species to which the training object belongs; Performing a masking process on the second training data to obtain second masking data, the second masking data representing a sequence obtained by masking at least one base in a sequence represented by the second training data; Reconstructing the second masking data by the neural network model to obtain second reconstruction data; Training the neural network model according to the second reconstruction data, the second training data, the first reconstruction data and the first training data to obtain the backbone model.

12. The method according to any one of claims 1 to 11, wherein, The determining the methylation state of the detection site according to the reference data and the sequencing data comprises: Performing feature extraction on the input feature of the i-th feature extraction network to obtain the output feature of the i-th feature extraction network; Determining the methylation state of the detection site according to the output feature of the N-th feature extraction network; Wherein, the i is any positive integer from 1 to N, the input feature of the first feature extraction network is determined based on the reference data and the sequencing data, and the input feature of any one of the second to N-th feature extraction networks comprises the output feature of the previous feature extraction network of the any one feature extraction network.

13. The method of claim 12, wherein, The detection site is at least two, and each detection site corresponds to an output feature of the N-th feature extraction network. The determining the methylation state of the detection site according to the output feature of the N-th feature extraction comprises: Performing global attention processing on the at least two output features of the N-th feature extraction network to obtain global attention features; Determining the methylation state of each detection site according to the global attention features.

14. The method of claim 12 or 13, wherein, The feature extraction is performed on the input feature of the i-th feature extraction network to obtain an output feature of the i-th feature extraction network, including: The self-attention processing is performed on the input feature of the i-th feature extraction network to obtain a first attention feature; The mapping processing is performed on the first attention feature to obtain a mapping feature; The output feature of the i-th feature extraction network is determined according to the mapping feature.

15. The method of claim 14, wherein, The self-attention processing is performed on the input feature of the i-th feature extraction network to obtain a first attention feature, including: The self-attention processing is performed on the input feature of the i-th feature network in a row direction to obtain a first processing result; and the self-attention processing is performed on the first processing result in a column direction to obtain the first attention feature. Or, the self-attention processing is performed on the input feature of the i-th feature network in a column direction to obtain a second processing result; and the self-attention processing is performed on the second processing result in a row direction to obtain the first attention feature.

16. The method of claim 15, wherein, The self-attention processing is performed on the input feature of the i-th feature network in a column to obtain a second processing result, including: The self-attention processing is performed on the input feature of the i-th feature in a column direction to obtain a second attention feature; The pooling processing is performed on the second attention feature in a column direction to obtain the second processing result.

17. An acquisition device of a detection result, wherein, The device includes: An acquisition module configured to acquire reference data and sequencing data of a sample object, the reference data representing a sequence of a detection site in a reference genome of a species to which the sample object belongs, and the sequencing data representing a sequence of the detection site in a genome of the sample object; A determination module configured to determine a methylation state of the detection site according to the reference data and the sequencing data; The determination module is further configured to determine a disease detection result of the sample object according to the methylation state of the detection site.

18. An electronic device, comprising: The electronic device includes a processor and a memory, the memory stores at least one computer program, the at least one computer program is loaded and executed by the processor, so that the electronic device implements the detection result acquisition method of any one of claims 1-16.

19. A non-transitory computer readable storage medium, wherein, The non-volatile computer readable storage medium stores at least one computer program, the at least one computer program is loaded and executed by the electronic device, so that the electronic device implements the detection result acquisition method of any one of claims 1 to 16.

20. A computer program product, wherein, The computer program product stores at least one computer program, the at least one computer program is loaded and executed by the processing unit, so that the electronic device implements the detection result acquisition method of any one of claims 1 - 16.

21. A computer program, wherein, The computer program is at least one, at least one computer program is loaded and executed by the processor, so that the electronic device implements any one of the detection result acquisition methods of claims 1 to 16.