A model training method, a protein processing method, a device, an electronic device, a computer readable storage medium and a computer program product
Patent Information
- Application Number
- CN202510250617.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2026-09-04
AI Technical Summary
然而,蛋白质变体的获取通常是通过对生物样本进行分析得到的,影响了蛋白质变体的获取效率
[0046]The embodiments of this application have at least the following beneficial effects: For a first protein sample, the first amino acid sample sequence included in the protein when no mutation has occurred is first obtained, and then the first preset variant type of the protein variant generated by the mutation is obtained; by using the first preset variant type as guiding information for protein variant prediction, the ability of the protein prediction model to be trained to predict the amino acid sequence of the protein variant is trained based on the first fusion sequence obtained by fusing the first amino acid sample sequence and the first preset variant type, and a trained protein prediction model is obtained; the trained protein prediction model includes the ability to predict the amino acid sequence of the protein variant based on the unmutated amino acid sequence of the protein and the preset type of the protein variant, so that the rapid prediction of protein variants can be achieved through the trained protein prediction model; therefore, the efficiency of obtaining protein variants can be improved.
Smart Images

Figure CN122696097A_ABST
Abstract
Description
Technical Field
[0001] This application relates to biomolecular processing technology in the field of biology, and more particularly to a model training method, a protein processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] In molecular biology, proteomics is a biotechnology used to study the proteome, which helps to deepen our understanding of physiological and pathological processes in organisms. The proteome is all the proteins in an organism, tissue, cell, or body fluid, including not only the basic sequences of proteins but also protein variants. However, obtaining protein variants is usually achieved through the analysis of biological samples, which affects the efficiency of protein variant acquisition. Summary of the Invention
[0003] This application provides a model training method, a protein processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the efficiency of obtaining protein variants.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] This application provides a model training method, the method comprising:
[0006] Determine the first amino acid sequence of the first protein sample, wherein the first amino acid sequence is the amino acid sequence included in the first protein sample when no mutation has occurred;
[0007] The first preset variant type and the first amino acid sample sequence are fused to obtain a first fusion sequence, wherein the first preset variant type is a preset type of protein variant of the first protein sample;
[0008] The first fusion sequence is predicted using the protein prediction model to be trained, and a second amino acid sample sequence is obtained. The second amino acid sample sequence is the amino acid sequence included in the protein variant of the first preset variant type.
[0009] Based on the second amino acid sample sequence and the preset third amino acid sample sequence, the first loss value of the protein prediction model to be trained is determined.
[0010] Based on the first loss value, the parameters of the protein prediction model to be trained are adjusted to obtain the trained protein prediction model.
[0011] This application provides a protein processing method, the method comprising:
[0012] Determine the first amino acid sequence of the protein to be treated, wherein the first amino acid sequence is the amino acid sequence of the protein to be treated when no mutation has occurred;
[0013] The second preset variant type and the first amino acid sequence are fused to obtain a second fusion sequence, wherein the second preset variant type is a preset type of protein variant of the protein to be processed;
[0014] Encoding the second fusion sequence yields the first protein variant feature;
[0015] The first protein variant feature is decoded to obtain a second amino acid sequence, which is the amino acid sequence included in the first protein variant of the second preset variant type.
[0016] This application provides a model training device, the model training device comprising:
[0017] The first data determination module is used to determine the first amino acid sample sequence of the first protein sample, wherein the first amino acid sample sequence is the amino acid sequence included in the first protein sample when no mutation has occurred.
[0018] The first information fusion module is used to fuse the first preset variant type and the first amino acid sample sequence to obtain a first fusion sequence, wherein the first preset variant type is a preset type of protein variant of the first protein sample;
[0019] The information prediction module is used to predict the first fusion sequence using a protein prediction model to be trained, and obtain a second amino acid sample sequence, wherein the second amino acid sample sequence is the amino acid sequence included in the protein variant of the first preset variant type.
[0020] The loss determination module is used to determine the first loss value of the protein prediction model to be trained based on the second amino acid sample sequence and the preset third amino acid sample sequence.
[0021] The parameter adjustment module is used to adjust the parameters of the protein prediction model to be trained based on the first loss value, so as to obtain the trained protein prediction model.
[0022] In this embodiment of the application, the information prediction module is further configured to encode the first fusion sequence through the first encoder in the protein prediction model to be trained to obtain the first protein variant sample feature; and to decode the first protein variant sample feature through the first decoder in the protein prediction model to be trained to obtain the second amino acid sample sequence.
[0023] In this embodiment, the loss determination module is further configured to: obtain the vector representation of each second amino acid sample in the second amino acid sample sequence; combine the vector representations of each second amino acid sample into a first amino acid vector sequence; obtain the vector representation of each third amino acid sample in the preset third amino acid sample sequence; combine the vector representations of each third amino acid sample into a second amino acid vector sequence; determine sub-loss values corresponding to multiple amino acid pairs based on the first amino acid vector sequence and the second amino acid vector sequence, wherein the amino acid pairs include second amino acid samples and third amino acid samples in the same order; and accumulate the sub-loss values corresponding to the multiple amino acid pairs to obtain the first loss value of the protein prediction model to be trained.
[0024] In this embodiment, the parameter adjustment module is further configured to predict the sequence of the first amino acid sample using the protein prediction model to be trained, to obtain a set of predicted modification sites, wherein the set of predicted modification sites includes at least one predicted modification site, and the predicted modification site is the predicted position of the mutated amino acid in the first protein sample; determine a second loss value of the protein prediction model to be trained based on the set of predicted modification sites and a preset set of modification sites of the first protein sample; and adjust the parameters of the protein prediction model to be trained based on the second loss value and the first loss value to obtain the trained protein prediction model.
[0025] In this embodiment, the information prediction module is further configured to: segment the fourth amino acid sample sequence of the second protein sample into words to obtain a first segmented sample sequence, wherein the fourth amino acid sample sequence is the amino acid sequence of a protein variant of the second protein sample; perturb the first segmented sample sequence to obtain a second segmented sample sequence, wherein the perturbation includes at least one of the following: masking, replacement, deletion, padding, duplication, and fusion; reconstruct the second segmented sample sequence using a protein semantic model to be trained to obtain a third segmented sample sequence; determine a third loss value for the protein semantic model to be trained based on the third segmented sample sequence and the first segmented sample sequence; and adjust the parameters of the protein semantic model to be trained based on the third loss value to obtain the protein prediction model to be trained.
[0026] In this embodiment of the application, the information prediction module is further configured to: determine the target fourth amino acid sample that has been post-translational modified from the fourth amino acid sample sequence of the second protein sample; label the target fourth amino acid sample in the fourth amino acid sample sequence based on the post-translational modification type to obtain the fifth amino acid sample sequence; and segment the fifth amino acid sample sequence based on the amino acid and the post-translational modification type to obtain the first segmented sample sequence.
[0027] In this embodiment of the application, the information prediction module is further configured to encode the second segmented sample sequence through the second encoder in the protein semantic model to be trained to obtain the second protein variant sample features; and to decode the second protein variant sample features through the second decoder in the protein semantic model to be trained to obtain the third segmented sample sequence.
[0028] In this embodiment of the application, the information prediction module is further configured to perform at least one of the following processes on the first segmented sample sequence to obtain a fourth segmented sample sequence: preset sequence tag addition and upper triangular mask matrix processing.
[0029] In this embodiment of the application, the information prediction module is further configured to decode the second protein variant sample features and the fourth word segmentation sample sequence through the second decoder in the protein semantic model to be trained, so as to obtain the third word segmentation sample sequence.
[0030] This application provides a protein processing apparatus, the protein processing apparatus comprising:
[0031] The second data determination module is used to determine the first amino acid sequence of the protein to be processed, wherein the first amino acid sequence is the amino acid sequence of the protein to be processed when no mutation has occurred.
[0032] The second information fusion module is used to fuse the second preset variant type and the first amino acid sequence to obtain a second fusion sequence, wherein the second preset variant type is a preset type of protein variant of the protein to be processed;
[0033] The feature encoding module is used to encode the second fusion sequence to obtain the first protein variant feature;
[0034] The feature decoding module is used to decode the features of the first protein variant to obtain a second amino acid sequence, wherein the second amino acid sequence is the amino acid sequence included in the first protein variant of the second preset variant type.
[0035] In this embodiment, the feature encoding module is used to obtain the target vector of each sequence element in the second fusion sequence, and combine the target vectors of each sequence element into a target vector sequence; and perform the following processing through iteration i: encode the i-th target vector and the (i-1)-th hidden state in the target vector sequence to obtain the i-th hidden state, where when i=1, the (i-1)-th hidden state is a preset hidden state, and i is a positive integer variable; when i iterates to I, the traversal of the vector sequence is completed, and the I-th hidden state obtained through iteration i is determined as the first protein variant feature, where I is the number of target vectors in the target vector sequence.
[0036] In this embodiment, the protein processing device further includes a data application module for performing mass spectrometry analysis on the second amino acid sequence to obtain a mass spectrum of the first protein variant; storing the mass spectrum of the first protein variant in a variant mass spectrum library, the variant mass spectrum library including the mass spectra corresponding to multiple protein variants respectively; in response to a protein variant identification request, determining the protein variant to be identified requested by the protein variant identification request; matching the mass spectrum of the protein variant to be identified in the variant mass spectrum library to obtain a target mass spectrum that matches the mass spectrum of the protein variant to be identified; and determining that the protein variant to be identified is the protein variant corresponding to the target mass spectrum.
[0037] In this embodiment of the application, the data application module is further configured to calculate the feature distance between the first protein variant feature and each protein variant feature in the variant feature library, wherein the variant feature library includes the protein variant features corresponding to multiple protein variants respectively; determine at least one protein variant feature from the variant feature library whose feature distance is less than a preset feature distance; and determine the biological application information of the first protein variant based on the protein variants corresponding to at least one of the protein variant features respectively.
[0038] In this embodiment of the application, the data application module is further configured to encode the first amino acid sequence to obtain modification site features; decode the modification site features to obtain a set of candidate modification sites for the protein to be processed, the set of candidate modification sites including at least one candidate modification site, the candidate modification site being the position of the mutated amino acid in the protein to be processed; and perform post-translational modification on the protein to be processed based on each candidate modification site to obtain a second protein variant.
[0039] In this embodiment of the application, the data application module is further configured to: determine the third amino acid sequence of the third protein variant of the protein to be processed; label the target third amino acid in the third amino acid sequence based on the post-translational modification type to obtain a fourth amino acid sequence, wherein the target third amino acid is a post-translational modified third amino acid; segment the fourth amino acid sequence based on the amino acid and the post-translational modification type to obtain a segmented sequence; and encode the segmented sequence to obtain the second protein variant feature of the third protein variant.
[0040] In this embodiment of the application, the data application module is further configured to determine a protein variant feature set of the protein variant set of the protein to be processed based on the second protein variant feature of the third protein variant, wherein the protein variant set includes each of the protein variants of the protein to be processed, and the protein variant feature set includes the features of each of the protein variants in the protein variant set; cluster the protein variant set based on the protein variant feature set to obtain at least one protein variant subset; and present at least one protein variant subset.
[0041] This application provides an electronic device, the electronic device comprising:
[0042] Memory is used to store executable instructions or computer programs.
[0043] When a processor executes computer-executable instructions or computer programs stored in the memory, it implements the model training method or the protein processing method provided in the embodiments of this application.
[0044] This application provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the model training method or the protein processing method provided in this application.
[0045] This application provides a computer program product, including computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, they implement the model training method or the protein processing method provided in this application.
[0046] The embodiments of this application have at least the following beneficial effects: For a first protein sample, the first amino acid sample sequence included in the protein when no mutation has occurred is first obtained, and then the first preset variant type of the protein variant generated by the mutation is obtained; by using the first preset variant type as guiding information for protein variant prediction, the ability of the protein prediction model to be trained to predict the amino acid sequence of the protein variant is trained based on the first fusion sequence obtained by fusing the first amino acid sample sequence and the first preset variant type, and a trained protein prediction model is obtained; the trained protein prediction model includes the ability to predict the amino acid sequence of the protein variant based on the unmutated amino acid sequence of the protein and the preset type of the protein variant, so that the rapid prediction of protein variants can be achieved through the trained protein prediction model; therefore, the efficiency of obtaining protein variants can be improved. Attached Figure Description
[0047] Figure 1 This is a schematic diagram of the architecture of the protein processing system provided in the embodiments of this application;
[0048] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0049] Figure 3 This is a flowchart illustrating the model training method provided in the embodiments of this application. Figure 1 ;
[0050] Figure 4 This is a flowchart illustrating the model training method provided in the embodiments of this application. Figure 2 ;
[0051] Figure 5 This is a flowchart illustrating the model training method provided in the embodiments of this application. Figure 3 ;
[0052] Figure 6 This is a schematic flowchart of the protein processing method provided in the embodiments of this application. Figure 1 ;
[0053] Figure 7 This is a schematic flowchart of the protein processing method provided in the embodiments of this application. Figure 2 ;
[0054] Figure 8 This is a schematic diagram illustrating an exemplary protein processing method provided in an embodiment of this application.
[0055] Figure 9 This is an exemplary schematic diagram of model pre-training provided in an embodiment of this application;
[0056] Figure 10This is an exemplary model fine-tuning diagram provided in an embodiment of this application. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0059] In the following description, the terms “first, second, third”, etc., are used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first, second, third”, etc., may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0060] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0061] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0062] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0063] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0064] Biomolecules include proteins, as well as nucleic acids (DNA and RNA), lipids, carbohydrates (sugars), and vitamins. These molecules perform various important functions in living organisms, such as storing and transmitting genetic information, constructing cell structures, storing and utilizing energy, signal transduction, and regulating metabolic processes.
[0065] 1) The proteome is the collection of all proteins in an organism, tissue, cell, or body fluid. The proteome is dynamic because protein expression levels, post-translational modifications (PTMs), and interactions change over time and under environmental conditions.
[0066] 2) Proteomics refers to the biotechnology used to study all proteins in an organism, tissue, cell, or body fluid. This includes protein identification, quantification of expression levels, post-translational modifications, structural analysis, interactions, and functions. Proteomics techniques include mass spectrometry (MS), two-dimensional gel electrophoresis (2DGE), and protein arrays. Proteomics research helps in understanding physiological and pathological processes in organisms and in discovering new biomarkers and drug targets.
[0067] 3) The base sequence of a protein refers to the amino acid sequence encoded by a gene in deoxyribonucleic acid (DNA) according to a predetermined pattern. In molecular biology, genes generate the base sequence of proteins through transcription and translation. Here, the gene in DNA is first transcribed into messenger ribonucleic acid (mRNA), and then the mRNA is translated into the base sequence of the protein by ribosomes. The base sequence of a protein consists of 20 different amino acids arranged in a specific order, and each amino acid is encoded by three nucleotides (one codon).
[0068] 4) Protein variants are protein molecules that are encoded by the same gene but have different amino acid sequences or post-translational modifications than the basic sequence of the protein. They are used to represent the various different protein molecules in the protein product of a single gene, excluding the basic sequence of the protein. Protein variants include protein mutants, protein isoforms, and post-translational modified proteins. Variants are produced by genetic variation, isoforms are produced by alternative splicing of RNA transcripts, and post-translational modified proteins are produced by post-translational modifications of proteins.
[0069] 5) Variant type refers to the type of protein variant, including protein mutant type, protein isoform type, and post-translational modification type, etc.
[0070] 6) Post-translational modifications refer to the chemical treatments performed on the amino acids in the basic sequence of a protein after synthesis. These include phosphorylation, glycosylation, acetylation, methylation, ubiquitination, and esterification. Post-translational modifications affect protein function, localization, and stability. For example, phosphorylation can activate or inhibit enzyme activity, while glycosylation can ensure proper protein folding or transport to specific organelles. Types of post-translational modifications refer to the specific types of modifications performed, such as phosphorylation, glycosylation, acetylation, methylation, ubiquitination, and esterification.
[0071] 7) Modification sites are the locations of amino acids in the basic sequence of a protein that are used for post-translational modifications.
[0072] 8) Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In the embodiments of this application, AI can be used to predict and characterize protein variants, etc.
[0073] 9) Artificial neural networks are mathematical models that mimic the structure and function of biological neural networks. Exemplary structures of artificial neural networks in this application include Graph Convolutional Networks (GCNs, a type of neural network for processing graph-structured data), Deep Neural Networks (DNNs), Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), Neural State Machines (NSMs), and Phase-Functioned Neural Networks (PFNNs). In this application, the prediction and characterization of protein variants can be achieved using artificial neural network models.
[0074] 10) Sequence-to-Sequence (Seq2Seq) models are end-to-end deep learning models used for sequence generation and sequence transformation tasks. The Seq2seq model uses two components, an encoder and a decoder, to transform the input sequence into an output sequence.
[0075] 11) Pre-training refers to training a model on training data before a specific task, enabling it to learn general features and knowledge, which can improve the model's performance and learning efficiency on subsequent specific tasks. In the embodiments of this application, the protein prediction model to be trained can be a pre-trained artificial neural network model.
[0076] 12) Fine-tuning refers to adjusting the parameters of a pre-trained model to adapt it to a new task or dataset. This effectively utilizes the general knowledge of the pre-trained model and allows for rapid improvement of the model's performance on a specific task through further training on a task-specific dataset. In this embodiment, the training process of the protein prediction model to be trained can be a fine-tuning process.
[0077] 13) Conditional generation refers to generating output based on given conditions or prompts. In natural language processing, a Seq2seq model is typically used for conditional generation, where the encoder converts the given conditions or prompts into embedded representations, and the decoder generates output text based on the embedded representations. In this embodiment, the training process of the protein prediction model to be trained is a conditional generation process, where the conditions are a first preset variant type.
[0078] The following section explains the relevant technologies for biomolecule processing.
[0079] It should be noted that biomolecular processing techniques can include those based on Protein Language Models (PLMs). PLMs are used to process and analyze the basic protein sequence, enabling various downstream tasks. For example, the basic protein sequence can be segmented, with each amino acid treated as a token. Then, the segmented sequence is pre-trained using a Masked Language Model (MLM) and fine-tuned for specific tasks. However, because this process focuses on the basic protein sequence and is unrelated to protein variants, it fails to uncover dynamic functional changes in proteins. Furthermore, the processing of the basic sequence only addresses local fragments, lacking analysis of the overall basic sequence. Additionally, the data augmentation strategy used in MLM pre-training—segmentation masking—does not align with the biological laws governing protein mutations. Therefore, protein language models cannot achieve the embedding representation and prediction of protein variants, impacting the efficiency of protein variant acquisition.
[0080] Furthermore, related technologies for biomolecular processing can also include biomolecular processing based on site modification prediction models. These models, for each potential modification site, determine 30 amino acid sequence fragments upstream and downstream of the potential modification site from the protein's base sequence, and predict whether the potential modification site is indeed a modification site based on these amino acid sequence fragments. However, since the determination of whether a site is a modification site is based on the amino acid sequence fragments of the potential modification site, ignoring amino acids outside the sequence fragments, the accuracy of modification site identification is affected. Moreover, the training process uses each known modification site as classification supervision information, failing to predict new, undetected modification sites. Additionally, the predicted modification sites are only single-site predictions. Therefore, site modification prediction models cannot achieve the embedding representation and prediction of protein variants, impacting the efficiency of protein variant acquisition.
[0081] Based on this, embodiments of this application provide a model training method, a protein processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the efficiency of protein variant acquisition. The following describes exemplary applications of the electronic device provided in this application. The electronic device provided in this application can be implemented as various types of terminals such as robots, smartphones, smartwatches, laptops, tablets, desktop computers, smart home appliances, set-top boxes, smart vehicle devices, portable music players, personal digital assistants, dedicated messaging devices, intelligent voice interaction devices, portable gaming devices, and smart speakers. It can also be implemented as a server, or a combination of both. The following will describe exemplary applications when the electronic device is implemented as a terminal or a server.
[0082] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the protein processing system provided in the embodiments of this application; as shown... Figure 1 As shown, to support a protein processing application, in the protein processing system 100, terminals 600 (terminals 600-1 and 600-2 are shown as examples) are connected to server 200 via network 300. Network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both. Additionally, the protein processing system 100 includes a database 500 for providing data support to server 200; and... Figure 1 The example shown illustrates a scenario where the database 500 is independent of the server 200. However, the database 500 can also be integrated into the server 200, and this embodiment does not limit this to the specific case.
[0083] Terminal 600 is used to determine the first amino acid sequence of the protein to be processed, which is the amino acid sequence included in the protein to be processed when no mutation has occurred; to fuse the second preset variant type and the first amino acid sequence to obtain a second fused sequence; to send the second fused sequence to server 200 via network 300; and to receive the second amino acid sequence sent by server 200 via network 300, which is the amino acid sequence included in the first protein variant of the second preset variant type; and to display the second amino acid sequence (graphical interfaces 600-11 and 600-21 are shown as examples).
[0084] Server 200 is configured to: determine the first amino acid sequence of a first protein sample, wherein the first amino acid sequence is the amino acid sequence included in the first protein sample when no mutation has occurred; fuse the first preset variant type and the first amino acid sequence to obtain a first fusion sequence, wherein the first preset variant type is a preset type of protein variant of the first protein sample; predict the first fusion sequence using a protein prediction model to be trained to obtain a second amino acid sequence, wherein the second amino acid sequence is the amino acid sequence included in the protein variant of the first preset variant type; determine a first loss value for the protein prediction model to be trained based on the second amino acid sequence and a preset third amino acid sequence; and adjust the parameters of the protein prediction model to be trained based on the first loss value to obtain a trained protein prediction model. Server 200 is also configured to: receive a second fusion sequence sent by terminal 600 via network 300; obtain the second amino acid sequence of the second fusion sequence through the trained protein prediction model; and send the second amino acid sequence to terminal 600 via network 300.
[0085] In some embodiments, server 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminals and servers can be connected directly or indirectly via wired or wireless communication, which is not limited in this embodiment.
[0086] See Figure 2 , Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; as shown... Figure 2 As shown, electronic device 400 (including Figure 1 The terminal 600 and server 200 in the device 400 include: at least one processor 410, memory 450, at least one network interface 420, and user interface 430. Various components in the electronic device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 2 The general labeled all buses as Bus System 440.
[0087] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0088] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0089] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.
[0090] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.
[0091] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0092] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0093] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, Wi-Fi, and Universal Serial Bus (USB), etc.
[0094] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;
[0095] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.
[0096] In some embodiments, the model training apparatus provided in this application can be implemented in software. Figure 2 A model training apparatus 455 stored in memory 450 is shown. This apparatus can be software in the form of programs and plugins, and includes the following software modules: a first data determination module 4551, a first information fusion module 4552, an information prediction module 4553, a loss determination module 4554, and a parameter adjustment module 4555. These modules are logically connected and can therefore be arbitrarily combined or further split according to their implemented functions. In some embodiments, the protein processing apparatus provided in this application can be implemented in software. Figure 2 A protein processing device 456 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a second data determination module 4561, a second information fusion module 4562, a feature encoding module 4563, a feature decoding module 4564, and a data application module 4565. These modules are logically linked and can therefore be arbitrarily combined or further divided according to their implemented functions. The functions of each module will be described below.
[0097] In some embodiments, the apparatus provided in this application can be implemented in hardware. For example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0098] In some embodiments, the terminal or server can implement the methods provided in the embodiments of this application by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be microprogram-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in an operating system; they can be native applications (APPs), i.e., programs that need to be installed in the operating system to run, such as a protein variant prediction APP; or they can be applets that can be embedded in any APP, i.e., programs that only need to be downloaded to a browser environment to run. In summary, the aforementioned computer-executable instructions can be any form of instruction, and the aforementioned computer programs can be any form of application, module, or plugin.
[0099] The model training method and protein processing method provided in this application will be described below with reference to exemplary applications and implementations of the electronic device provided in the embodiments of this application. Furthermore, the model training method and protein processing method provided in the embodiments of this application are applicable to various protein processing scenarios such as cloud technology, artificial intelligence, education, and healthcare.
[0100] See Figure 3 , Figure 3 This is a flowchart illustrating the model training method provided in the embodiments of this application. Figure 1 ,in, Figure 3 The main entity executing each step is the electronic device used for model training (hereinafter referred to as the model training device); the following will combine... Figure 3 The steps shown are explained.
[0101] Step 101: Determine the first amino acid sequence of the first protein sample.
[0102] In this embodiment of the application, the model training device is used to train a protein prediction model to be trained; thus, after obtaining the protein prediction model to be trained, the model training device first obtains the first training data for training the protein prediction model to be trained; the first training data includes a first protein sample, which is a raw protein that has not undergone mutation, and is a protein sample used to train the protein prediction model to be trained; here, the model training device obtains the amino acid sequence of the first protein sample, thus obtaining the first amino acid sample sequence.
[0103] It should be noted that the protein prediction model to be trained is an artificial neural network model used to predict protein variants. It can be a pre-built model or a pre-trained model, etc., and this application does not limit this. Furthermore, the protein prediction model to be trained is a sequence-to-sequence model, such as a sequence-to-sequence model using a recurrent neural network as the encoder and decoder, a Long Short-Term Memory (LSTM) model, a Gated Recurrent Unit (GRU) model, or a sequence-to-sequence model based on a self-attention mechanism. The first amino acid sample sequence is the basic sequence of the protein and the basic sequence of the first protein sample, that is, the amino acid sequence included in the first protein sample when no mutation has occurred. For example, it is an amino acid sequence composed of 20 different amino acids arranged in a specific order. Therefore, the first amino acid sample sequence is a sequence composed of first amino acid samples, and each first amino acid sample in the first amino acid sample sequence is an amino acid constituting the first protein sample.
[0104] Step 102: Fuse the first preset variant type and the first amino acid sample sequence to obtain the first fusion sequence.
[0105] In this embodiment of the application, the first training data acquired by the model training device also includes a first preset variant type. Since the protein prediction model to be trained predicts protein variants by combining information on both variant type and protein base sequence, and the first preset variant type is the variant type of the first protein sample, and the first amino acid sample sequence is the base sequence of the first protein sample, the model training device, after obtaining the first preset variant type and the first amino acid sample sequence, fuses the first preset variant type and the first amino acid sample sequence, and the fusion result is called the first fusion sequence.
[0106] It should be noted that the first preset variant type is a preset type of protein variant of the first protein sample, and can be any protein variant type of the first protein sample, such as various Variant types, various Isoform types, various PTM types, etc. Here, the model training device can achieve the fusion of the first preset variant type and the first amino acid sample sequence in the following ways: splicing the first preset variant type and the first amino acid sample sequence, splicing the first preset variant type with each first amino acid sample in the first amino acid sample sequence one by one, accumulating the vector representation of the first preset variant type with the vector representation of each first amino acid sample in the first amino acid sample sequence one by one, etc., the embodiments of this application do not limit this. The first fusion sequence is data in sequence form. Each sequence element in the first fusion sequence is determined based on the fusion method of the first preset variant type and the first amino acid sample sequence. For example, when the fusion method is to splice the first preset variant type and the first amino acid sample sequence, the sequence element in the first fusion sequence is either the first preset variant type or the first amino acid sample. When the fusion method is to splice the first preset variant type with each first amino acid sample in the first amino acid sample sequence one by one, the sequence element in the first fusion sequence is the first preset variant type and each first amino acid sample. When the fusion method is to accumulate the vector representation of the first preset variant type and the vector representation of each first amino acid sample in the first amino acid sample sequence one by one, the sequence element in the first fusion sequence is the result of accumulating the vector representation of the first preset variant type and the vector representation of each first amino acid sample. In addition, when the model training device achieves fusion by splicing the first preset variant type and the first amino acid sample sequence, the first preset variant type can be used as the first sequence element of the first fusion sequence, and the first amino acid sample in the first amino acid sample sequence can be used as the sequence element after the first sequence element of the first fusion sequence. In this way, the influence of the first preset variant type on the first fusion sequence can be improved, so as to accurately predict the protein variant of the first preset variant type.
[0107] For example, when the model training device achieves fusion of the first preset variant type and the first amino acid sample sequence by splicing the first preset variant type, if the first preset variant type is PTM type 1 and the first amino acid sample sequence is {amino acid 1, amino acid 2, amino acid 3... amino acid 10}, then the first fusion sequence is {PTM type 1, amino acid 1, amino acid 2, amino acid 3... amino acid 10}.
[0108] Step 103: Predict the first fusion sequence using the protein prediction model to be trained, and obtain the second amino acid sample sequence.
[0109] In this embodiment, the model training device performs the following processing using the protein prediction model to be trained: predicting a protein variant of a first preset variant type based on the first fusion sequence, and using the predicted amino acid sequence as the amino acid sequence of the predicted protein variant. Here, the predicted amino acid sequence is referred to as the second amino acid sample sequence. Since the first fusion sequence is sequence data, the protein prediction model to be trained is used to process the sequence data. Therefore, the model training device inputs the first fusion sequence into the protein prediction model to be trained, and thus outputs the second amino acid sample sequence.
[0110] It should be noted that the second amino acid sample sequence is the amino acid sequence included in the protein variant of the first preset variant type, and the second amino acid sample sequence is the amino acid sequence included in the protein variant of the first protein sample, and each sequence element of the second amino acid sample sequence is a second amino acid sample.
[0111] In step 103 of this application embodiment, the model training device predicts the first fusion sequence through the protein prediction model to be trained to obtain the second amino acid sample sequence, including: the model training device first encodes the first fusion sequence through the first encoder in the protein prediction model to be trained to obtain the first protein variant sample feature; and then decodes the first protein variant sample feature through the first decoder in the protein prediction model to be trained to obtain the second amino acid sample sequence.
[0112] It should be noted that since the protein prediction model to be trained is a sequence-to-sequence model, it includes its own encoder and decoder. The first encoder is the encoder of the protein prediction model to be trained, and the first decoder is the decoder. Here, the model training device encodes the first fusion sequence using the first encoder to extract its semantic features, which are then referred to as the first protein variant sample features. It is easy to see that the first protein variant sample features represent the features of a protein variant of a first preset variant type. Next, the model training device decodes the first protein variant sample features using the first decoder to convert them into the corresponding amino acid sequence, thus obtaining the second amino acid sample sequence.
[0113] Understandably, since the first encoder can effectively process sequence data, it can convert the first fused sequence into a fixed-length context vector, which helps to capture key features and long-distance dependencies in the sequence. The first decoder can flexibly generate the amino acid sequence of the protein variant based on the context vector generated by the encoder. In this way, the protein prediction model to be trained can adapt to different variant types and generate diverse protein variants, thereby improving the prediction accuracy of protein variants.
[0114] Step 104: Based on the second amino acid sample sequence and the preset third amino acid sample sequence, determine the first loss value of the protein prediction model to be trained.
[0115] In this embodiment, the model training device can obtain the amino acid sequence of the protein variant that corresponds to both the first protein sample and the first preset variant type, which is the preset third amino acid sample sequence. The model training device then compares the second amino acid sample sequence with the preset third amino acid sample sequence to determine the first loss value of the protein prediction model to be trained based on the difference between the two sequences. Here, the model training device can preset a corresponding loss function (e.g., a crossover loss function) for the protein prediction model to be trained. Therefore, the loss value corresponding to the second and third amino acid sample sequences can be calculated using this loss function, which is the first loss value.
[0116] It should be noted that the preset third amino acid sample sequence is preset data and is a reference amino acid sequence included in the protein variant of the first preset variant type; the first preset variant type can be obtained by obtaining the type of protein variant corresponding to the preset third amino acid sample sequence.
[0117] In step 104 of this embodiment, when calculating the first loss value using the cross-entropy loss function, the model training device determines the first loss value of the protein prediction model to be trained based on the second amino acid sample sequence and a preset third amino acid sample sequence. This includes: the model training device first obtains the vector representation of each second amino acid sample in the second amino acid sample sequence, and combines the vector representations of each second amino acid sample into a first amino acid vector sequence; and obtains the vector representation of each third amino acid sample in the preset third amino acid sample sequence, and combines the vector representations of each third amino acid sample into a second amino acid vector sequence; then, based on the first amino acid vector sequence and the second amino acid vector sequence, it determines the sub-loss values corresponding to multiple amino acid pairs respectively; finally, it accumulates the sub-loss values corresponding to multiple amino acid pairs respectively to obtain the first loss value of the protein prediction model to be trained.
[0118] It should be noted that when the model training device calculates the first loss value based on the second amino acid sample sequence and the preset third amino acid sample sequence, it first represents the amino acids of each of the second amino acid sample sequence and the preset third amino acid sample sequence as vectors. Here, each first amino acid vector in the first amino acid vector sequence is the vector representation of the corresponding second amino acid sample in the second amino acid sample sequence, and each second amino acid vector in the second amino acid vector sequence is the vector representation of the corresponding third amino acid sample in the third amino acid sample sequence. The vector representation can be, for example, one-hot encoding. An amino acid pair includes second and third amino acid samples in the same order, where the order refers to the order of elements in the second and third amino acid sample sequences. For example, the j-th second amino acid sample in the second amino acid sample sequence and the j-th third amino acid sample in the third amino acid sample sequence form an amino acid pair, where j is a positive integer variable. Furthermore, the model training device determines sub-loss values for multiple amino acid pairs based on the first and second amino acid vector sequences. This includes: for each amino acid pair, the model training device determines the negative log-likelihood between the first amino acid vector of the second amino acid sample and the second amino acid vector of the third amino acid sample, thus obtaining the negative log-likelihood for each amino acid pair, and using this negative log-likelihood as the sub-loss value. The negative log-likelihood is obtained by calculating the negative of the product of the logarithms of the first and second amino acid vectors.
[0119] It is understandable that when the first loss value between the second amino acid sample sequence and the preset third amino acid sample sequence is calculated using the cross-entropy loss function, the difference between the second amino acid sample sequence and the preset third amino acid sample sequence can be effectively measured. This enables the protein prediction model to be trained to accurately learn the amino acid sequence of the protein variant, thereby improving the accuracy of protein variant prediction.
[0120] In this embodiment of the application, the model training device can also compare the second amino acid sample sequence and the third amino acid sample sequence in sequence to obtain sub-loss values corresponding to multiple amino acid pairs respectively; that is, by traversing the second amino acid sample sequence and the third amino acid sample sequence j, it is determined whether the j-th second amino acid sample and the j-th third amino acid sample are the same. If they are the same, the sub-loss value is the first preset loss value (e.g., 0). If they are different, the sub-loss value is the second preset loss value (e.g., a preset loss value greater than 0).
[0121] Step 105: Adjust the parameters of the protein prediction model to be trained based on the first loss value to obtain the trained protein prediction model.
[0122] In this embodiment of the application, since the first loss value obtained by the model training device is the loss value of the protein prediction model to be trained, the model training device performs backpropagation in the protein prediction model to be trained based on the first loss value in order to adjust the parameters of the protein prediction model to be trained, thereby adjusting the model parameters of the protein prediction model to be trained; the protein prediction model to be trained after the parameter adjustment is the trained protein prediction model.
[0123] It should be noted that the training of the protein prediction model to be trained includes the determination of the first loss value and the process of adjusting the parameters of the protein prediction model to be trained based on the first loss value. Here, the model training device can train the protein prediction model to be trained in a single run or iteratively. When the first iteration termination condition is met, the training ends, and the protein prediction model to be trained in the last iteration is determined as the trained protein prediction model. The first iteration termination condition can be greater than the first accuracy index threshold, greater than the first iteration number threshold, greater than the first iteration duration threshold, or a combination of the above, etc. This application embodiment does not limit this. The first accuracy index threshold, the first iteration number threshold, and the first iteration duration threshold can be set manually or determined through statistical data. This application embodiment does not limit this.
[0124] See Figure 4 , Figure 4 This is a flowchart illustrating the model training method provided in the embodiments of this application. Figure 2 ,in, Figure 4 The main entity executing each step is the model training device; such as Figure 4 As shown in the embodiment of this application, step 105 can be implemented through steps 1051 to 1053; that is, the model training device adjusts the parameters of the protein prediction model to be trained based on the first loss value to obtain the trained protein prediction model, including steps 1051 to 1053. Each step is described below.
[0125] Step 1051: Using the protein prediction model to be trained, predict the sequence of the first amino acid sample to obtain a set of predicted modification sites.
[0126] In this embodiment of the application, the protein prediction model to be trained is also used to predict modification sites; here, the first encoder of the protein prediction model to be trained is not only used to output the first protein variant sample features of the first fusion sequence, but also used to output the predicted modification site set of the first amino acid sample sequence; thus, the model training device can also predict the modification sites of the first amino acid sample sequence through the protein prediction model to be trained; that is, the model training device inputs the first amino acid sample sequence into the first encoder of the protein prediction model to be trained, and can output the predicted modification site set.
[0127] It should be noted that the set of predicted modification sites includes at least one predicted modification site. A predicted modification site is the predicted location of the amino acid in the first protein sample that has been mutated, and is a possible modification site.
[0128] Step 1052: Based on the predicted modification site set and the preset modification site set of the first protein sample, determine the second loss value of the protein prediction model to be trained.
[0129] In this embodiment, the model training device can pre-obtain the position of at least one post-translational modified amino acid in a first protein sample, and these at least one modified site combines to form a preset set of modified sites. Thus, the preset set of modified sites includes at least one preset modified site, which is the position of the post-translational modified amino acid in the first protein sample. Here, the model training device calculates the loss value of the protein prediction model to be trained in predicting modified sites based on the difference between the predicted set of modified sites and the preset set of modified sites, thus obtaining a second loss value.
[0130] It should be noted that the model training device can first determine the predicted modification site sequence corresponding to the predicted modification site set and the preset modification site sequence corresponding to the preset modification site set based on the order of the first amino acid sample in the first amino acid sample sequence; then, the predicted modification site sequence is represented as a predicted modification site vector sequence and the preset modification site sequence is represented as a preset modification site vector sequence; finally, by using the process of determining the first loss value based on the first amino acid vector sequence and the second amino acid vector sequence, the loss value of the predicted modification site vector sequence and the preset modification site vector sequence is calculated, thus obtaining the second loss value.
[0131] It should also be noted that the model training device can also calculate the second loss value by determining whether each predicted modification site in the predicted modification site set belongs to the preset modification site set; that is, the model training device determines the loss value of each predicted modification site by determining whether each predicted modification site belongs to the preset modification site set. For example, if it belongs, the loss value is 0, and if it does not belong, the loss value is a preset value greater than 0. In this way, multiple loss values of the predicted modification site set can be obtained, and the second loss value can be obtained by accumulating these multiple loss values.
[0132] Step 1053: Adjust the parameters of the protein prediction model to be trained based on the second loss value and the first loss value to obtain the trained protein prediction model.
[0133] It should be noted that the model training device uses the second loss value and the first loss value to adjust the parameters of the protein prediction model to be trained; it can first integrate the second loss value and the first loss value into a target loss value, and then adjust the parameters of the protein prediction model to be trained based on the target loss value; wherein, the model training device can integrate the second loss value and the first loss value into a target loss value by addition, or by weighted summation, etc., and the embodiments of this application do not limit this.
[0134] Understandably, by utilizing the correlation between different prediction tasks to adjust parameters, the overall performance of the model in the prediction task can be improved. Therefore, by combining the first loss value of the protein variant prediction dimension and the second loss value of the modification site prediction dimension to adjust the parameters of the protein prediction model to be trained, the prediction accuracy of both protein variants and modification sites can be improved, while reducing the resource consumption of the model training process.
[0135] It can also be understood that, for a first protein sample, the first amino acid sequence of the protein before mutation is obtained, and then the first preset variant type of the protein variant generated by the mutation is obtained; by using the first preset variant type as guiding information for protein variant prediction, the protein prediction model to be trained is trained based on the first fusion sequence obtained by fusing the first amino acid sample sequence and the first preset variant type to predict the amino acid sequence of the protein variant, thus obtaining the trained protein prediction model; this trained protein prediction model includes the ability to predict the amino acid sequence of the protein variant based on the unmutated amino acid sequence of the protein and the preset type of the protein variant, thereby enabling rapid prediction of protein variants through the trained protein prediction model; therefore, it can improve the efficiency of protein variant acquisition.
[0136] See Figure 5 , Figure 5 This is a flowchart illustrating the model training method provided in the embodiments of this application. Figure 3 ,in, Figure 5 The main entity executing each step is the model training device; such as Figure 5 As shown in the embodiment of this application, steps 106 to 110 are included before step 103; that is, before the model training device predicts the first fusion sequence through the protein prediction model to be trained and obtains the second amino acid sample sequence, the model training method includes steps 106 to 110. Each step is described below.
[0137] Step 106: Segment the fourth amino acid sequence of the second protein sample to obtain the first segmented sample sequence.
[0138] In this embodiment, to convert the fourth amino acid sample sequence into a data format suitable for model processing, the model training device performs word segmentation on the fourth amino acid sample sequence, and the resulting word segmentation is the first segmented sample sequence. Since the fourth amino acid sample sequence is the amino acid sequence of a protein variant, and protein variants are generated due to amino acid mutations, isomerism, or modifications in the basic sequence of a protein, the model training device can perform word segmentation on the fourth amino acid sample sequence based on the fourth amino acid sample and the post-translational modification type (i.e., the type of modification). Therefore, the sequence elements of the first segmented sample sequence can be either the fourth amino acid sample or the post-translational modification type on the fourth amino acid sample. Word segmentation refers to treating each amino acid in the amino acid sequence and its post-translational modification type as a separate word segmentation unit.
[0139] It should be noted that when the protein prediction model to be trained is a pre-trained model, the model training device is also used to perform model pre-training to obtain the protein prediction model to be trained. The second training data for model pre-training includes the fourth amino acid sample sequence of the second protein sample. The second protein sample is a raw protein that has not undergone mutation, and the fourth amino acid sample sequence is the amino acid sequence of a protein variant of the second protein sample, and the sequence elements of the fourth amino acid sample sequence are the fourth amino acid sample.
[0140] In step 106 of this embodiment, the model training device segments the fourth amino acid sample sequence of the second protein sample to obtain a first segmented sample sequence. This includes: the model training device first determines the target fourth amino acid sample to be post-translational modified from the fourth amino acid sample sequence of the second protein sample; then, based on the post-translational modification type, it marks the target fourth amino acid sample in the fourth amino acid sample sequence to obtain a fifth amino acid sample sequence; finally, based on the amino acid and the post-translational modification type, it segments the fifth amino acid sample sequence to obtain the first segmented sample sequence.
[0141] It should be noted that when segmenting the fourth amino acid sample sequence using the fourth amino acid sample and the post-translational modification type, the model training device first identifies the fourth amino acid samples in the fourth amino acid sample sequence that have undergone post-translational modification, and refers to the post-translational modified fourth amino acid samples as target fourth amino acid samples. Next, the corresponding post-translational modification type is labeled on each target fourth amino acid sample in the fourth amino acid sample sequence; the fifth amino acid sample sequence is then the fourth amino acid sample sequence labeled with the post-translational modification type. Finally, in the fifth amino acid sample sequence, both the fifth amino acid sample and the post-translational modification type are treated as separate words to segment the fifth amino acid sample sequence. It is easy to see that the fourth amino acid sample refers to the fifth amino acid sample that has not undergone post-translational modification or the fifth amino acid sample that has undergone post-translational modification but whose post-translational modification type has been removed. Furthermore, labeling the target fourth amino acid sample refers to labeling the post-translational modification type of the target fourth amino acid sample.
[0142] Understandably, by segmenting words based on amino acids and post-translational modification types, the accuracy of information about each amino acid in a protein variant can be improved, and the learning of post-translational modification types can also be achieved. Based on the acquired and learned information, the training accuracy and convergence efficiency of the protein prediction model to be trained can be improved.
[0143] Step 107: Perturb the first word segmentation sample sequence to obtain the second word segmentation sample sequence.
[0144] It should be noted that perturbing the first segmented word sample sequence in the model training device refers to perturbing the amino acids in the first segmented word sample sequence to obtain a first segmented word sample sequence carrying noise. This first segmented word sample sequence carrying noise is referred to as the second segmented word sample sequence. The perturbation refers to modifying the amino acids in the first segmented word sample sequence.
[0145] In this embodiment of the application, the model training device perturbs the first segmented word sample sequence to obtain the second segmented word sample sequence, including: the model training device performs at least one of the following perturbations on the first segmented word sample sequence to obtain the second segmented word sample sequence: masking, replacement, deletion, filling, copying, and fusion.
[0146] It should be noted that masking refers to masking at least one amino acid in the first segmented sample sequence, replacement refers to replacing at least one amino acid in the first segmented sample sequence with a specified marker (e.g., specified amino acid, [MASK], etc.), deletion refers to deleting at least one amino acid in the first segmented sample sequence, filling refers to filling at least one amino acid in the first segmented sample sequence, copying refers to inserting at least one amino acid copied from the first segmented sample sequence into the first segmented sample sequence, and fusion refers to fusing at least two adjacent amino acids in the first segmented sample sequence into one amino acid.
[0147] Understandably, since protein mutations occur due to at least one of the following perturbations on the amino acid sequence: masking, substitution, deletion, padding, duplication, and fusion, the model training device uses this at least one perturbation as a biological prior. By perturbing the amino acids in the first segmented sample sequence with this at least one perturbation, it simulates the process of protein mutation to obtain protein variants. This improves the quality of pre-training data and, consequently, the accuracy of model pre-training.
[0148] Step 108: Reconstruct the second segmented word sample sequence using the protein semantic model to be trained to obtain the third segmented word sample sequence.
[0149] In this embodiment, the artificial neural network model to be pre-trained is a protein semantic model to be trained. This model is used to predict the amino acid sequence of a protein variant before perturbation, given the amino acid sequence of the perturbated variant. Here, when the model training device reconstructs the second segmented sample sequence using the protein semantic model to be trained, it inputs the second segmented sample sequence into the model, and the output is the third segmented sample sequence. The second segmented sample sequence is the segmentation result of the reconstructed amino acid sequence of the protein variant, which is the predicted second segmented sample sequence before perturbation. It is easy to see that the reconstruction of the second segmented sample sequence refers to the processing of the predicted second segmented sample sequence before perturbation.
[0150] It should be noted that the protein semantic model to be trained can be originally constructed or pre-trained, etc., and this application does not limit this. In addition, the protein prediction model to be trained is a sequence-to-sequence model, such as a sequence-to-sequence model that uses a recurrent neural network as the encoder and decoder, an LSTM model, a GRU model, a sequence-to-sequence model based on a self-attention mechanism, etc.
[0151] In this embodiment of the application, the model training device reconstructs the second segmented sample sequence using a protein semantic model to be trained, thereby obtaining a third segmented sample sequence. This process includes: the model training device first encodes the second segmented sample sequence using a second encoder in the protein semantic model to be trained, obtaining second protein variant sample features; then, it decodes the second protein variant sample features using a second decoder in the protein semantic model to be trained, obtaining the third segmented sample sequence. The reconstruction process includes encoding by the second encoder and decoding by the second decoder.
[0152] It should be noted that since the protein semantic model to be trained is a sequence-to-sequence model, it includes its own encoder and decoder. The second encoder is the encoder of the protein semantic model to be trained, and the second decoder is the decoder. Here, the model training device encodes the second segmented sample sequence using the second encoder to extract its semantic features, which are then referred to as the second protein variant sample features. It is easy to see that the second protein variant sample features represent the features of the protein variants of the second protein sample. Next, the model training device decodes the second protein variant sample features using the second decoder to convert them into the corresponding amino acid sequence segmentation results, thus obtaining the third segmented sample sequence.
[0153] Understandably, since the second encoder can effectively process sequence data, it can convert the second segmented sample sequence into a fixed-length context vector, which helps to capture key features and long-distance dependencies in the sequence. The second decoder can then accurately reconstruct the segmentation results of the amino acid sequence of the protein variant based on the context vector generated by the second encoder.
[0154] In this embodiment of the application, before the model training device decodes the features of the second protein variant sample through the second decoder in the protein semantic model to be trained to obtain the third segmented sample sequence, the model training method further includes: the model training device performs at least one of the following processes on the first segmented sample sequence to obtain the fourth segmented sample sequence: preset sequence marker addition and upper triangular mask matrix processing.
[0155] It should be noted that "preset sequence marker addition" refers to the addition of start and end markers to the sequence in natural language processing. "Upper triangular mask matrix processing" refers to the application of an upper triangular mask matrix; where the upper triangular part (i.e., elements above the main diagonal) is masked (e.g., assigned specific values or markers), while the lower triangular part remains unchanged. By applying upper triangular mask matrix processing to the first segmented sample sequence, the focus during processing of the first segmented sample sequence is on information preceding the current first segmented sample. The fourth segmented sample sequence is the first segmented sample sequence after at least one of the preset sequence marker addition and upper triangular mask matrix processing.
[0156] Accordingly, the model training device decodes the features of the second protein variant sample through the second decoder in the protein semantic model to be trained, and obtains the third word segmentation sample sequence, including: decoding the features of the second protein variant sample and the fourth word segmentation sample sequence through the second decoder in the protein semantic model to be trained, and obtaining the third word segmentation sample sequence.
[0157] It should be noted that during the decoding process of the protein semantic model to be trained, the fourth segmented sample sequence is used as the decoding target to assist in decoding the features of the second protein variant sample into the third segmented sample sequence.
[0158] It is understandable that since the fourth segmented sample sequence is obtained from the first segmented sample sequence, the fourth segmented sample sequence is used as the decoding target during the decoding process to help decode the second protein variant sample features into the third segmented sample sequence. This makes the decoded third segmented sample sequence close to the first segmented sample sequence, thereby improving the model's pre-training efficiency and accuracy.
[0159] Step 109: Based on the third segmentation sample sequence and the first segmentation sample sequence, determine the third loss value of the protein semantic model to be trained.
[0160] It should be noted that since the third segmented sample sequence is the reconstruction result of the second segmented sample sequence, and the second segmented sample sequence is the perturbation result of the first segmented sample sequence, the model training device can determine the reconstruction accuracy of the protein semantic model to be trained by comparing the third segmented sample sequence with the first segmented sample sequence. Here, the model training device determines the third loss value of the trained protein semantic model based on the difference between the third segmented sample sequence and the first segmented sample sequence. The model training device can preset a corresponding loss function (e.g., a cross-loss function) for the protein semantic model to be trained, and thus, the loss value corresponding to the third segmented sample sequence and the first segmented sample sequence can be calculated using this loss function; this is the third loss value.
[0161] In this embodiment, when calculating the third loss value using the cross-entropy loss function, the calculation process of the third loss value is similar to that of the first loss value, and will not be repeated here. In addition, when calculating the third loss value based on the order comparison between the third segmented sample sequence and the first segmented sample sequence, the calculation process of the third loss value is also similar to that of the first loss value, and will not be repeated here.
[0162] Step 110: Adjust the parameters of the protein semantic model to be trained based on the third loss value to obtain the protein prediction model to be trained.
[0163] In this embodiment, since the third loss value obtained by the model training device is the loss value of the protein semantic model to be trained, the model training device performs backpropagation on the protein semantic model to be trained based on the third loss value to adjust the parameters of the protein semantic model to be trained, thereby adjusting the model parameters of the protein semantic model to be trained; the protein semantic model to be trained after parameter adjustment is the protein prediction model to be trained. It is easy to see that the trained protein semantic model is the protein prediction model to be trained.
[0164] It should be noted that the training of the protein semantic model to be trained includes the determination of the third loss value and the process of adjusting the parameters of the protein semantic model to be trained based on the third loss value. Here, the training device can train the protein semantic model to be trained in a single run or iteratively. When the second iteration termination condition is met, the training ends, and the protein semantic model trained in the last iteration is determined as the protein prediction model to be trained. The second iteration termination condition can be greater than the second accuracy index threshold, greater than the second iteration number threshold, greater than the second iteration duration threshold, or a combination of the above, etc. This application embodiment does not limit this. The second accuracy index threshold, the second iteration number threshold, and the second iteration duration threshold can be set manually or determined through statistical data. This application embodiment does not limit this.
[0165] Understandably, training the protein semantic model to be trained using the fourth amino acid sample sequence of the protein variant from the second protein sample enables the obtained protein prediction model to accurately acquire the semantics of the protein variant, providing a knowledge base for the prediction of protein variants. In addition, during the training process of the protein semantic model to be trained, segmentation by amino acids and post-translational modification types, as well as perturbation of the first segmented sample sequence by simulating protein mutation, all improve the modeling ability of the protein prediction model to be trained for protein variants.
[0166] See Figure 6 , Figure 6 This is a schematic flowchart of the protein processing method provided in the embodiments of this application. Figure 1 ,in, Figure 6 The main entity executing each step in the process is an electronic device used for protein processing (hereinafter referred to as the protein processing device); the following will combine... Figure 6 The steps shown are explained.
[0167] Step 111: Determine the first amino acid sequence of the protein to be processed.
[0168] In this embodiment, the protein to be processed is a raw, unmutated protein. The protein processing device obtains the amino acid sequence of the protein to be processed, thus obtaining the first amino acid sequence. The first amino acid sequence is the basic sequence of the protein and the basic sequence of the first protein sample. Therefore, the first amino acid sequence is the amino acid sequence of the protein to be processed when it has not undergone mutation. For example, it is an amino acid sequence composed of 20 different amino acids arranged in a specific order. Thus, the first amino acid sequence is a sequence composed of first amino acids, and each first amino acid in the first amino acid sequence is an amino acid used to constitute the protein to be processed.
[0169] It should be noted that the process by which the protein processing equipment determines the first amino acid sequence of the protein to be processed is similar to the process by which the model training equipment determines the first amino acid sequence of the first protein sample.
[0170] Step 112: Fuse the second preset variant type and the first amino acid sequence to obtain the second fusion sequence.
[0171] In this embodiment of the application, the protein processing device predicts protein variants by combining information on both variant type and the basic sequence of the protein. The second preset variant type is a preset type of protein variant of the protein to be processed, and the first amino acid sequence is the basic sequence of the protein to be processed. Therefore, after obtaining the second preset variant type and the first amino acid sequence, the protein processing device begins to predict the protein variant. Here, the protein processing device first fuses the second preset variant type and the first amino acid sequence, and the fusion result is called the second fusion sequence.
[0172] It should be noted that the second preset variant type is a preset type of protein variant of the protein to be processed, and can be any protein variant type of the protein to be processed, such as various Variant types, various Isoform types, various PTM types, etc. Here, the process of the protein processing device fusing the second preset variant type and the first amino acid sequence into a second fusion sequence is similar to the process of the model training device fusing the first preset variant type and the first amino acid sample sequence into a first fusion sequence, and will not be described again in this embodiment. It is easy to see that the sequence element of the second fusion sequence is the second preset variant type or the first amino acid; and the second preset variant type can be the first sequence element of the second fusion sequence, thus improving the utilization rate of prediction information.
[0173] Step 113: Encode the second fusion sequence to obtain the first protein variant feature.
[0174] In this embodiment, the protein processing device encodes the second fusion sequence to extract semantic features, and the extracted semantic features (i.e., the encoding result) are referred to as the first protein variant features. Here, the process of the protein processing device encoding the second fusion sequence is similar to the process of the model training device encoding the first fusion sequence.
[0175] It should be noted that the first protein variant feature represents the characteristics of a protein variant of a second preset variant type of the protein to be processed. Alternatively, the protein processing device can encode the second fusion sequence using the encoder of a trained protein prediction model to obtain the first protein variant feature.
[0176] In this embodiment of the application, the protein processing device encodes the second fusion sequence to obtain the first protein variant feature, including: the protein processing device first obtains the target vector of each sequence element in the second fusion sequence, and combines the target vectors of each sequence element into a target vector sequence; then, through iteration i, the following processing is performed: the i-th target vector and the (i-1)-th hidden state in the target vector sequence are encoded to obtain the i-th hidden state, and when i=1, the (i-1)-th hidden state is a preset hidden state; finally, when i iterates to I, the traversal of the vector sequence is completed, and the I-th hidden state obtained through iteration i is determined as the first protein variant feature.
[0177] It should be noted that the target vector is the vector representation of each sequence element in the second fusion sequence. `i` is a positive integer variable, and the protein processing device iterates through the target vector sequence starting from 1 using `i`. `i` also represents the time step in processing the target vector sequence; the `i`th time step is used to process the `i`th target vector in the target vector sequence. Therefore, the `i`th target vector is the `i`th element in the target vector sequence, the `i`th hidden state is the output obtained by encoding the `i`th target vector, and the `i-1`th hidden state is the output obtained by encoding the `i-1`th target vector. When `i` iterates to `I`, it indicates that the last target vector in the target vector sequence has been traversed. The `I`th hidden state is obtained by encoding the `I`th target vector and the `I-1`th hidden state; where `I` is the number of target vectors in the target vector sequence. Furthermore, the hidden state is the encoding result of the target vector sequence at time step `i`, containing information corresponding to the `i-1` previously input target vectors, used to process and predict the output of subsequent input target vectors.
[0178] Step 114: Decode the features of the first protein variant to obtain the second amino acid sequence.
[0179] It should be noted that the protein processing device decodes the features of the first protein variant to convert them into the corresponding amino acid sequence, thus obtaining the second amino acid sequence. The second amino acid sequence is the amino acid sequence included in the first protein variant of the second preset variant type. Here, the process of the protein processing device decoding the features of the first protein variant is similar to the process of the model training device decoding the features of the first protein variant sample. Alternatively, the protein processing device can decode the features of the first protein variant using the decoder of the trained protein prediction model to obtain the second amino acid sequence.
[0180] It is understandable that by extracting the first protein variant feature corresponding to the second preset variant type of the protein to be treated from the amino acid sequence of the protein to be treated that has not undergone mutation and the second preset variant type, the amino acid sequence of the first protein variant of the protein to be treated can be predicted based on the first protein variant feature; thus, a technical solution for automatically predicting potential protein variants based on the amino acid sequence of the protein to be treated that has not undergone mutation and the second preset variant type is realized, thereby improving the efficiency of protein variant acquisition.
[0181] In this embodiment of the application, after the protein processing device decodes the features of the first protein variant to obtain the second amino acid sequence, the protein processing method further includes: the protein processing device first performs mass spectrometry analysis on the second amino acid sequence to obtain the mass spectrum of the first protein variant; and stores the mass spectrum of the first protein variant in a variant mass spectrum library; thereby, in response to a protein variant identification request, the protein variant to be identified requested by the protein variant identification request is determined; then, based on the mass spectrum of the protein variant to be identified, a match is made in the variant mass spectrum library to obtain a target mass spectrum that matches the mass spectrum of the protein variant to be identified; finally, the protein variant to be identified is determined to be the second protein variant corresponding to the target mass spectrum.
[0182] It should be noted that after the protein processing equipment predicts the second amino acid sequence of the first protein variant, a mass spectrum of the first protein variant is obtained through mass spectrometry analysis and stored in a variant mass spectrum library for protein variant identification. Mass spectrometry analysis refers to the process of chemically or enzymatically treating protein variants to generate peptides, followed by analysis of these peptides using a mass spectrometer. The mass spectrum is a graphical representation obtained after analyzing the amino acid sequence using a mass spectrometer, used to represent information such as the mass-to-charge ratio of the protein variant or its peptides. The variant mass spectrum library includes mass spectra corresponding to multiple protein variants. A protein variant identification request is used to request the identification of an unknown protein variant. The identification process involves comparing the mass spectrum of the protein variant to be identified with the mass spectra in the variant mass spectrum library. Figure 1 If a matching mass spectrum is obtained from the variant mass spectrum library, the protein variant corresponding to the matching mass spectrum is determined to be the protein variant to be identified; if no matching mass spectrum is obtained from the variant mass spectrum library, the protein variant to be identified is determined to have failed to be identified.
[0183] It is understandable that by predicting protein variants through the basic sequence of the protein to be processed and a second preset variant type, a variant mass spectrum library of protein variants can be obtained. This enables rapid and accurate identification of the protein variant to be identified based on the variant mass spectrum library in protein variant identification applications, thereby improving the efficiency and accuracy of protein variant identification.
[0184] In this embodiment of the application, after the protein processing device encodes the second fusion sequence to obtain the first protein variant feature, the protein processing method further includes: the protein processing device calculating the feature distance between the first protein variant feature and each protein variant feature in the variant feature library; and determining at least one protein variant feature from the variant feature library whose feature distance is less than a preset feature distance.
[0185] Accordingly, after the protein processing device decodes the first protein variant feature to obtain the second amino acid sequence, the protein processing method further includes: the protein processing device determining the biological application information of the first protein variant based on the protein variant corresponding to at least one protein variant feature.
[0186] It should be noted that the variant feature library includes protein variant features corresponding to multiple protein variants. The protein processing device determines at least one protein variant feature in the variant feature library that is similar to the first protein variant feature by calculating the feature distance between the first protein variant feature and each protein variant feature in the variant feature library. The feature distance can be determined by at least one of Euclidean distance, Manhattan distance, Chebyshev distance, and cosine distance. Similarity is defined as a feature distance less than a preset feature distance, which is the maximum preset feature distance used to characterize the similarity of protein variant features. Here, since at least one protein variant feature is similar to the first protein variant feature, the protein processing device determines the biological properties of the protein variants corresponding to the at least one protein variant feature as the biological properties of the first protein variant, thus obtaining the biological application information of the first protein variant. For example, if the biological properties of the protein variants corresponding to the at least one protein variant feature are biomarkers for a disease, then the first protein variant is determined as a new biomarker for that disease; or, if the biological properties of the protein variants corresponding to the at least one protein variant feature are therapeutic targets for a disease, then the first protein variant is determined as a new therapeutic target for that disease.
[0187] It is understandable that by acquiring the first protein variant feature and the first protein variant, matching at least one protein variant feature similar to the first protein variant feature from a preset variant feature library, and determining the biological application information of the first protein variant based on the biological properties of the protein variants corresponding to the at least one protein variant feature, accurate and rapid mining of biological application information such as new biomarkers and new therapeutic targets for diseases can be achieved.
[0188] See Figure 7 , Figure 7 This is a schematic flowchart of the protein processing method provided in the embodiments of this application. Figure 2 ,in, Figure 7 The main body executing each step in the process is an electronic device used for protein processing; such as Figure 7 As shown in the embodiments of this application, steps 115 to 117 are included after step 111; that is, after the protein processing device determines the first amino acid sequence of the protein to be processed, the protein processing method further includes steps 115 to 117, and each step is described below.
[0189] Step 115: Encode the first amino acid sequence to obtain the modification site characteristics.
[0190] It should be noted that the protein processing device is also used to predict modification sites in the first amino acid sequence. The predicted modification sites are then used to form a candidate modification site set, which includes at least one candidate modification site. A candidate modification site is the position of the amino acid in the protein to be post-translationally modified. Here, the protein processing device extracts semantic features from the first amino acid sequence by encoding it, and these semantic features (i.e., the encoding results) are referred to as modification site features.
[0191] Step 116: Decode the modification site features to obtain a set of candidate modification sites for the protein to be processed.
[0192] It should be noted that since the modification site feature is the feature corresponding to the position of the amino acid to be modified in the first amino acid sequence, the protein processing device can decode the modification site feature to obtain a set of candidate modification sites for the protein to be processed.
[0193] Step 117: Perform post-translational modifications on the protein to be treated based on each candidate modification site to obtain a second protein variant.
[0194] It should be noted that since each candidate modification site in the candidate modification site set is the position of an amino acid in the protein to be post-translationally modified, the protein processing device performs post-translational modifications on the protein based on each candidate modification site, and the resulting protein variant is the second protein variant. Additionally, the protein processing device can use the encoder of a trained protein prediction model to predict the candidate modification site set for the first amino acid sequence.
[0195] Understandably, by extracting modification site features from the first amino acid sequence, a set of candidate modification sites, including at least one candidate modification site, can be predicted, improving the comprehensiveness and efficiency of modification site prediction and enabling the prediction of potential modification sites. In addition, since the prediction of the candidate modification site set is based on the overall information of the first amino acid sequence, the comprehensiveness of the information on which the modification site prediction is based is improved, thereby improving the accuracy of modification site prediction.
[0196] In this embodiment of the application, the protein processing device is further configured to determine the third amino acid sequence of the third protein variant of the protein to be processed; and based on the post-translational modification type, to label the target third amino acid in the third amino acid sequence to obtain the fourth amino acid sequence; and, based on the amino acid and the post-translational modification type, to segment the fourth amino acid sequence to obtain a segmented sequence; and finally, to encode the segmented sequence to obtain the second protein variant feature of the third protein variant.
[0197] It should be noted that the process of obtaining the segmented sequence is similar to that of obtaining the first segmented sample sequence, and the process of encoding the segmented sequence is similar to that of encoding the second segmented sample sequence; therefore, the embodiments of this application will not repeat the description here. Furthermore, the target third amino acid is the third amino acid that has been post-translational modified. The third protein variant is the protein variant for which semantic features are to be acquired, and the second protein variant feature is the semantic feature of the third protein variant. Here, the acquisition of the second protein variant feature of the third protein variant can be achieved through the first encoder of the protein prediction model to be trained.
[0198] In this embodiment of the application, after the protein processing device encodes the segmented sequence to obtain the second protein variant feature of the third protein variant, the protein processing method further includes: the protein processing device first determines the protein variant feature set of the protein variant set of the protein to be processed based on the second protein variant feature of the third protein variant; then clusters the protein variant set based on the protein variant feature set to obtain at least one protein variant subset; and finally, presents at least one protein variant subset.
[0199] It should be noted that the protein variant set includes all protein variants of the protein to be processed, and the protein variant feature set includes the features of each protein variant in the protein variant set. The protein processing device obtains the protein variant feature set of the protein variant set of the protein to be processed by combining the second protein variant features of each third protein variant of the protein to be processed. The protein processing device clusters the protein variant set using the protein variant feature set to classify the protein variant set based on the distance between protein variant features; here, each cluster is a subset of protein variants, and the protein processing device can obtain at least one subset of protein variants.
[0200] Understandably, by using the characteristics of different protein variants of the protein to be treated, clustering the different protein variants of the protein to be treated and presenting the clustering results (at least one subset of protein variants), the relative distance between different protein variants of the same protein can be visualized. In addition, for each subset of protein variants, the similarity of the functions of the same type of protein in different species can be determined; and for at least one subset of protein variants, the trend of functional changes brought about by different protein variants of the same protein can be determined.
[0201] The following describes an exemplary application of the embodiments of this application in a practical application scenario. This exemplary application describes a relevant processing procedure for protein variants. It is readily apparent that the methods provided in the embodiments of this application can be applied to biomolecules such as proteins, nucleic acids, lipids, carbohydrates, and vitamins; here, proteins are used as an example of a biomolecule for illustration.
[0202] It should be noted that omics studies at the transcriptomic and genomic levels cannot determine the role of the proteome in reflecting the homeostasis of organisms and the dynamic processes of disease progression. Therefore, in-depth research on the proteome is significant for understanding life activities and disease mechanisms. Proteomics research includes multiple aspects such as protein variant recognition.
[0203] Because the same protein can produce various variants in different cell types, tissues, and disease states within an organism, and thus perform different biological functions, the proteome of an organism is dynamic and complex. For example, protein A is a phosphorylation kinase present in signaling pathways such as cell growth. When protein A is phosphorylated, the phosphorylated protein A is activated and triggers the transduction of downstream signaling pathways; while the unphosphorylated protein A is inactive. This switching of phosphorylation states can act as a switch for signal transduction and biological function. Therefore, modeling and analyzing protein variants, identifying patterns, and predicting potential unidentified protein variants are significant for life science and medical research.
[0204] In the embodiments of this application, the Seq2Seq model in the field of Natural Language Processing (NLP) is used to represent the entire sequence of a protein variant using an encoder-decoder approach and predict potential protein variants based on the basic sequence of the protein.
[0205] See Figure 8 , Figure 8 This is an exemplary logic diagram of protein processing provided in an embodiment of this application; as shown... Figure 8 As shown, the logical steps of this exemplary protein processing include data processing 8-1, data segmentation 8-2, pre-training 8-3, fine-tuning 8-4, and inference 8-5. Each step is described below.
[0206] Data processing 8-1 refers to collecting various protein variants corresponding to different proteins from databases such as the protein database (Uniprotkb) and the post-translational modification database (Dbptm), and uniformly representing each protein variant as an amino acid sequence [PTM] format. The PTM part adopts the standard chemical modification representation method, and the amino acids in the amino acid sequence that contain PTM are labeled with PTM. This achieves unified storage and representation of the three types of protein variants (PTM, Isoform, and Variant), facilitating subsequent processing and analysis. Here, a unified naming and numbering system for protein modifications (e.g., unimod) is used to represent the PTM type. This system assigns a unique number to each PTM type; therefore, the specific PTM type within the brackets [] is represented using the numbering system described by the unified naming and numbering system for protein modifications.
[0207] Data segmentation 8-2 refers to the tokenization of the protein variant corpus data before inputting it into the Seq2Seq architecture, following the data processing 8-1 steps. This tokenization uses individual amino acid segmentation and PTM (Proteinized Meta-Transformation) to ensure accurate capture of every detail within the protein variants. Tokenization is the process of dividing continuous text into meaningful segments or units. These units can be words, phrases, symbols, or other smaller semantic units. Tokenization transforms unstructured text data into a structured format, facilitating subsequent analysis and processing.
[0208] Pre-training 8-3 enables the model to learn the semantic information and distribution patterns of protein variants from the segmented sequences of data segmentation in a self-supervised pre-training manner.
[0209] In this embodiment of the application, the pre-trained model (referred to as the protein semantic model to be trained) consists of an Encoder and a Decoder, see [link to relevant documentation]. Figure 9 , Figure 9 This is an exemplary schematic diagram of model pre-training provided in an embodiment of this application; as shown... Figure 9 As shown, each protein variant 9-11 (referred to as the protein variant of the second protein sample) in the protein variant corpus data 9-1 is segmented into words to obtain a segmented sequence 9-2 (referred to as the first segmented sample sequence) for each protein variant 9-1. The segmented sequence 9-2 is perturbed (including token masking, token substitution, token deletion, and multiple text infilling) to obtain the input 9-4 (referred to as the second segmented sample sequence) of the encoder 9-31 (referred to as the second encoder) in the pre-trained model 9-3. In addition, the segmented sequence 9-2 is processed sequentially with natural language segmentation (e.g., adding start or end markers) and upper triangular matrix masking (to ensure that each position focuses on the current position and previous positions, reducing the leakage of future information of subsequent positions) to obtain the input 9-51 (referred to as the fourth segmented sample sequence) of the decoder 9-32 (referred to as the second decoder) in the pre-trained model 9-3. Here, input 9-4 is fed into encoder 9-31 to obtain output 9-52 (referred to as the second protein variant sample feature); input 9-51 and output 9-52 are fed into decoder 9-32 to obtain sequence 9-6 (referred to as the third segmentation sample sequence). Finally, cross-entropy loss (referred to as the third loss value) is calculated using segmentation sequence 9-2 and sequence 9-6 to adjust the model parameters of encoder 9-31 and decoder 9-32, thus achieving pre-training of pre-trained model 9-3.
[0210] It should be noted that the embodiments of this application are based on biological priors and simulate the process of protein generating protein variants, and perform the following four perturbations on the training data; among them, a single token mask refers to a single token in the mask sequence, token replacement refers to replacing the sampled token with other tokens, token deletion refers to deleting the sampled token, and multiple token masks refer to replacing a sampled text segment with a mask token.
[0211] In the embodiments of this application, the pre-trained model after pre-training can be used for model initialization in the subsequent fine-tuning process, or it can directly accept protein variants as input, and the corresponding embedding representation has been generated by the encoder.
[0212] Fine-tuning 8-4 is used to fine-tune the pre-trained model. In this embodiment, the fine-tuned model (referred to as the protein prediction model to be trained) consists of an Encoder and a Decoder. The model parameters of the Encoder (referred to as the first encoder) in the fine-tuned model are initialized from the model parameters of the Encoder in the pre-trained model, and the model parameters of the Decoder (referred to as the first decoder) in the fine-tuned model are initialized from the model parameters of the Decoder in the pre-trained model.
[0213] See Figure 10 , Figure 10 This is an exemplary model fine-tuning diagram provided in an embodiment of this application; as shown... Figure 10 As shown, the basic protein sequence 10-2 (referred to as the first amino acid sample sequence) and protein variant type 10-3 (referred to as the first preset variant type) are input into the encoder 10-11 of the fine-tuning model 10-1 to obtain the protein variant embedding representation 10-4 (referred to as the first protein variant sample feature) and potential modification site 10-5 (referred to as the predicted modification site); then, the protein variant embedding representation 10-4 is input into the decoder 10-12 of the fine-tuning model 10-1 to obtain the potential protein variant 10-6 (referred to as the first protein variant). Here, the fine-tuning model 10-1 is a pre-trained model.
[0214] It should be noted that fine-tuning is performed on the pre-trained model so that by adding the protein variant type before the base sequence of each protein, different types of protein variants can be generated. Specifically, the protein variant type is added before the base sequence of the protein and used as input to the Encoder. The Decoder decodes the embedded representation output by the Encoder to obtain the amino acid sequence of the protein variant. Here, the amino acid sequences of known protein variants in the fine-tuning dataset (referred to as the preset third amino acid sample sequence) are used as labels, and cross-entropy is calculated as a supervision signal for model fine-tuning until convergence.
[0215] In this embodiment, since modification sites are used to achieve post-translational modification of proteins, the model fine-tuning adds a modification site prediction task to the Encoder. This task uses the confidence scores of the modification sites output by the model to determine the probability of modification occurring at different sites, and combines this with downstream tasks to achieve post-translational modification, resulting in post-translational modified protein variants. Therefore, the fine-tuning model includes two parts of output: one part is the Encoder output, used to predict modification sites and their corresponding confidence scores; the other part is the Decoder output, used to generate the amino acid sequence of the corresponding protein variant. Here, for the first part of the output, a cross-entropy loss value (referred to as the second loss value) is calculated based on each known modification site corresponding to the protein's base sequence and the Encoder output. For the second part of the output, a cross-entropy loss value (referred to as the first loss value) is calculated based on the amino acid sequence of the protein variant corresponding to the protein variant type and the amino acid sequence output by the Decoder. Finally, the final loss value for model fine-tuning is determined based on the two calculated cross-entropy loss values, and model fine-tuning is performed based on this final loss value until convergence. This allows the Encoder to accurately output modification sites, enabling both the Encoder and Decoder to learn the dynamic changes in the amino acid sequence from the basic protein sequence to protein variants.
[0216] Inference 8-5 includes inference based on pre-trained models and inference based on fine-tuned models.
[0217] On one hand, inference based on a pre-trained model is used to determine the embedding representation of a protein variant (referred to as the first protein variant feature); that is, the embedding representation of the amino acid sequence of a given protein variant is determined based on the encoder in the pre-trained model to obtain the semantic features of the protein variant. Thus, multiple protein variants can be clustered based on this embedding representation to visualize the relative distances between multiple protein variants in terms of semantic features, thereby determining the conservation of function among different protein variants of the same protein in different species, as well as the functional variation trends among different protein variants of the same protein.
[0218] On the other hand, inference based on the fine-tuned model is used to identify potential modification sites (called candidate modification sites) and potential protein variants (called first protein variants). That is, based on the fine-tuned Encoder-Decoder, potential protein variants corresponding to the protein's base sequence and protein variant type are identified, and a search database (called a variant mass spectrometry library) is built based on these potential protein variants to improve retrieval efficiency; or, based on the fine-tuned Encoder, potential modification sites in the protein's base sequence are identified, and post-translational modifications are performed on the protein based on these potential modification sites to obtain post-translational modified protein variants (called second protein variants).
[0219] Understandably, models based on the seq2seq Encoder-Decoder architecture in Natural Language Processing (NLP) process the entire amino acid sequence of protein variants during pre-training, revealing their overall semantics. They employ a unified representation of the amino acid sequences of protein variants, ensuring that pre-training data includes various types of protein variants (including PTM, isoform, and variant types). Furthermore, the use of a combination of single amino acid segmentation and PTM segmentation allows for flexible and accurate encoding of all types of protein variants. Additionally, combining pre-training with biologically sound data augmentation strategies can uncover the biological semantic patterns of protein variants, thus enabling accurate representation of protein variants. Finally, the pre-trained model is fine-tuned through conditional generation; that is, by inputting the basic protein sequence and a label for a specified protein variant type, the fine-tuned model can accurately predict potential protein variants and modification sites. Furthermore, by using pre-trained models, semantic information of protein variants can be mined from the dynamic functional level, enabling accurate acquisition of the embedding representation of protein variants; by generating potential protein variants through fine-tuned models, the identification efficiency of protein variants can be improved; by predicting modification sites through fine-tuned models, diverse protein variants can be obtained; and by acquiring the embedding representation of protein variants and predicting potential protein variants through pre-trained and fine-tuned models, new disease biomarkers or potential therapeutic targets can be revealed.
[0220] The following description continues to illustrate the exemplary structure of the model training device 455 provided in the embodiments of this application as a software module. In some embodiments, such as... Figure 2 As shown, the software modules stored in the model training device 455 in the memory 450 may include:
[0221] The first data determination module 4551 is used to determine the first amino acid sample sequence of the first protein sample, wherein the first amino acid sample sequence is the amino acid sequence included in the first protein sample when no mutation has occurred.
[0222] The first information fusion module 4552 is used to fuse the first preset variant type and the first amino acid sample sequence to obtain a first fusion sequence, wherein the first preset variant type is a preset type of protein variant of the first protein sample.
[0223] The information prediction module 4553 is used to predict the first fusion sequence through the protein prediction model to be trained, and obtain the second amino acid sample sequence, wherein the second amino acid sample sequence is the amino acid sequence included in the protein variant of the first preset variant type.
[0224] The loss determination module 4554 is used to determine the first loss value of the protein prediction model to be trained based on the second amino acid sample sequence and the preset third amino acid sample sequence.
[0225] The parameter adjustment module 4555 is used to adjust the parameters of the protein prediction model to be trained based on the first loss value, so as to obtain the trained protein prediction model.
[0226] In this embodiment of the application, the information prediction module 4553 is further configured to encode the first fusion sequence through the first encoder in the protein prediction model to be trained to obtain the first protein variant sample feature; and to decode the first protein variant sample feature through the first decoder in the protein prediction model to be trained to obtain the second amino acid sample sequence.
[0227] In this embodiment, the loss determination module 4554 is further configured to: obtain the vector representation of each second amino acid sample in the second amino acid sample sequence; combine the vector representations of each second amino acid sample into a first amino acid vector sequence; obtain the vector representation of each third amino acid sample in the preset third amino acid sample sequence; combine the vector representations of each third amino acid sample into a second amino acid vector sequence; determine sub-loss values corresponding to multiple amino acid pairs based on the first amino acid vector sequence and the second amino acid vector sequence, wherein the amino acid pairs include second amino acid samples and third amino acid samples in the same order; and accumulate the sub-loss values corresponding to the multiple amino acid pairs to obtain the first loss value of the protein prediction model to be trained.
[0228] In this embodiment, the parameter adjustment module 4555 is further configured to predict the sequence of the first amino acid sample using the protein prediction model to be trained, to obtain a set of predicted modification sites, wherein the set of predicted modification sites includes at least one predicted modification site, and the predicted modification site is the predicted position of the mutated amino acid in the first protein sample; determine a second loss value of the protein prediction model to be trained based on the set of predicted modification sites and a preset set of modification sites of the first protein sample; and adjust the parameters of the protein prediction model to be trained based on the second loss value and the first loss value to obtain the trained protein prediction model.
[0229] In this embodiment, the information prediction module 4553 is further configured to segment the fourth amino acid sample sequence of the second protein sample to obtain a first segmented sample sequence, wherein the fourth amino acid sample sequence is the amino acid sequence of a protein variant of the second protein sample; perturb the first segmented sample sequence to obtain a second segmented sample sequence, wherein the perturbation includes at least one of the following: masking, replacement, deletion, padding, duplication, and fusion; reconstruct the second segmented sample sequence using a protein semantic model to be trained to obtain a third segmented sample sequence; determine a third loss value of the protein semantic model to be trained based on the third segmented sample sequence and the first segmented sample sequence; and adjust the parameters of the protein semantic model to be trained based on the third loss value to obtain the protein prediction model to be trained.
[0230] In this embodiment of the application, the information prediction module 4553 is further configured to determine the target fourth amino acid sample that has been post-translational modified from the fourth amino acid sample sequence of the second protein sample; to label the target fourth amino acid sample in the fourth amino acid sample sequence based on the post-translational modification type, thereby obtaining a fifth amino acid sample sequence; and to segment the fifth amino acid sample sequence based on the amino acid and the post-translational modification type, thereby obtaining a first segmented sample sequence.
[0231] In this embodiment of the application, the information prediction module 4553 is further configured to encode the second segmented sample sequence through the second encoder in the protein semantic model to be trained to obtain the second protein variant sample features; and to decode the second protein variant sample features through the second decoder in the protein semantic model to be trained to obtain the third segmented sample sequence.
[0232] In this embodiment of the application, the information prediction module 4553 is further configured to perform at least one of the following processes on the first segmented sample sequence to obtain a fourth segmented sample sequence: preset sequence tag addition and upper triangular mask matrix processing.
[0233] In this embodiment of the application, the information prediction module 4553 is further configured to decode the second protein variant sample features and the fourth word segmentation sample sequence through the second decoder in the protein semantic model to be trained, so as to obtain the third word segmentation sample sequence.
[0234] The following description continues to illustrate the exemplary structure of the protein processing device 456 provided in the embodiments of this application as a software module. In some embodiments, such as... Figure 2 As shown, the software modules stored in the protein processing device 456 in the memory 450 may include:
[0235] The second data determination module 4561 is used to determine the first amino acid sequence of the protein to be processed, wherein the first amino acid sequence is the amino acid sequence included in the protein to be processed when no mutation has occurred.
[0236] The second information fusion module 4562 is used to fuse the second preset variant type and the first amino acid sequence to obtain a second fusion sequence, wherein the second preset variant type is a preset type of protein variant of the protein to be processed;
[0237] The feature encoding module 4563 is used to encode the second fusion sequence to obtain the first protein variant feature;
[0238] The feature decoding module 4564 is used to decode the features of the first protein variant to obtain a second amino acid sequence, wherein the second amino acid sequence is the amino acid sequence included in the first protein variant of the second preset variant type.
[0239] In this embodiment of the application, the feature encoding module 4563 is used to obtain the target vector of each sequence element in the second fusion sequence, and combine the target vector of each sequence element into a target vector sequence; and perform the following processing through iteration i: encode the i-th target vector and the (i-1)-th hidden state in the target vector sequence to obtain the i-th hidden state, where when i=1, the (i-1)-th hidden state is a preset hidden state, and i is a positive integer variable; when i iterates to I, the traversal of the vector sequence is completed, and the I-th hidden state obtained through iteration i is determined as the first protein variant feature, where I is the number of target vectors in the target vector sequence.
[0240] In this embodiment, the protein processing device 456 further includes a data application module 4565, configured to perform mass spectrometry analysis on the second amino acid sequence to obtain a mass spectrum of the first protein variant; store the mass spectrum of the first protein variant in a variant mass spectrum library, the variant mass spectrum library including the mass spectra corresponding to multiple protein variants respectively; in response to a protein variant identification request, determine the protein variant to be identified requested by the protein variant identification request; match the mass spectrum of the protein variant to be identified in the variant mass spectrum library to obtain a target mass spectrum that matches the mass spectrum of the protein variant to be identified; and determine that the protein variant to be identified is the protein variant corresponding to the target mass spectrum.
[0241] In this embodiment of the application, the data application module 4565 is further configured to calculate the feature distance between the first protein variant feature and each protein variant feature in the variant feature library, wherein the variant feature library includes the protein variant features corresponding to multiple protein variants respectively; determine at least one protein variant feature from the variant feature library whose feature distance is less than a preset feature distance; and determine the biological application information of the first protein variant based on the protein variants corresponding to at least one of the protein variant features respectively.
[0242] In this embodiment of the application, the data application module 4565 is further configured to encode the first amino acid sequence to obtain modification site features; decode the modification site features to obtain a set of candidate modification sites for the protein to be processed, the set of candidate modification sites including at least one candidate modification site, the candidate modification site being the position of the mutated amino acid in the protein to be processed; and perform post-translational modification on the protein to be processed based on each candidate modification site to obtain a second protein variant.
[0243] In this embodiment of the application, the data application module 4565 is further configured to: determine the third amino acid sequence of the third protein variant of the protein to be processed; label the target third amino acid in the third amino acid sequence based on the post-translational modification type to obtain a fourth amino acid sequence, wherein the target third amino acid is a post-translational modified third amino acid; segment the fourth amino acid sequence based on the amino acid and the post-translational modification type to obtain a segmented sequence; and encode the segmented sequence to obtain the second protein variant feature of the third protein variant.
[0244] In this embodiment of the application, the data application module 4565 is further configured to determine a protein variant feature set of the protein variant set of the protein to be processed based on the second protein variant feature of the third protein variant, wherein the protein variant set includes each of the protein variants of the protein to be processed, and the protein variant feature set includes the features of each of the protein variants in the protein variant set; cluster the protein variant set based on the protein variant feature set to obtain at least one protein variant subset; and present at least one protein variant subset.
[0245] This application provides a computer program product, which includes computer-executable instructions or a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions or computer program from the computer-readable storage medium and executes the computer-executable instructions or computer program, causing the electronic device to perform the model training method or protein processing method described in this application.
[0246] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the model training method provided in this application. For example, ... Figure 3 The model training method shown; or will cause the processor to execute the model training method provided in the embodiments of this application, for example, such as Figure 6 The protein processing method is shown.
[0247] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0248] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0249] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0250] As an example, computer-executable instructions can be deployed to execute on a single electronic device (in which case, this single electronic device is both a model training device and a protein processing device), or to execute on multiple electronic devices located in one location (in which case, the multiple electronic devices located in one location are both a model training device and a protein processing device), or to execute on multiple electronic devices distributed across multiple locations and interconnected via a communication network (in which case, the multiple electronic devices distributed across multiple locations and interconnected via a communication network are both a model training device and a protein processing device).
[0251] It is understood that in the embodiments of this application, data related to proteins and the like are involved. When the embodiments of this application are applied to specific products or technologies, the permission or consent of the information subject is required. The collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and conform to the principles of legality, legitimacy and necessity. It does not involve obtaining data types prohibited or restricted by laws and regulations, and will not hinder the normal operation of the target website.
[0252] In summary, this application embodiment, for a first protein sample, first obtains the first amino acid sample sequence included in the protein sample when no mutation has occurred, and then obtains the first preset variant type of the protein variant generated by the mutation; by using the first preset variant type as guiding information for protein variant prediction, and based on the first fusion sequence obtained by fusing the first amino acid sample sequence and the first preset variant type, the ability of the protein prediction model to be trained to predict the amino acid sequence of the protein variant is trained, resulting in a trained protein prediction model; this trained protein prediction model includes the ability to predict the amino acid sequence of the protein variant based on the unmutated amino acid sequence of the protein and the preset type of the protein variant, thus enabling rapid prediction of protein variants through the trained protein prediction model; therefore, it can improve the efficiency of protein variant acquisition. Furthermore, it can also improve the accuracy of predicting modification sites and the accuracy of feature representation of protein variants.
[0253] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A model training method, characterized in that, The method includes: Determine the first amino acid sequence of the first protein sample, wherein the first amino acid sequence is the amino acid sequence included in the first protein sample when no mutation has occurred; The first preset variant type and the first amino acid sample sequence are fused to obtain a first fusion sequence, wherein the first preset variant type is a preset type of protein variant of the first protein sample; The first fusion sequence is predicted using the protein prediction model to be trained, and a second amino acid sample sequence is obtained. The second amino acid sample sequence is the amino acid sequence included in the protein variant of the first preset variant type. Based on the second amino acid sample sequence and the preset third amino acid sample sequence, the first loss value of the protein prediction model to be trained is determined. Based on the first loss value, the parameters of the protein prediction model to be trained are adjusted to obtain the trained protein prediction model.
2. The method according to claim 1, characterized in that, The step of predicting the first fusion sequence using a protein prediction model to be trained to obtain the second amino acid sample sequence includes: The first fusion sequence is encoded using the first encoder in the protein prediction model to be trained, thereby obtaining the first protein variant sample features. The first protein variant sample features are decoded using the first decoder in the protein prediction model to be trained, to obtain the second amino acid sample sequence.
3. The method according to claim 1 or 2, characterized in that, The step of determining the first loss value of the protein prediction model to be trained based on the second amino acid sample sequence and the preset third amino acid sample sequence includes: Obtain the vector representation of each second amino acid sample in the second amino acid sample sequence, and combine the vector representations of each second amino acid sample into a first amino acid vector sequence; Obtain the vector representation of each third amino acid sample in the preset third amino acid sample sequence, and combine the vector representations of each third amino acid sample into a second amino acid vector sequence; Based on the first amino acid vector sequence and the second amino acid vector sequence, sub-loss values corresponding to multiple amino acid pairs are determined respectively, wherein the amino acid pairs include the second amino acid sample and the third amino acid sample in the same order; The sub-loss values corresponding to the multiple amino acid pairs are summed to obtain the first loss value of the protein prediction model to be trained.
4. The method according to any one of claims 1 to 3, characterized in that, The step of adjusting the parameters of the protein prediction model to be trained based on the first loss value to obtain the trained protein prediction model includes: The protein prediction model to be trained is used to predict the sequence of the first amino acid sample to obtain a set of predicted modification sites. The set of predicted modification sites includes at least one predicted modification site, which is the predicted location of the mutated amino acid in the first protein sample. Based on the predicted modification site set and the preset modification site set of the first protein sample, a second loss value is determined for the protein prediction model to be trained. The parameters of the protein prediction model to be trained are adjusted based on the second loss value and the first loss value to obtain the trained protein prediction model.
5. The method according to any one of claims 1 to 4, characterized in that, Before predicting the first fusion sequence using the protein prediction model to be trained to obtain the second amino acid sample sequence, the method further includes: The fourth amino acid sample sequence of the second protein sample is segmented to obtain the first segmented sample sequence, wherein the fourth amino acid sample sequence is the amino acid sequence of the protein variant of the second protein sample; The first segmented word sample sequence is perturbed to obtain the second segmented word sample sequence, wherein the perturbation includes at least one of the following: masking, replacement, deletion, padding, copying and merging; The second segmented word sample sequence is reconstructed using the protein semantic model to be trained, resulting in the third segmented word sample sequence. Based on the third segmented word sample sequence and the first segmented word sample sequence, the third loss value of the protein semantic model to be trained is determined; The parameters of the protein semantic model to be trained are adjusted based on the third loss value to obtain the protein prediction model to be trained.
6. The method according to claim 5, characterized in that, The process of segmenting the fourth amino acid sequence of the second protein sample to obtain the first segmented sample sequence includes: From the fourth amino acid sample sequence of the second protein sample, the target fourth amino acid sample that has been post-translational modified is determined; Based on the post-translational modification type, the target fourth amino acid sample in the fourth amino acid sample sequence is labeled to obtain the fifth amino acid sample sequence; Based on the amino acid and the post-translational modification type, the fifth amino acid sample sequence is segmented to obtain the first segmented sample sequence.
7. The method according to claim 5 or 6, characterized in that, The process involves reconstructing the second segmented word sample sequence using a protein semantic model to be trained, resulting in a third segmented word sample sequence, including: The second word segmentation sample sequence is encoded by the second encoder in the protein semantic model to be trained to obtain the features of the second protein variant sample. The second protein variant sample features are decoded using the second decoder in the protein semantic model to be trained, to obtain the third word segmentation sample sequence.
8. The method according to claim 7, characterized in that, Before decoding the features of the second protein variant sample using the second decoder in the protein semantic model to be trained to obtain the third segmented sample sequence, the method further includes: Perform at least one of the following processes on the first segmented word sample sequence to obtain the fourth segmented word sample sequence: preset sequence marker addition and upper triangular mask matrix processing; The process of decoding the features of the second protein variant sample using the second decoder in the protein semantic model to be trained to obtain the third word segmentation sample sequence includes: The second decoder in the protein semantic model to be trained decodes the features of the second protein variant sample and the fourth segmented sample sequence to obtain the third segmented sample sequence.
9. A protein processing method, characterized in that, The method includes: Determine the first amino acid sequence of the protein to be treated, wherein the first amino acid sequence is the amino acid sequence of the protein to be treated when no mutation has occurred; The second preset variant type and the first amino acid sequence are fused to obtain a second fusion sequence, wherein the second preset variant type is a preset type of protein variant of the protein to be processed; Encoding the second fusion sequence yields the first protein variant feature; The first protein variant feature is decoded to obtain a second amino acid sequence, which is the amino acid sequence included in the first protein variant of the second preset variant type.
10. The method according to claim 9, characterized in that, The encoding of the second fusion sequence to obtain the first protein variant feature includes: Obtain the target vector of each sequence element in the second fusion sequence, and combine the target vectors of each sequence element into a target vector sequence; The following processing is performed by iterating through i: the i-th target vector and the (i-1)-th hidden state in the target vector sequence are encoded to obtain the i-th hidden state. When i = 1, the (i-1)-th hidden state is a preset hidden state, where i is a positive integer variable. When i iterates to I, the traversal of the vector sequence is completed, and the I-th hidden state obtained by iterating i is determined as the first protein variant feature, where I is the number of target vectors in the target vector sequence.
11. The method according to claim 9 or 10, characterized in that, After decoding the first protein variant feature to obtain the second amino acid sequence, the method further includes: Mass spectrometry analysis of the second amino acid sequence yielded the mass spectrum of the first protein variant. The mass spectrum of the first protein variant is stored in a variant mass spectrum library, which includes the mass spectra corresponding to multiple protein variants respectively; In response to a protein variant identification request, determine the protein variant to be identified that the protein variant identification request requests to be identified; The mass spectrum of the protein variant to be identified is matched with the variant mass spectrum library to obtain a target mass spectrum that matches the mass spectrum of the protein variant to be identified. The protein variant to be identified is determined to be the protein variant corresponding to the target mass spectrum.
12. The method according to any one of claims 9 to 11, characterized in that, After encoding the second fusion sequence to obtain the first protein variant feature, the method further includes: Calculate the feature distance between the first protein variant feature and each protein variant feature in the variant feature library, wherein the variant feature library includes the protein variant features corresponding to multiple protein variants respectively; Determine at least one protein variant feature whose feature distance is less than a preset feature distance from the variant feature library; After decoding the first protein variant feature to obtain the second amino acid sequence, the method further includes: Based on the protein variants corresponding to at least one of the protein variant features, the biological application information of the first protein variant is determined.
13. The method according to any one of claims 9 to 12, characterized in that, After determining the first amino acid sequence of the protein to be processed, the method further includes: The first amino acid sequence is encoded to obtain the modification site features; The modification site features are decoded to obtain a set of candidate modification sites for the protein to be processed. The set of candidate modification sites includes at least one candidate modification site, which is the position of the amino acid in the protein to be modified post-translationally. The protein to be treated is post-translational modified based on each of the candidate modification sites to obtain a second protein variant.
14. The method according to any one of claims 9 to 13, characterized in that, The method further includes: Determine the third amino acid sequence of the third protein variant of the protein to be treated; Based on the post-translational modification type, the target third amino acid in the third amino acid sequence is labeled to obtain the fourth amino acid sequence, wherein the target third amino acid is the third amino acid that has been post-translationally modified. Based on the amino acid and the post-translational modification type, the fourth amino acid sequence is segmented to obtain a segmented sequence; The word segmentation sequence is encoded to obtain the second protein variant feature of the third protein variant.
15. The method according to claim 14, characterized in that, After encoding the segmented sequence to obtain the second protein variant feature of the third protein variant, the method further includes: Based on the second protein variant features of the third protein variant, a protein variant feature set of the protein variant set of the protein to be processed is determined, the protein variant set including each of the protein variants of the protein to be processed, and the protein variant feature set including the features of each of the protein variants in the protein variant set; Based on the protein variant feature set, the protein variant set is clustered to obtain at least one protein variant subset; Present at least one set of said protein variants.
16. A model training device, characterized in that, The model training device includes: The first data determination module is used to determine the first amino acid sample sequence of the first protein sample, wherein the first amino acid sample sequence is the amino acid sequence included in the first protein sample when no mutation has occurred. The first information fusion module is used to fuse the first preset variant type and the first amino acid sample sequence to obtain a first fusion sequence, wherein the first preset variant type is a preset type of protein variant of the first protein sample; The information prediction module is used to predict the first fusion sequence using a protein prediction model to be trained, and obtain a second amino acid sample sequence, wherein the second amino acid sample sequence is the amino acid sequence included in the protein variant of the first preset variant type. The loss determination module is used to determine the first loss value of the protein prediction model to be trained based on the second amino acid sample sequence and the preset third amino acid sample sequence. The parameter adjustment module is used to adjust the parameters of the protein prediction model to be trained based on the first loss value, so as to obtain the trained protein prediction model.
17. A protein processing apparatus, characterized in that, The protein processing apparatus includes: The second data determination module is used to determine the first amino acid sequence of the protein to be processed, wherein the first amino acid sequence is the amino acid sequence of the protein to be processed when no mutation has occurred. The second information fusion module is used to fuse the second preset variant type and the first amino acid sequence to obtain a second fusion sequence, wherein the second preset variant type is a preset type of protein variant of the protein to be processed; The feature encoding module is used to encode the second fusion sequence to obtain the first protein variant feature; The feature decoding module is used to decode the features of the first protein variant to obtain a second amino acid sequence, wherein the second amino acid sequence is the amino acid sequence included in the first protein variant of the second preset variant type.
18. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the model training method according to any one of claims 1 to 8, or the protein processing method according to any one of claims 9 to 15.
19. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the model training method according to any one of claims 1 to 8, or the protein processing method according to any one of claims 9 to 15.
20. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the model training method according to any one of claims 1 to 8, or the protein processing method according to any one of claims 9 to 15.
