A protein sequence generation method, device, system and storage medium

CN122761990APending Publication Date: 2026-09-15SHANGHAI TURING INTELLIGENT COMPUTING QUANTUM TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610938061.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2026-09-15

AI Technical Summary

Technical Problem

传统基于物理化学原理的方法和统计学方法在计算量和设计效果上存在局限性,难以满足复杂的功能需求

Benefits of technology

[0025] This invention provides a method, apparatus, system, and storage medium for protein sequence generation. The protein sequence generation method, by introducing a discrete diffusion model and multi-attribute conditional vectors, achieves precise control and optimization of the protein sequence generation process, significantly improving the functional controllability and practicality of the generated sequences. During the generation process, the multi-attribute conditional vectors dynamically guide sequence generation, ensuring that the generated protein sequences possess the expected functional characteristics, such as solubility, enzyme activity, and thermostability. This guidance mechanism not only increases the proportion of generated sequences that meet the target attribute requirements but also effectively reduces the cost and time of experimental verification, providing a more efficient and precise technical means for protein engineering design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122761990A_ABST
    Figure CN122761990A_ABST
Patent Text Reader

Abstract

The application provides a protein sequence generation method, device, system and storage medium, and relates to the technical field of biological information. The generation method comprises the following steps: obtaining a protein sequence to be analyzed and constructing a sequence data set; constructing a multi-attribute conditional vector of different functional attributes; constructing a protein sequence generation model; inputting the protein sequence to be analyzed in the sequence data set into the protein sequence generation model after coding the protein sequence to be analyzed into discrete representation; and generating a target protein sequence based on a target attribute by using the multi-attribute conditional vector to guide the generation process. The protein sequence generation method utilizes a discrete diffusion model and a multi-attribute conditional vector, realizes accurate functional control and structural optimization, reduces experimental cost and time. Meanwhile, the method supports joint optimization of multiple functional attributes, has high flexibility and practicability, provides efficient technical support for protein engineering, and accelerates the development of new proteins.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application filed on June 18, 2025, with application number 202510818986.1 and invention title "A method, apparatus, system and storage medium for generating protein sequences". Technical Field

[0002] This invention relates to the field of bioinformatics, and more specifically, to a method, apparatus, system, and storage medium for generating protein sequences. Background Technology

[0003] Protein design, a crucial research area in biotechnology and bioengineering, aims to artificially create protein sequences with specific functions to meet the needs of various fields, including biomedicine and industrial enzyme applications. The development of this field relies not only on a deep understanding of the relationship between protein structure and function but also involves multiple interdisciplinary technologies and methods. Proteins are the primary executors of life activities; their functions are determined by their three-dimensional structure, which in turn is determined by their amino acid sequence. Therefore, designing protein sequences with specific functions essentially involves regulating protein function by controlling the amino acid sequence. This process requires the comprehensive consideration of knowledge and techniques from multiple disciplines, including biochemistry, molecular biology, and computational science.

[0004] In the field of protein design, existing technologies mainly include methods based on physicochemical principles, statistical methods, and end-to-end methods based on deep learning. Physicochemical methods design protein sequences by considering the chemical and physical properties of amino acids, such as polarity and hydrophobicity. While theoretically sound, these methods require consideration of numerous factors, resulting in enormous computational demands and often failing to achieve ideal design results. Statistical methods utilize datasets of known protein sequences to predict and design novel sequences with target functions through statistical analysis, such as fragment embedding methods and Hidden Markov Models (HMMs). Although these methods can utilize large amounts of existing data, they still require manual design and have limited effectiveness for complex functional requirements. In recent years, end-to-end methods based on deep learning have received widespread attention. These methods can directly design novel protein sequences from the target function, with representative models including generative models like SeqGAN and VAE, and predictive models like AlphaFold. While these methods offer a large design space and can generate functionally novel sequences, they are challenging to train and design, and lack sufficient control over some latent features (such as solubility and stability).

[0005] Existing protein sequence generation models are mainly divided into two categories: unconditional generation and condition-guided generation. Unconditional generation models, such as ProteinGAN, learn to generate new protein sequences entirely based on the distribution of training data without any guidance or constraints. These models are simple to implement and generate a wide variety of sequences, but their lack of objective control makes them difficult to use in real-world tasks. Conditional generation models, on the other hand, guide the model to generate protein sequences that meet specific conditions by inputting explicit conditional information (such as target secondary structures and functional properties), such as Diffdock and CPDiffusion. While these models can achieve task-oriented design, their ability to guide implicit features that are difficult to represent with explicit conditions (such as solubility and stability) is insufficient, limiting their effectiveness in practical applications.

[0006] In summary, while existing protein design and sequence generation methods have made some theoretical and technical progress, numerous problems and challenges remain. Traditional methods based on physicochemical principles and statistical methods have limitations in terms of computational cost and design effectiveness, making it difficult to meet complex functional requirements. While deep learning-based methods offer greater design space, they face challenges in training and design complexity and lack sufficient control over latent features. Furthermore, existing generative models also have certain shortcomings in target control and practical application effectiveness. For example, the Protein Diffusiongenerator method faces problems such as model architecture training, reliance on external software for sequence generation, high computational costs, and a lack of real-world validation, all of which limit its large-scale application in practice. These issues indicate that existing protein design and sequence generation technologies still need further improvement and development to better meet the needs of practical applications.

[0007] In view of this, the present invention is hereby proposed. Summary of the Invention

[0008] The purpose of this invention is to provide a protein sequence generation method, apparatus, system, and storage medium. The protein sequence generation method utilizes a discrete diffusion model and multi-attribute conditional vectors to achieve precise functional control and structural optimization, reducing experimental costs and time. Simultaneously, it supports joint optimization of multiple functional attributes, possessing high flexibility and practicality, providing efficient technical support for protein engineering, and accelerating the development of novel proteins.

[0009] In order to achieve the above-mentioned objectives of the present invention, the following technical solution is adopted: In a first aspect, the present invention provides a method for generating a protein sequence, comprising: Obtain the protein sequence to be analyzed and construct a sequence dataset including the protein sequence; Based on the protein sequence to be analyzed in the sequence dataset, a multi-attribute conditional vector of different functional properties is constructed; wherein, the functional property includes at least one of solubility, enzyme activity and thermostability; A protein sequence generation model based on a deep learning model with an attention mechanism is constructed, and the trained protein sequence generation model is obtained through training. The protein sequences to be analyzed in the sequence dataset are encoded into discrete representations and then input into the protein sequence generation model; The generation process is guided by multi-attribute conditional vectors to generate target protein sequences based on target attributes.

[0010] In an optional implementation, obtaining the protein sequence to be analyzed includes: The original sequence data is obtained from a public database, and the original sequence data is mapped to integers. The sequence information after mapping to integers is used as the protein sequence to be analyzed corresponding to the original sequence data. Specifically, for the primary structure, the 20 amino acid information and unknown amino acid in the original sequence data are mapped to integers from 0 to 20; for the 8 structural elements in the secondary structure, they are mapped to integers from 0 to 7 respectively.

[0011] In an optional implementation, constructing a multi-attribute conditional vector with different functional properties based on the protein sequence to be analyzed in the sequence dataset includes: Determine whether the protein sequence to be analyzed in the sequence dataset has corresponding attribute information; If so, the attribute information is used as a functional attribute of the protein sequence to be analyzed and converted into an attribute tag; If not, the trained attribute prediction model is used to predict the protein sequence to be analyzed in the sequence dataset to obtain attribute labels; The multi-attribute condition vector is generated based on all the attribute tags of the protein sequence to be analyzed.

[0012] In an optional implementation, the step of using a trained attribute prediction model to predict the protein sequence to be analyzed in the sequence dataset and obtain attribute labels includes: For the solubility in the attribute information, a solubility classifier is used based on the ESM-C large language model to classify solubility, obtain prediction results, and generate a solubility tag in the attribute tag of the protein sequence to be analyzed based on the prediction results. Regarding the thermal stability in the attribute information, the structural information of the protein sequence to be analyzed in the sequence dataset is used as input. By modeling the global relationship between molecular structure nodes and edges, a prediction result is obtained, and a thermal stability label in the attribute tag of the protein sequence to be analyzed is generated based on the prediction result. For the enzyme activity in the attribute information, the primary structure of the protein sequence to be analyzed in the sequence dataset is used as input. The interaction between molecules is simulated by quantum computing. Based on the Transformer architecture in deep learning and combined with the ESM-C large language model, the sequence information of the primary structure is parsed to obtain the prediction result. Based on the prediction result, the enzyme activity tag in the attribute tag of the protein sequence to be analyzed is generated.

[0013] In an optional implementation, the step of obtaining the trained protein sequence generation model through training includes: Obtain sequence data from the training set, and calculate reconstruction loss and multi-attribute prediction loss based on the functional attributes, and calculate the total loss of the sequence data based on the reconstruction loss and the multi-attribute prediction loss; A multi-task loss combination with adaptive weights is constructed, including the total loss and the multi-attribute prediction loss; wherein the multi-attribute prediction loss includes at least one of solubility prediction loss, activity prediction loss and thermal stability prediction loss; The protein sequence generation model is optimized by combining the multi-task loss to obtain a trained protein sequence generation model.

[0014] In an optional implementation, the method for calculating the reconstruction loss is as follows: ; in, Represents the reconstruction loss; Represents real noise; The noise represented by the protein sequence generation model prediction; The noisy sequence represents time step t; c represents the functional attribute; and / or, The calculation method for the multi-attribute prediction loss is as follows: ; in, This represents the multi-attribute prediction loss; This represents the loss of solubility; This represents the loss of enzyme activity; This represents the loss of thermal stability.

[0015] The method for calculating the total loss is as follows: ; in, α represents the total loss; α represents the weight of the reconstruction loss. represents the reconstruction loss; k represents the total number of types of functional attributes that need to be predicted; The prediction loss represents the functional attribute i; The weight represents the functional attribute i.

[0016] In an optional implementation, the step of guiding the generation process using multi-attribute conditional vectors to generate target protein sequences based on target attributes includes: Calculate the state transition probability and use the state transition probability to determine different states in the diffusion process of the protein sequence; wherein the diffusion process includes an initial state, an intermediate state, and a final state; Based on the state transition probability and the multi-attribute conditional vector, the conditional generation probability is calculated, and the target protein sequence is generated.

[0017] In an optional implementation, the state transition probability is calculated as follows: ; in, The state at the previous time step t-1; I represents the identity matrix; Represents the scaling factor; and / or, The method for calculating the conditional generation probability is as follows: ; Where c represents the multi-attribute condition vector, and ; Indicates solubility; Represents enzyme activity; Represents stability; The conditional generation probability; The mean; The variance.

[0018] In an optional implementation, the step of guiding the generation process using multi-attribute conditional vectors to generate target protein sequences based on target attributes further includes: The intermediate states of the diffusion process are evaluated using a trained classifier to obtain the evaluation results. Calculate the predicted gradient information based on the evaluation results, and update the sequence state based on the current state and the predicted gradient information, so that the generated target protein sequence conforms to the preset target attributes. During the sequence generation process at each time step, the sequence generation process is adjusted according to the preset target attribute based on the calculated predicted gradient information and the current state during the diffusion process. The guiding strength parameter is dynamically adjusted based on the time step of the sequence generation process to optimize the sequence generation process of the target protein sequence.

[0019] In an optional implementation, the method for calculating the predicted gradient information is as follows: ; Where, x t y represents the current state at time step t; y represents the target attribute. In the case of , the logarithm of the conditional probability of the target attribute y; beg The predicted gradient information; and / or, In an optional implementation, the method for updating the sequence state based on the current state and the predicted gradient information includes: ; The standard deviation of time step t represents the standard deviation of time step t; w represents the guidance intensity parameter. The sequence state representing the updated time step t-1; This represents the predicted sequence state given the current state and time step t. The mean; The gradient; and / or, In an optional implementation, the method for calculating the guiding strength parameter is as follows: ; Where t represents the current time step; T represents the total time steps; Represents the guiding strength parameter; Represents the maximum guiding strength; The attenuation coefficient representing the guiding intensity; and / or, In an optional implementation, the method for calculating the conditional generation probability is as follows: ; in, The condition represents the generation probability; t represents the current time step; c represents the multi-attribute condition vector. This represents the current state at time step t; The sequence state representing the updated time step t-1; P Represents the prior probability of the multi-attribute conditional vector; This represents conditional probability.

[0020] In an optional implementation, the construction of the protein sequence generation model based on a deep learning model with an attention mechanism includes: A feature extraction module is constructed to build the protein sequence generation model; the feature extraction module includes a multi-layer Transformer encoder and a multi-head attention layer; Construct a multi-scale feature fusion module for the protein sequence generation model; During the feature extraction process, the multi-scale feature fusion module is used to perform multi-scale feature fusion processing. By combining features of different scales through the multi-head self-attention layer and the feedforward network, the protein sequence generation model's ability to capture features of different scales is optimized.

[0021] In an optional implementation, the formula for the multi-scale feature fusion processing is: ; Wherein, c represents the multi-attribute condition vector; Represents the hidden state of the l-th layer, indicating the feature representation after processing by the current layer; The hidden state of layer (l-1) represents the feature representation input to the current layer; MSA represents the multi-head attention layer; FEN represents the feedforward network; concat represents... The concatenation operation of c along the feature dimension.

[0022] In a second aspect, the present invention provides a protein sequence generation apparatus, comprising: The data acquisition module is used to acquire the protein sequence to be analyzed and construct a sequence dataset including the protein sequence; A vector construction module is used to construct a multi-attribute conditional vector with different functional attributes based on the protein sequence to be analyzed in the sequence dataset; wherein the functional attributes include at least one of solubility, enzyme activity and thermal stability; The model building module is used to build a protein sequence generation model based on a deep learning model with an attention mechanism, and to obtain the trained protein sequence generation model through training. The data input module is used to encode the protein sequence to be analyzed in the sequence dataset into a discrete representation and then input it into the protein sequence generation model; The guided generation module is used to guide the generation process using multi-attribute conditional vectors to generate target protein sequences based on target attributes.

[0023] Thirdly, the present invention provides a system comprising a processor and a memory, the memory storing a computer program, the processor being configured to execute the computer program to implement the protein sequence generation method described in any of the foregoing embodiments.

[0024] Fourthly, the present invention provides a computer storage medium storing a computer program, which, when executed on a processor, implements the protein sequence generation method according to any one of the foregoing embodiments.

[0025] This invention provides a method, apparatus, system, and storage medium for protein sequence generation. The protein sequence generation method, by introducing a discrete diffusion model and multi-attribute conditional vectors, achieves precise control and optimization of the protein sequence generation process, significantly improving the functional controllability and practicality of the generated sequences. During the generation process, the multi-attribute conditional vectors dynamically guide sequence generation, ensuring that the generated protein sequences possess the expected functional characteristics, such as solubility, enzyme activity, and thermostability. This guidance mechanism not only increases the proportion of generated sequences that meet the target attribute requirements but also effectively reduces the cost and time of experimental verification, providing a more efficient and precise technical means for protein engineering design.

[0026] Furthermore, this method achieves efficient secondary structure condition generation while maintaining sequence diversity, further validating the reliability of the guided diffusion model. The generated sequences exhibit good secondary structure recovery, with most sequences effectively capturing the target secondary structure features, ensuring the structural rationality and stability of the generated sequences. This demonstrates that this method can not only optimize target properties but also maintain protein stability and functionality at the structural level, providing strong technical support for the development of novel proteins.

[0027] Furthermore, this method supports joint optimization of multiple functional attributes, enabling the generation of protein sequences that meet multifunctional requirements. This multi-task learning framework provides a more flexible solution for protein engineering design, allowing users to flexibly adjust the model's guidance strategy according to different application scenarios, choosing to use single functional attribute guidance or joint guidance of multiple functional attributes, thereby achieving targeted design during sequence optimization. This diverse optimization capability makes the method more widely applicable and more practical in real-world applications.

[0028] In summary, the protein sequence generation method provided by this invention significantly improves the accuracy, controllability, and efficiency of protein design through precise functional control, efficient structure generation, and diverse optimization strategies, offering a powerful and practical technical solution for the field of protein engineering. This method maintains sequence diversity while precisely controlling target properties, significantly improving the success rate of protein engineering and accelerating the discovery of novel protein structures and functions. It holds significant application potential, particularly in drug development, biocatalyst design, and biomaterials research. Attached Figure Description

[0029] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0030] Figure 1 This is a schematic diagram of the hardware operating environment involved in an embodiment of the protein sequence generation method of the present invention; Figure 2 This is a schematic flowchart of Example 1 of the protein sequence generation method of the present invention; Figure 3 This is a detailed flowchart of step S200 in Example 3 of the protein sequence generation method of the present invention; Figure 4 This is a detailed flowchart of step S300 in Example 4 of the protein sequence generation method of the present invention; Figure 5 This is a detailed flowchart of step S500 in Example 5 of the protein sequence generation method of the present invention; Figure 6 This is a detailed flowchart of step S300 in Example 6 of the protein sequence generation method of the present invention; Figure 7 This is a schematic diagram of the model structure in Example 7 of the protein sequence generation method of the present invention; Figure 8 This is a schematic diagram of the module connections of the protein sequence generation device of the present invention. Detailed Implementation

[0031] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0032] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0033] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.

[0034] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0035] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0036] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0037] like Figure 1 The diagram shown is a structural schematic of the hardware operating environment of the terminal involved in an embodiment of the present invention.

[0038] The protein sequence generation system of this invention can be a PC, or a mobile terminal device such as a smartphone, tablet, or portable computer. The protein sequence generation system may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, an input unit such as a keyboard, or a remote control; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory, such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001. Optionally, the protein sequence generation system may also include RF (Radio Frequency) circuitry, audio circuitry, a Wi-Fi module, etc. In addition, this protein sequence generation system can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, which will not be described in detail here.

[0039] Those skilled in the art will understand that Figure 1 The protein sequence generation system shown is not intended to limit it and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Figure 1 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a data interface control program, a network connection program, and a protein sequence generation program.

[0040] In summary, the method provided by this invention, utilizing a discrete diffusion model and multi-attribute conditional vectors, achieves precise functional control and structural optimization, reducing experimental costs and time. Simultaneously, it supports joint optimization of multiple functional attributes, possessing high flexibility and practicality, providing efficient technical support for protein engineering, and accelerating the development of novel proteins.

[0041] Example 1 Reference Figure 2 This embodiment provides a protein sequence generation method, including: Step S100: Obtain the protein sequence to be analyzed and construct a sequence dataset including the protein sequence.

[0042] The protein sequences to be analyzed, as mentioned above, refer to specific protein sequences that need to be analyzed and processed in protein design or functional prediction research. These sequences can be obtained from public databases or are protein amino acid sequences determined experimentally. They are the basic data for subsequent tasks such as functional prediction, structural analysis, or sequence generation.

[0043] A sequence dataset is a collection of multiple protein sequences that have been organized, filtered, and used for specific research purposes. Sequence datasets are commonly used to train machine learning models or for bioinformatics analysis. When constructing a sequence dataset, a large number of protein sequences are collected from public databases and preprocessed, such as removing redundancy and formatting, to ensure data quality and consistency.

[0044] In this step, the target protein sequence is collected, and a dataset containing this sequence is built based on it. The goal of this stage is to prepare data for subsequent model training.

[0045] Data acquisition can be achieved by collecting protein sequences and their associated multiple attributes (such as solubility, enzyme activity, and thermal stability) from public databases.

[0046] Specifically, one can first collect the primary sequences and corresponding functional attributes of proteins from publicly available protein databases. The amino acid sequences of the proteins are then standardized (usually through integer encoding, with each amino acid represented by an integer) to adapt them for model training, resulting in a standardized protein sequence dataset and corresponding attribute label data, ensuring the data is suitable for model training.

[0047] Through standardized processing, data can be uniformly input into deep learning models, ensuring efficient training and prediction.

[0048] Data collection can be accomplished through APIs or database queries, and standardized encoding can be achieved through mapping tables or character-to-integer conversion.

[0049] Step S200: Based on the protein sequence to be analyzed in the sequence dataset, construct a multi-attribute condition vector with different functional attributes; wherein, the functional attributes include at least one of solubility, enzyme activity and thermal stability.

[0050] The aforementioned functional attributes refer to the biological functional characteristics of a protein sequence, such as enzyme activity, thermostability, and solubility. These attributes can be determined experimentally or predicted using machine learning models. In protein design, functional attributes are an important component of the design goals, guiding the generation of protein sequences with specific functions. Specifically: (1) Solubility: This refers to the ability of a protein to dissolve in an aqueous solution. High solubility usually means that the protein is more readily utilized in biochemical reactions.

[0051] (2) Enzyme Activity: This indicates the ability of a protein to catalyze reactions as an enzyme. The higher the activity, the more efficient the enzyme is in biochemical reactions.

[0052] (3) Thermal stability: This refers to the stability of a protein under high temperature conditions. High thermal stability means that the protein can still maintain its structure and function in a high temperature environment.

[0053] In addition, other properties may be included, such as binding affinity, pH tolerance, etc., depending on the application requirements.

[0054] As mentioned above, the multi-attribute conditional vector is a key data structure used to guide the protein sequence generation process. It contains information on various functional attributes of the protein sequence. These functional attributes typically include, but are not limited to, solubility, enzyme activity, and thermostability. By integrating this attribute information into a multi-dimensional vector, a clear guiding direction can be provided for the protein sequence generation model, ensuring that the generated sequence meets specific functional requirements.

[0055] In the protein sequence generation process, multi-attribute conditional vectors serve as guiding signals, helping the model generate protein sequences that meet specific functional requirements. By dynamically adjusting the generation process, it is ensured that the generated sequences achieve the expected goals in multiple functional attributes, thereby improving the practicality and goal-orientation of the generated sequences.

[0056] In this step, a conditional vector containing multiple functional attributes (such as solubility, enzyme activity, and thermal stability) is generated based on the functional characteristics of the protein sequences in the sequence dataset to guide the subsequent sequence generation process.

[0057] The attributes obtained directly can be used as functional attributes, or the functional attributes of the sequence can be predicted using an attribute prediction model, and the prediction results can be converted into attribute labels.

[0058] All attribute tags are integrated into a multi-attribute conditional vector, which contains key functional attribute information of the protein sequence and can provide clear guidance for sequence generation.

[0059] This step enables precise control over the protein sequence generation process, allowing the generation of protein sequences with specific functional requirements, thus improving the practicality and target orientation of the generated sequences.

[0060] Specifically, attribute prediction models can be trained using machine learning or deep learning algorithms, and these models can be used to predict the functional properties of protein sequences, with the prediction results encoded as conditional vectors.

[0061] Step S300: Construct a protein sequence generation model based on a deep learning model with an attention mechanism, and obtain the trained protein sequence generation model through training.

[0062] In this step, a deep learning model framework with an attention mechanism is established. For example, it can be a discrete diffusion model or other deep learning models with attention mechanisms to adapt to different application scenarios. These alternatives can further enhance the flexibility and applicability of the present invention, providing more options for protein sequence generation.

[0063] A deep learning model framework based on attention mechanism is used to generate protein sequences and, through training, enables it to generate protein sequences that conform to target properties.

[0064] One example is the Discrete Diffusion Model (DDPM), a generative model used to generate discrete data (such as text, protein sequences, etc.). It generates data samples by progressively removing noise, similar to continuous diffusion models (such as DDPM), but specifically optimized for discrete data. This model starts with an initial data sample and gradually adds noise until the data is completely covered by noise. This process is reversible; that is, the original data can be recovered by progressively removing noise through the reverse process. Because it deals with discrete data (such as amino acids in a protein sequence), the model needs to be specially designed to handle the discrete state space. This is typically achieved by introducing a masking mechanism or discrete noise. In terms of the generation process, data can be generated progressively through a reverse diffusion process. In each step, the model predicts the noise in the current state and removes it, gradually approaching the target data distribution.

[0065] The protein sequence generation model in this embodiment is a model for designing and generating protein sequences with specific functions. It combines bioinformatics, deep learning, and machine learning techniques to generate protein sequences that meet specific needs by learning the relationship between protein sequences and functions.

[0066] The first step is to design the architecture of the protein sequence generation model, including a sequence encoding module, a feature extraction module, and an attribute prediction module. Then, training data is prepared, including protein sequences and their corresponding functional attribute labels. Next, loss functions are defined, such as sequence reconstruction loss and multi-attribute prediction loss, and a multi-task loss combination with adaptive weights is constructed. The model is then trained using the training data, and the model parameters are adjusted through algorithm optimization to obtain a well-trained protein sequence generation model.

[0067] Specifically, deep learning frameworks (such as TensorFlow or PyTorch) can be used to build and train protein sequence generation models. The design of the model architecture, data preprocessing, control of the training process, and optimization of the model can be achieved by writing code.

[0068] Step S400: The protein sequence to be analyzed in the sequence dataset is encoded into a discrete representation and then input into the protein sequence generation model.

[0069] As mentioned above, discrete representation refers to the process of converting continuous or complex input data into a discrete form. In the process of protein sequence generation, discrete representation refers to mapping the amino acids and corresponding structural information in the protein sequence into analyzable sequences or other discrete symbols.

[0070] Encoding protein sequences into discrete representations is designed to better adapt to the input requirements of models, simplify the computation process, and improve the model's generalization ability and optimization efficiency. This representation method plays a crucial role in protein sequence generation tasks, significantly enhancing the quality and usability of the generated sequences.

[0071] In this step, the target protein sequence is converted into a discrete form that the model can process, and then input into the trained protein sequence generation model.

[0072] The protein sequences in the sequence dataset are encoded and mapped to sequences that can be further analyzed.

[0073] Discrete representations are better suited to the input requirements of models, facilitating the processing and generation of protein sequences. Specifically, coding programs can be written to convert amino acids and secondary structure elements in protein sequences into corresponding analyzable sequences according to predefined mapping rules, and these sequences can then be used as input to the model.

[0074] Step S500: The generation process is guided by a multi-attribute conditional vector to generate a target protein sequence based on the target attributes.

[0075] In this step, during the protein sequence generation process, the previously constructed multi-attribute conditional vector is used to dynamically guide the generation process, so that the generated protein sequence meets the requirements of the target functional attributes.

[0076] During the generation process, state transition probabilities are calculated based on attribute information in the multi-attribute condition vector to determine different states of the protein sequence during diffusion. Conditional generation probabilities can be calculated based on the state transition probabilities and the multi-attribute condition vector, and this probability distribution can be used to generate the target protein sequence, thus enabling the generation of protein sequences that satisfy target attributes (such as solubility, enzyme activity, and thermostability).

[0077] By using multi-attribute condition vectors, precise control over the generation process can be achieved, increasing the proportion of generated sequences that meet the target attribute requirements. During the model generation phase, the generation process is guided by calculating and updating the sequence state based on the attribute information in the multi-attribute condition vectors.

[0078] In summary, the protein sequence generation method presented in this embodiment, by constructing a multi-attribute conditional vector and integrating it into the generation process, can precisely control the generated protein sequences to meet specific functional requirements, such as solubility, enzyme activity, and thermostability, thereby significantly improving the functional controllability and target orientation of the generated sequences. Utilizing the characteristics of the discrete diffusion model, this method can efficiently generate high-quality protein sequences while maintaining sequence diversity and structural rationality. Furthermore, by jointly training sequence generation and functional attribute prediction tasks, the model's stability and convergence speed are improved, further optimizing the generation results. Finally, this method performs excellently in experimental validation, rapidly generating protein sequences that meet specific functional requirements, significantly reducing the time and cost of experimental screening and validation, and providing strong technical support for research and development in the fields of protein engineering and biomedicine.

[0079] Example 2 This embodiment provides a protein sequence generation method. Based on the aforementioned embodiment 1, step S100, obtaining the protein sequence to be analyzed, includes: Step S110: Obtain raw sequence data based on a public database, map the raw sequence data to integers, and use the sequence information after mapping to integers as the protein sequence to be analyzed corresponding to the raw sequence data; In this step, the raw protein sequence data is first obtained from a public database. Public databases (such as AlphaFold and PDBbank) can be accessed to download data containing protein sequences and their functional attributes, thus obtaining a raw dataset containing protein sequences and their functional attributes.

[0080] By leveraging the vast amounts of data in public databases, we can ensure data diversity and reliability. Specifically, data can be retrieved from public databases via API interfaces or manual download.

[0081] Using publicly available protein structure databases from AlphaFold and PDBbank, nearly one million protein sequences and structural data were collected, as in this embodiment. This data encompasses protein sequences of varying lengths and from diverse sources, along with varied secondary structure information, forming a high-quality, large-scale dataset.

[0082] Furthermore, the original sequence data is mapped to integers. That is, the amino acid and secondary structure information in the protein sequence is converted into integer representations.

[0083] (1) For the primary structure, the 20 amino acid information and unknown amino acid in the original sequence data are mapped to integers from 0 to 20.

[0084] (2) For the eight structural elements in the secondary structure, they are mapped to integers from 0 to 7 respectively.

[0085] To accurately encode the protein sequence, in this embodiment, the 20 common amino acids in the protein's primary structure sequence, along with one additional unknown amino acid "X", are mapped to integers. These amino acids are represented by the characters "ACDEFGHIKLMNPQRSTVWY" and "X", corresponding to integers from 0 to 20, respectively. Furthermore, the protein's secondary structure, composed of 8 structural elements, is represented by the characters "~HBEGITS", also mapped to integers from 0 to 7.

[0086] It should be noted that primary structure refers to the linear sequence of amino acids in a protein molecule. It is the most basic structural level of a protein, determining its chemical composition and fundamental properties.

[0087] For example, the mapping rules are: A ->0, C ->1, D ->2, E ->3, F ->4, G ->5, H ->6, I ->7, K ->8, L ->9, M ->10, N ->11, P ->12, Q ->13, R ->14, S ->15, T ->16, V ->17, W ->18, Y ->19, X ->20 (unknown amino acid) The original sequence data of the primary structure is: VQGILWFNPKYRSMTEAHCX. Replacing each amino acid with its corresponding integer gives: [17, 13, 5, 7, 9, 18, 4, 11, 12, 8, 19, 14, 15, 10, 16, 3, 0, 6, 1,20].

[0088] By mapping randomly generated protein sequences to integer sequences, a discrete representation suitable for computer processing is obtained. This representation simplifies data processing, improves computational efficiency, and also meets the input requirements of deep learning models such as discrete diffusion models.

[0089] As mentioned above, secondary structure refers to the localized, regular spatial conformation of a protein molecule. It is formed by hydrogen bonds in the amino acid sequence. Secondary structures mainly include the following types: α-helix: A helical structure, typically consisting of 3.6 amino acid residues per turn. α-helices are very common in many proteins, such as myoglobin and hemoglobin. β-sheet: Composed of multiple β-chains, which can be parallel or antiparallel. β-sheets are also important in many proteins, such as immunoglobulins. β-turn: A short, curved structure, typically consisting of 4 amino acid residues. β-turns connect different secondary structure elements during protein folding. Random coil: A portion without a fixed structure, usually determined by the chemical properties of the amino acid sequence; these portions play a regulatory role on the surface or inside the protein.

[0090] For example, the mapping rules for secondary structures are: (random curl) -> 0, H (α-spiral) -> 1, E (β-fold) -> 2, B (β-bridge) -> 3, G (3-10 spiral) -> 4, I (π-spiral) -> 5, T (turn) -> 6, S (bend) -> 7.

[0091] For example, the original sequence data of the secondary structure is: ~HHHHEEEEBBGGIIITTTSSS. Replacing each amino acid with the corresponding integer sequence, it becomes: [011112222334455666777].

[0092] By mapping the secondary structure elements of proteins to integers from 0 to 7, a discrete representation is obtained, which facilitates the processing and analysis of protein secondary structure information in computational models. This mapping method has significant application value in fields such as protein structure prediction and protein design.

[0093] Furthermore, considering the variability in protein sequence length, this embodiment standardized sequences shorter than 512 characters. To ensure consistent sequence length, sequences shorter than 512 characters were padded with zero values ​​at the ends.

[0094] This standardization process ensures that all input sequences have the same length, thereby optimizing the training efficiency and computational performance of the model.

[0095] Furthermore, to distinguish between the original sequence and the padding portion, this embodiment introduces a padding mask to shield the padding data during model training and inference. This masking information is crucial for the model to handle variable-length sequences, avoid interference from invalid data, and improve the accuracy of data processing.

[0096] It should be noted that, in this embodiment, the secondary structure condition information can also be replaced with other condition information, such as the protein's linguistic description, protein spatial structure, protein physicochemical properties, etc.

[0097] Example 3 Reference Figure 3 This embodiment provides a protein sequence generation method. Based on the aforementioned embodiment 1, step S200 involves constructing a multi-attribute conditional vector with different functional attributes based on the protein sequence to be analyzed in the sequence dataset, including: Step S210: Determine whether the protein sequence to be analyzed in the sequence dataset has corresponding attribute information.

[0098] This step involves checking whether each protein sequence in the sequence dataset already exists, has been obtained, or has been labeled with attribute information. The sequence dataset is traversed to check whether each sequence contains attribute information such as solubility, enzyme activity, and thermostability, determining which sequences have been labeled with attribute information and which have not.

[0099] It should be noted that in protein sequence generation methods, the first step is to determine whether the corresponding attribute information exists in the sequence dataset in order to make more efficient use of existing data and to allocate computing resources reasonably.

[0100] In practical applications, protein sequence datasets may originate from various sources (public databases, data sources). Some sequences may have undergone detailed experimental validation and been labeled with functional attributes, while others may not have undergone such validation. By determining the existence of attribute information, we can ensure that each sequence in the dataset has complete functional attribute information, whether by directly using existing annotations or by generating it through a predictive model. This helps maintain the consistency and integrity of the dataset, providing a high-quality data foundation for subsequent model training and generation tasks.

[0101] Using pre-labeled attribute information can directly provide accurate guidance for the model. While predictive models are powerful, they may not fully achieve the accuracy verified in experiments. By prioritizing the use of existing attribute information, we can ensure that the model receives more accurate signals during training, thereby improving model performance and the quality of generated results. For sequences without labeled attribute information, using predictive models to generate attribute labels can, to some extent, compensate for the lack of data while maintaining the integrity of the dataset.

[0102] Protein sequence datasets may contain sequences from different databases or studies, and the annotations of these data may vary. By determining the presence of attribute information, these data from different sources can be handled flexibly, ensuring that each sequence is appropriately processed. This flexibility is crucial for building a general and robust protein sequence generation model.

[0103] In practical applications, computational resources are often limited. By first determining the existence of attribute information, computational resources can be allocated rationally, prioritizing sequences that have not yet been labeled with attribute information. This ensures that as many high-quality protein sequences as possible are generated with limited resources, improving overall work efficiency.

[0104] Step S220: If yes, then the attribute information is used as the functional attribute of the protein sequence to be analyzed and converted into an attribute label.

[0105] For sequences with labeled attribute information, this attribute information is converted into a label format that the model can process. Attribute information (such as high solubility, strong enzyme activity, good thermal stability, etc.) can be converted into numerical labels according to predefined attribute label mapping rules.

[0106] Step S230: If not, then use the trained attribute prediction model to predict the protein sequence to be analyzed in the sequence dataset to obtain attribute labels.

[0107] For sequences without attribute information, a trained attribute prediction model is used to predict their attribute labels.

[0108] Step S240: Generate the multi-attribute condition vector based on all the attribute tags of the protein sequence to be analyzed.

[0109] The attribute labels of all sequences are integrated into a multi-attribute conditional vector. Specifically, for each sequence, all its attribute labels (such as solubility, enzyme activity, thermostability, etc.) can be combined into a vector. This yields a multi-attribute conditional vector for each sequence. This provides comprehensive attribute guidance for sequence generation models, improving the relevance and functionality of the generated sequences. The attribute labels of each sequence can be combined into a vector.

[0110] In some preferred embodiments, step S230, which uses a trained attribute prediction model to predict the protein sequence to be analyzed in the sequence dataset to obtain attribute labels, includes: Step S231: For the solubility in the attribute information, based on the ESM-C large language model, a solubility classifier is used to classify the solubility to obtain the prediction result, and the solubility tag in the attribute tag of the protein sequence to be analyzed is generated according to the prediction result.

[0111] In this embodiment, different attribute information can be predicted separately to obtain the corresponding attribute labels.

[0112] This paper uses a solubility classifier based on the ESM-C large language model to predict the solubility of protein sequences. The protein sequence can be input into the ESM-C model, where a pre-trained language model extracts feature representations of the sequence. Then, a classifier is used to classify these features and determine the solubility of the sequence, thus obtaining a solubility label (e.g., soluble or insoluble) for each protein sequence.

[0113] Pre-trained language models can capture complex features of sequences, improving the accuracy of solubility prediction. Specifically, a pre-trained ESM-C model can be loaded to encode protein sequences into feature vectors, which are then used for prediction by a trained classifier.

[0114] For example, to generate soluble labels, this embodiment also utilized the ESM-C large language model to train and fine-tune datasets from AlphaFold and PDBbank, developing a soluble classifier. This classifier achieved an accuracy of 73% on the validation set, demonstrating relatively accurate classification of protein sequences based on their solubleness. Based on the classifier's predictions, corresponding soluble labels were generated for all protein sequences in the dataset. These labels were used in the feature guidance process of the diffusion model, thereby helping the model generate protein sequences with higher solubility.

[0115] Step S232: For the thermal stability in the attribute information, the structural information of the protein sequence to be analyzed in the sequence dataset is used as input. By modeling the global relationship between molecular structure nodes and edges, a prediction result is obtained, and a thermal stability label in the attribute tag of the protein sequence to be analyzed is generated based on the prediction result.

[0116] In this step, molecular structure modeling methods are used to predict the thermal stability of protein sequences. The structural information of the protein sequence (such as secondary and tertiary structures) is used as input, and the modeling method predicts its thermal stability, thus obtaining a thermal stability label (e.g., stable or unstable) for each protein sequence. Combining the protein's structural information allows for more accurate prediction of thermal stability.

[0117] Specifically, a model can be used, which takes the structural information of the protein as input and outputs the predicted results of its thermal stability.

[0118] For example, thermal stability labels are predicted and generated using the EGNN algorithm. EGNN is a graph-based deep learning algorithm specifically designed for protein 3D structure analysis and property prediction. This algorithm takes the protein's 3D structural information as input and accurately assesses the protein's thermal stability by modeling the global relationships between molecular structure nodes and edges.

[0119] Step S233: For the enzyme activity in the attribute information, using the primary structure of the protein sequence to be analyzed in the sequence dataset as input, the sequence information of the primary structure is parsed by simulating the interaction between molecules through quantum computing, based on the Transformer architecture in deep learning and combined with the ESM-C large language model, to obtain the prediction result, and the enzyme activity tag in the attribute tag of the protein sequence to be analyzed is generated according to the prediction result.

[0120] In this step, quantum computing is used to simulate intermolecular interactions, and deep learning models (such as the Transformer architecture) are combined to predict the enzyme activity of protein sequences. The primary structure of the protein sequence can be used as input, and its intermolecular interactions can be simulated through quantum computing. Then, deep learning models are used for feature extraction and activity prediction to obtain an enzyme activity tag (such as high activity or low activity) for each protein sequence.

[0121] Combining quantum computing and deep learning models can more comprehensively capture the activity characteristics of proteins and improve prediction accuracy. Specifically, quantum computing tools (such as Qiskit) and deep learning frameworks (such as PyTorch) can be used for prediction.

[0122] In this embodiment, the activity tag (enzyme activity) is generated by prediction using the QDTA algorithm. QDTA is a quantum hybrid deep learning algorithm designed specifically for protein function prediction. This algorithm uses the protein's primary sequence as input and combines quantum computing simulation and deep learning techniques to achieve higher accuracy in function prediction.

[0123] Specifically, the core features of the QDTA algorithm include: (1) Quantum Hybrid Computing: Improves the accuracy of predicting protein functional characteristics by simulating intermolecular interactions through quantum computing.

[0124] (2) Transformer architecture: The algorithm is based on the Transformer architecture in deep learning, which has powerful sequence modeling capabilities and can learn rich contextual features from protein sequences.

[0125] (3) ESM-C feature fusion: In the QDTA algorithm, protein features generated by the ESM-C large language model are further combined. The model’s representation ability is used to perform in-depth analysis of primary sequence information, thereby improving the prediction effect of protein activity.

[0126] The activity tags predicted by the QDTA algorithm encompass the functional characteristics of proteins under different conditions, especially their catalytic activity and interactions with cofactors (such as NADPH). These activity tags are used for feature guidance in diffusion models, helping the models generate protein sequences with higher activity potential.

[0127] This embodiment supports the simultaneous use of soluble tags, thermostable tags, and activity tags for guided generation. Alternatively, a single feature-guided mode can be selected based on actual needs. Furthermore, steps 231-S233 can be performed in any order, or simultaneously. In practical applications, the combined use of these feature tags can effectively enhance the functional diversity and practicality of the generated protein sequences.

[0128] Example 4 Reference Figure 4 This embodiment provides a protein sequence generation method. Based on the aforementioned embodiment 1, step S300, which involves training a well-trained protein sequence generation model, includes: Step S310: Obtain sequence data from the training set, calculate reconstruction loss and multi-attribute prediction loss based on the functional attributes, and calculate the total loss of the sequence data based on the reconstruction loss and the multi-attribute prediction loss.

[0129] In this step, protein sequence data is obtained from the training set, and the reconstruction loss and multi-attribute prediction loss of the model on these data are calculated, and the reconstruction loss and multi-attribute prediction loss are combined into a total loss.

[0130] Protein sequences and their corresponding functional attribute labels are extracted from the training set. These sequences are reconstructed using a model, and reconstruction losses (such as KL divergence or mean squared error) are calculated. For each functional attribute (such as solubility, enzyme activity, and thermostability), predictions are made, and the corresponding prediction losses are calculated, thus obtaining the reconstruction loss and multi-attribute prediction loss for each sequence.

[0131] By calculating reconstruction loss and prediction loss, the performance of a model on both generation and prediction tasks can be comprehensively evaluated. The losses can be calculated using deep learning frameworks such as PyTorch or TensorFlow.

[0132] Specifically, the method for calculating the reconstruction loss is as follows: ; in, The reconstruction loss represents the model's performance in the denoising process. It indicates the difference between the noise predicted by the model and the actual noise. By minimizing this loss, the model can better learn how to recover the original sequence from a noisy sequence.

[0133] This represents real noise, which is added to the sequence during the diffusion process. It is used to train the model so that it can learn how to recover the original sequence from the noisy sequence. This represents the noise predicted by the protein sequence generation model, i.e., the noisy sequence added by the model based on the current time step t. The model aims to make the predicted noise as close as possible to the actual noise, along with the functional attribute c. The noisy sequence representing time step t indicates the sequence state at a certain step in the diffusion process. It serves as input to the model for predicting noise. t is the time step, representing the current step in the diffusion process. In the diffusion model, time step t controls the addition and removal of noise. c represents the functional attribute. The functional attribute represents the functional properties of the protein sequence (such as solubility, enzyme activity, thermostability, etc.). It serves as a conditional input, guiding the model to generate protein sequences with specific functional attributes.

[0134] Furthermore, the calculation method for the multi-attribute prediction loss is as follows: ; in, The multi-attribute prediction loss represents the overall error of the model in predicting the functional properties of a protein sequence (such as solubility, enzyme activity, and thermostability). By minimizing this loss, the model can simultaneously optimize the prediction performance of multiple functional properties.

[0135] This represents the solubility loss; it measures the error of the model in predicting the solubility of a protein sequence. By minimizing this loss, the model can predict protein solubility more accurately. It can typically be calculated using a classification loss function (such as cross-entropy loss). This represents the enzyme activity loss, used to measure the error of the model in predicting the enzyme activity of a protein sequence. By minimizing this loss, the model can predict the enzyme activity of a protein more accurately. It can be calculated using a regression loss function (such as mean squared error loss). The thermal stability loss represents the error of the model in predicting the thermal stability of a protein sequence. By minimizing this loss, the model can predict the thermal stability of the protein more accurately. It is typically calculated using a regression loss function (such as mean squared error loss).

[0136] Furthermore, the total loss is calculated as follows: ; in, The total loss represents the overall performance of the model in generating protein sequences and predicting functional properties. By minimizing the total loss, the model can simultaneously optimize both the quality of sequence generation and the accuracy of functional property prediction.

[0137] α represents the weight of the reconstruction loss; it is used to balance the contributions between the reconstruction loss and the functional attribute prediction loss. By adjusting α, the importance of the reconstruction loss in the total loss can be controlled, avoiding excessive dominance by a single task (such as the generation task or the prediction task). The reconstruction loss represents the model's performance in the denoising process, specifically the difference between the noise predicted by the model and the actual noise. By minimizing the reconstruction loss, the model can better recover the original sequence from the noisy sequence. k represents the total number of functional attributes to be predicted, where k represents the number of functional attributes the model needs to predict. In this embodiment, k=3, corresponding to the three functional attributes: solubility, enzyme activity, and thermal stability. The weight representing the functional attribute i, i.e., the weight of the i-th functional attribute, is used to balance the contributions of different functional attributes to the prediction loss. This is achieved by adjusting... This allows you to control the importance of the prediction loss for each functional attribute in the total loss. Let $\frac{i}{i}$ represent the prediction loss for functional attribute $i$; that is, the prediction loss for the $i$-th functional attribute, used to measure the error of the model in predicting the $i$-th functional attribute. By minimizing the prediction loss for each functional attribute, the model can more accurately predict the functional attributes of the protein.

[0138] Step S320: Construct a multi-task loss combination with adaptive weights, including the total loss and the multi-attribute prediction loss; wherein the multi-attribute prediction loss includes at least one of solubility prediction loss, activity prediction loss and thermal stability prediction loss.

[0139] In this step, an adaptive weighted multi-task loss combination is constructed, and adaptive weights are assigned to each loss.

[0140] The weights of each loss can be defined separately, and these weights can be dynamically adjusted according to the performance during training. The reconstruction loss and the multi-attribute prediction loss are weighted and summed to obtain the total loss, thus obtaining a total loss function that includes the losses of all tasks.

[0141] By using adaptive weights, the losses from different tasks can be balanced, preventing any one task from dominating the training process and improving the overall performance of the model. Weights can be defined to obtain combinations of losses from multiple tasks.

[0142] Step S330: Optimize the joint loss of the protein sequence generation model using the multi-task loss combination to obtain the trained protein sequence generation model.

[0143] In this step, the protein sequence generation model is jointly optimized using the total loss function. Optimization algorithms (such as Adam or SGD) can be used to update the model parameters to minimize the total loss. During training, the weights are dynamically adjusted to ensure that the loss for each task is optimized, resulting in a well-trained protein sequence generation model.

[0144] Through joint optimization, the model can simultaneously learn to generate high-quality protein sequences and predict their functional properties, improving the diversity and accuracy of the generated results. An optimizer can be used for training.

[0145] Through the steps described above, this embodiment constructs a multi-task loss combination with adaptive weights by calculating reconstruction loss and multi-attribute prediction loss, and trains the protein sequence generation model through joint optimization. This method can balance the losses of different tasks, improve the overall performance of the model, and thus achieve the generation of high-quality protein sequences with specific functional attributes.

[0146] Example 5 Reference Figure 5This embodiment provides a protein sequence generation method. Based on the aforementioned embodiment 4, step S500 utilizes a multi-attribute condition vector to guide the generation process, generating a target protein sequence based on target attributes, including: Step S510: Calculate the state transition probability and use the state transition probability to determine different states in the diffusion process of the protein sequence; wherein the diffusion process includes an initial state, an intermediate state, and a final state.

[0147] In this step, within the diffusion model, the state transition probability characterizes the state transition probability from the noisy sequence x at time step t. t Transition to state x of the previous time step t-1 t-1 The state transition probability is calculated using a predefined probability distribution (such as a Gaussian distribution), thus obtaining the state transition probability at each time step. The state transition probability is a core part of the diffusion model, allowing the model to progressively remove noise and recover the original sequence.

[0148] Furthermore, the method for calculating the state transition probability is as follows: ; in, This represents the intermediate state x, given the initial state x0 at time step 0. t The state transition probability represents the intermediate state x from the initial state x0 to time step t. t The probability distribution.

[0149] This represents an intermediate state at time step t, indicating the noisy sequence at a certain step in the diffusion process. Its function is to be used in diffusion models. This is a sequence obtained by gradually adding noise to the initial state x0, used to describe the state changes during the diffusion process. t-1 Represents the intermediate state x t The state of the previous time step t-1; that is, the intermediate state of time step t-1, used when calculating the state transition probability, x t-1 Used to describe from x t-1 To x t The state change of β. t β represents the noise intensity at time step t; it indicates the intensity of the noise added at time step t. Controlling the amount of noise added at each time step affects the speed and extent of the diffusion process. t It can be a predefined value that can be adjusted according to the specific task. I represents the identity matrix; it represents the covariance matrix of the noise. In a Gaussian distribution, the identity matrix I indicates that the covariance matrix of the noise is the identity matrix, meaning that each dimension of the noise is independent and identically distributed. Represents the scaling factor used to adjust the previous state x. t-1 The scaling factor is used to adjust the contribution of the previous state during state transitions, ensuring the smoothness of the transitions.

[0150] Then, based on the state transition probabilities, the different states of the protein sequence during the diffusion process are determined, including the initial state, intermediate state, and final state.

[0151] Specifically, the different states of the diffusion process can include: (1) the initial state, defined as x0 being the original protein sequence; (2) the intermediate state x0... t It is a noisy sequence at time step t. (3) Final state (final output, such as defined as x) T () is the sequence after adding noise.

[0152] This step defines all the states in the diffusion process. By defining each state, the model can progressively recover the original sequence from the noisy sequence. Specifically, in the diffusion model, a sequence from the initial state to the final state can be generated by progressively applying state transition probabilities.

[0153] Step S520: Based on the state transition probability and the multi-attribute condition vector, calculate the condition generation probability and generate the target protein sequence.

[0154] In this step, the generation probability under given conditions is calculated by combining the state transition probability and the multi-attribute condition vector. Using the conditional generation probability formula, and combining the state transition probability and the multi-attribute condition vector, the generation probability at each time step is calculated.

[0155] By combining state transition probabilities and multi-attribute conditional vectors, the model can generate protein sequences that satisfy specific functional properties. The generation probability can be calculated using the conditional generation probability formula of the diffusion model.

[0156] Then, a target protein sequence satisfying the target properties can be generated based on the conditional generation probability. Starting from the final state, intermediate states are generated step by step using the conditional generation probability until the initial state x0 is recovered. At each time step, the sequence state is updated using the conditional generation probability, thereby generating a protein sequence that satisfies the target properties.

[0157] By using conditional generation probabilities, the model can generate high-quality protein sequences with specific functional properties. The target sequence can be generated using the inverse process of a diffusion model.

[0158] Furthermore, the method for calculating the conditional generation probability is as follows: ; Here, 'c' represents the multi-attribute condition vector, which contains functional attribute information of the protein sequence. It guides the generation process, ensuring that the generated sequence satisfies specific functional attributes. ; Indicates solubility (soluble label); Represents enzyme activity (enzyme activity label); Represents stability (stability label). Represents the current state x based on time step t. t Given the multi-attribute condition vector c, the previous state x t-1 The conditional generation probability; characterizes the probability generated from the noisy state (current state x) in the inverse process of the diffusion model. t Restore to the previous state x t-1 The probability distribution. Represents the given current state x t Given time step t and the multi-attribute condition vector c, the previous state x t-1 The mean of the values ​​represents the model's prediction of the previous state x. t-1 The expected value. This is the mean part of the conditional generation probability, used to guide the generation process. Represents the given current state x t Given time step t, the previous state x t-1 The variance of the model's prediction of the previous state is used to describe the uncertainty in the generation process. This is the variance part of the conditional generation probability, used to control the randomness of the generation process.

[0159] In some implementations, step S500, which guides the generation process using a multi-attribute conditional vector to generate a target protein sequence based on target attributes, further includes: Step S530: Use the trained classifier to evaluate the intermediate states of the diffusion process to obtain the evaluation result.

[0160] As described above, during the diffusion generation process, a pre-trained classifier is used to evaluate the intermediate protein sequence. The intermediate protein sequence can be input into the classifier, and the classifier outputs evaluation results based on its training objectives (such as solubility, enzyme activity, thermostability, etc.), thereby obtaining the evaluation results of the intermediate sequence. These results reflect the sequence's performance in specific functional properties.

[0161] By evaluating intermediate states, deviations from the target attributes during the generation process can be identified in a timely manner, providing a basis for subsequent adjustments. A pre-trained classifier can be loaded, and the sequence of intermediate states can be input into the classifier to obtain the evaluation results.

[0162] Step S540: Calculate the predicted gradient information based on the evaluation results, and update the sequence state based on the current state and the predicted gradient information, so that the generated target protein sequence conforms to the preset target attributes.

[0163] As described above, based on the classifier's evaluation results, predicted gradient information is calculated to guide adjustments in the generation process. The gradient information of the current state sequence relative to the target attribute is calculated using the classifier's output. This gradient information indicates how to adjust the sequence to better satisfy the target attribute, thus obtaining the predicted gradient information, which is used for subsequent sequence state updates.

[0164] Predicted gradient information provides direction for adjusting the generation process, helping to generate sequences that better match the target properties. Gradient information can be calculated using the output of the classifier.

[0165] Furthermore, the method for calculating the predicted gradient information is as follows: ; in, Represents x t beg The predicted gradient information. That is, the logarithm of the conditional probability of the target attribute y in the current state. The gradient. This gradient information indicates how to adjust the current state. To increase the conditional probability of the target attribute y.

[0166] x t The current state at time step t represents the noisy sequence at a certain step in the diffusion process. It serves as input for calculating gradient information, determining how to adjust the current state to better satisfy the target attribute. y represents the target attribute; it indicates the attribute to be optimized during the generation process, such as solubility, enzyme activity, and thermal stability. It serves as the output target of the conditional probability, guiding the generation process. Represents the given current state x t In the case of , the logarithm of the conditional probability of the target attribute y; the logarithmic probability is used to calculate gradient information because the derivative of the logarithmic function is mathematically easier to handle and can avoid numerical problems. Represents x t The partial derivative is used to calculate the gradient. The logarithm of the conditional probability with respect to the current state x is used to calculate the gradient. t The gradient, i.e., the predicted gradient information.

[0167] Furthermore, the protein sequence in the intermediate state is updated based on the current state and the predicted gradient information.

[0168] The current state sequence can be combined with the predicted gradient information, and the sequence state can be adjusted according to a certain update rule (such as gradient descent) to obtain an updated sequence state that is closer to the target attribute.

[0169] By gradually adjusting the sequence state, the generation process can more effectively approach the target attribute, improving the quality of the generated sequence. The sequence state can be updated based on gradient information.

[0170] Furthermore, the method for updating the sequence state based on the current state and the predicted gradient information includes: ; in, The sequence state represents the updated time step t-1; indicating the current state. The state of the previous time step is generated under the influence of the predicted gradient information. This is a step-by-step denoising process during generation.

[0171] This represents the predicted sequence state given the current state and time step t. The mean; representing the previous state predicted by the model. The expected value. This is the mean part of the conditional generation probability, used to guide the generation process. represents the standard deviation at time step t; it indicates the noise level at time step t. The standard deviation is used to control the randomness in the generation process, ensuring that the generated sequences have a certain degree of diversity. w represents the guiding strength parameter; it controls the degree to which the predicted gradient information affects the sequence update. A larger w value will make the generation process more strongly converge to the target attribute y, but may lead to reduced diversity in the generated sequences; a smaller w value will make the generation process smoother, but may require more time steps to reach the target attribute. This represents the logarithm of the conditional probability of the target attribute y given the current state x. t The gradient. Provides the adjustment direction, indicating how to modify the current state. This increases the conditional probability of the target attribute y. This gradient information is a key guide for adjusting the sequence during the generation process.

[0172] Step S550: During the sequence generation process at each time step, the sequence generation process is adjusted according to the preset target attribute based on the calculated predicted gradient information and the current state during the diffusion process.

[0173] As described above, at each time step, the generation process is adjusted based on the predicted gradient information and the current state to better conform to the preset target attributes.

[0174] At each time step of the diffusion generation process, the parameters or strategies of the generation process are dynamically adjusted by combining the predicted gradient information and the current state. This ensures that the generated sequence gradually meets the target properties, thus the generation process is progressively adjusted, and the final generated sequence better matches the target properties. Specifically, the generation process can be adjusted at each time step.

[0175] Dynamically adjusting the generation process can improve the target attribute compliance of the generated sequence and enhance the controllability of the generation process.

[0176] Step S560: Dynamically adjust the guiding strength parameter according to the time step of the sequence generation process to optimize the sequence generation process of the target protein sequence.

[0177] As described above, the guidance intensity parameters are dynamically adjusted based on the time step of the generation process to optimize the generation process.

[0178] At different stages of the generation process, the guidance strength parameter is adjusted according to a preset strategy to balance the stability of the generation process and the guidance strength of the target attribute. This dynamic adjustment of the guidance strength parameter allows the generation process to better balance stability and the guidance of the target attribute at different stages, ultimately generating higher-quality sequences. Specifically, the guidance strength parameter can be dynamically adjusted based on the time step.

[0179] Dynamically adjusting the guiding strength parameters can improve the flexibility and adaptability of the generation process, ensuring that the generated sequences maintain diversity while meeting the target attributes.

[0180] Furthermore, the method for calculating the guiding strength parameter is as follows: ; Where t represents the current time step, indicating the current time step in the generation process; T represents the total time steps, indicating that the generation process ends at t = T.

[0181] This represents the guidance strength parameter; it controls the guidance strength of the target attribute on the generation process at time step t. Represents the maximum boot strength; sets the maximum value of the boot strength to ensure that the boot strength will not exceed this value at any time step in the generation process. This represents the decay coefficient of the guiding intensity. It controls the decay rate of the guiding intensity with time step t. A larger value indicates a lower decay rate. This value will cause the guiding strength to decay more quickly.

[0182] Furthermore, the method for calculating the conditional generation probability is as follows: ; in, This represents the probability of generating the condition, that is, given the current state x. t In the case of a multi-attribute condition vector c, the previous state x t-1 The conditional generation probability. It represents the probability generated from the current state x during the generation process. t Restore to the previous state x t-1 The probability distribution.

[0183] Represents the situation given the current state x. t Given the condition vector c, the conditional probability of the multi-attribute condition vector c. Let represent the conditional probability of the current state x. t P represents the probability that the multi-attribute condition vector c satisfies the given conditions. The prior probability of the multi-attribute conditional vector represents the probability of the multi-attribute conditional vector c occurring in the absence of any other information. Represents conditional probability, that is, given the current state x t In the case of the previous state x t-1 The conditional probability of represents the probability of the current state x during the generation process. t Restore to the previous state x t-1 The probability distribution is assumed, without considering the influence of the multi-attribute condition vector c. t represents the current time step; c represents the multi-attribute condition vector. This represents the current state at time step t; The sequence state represents the updated time step t-1.

[0184] Example 6 Reference Figure 6 This embodiment provides a protein sequence generation method. Based on the aforementioned embodiment 1, step S300 involves constructing a protein sequence generation model based on a deep learning model with an attention mechanism, including: Step S310: Construct the feature extraction module of the protein sequence generation model; the feature extraction module includes a multi-layer Transformer encoder and a multi-head attention layer.

[0185] It should be noted that the protein sequence generation model constructed in this embodiment is a conditionally guided diffusion model based on a multi-head attention mechanism, which may include: (1) Sequence encoding module: amino acid sequence embedding layer, secondary structure encoding layer, position encoding layer, and multiple attribute projection layer. (2) Feature extraction module: multi-layer Transformer encoder and multi-head attention layer. (3) Attribute prediction module: multi-task regression head and attribute prediction layer.

[0186] Specifically, the secondary structure of a protein can be used as guiding information to accurately extract the secondary structure using DSSP; the primary sequence of a protein can be used as input information to predict solubility and activity fold rate using a self-developed algorithm; and the spatial structure of a protein can be used as input information to predict thermal stability using a self-developed algorithm.

[0187] The aforementioned feature extraction module is designed, including a multi-layer Transformer encoder and a multi-head attention layer.

[0188] The Transformer architecture can be used to process protein sequences and extract long-range dependencies. Multi-head attention mechanisms can be used to capture different features within the sequence, resulting in a feature extraction module capable of capturing complex protein sequence features.

[0189] The Transformer architecture can effectively handle long sequences and capture long-range dependencies. The multi-head attention mechanism can simultaneously focus on multiple features in the sequence, improving the efficiency and accuracy of feature extraction.

[0190] Specifically, deep learning frameworks (such as PyTorch or TensorFlow) can be used to implement multi-layer Transformer encoders and multi-head attention layers.

[0191] Step S320: Construct the multi-scale feature fusion module of the protein sequence generation model.

[0192] The above describes the construction of a module for fusing features at different scales.

[0193] A multi-scale feature fusion module can be designed to combine features at different scales. Multi-head self-attention layers and feedforward networks (FFNs) can be used to process features at different scales. Through feature fusion, the model's ability to capture features at different scales is optimized, resulting in a module capable of fusing features at different scales and improving the model's ability to handle complex features. A multi-scale feature fusion module can be added to the feature extraction module.

[0194] Multi-scale feature fusion can capture local and global features in a sequence, improving the model's generalization ability and generation quality.

[0195] Step S330: During the feature extraction process, the multi-scale feature fusion module is used to perform multi-scale feature fusion processing. By combining features of different scales through the multi-head self-attention layer and the feedforward network, the protein sequence generation model's ability to capture features of different scales is optimized.

[0196] As mentioned above, a multi-scale feature fusion module is used in the feature extraction process to process and fuse features of different scales.

[0197] The output of the feature extraction module is passed to the multi-scale feature fusion module. A multi-head self-attention layer and a feedforward network are used to combine features at different scales. Through feature fusion, the model's ability to capture features at different scales is optimized, resulting in a feature representation that integrates features from different scales, thus improving the model's generative performance. A data flow can be established between the feature extraction module and the multi-scale feature fusion module.

[0198] By fusing multi-scale features, the model can better handle complex protein sequences and generate higher-quality protein sequences.

[0199] Through the steps described above in this embodiment, a protein sequence generation model based on a discrete diffusion model is constructed, including a feature extraction module and a multi-scale feature fusion module. This method combines the Transformer architecture and multi-scale feature fusion, enabling effective extraction and processing of complex features of protein sequences to generate high-quality protein sequences.

[0200] Furthermore, the formula for the multi-scale feature fusion processing is as follows: ; Wherein, 'c' represents the multi-attribute condition vector, which contains functional attribute information of the protein sequence (such as solubility, enzyme activity, and thermal stability). As a conditional input, it guides the model to generate protein sequences that satisfy specific functional attributes. Represents the hidden state of the l-th layer, indicating the feature representation after processing by the current layer; it serves as the output of the current layer and is used as the input of subsequent layers or the final feature representation. Represents the hidden state of layer l-1, indicating the feature representation input to the current layer; it serves as the input to the current layer and is used to compute the output of the multi-head attention and feedforward network.

[0201] MSA (Multi-Head Self-Attention) represents the multi-head attention layer; it captures long-range dependencies in a sequence through a multi-head attention mechanism, generating richer feature representations. The multi-head attention mechanism allows the model to focus on multiple locations in a sequence simultaneously, improving the efficiency and accuracy of feature extraction.

[0202] FEN (Feed-Forward Network) represents the feed-forward network; it performs nonlinear transformations on the input features, further processing and fusing the features. A feed-forward network typically consists of two fully connected layers, enhancing the model's expressive power.

[0203] concat means to The concatenation operation along the feature dimension of c. This involves combining the multi-attribute conditional vector c with the feature representation from the previous layer. This combination enables the model to simultaneously consider sequence features and functional attribute information.

[0204] It should be noted that although the discrete diffusion model and multi-head attention mechanism are used in the above embodiments, these components can be replaced by other deep learning models with attention mechanisms to achieve the same functionality. For example, other variants based on the Transformer architecture can be used, or the feature extraction module can be constructed by combining other deep learning techniques (such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), etc.). These alternatives can further optimize the model's performance and adapt to different application scenarios.

[0205] Example 7 To more clearly illustrate the protein sequence generation method provided in this application, this embodiment describes the construction, training, and output of the model.

[0206] Experimental methods: 1. Data Acquisition: (1) Obtain raw sequence data from public databases: Use bioinformatics tools (NCBI) to download protein sequence data from public databases. Ensure that the downloaded sequence data contains primary and secondary structure information. (2) Map the raw sequence data to integers: For the primary structure, the 20 amino acids and the unknown amino acid "X" are mapped to integers from 0 to 20. For the secondary structure, the 8 structural elements are mapped to integers from 0 to 7. The mapped integer sequence is then used as the protein sequence to be analyzed.

[0207] 2. Multi-attribute conditional vector: This checks whether each sequence in the sequence dataset has been labeled with functional attributes (such as solubility, enzyme activity, and thermal stability). If the sequence has been labeled with attribute information, this attribute information is converted into attribute labels. If the sequence has not been labeled with attribute information, a trained attribute prediction model is used for prediction. For solubility, a solubility classifier based on the ESM-C protein big language model is used for prediction. For thermal stability, molecular structure modeling methods are used for prediction. For enzyme activity, quantum computing and deep learning models (such as the Transformer architecture) are used for prediction. All attribute labels are combined into a multi-attribute conditional vector c.

[0208] 3. Construct a protein sequence generation model: Build a feature extraction module: Design a feature extraction module, including a multi-layer Transformer encoder and a multi-head attention layer. Use the Transformer architecture to extract long-range dependencies in the sequence.

[0209] Construct a multi-scale feature fusion module: Design a multi-scale feature fusion module to combine features of different scales. Use a multi-head self-attention layer and a feedforward network (FFN) to process features of different scales.

[0210] Training the protein sequence generation model: Prepare a training set, including protein sequences and their corresponding functional attribute labels. Calculate the reconstruction loss and multi-attribute prediction loss. Construct a multi-task loss combination with adaptive weights. Optimize the joint loss using an optimization algorithm (such as Adam) and train the generative model.

[0211] Model structure reference Figure 7 Specifically, it includes the following: (1) The network structure includes: a multi-layer neural network consisting of multiple hidden layers, represented by purple nodes; fully connected layers, where dense connections between nodes in each layer represent full interaction and transformation of features; and hierarchical processing, which achieves progressive optimization from noise sequence to target sequence through layer-by-layer feature extraction and transformation.

[0212] (2) The conditional fusion mechanism includes: fusing the three types of input information (sequence, structure, and features) in the early stage of the network; achieving effective integration of conditional information through feature embedding and attention mechanisms; and ensuring that the generation process fully considers all constraints.

[0213] (3) The input layer includes: a large protein dataset (x t As the basic training data for the model, it contains known protein sequences and their corresponding features, secondary structure information, information on local protein folding patterns such as α-helices and β-sheets, and other key features such as solubility, activity fold, and thermal stability.

[0214] (4) The output layer includes: outputting optimized protein sequences; ensuring that the generated sequences meet the structural and feature constraints of the input; and providing candidate sequences that meet the expected functions.

[0215] The training parameters are set as follows: 1. Number of training epochs: 500; 2. Batch size: 64; 3. Learning rate (lr): 0.0001; 4. Learning rate scheduler: lr_scheduler: ReduceLROnPlateau. a) mode: min; b) factor: 0.9; c) cooldown: 20; d) min_lr: 1e-7; 5. Optimizer: Adam.

[0216] In this embodiment, a Discrete Diffusion Model is used for the protein sequence generation task. The generation process of the model is controlled by secondary structure conditions, and a feature guidance module is incorporated to guide the sequence to optimize for specific functional properties (such as solubility and activity) during the generation process.

[0217] Core Architecture and Feature Guidance Module: In this embodiment, a feature guidance module is added to achieve precise control and guidance of protein functional properties. The feature guidance module provides two different guidance mechanisms, which users can choose to use according to their actual needs: Classifier-Guided Diffusion (GPD): This mechanism utilizes a pre-trained classifier to evaluate the sequences of intermediate generation steps in real time during the diffusion generation process. It guides the model's generation direction by calculating token-level gradients, making the generated sequences more consistent with target characteristics (such as higher solubility or stronger activity). This guidance method offers high flexibility and accuracy, making it suitable for scenarios with clearly defined target characteristics and requiring strong control.

[0218] Classifier-Free Guided Diffusion: This guidance mechanism integrates feature labels directly into the conditional input of the diffusion process, eliminating the need for a separate classifier for evaluation. The model randomly masks some conditions during training, allowing for flexible control over feature labels during generation. This guidance method reduces reliance on classifiers and is more suitable for scenarios requiring a balance between generating diversity and controlling target characteristics.

[0219] Flexible application of feature-guided approaches: Both guidance modules are provided as independent control options. Users can choose to use one guidance mechanism alone or combine the two guidance mechanisms in the generation task, and flexibly adjust the model's guidance strategy according to different application scenario requirements.

[0220] By introducing a feature-guided module, the discrete diffusion model in this embodiment can generate protein sequences that better meet actual needs while maintaining generation diversity, effectively solving the technical bottleneck of lacking target function control in traditional generation models.

[0221] 4. Encode the sequence into a discrete representation: Encode the protein sequence to be analyzed into a discrete representation: Using the mapping rules defined in step 2, encode the primary and secondary structures of the protein sequence into integer sequences. Input the encoded sequence into the trained protein sequence generation model.

[0222] 5. Generate the target protein sequence: Calculate the state transition probability; during the diffusion process, calculate the state transition probability from the initial state to the intermediate state. Calculate the conditional generation probability: Based on the state transition probability and the multi-attribute conditional vector, calculate the conditional generation probability. Update the sequence state: Evaluate the intermediate state using a trained classifier and calculate the predicted gradient information. Update the sequence state based on the current state and the predicted gradient information. Dynamically adjust the guidance strength parameter to optimize the generation process. Generate the target protein sequence: Starting from the final state, generate the sequence step-by-step in reverse until the initial state is recovered. Obtain the protein sequence that satisfies the target attributes.

[0223] Example 8 To more clearly illustrate the protein sequence generation method provided in this application, in this embodiment, the model training length is based on Bacillus subtilis. Bacillus subtilis Xylanase (PDB: 2DCZ, Bs xynA) and Sphingosomalmonella Sphingobium yanoikuyae Short-chain dehydrogenases (PDB: 4BMV, Sy SDR) were used to generate active sequences for the model, thereby obtaining a novel xylanase and a novel short-chain dehydrogenase, respectively.

[0224] 1. Experimental methods: (1) Construction of engineered bacteria: clone the novel protein model gene, construct a 6×his-tag expression vector, and transfer it into the host bacteria to obtain engineered bacteria of xylanase and short-chain dehydrogenase; (2) Preparation of test products: ferment the constructed engineered bacteria to produce enzymes, and sonicate or pressurize the fermented cells to obtain crude enzyme solutions of xylanase and short-chain dehydrogenase; react the crude enzyme solution and the substrate to be tested in the transformation system: short-chain dehydrogenase with ethanol and NADP + The reaction produces acetaldehyde and NADPH. Xylanase reacts with xylan to produce reducing sugar products. The defensin is spread in 8 mm radius circles on non-resistant mold plates.

[0225] 2. Target Protein 1-Xylanase: Xylanase is a key hydrolytic enzyme capable of degrading xylan into monosaccharides and oligosaccharides. It is widely used in biofuels, food processing, papermaking, and animal feed, playing a crucial role in improving production efficiency and environmental benefits. Its functionality lies in the multi-scale decomposition of complex xylans, while its stability determines its applicability under high temperature, wide pH, and denaturing environments. Through protein engineering, directed evolution, and biomimetic optimization, the enzyme's activity, thermal stability, and environmental tolerance can be significantly improved to meet the demands of complex industries.

[0226] In this embodiment, based on the method in Embodiment 7, the method is used to... BsxynA performed a homology sequence search, removing sequences with homology below 30% and above 90%. Using NCBI's Blastp component, a redundancy-removing database was selected (with the Blastp algorithm set), controlling the sequence length to 160-210 bp (ensuring uniform sequence length). The remaining 91 sequences were then further removed using Jalview to eliminate sequences with similarity greater than 95%, preventing excessive similarity from affecting the results' bias. This left 50 sequences. The main reason for these deletions was the high similarity of template sequences and homology sequences exceeding 90%, necessitating the cut-off of most sequences during processing.

[0227] Large sequence libraries were aligned using MAFFT to correct for gap bias, and the LG model was used for further precise alignment. Snapgene was used to define consensus sites (i.e., mask sites) with sequence identity >90%. Higher identity frequencies indicate greater conservation of the position during evolution, which is crucial for family identification and confirmation of functional residues; therefore, a 90% constraint was added to the mask. Based on this, the output site set is as follows: 23-26 GGNY, 34-37 GNFV, 39-42 GKGW, 62-65 GNXYL, 68-72 LYGWT, 78-80 EYY, 96-98 GTV, 101-105 DGGTY, 112-117 RXNAPS, 124-132 TFXQXWSVR, 144-153 ITXXNHXXAW, 176-183 SSGXXNXT. Within this restricted range, short characteristic motifs, i.e., functional residue groups with >3 aa, are identified as protein functional sites.

[0228] Based on the above adjustments, Bs xynA underwent a secondary design, resulting in 100 output sequences. After sequence generation, Omega Fold was used to generate tertiary structures. The top 10 sequences with the best secondary structure similarity scores were selected for sequence evaluation, based on their secondary structure similarity, Fold x stability calculation, sequence similarity, sequence family distribution, and catalytic region identification.

[0229] Based on the above algorithm, the generated sequence length is 185 aa. Its secondary structure similarity scores range from a high of 71.89 to a low of 62.7, indicating high structural similarity. In sequence similarity prediction, the sequence similarity is between 39.43% and 46.91%, which is within the range of homologous sequence similarity. Based on Pfam, its secondary structure domains are predicted to verify the functional distribution of the sequences. All 10 sequences belong to the Glycoside hydrolase family. BsXynA belongs to the same family as Endo-1,4-β-xylanase A, and its functional region was identified as Endo-1,4-β-xylanase A. It exhibits similar glycoside hydrolytic properties and has been identified as a segment of the Glycosylhydrolases family 11 (GH11) domain, showing high functional similarity. Endo-1,4-β-xylanase (Xylanase) is an arabinoxylan degrading enzyme and glycoside hydrolase commonly used in biochemical research. Endo-1,4-β-xylanase cleaves the β-xylosyl bond between two d-pyranyl residues linked at β-(1,4). It decomposes xylan into xylose, xylobiose, and xylotriose, exhibiting relatively stable properties. Based on the degree of tertiary structural superposition, the optimal tertiary structural superposition is sequence 28,28-G, with a sequence similarity of 45.29% and a secondary structural similarity of 71.89%. Based on these structures, physicochemical properties were predicted, and the substrate binding forces of the tertiary structure were analyzed.

[0230] Intermolecular forces include hydrogen bonds, halogen bonds, disulfide bonds, salt bridges, π-π stacking, and hydrophobic interactions (hyperconjugation, π-methyl interactions, etc.). Higher affinity indicates stronger intermolecular interactions. Intermolecular affinity is primarily determined by intramolecular hydrogen bonds, ionic bonds, and hydrophobic interactions, and is also influenced by molecular concentration, pH, temperature, and molecular structure. Predicted physicochemical properties include amino acid distribution, protein isoelectric point, half-life, stability, and hydrophilicity (assessed through lipophilicity and gravy). The protein half-life, the time required for half of the protein to degrade, is a fundamental indicator of protein stability; a longer half-life indicates greater stability within the expression system.

[0231] The sequence generation library was updated to 1000, and the top 50 sequences were selected based on secondary structure similarity. Sequence 816 achieved the best secondary structure similarity of 90%. Sequences ranked 1-50 had secondary structure similarities of 81-90% and sequence similarities of 49-57%, respectively, and their soluble expression met the requirements for *E. coli* expression (score > 0.5). A xylanase-xylotriose complex model was constructed based on the protein-small molecule complex model (PDB: 6JXL). The hydrogen-bonding sites for xylanase-xylotriose were Y69, Y80, P116, Y166, and E172. Sequences 816 and 809 were obtained by screening these hydrogen-bonding sites.

[0232] The sequences Xyn1, Xyn3, and Xyn4 have the same half-life and stability. BsXyn has similar values, with an isoelectric point of 8.8 and an internal half-life of 10 hours in E. coli. Its lipophilicity and hydrophilicity are slightly lower than Bsxyn A, but its stability is higher than Bsxyn A. Molecular dynamics simulations were used to construct a complex, which was found to stably bind to xylotriose.

[0233] The novel xylanase protein sequence is derived from Bacillus subtilis. Bacillus subtilis The amino acid sequences of the novel proteins are shown in SEQ ID NO.1, 3, 5, and 7, and the nucleic acid sequences are shown in SEQ ID NO.2, 4, 6, and 8 (corresponding to the amino acid sequences).

[0234] The novel xylanase sequence was directly cloned into pET-21a. Nde I and Xho Between the I restriction sites, the recombinant plasmid pET-21a-xyn-6×his tag was obtained (pET-21a plasmid was obtained from General Electric). It was transformed into E. coli BL21(DE3) competent cells using the heat shock method, and positive clones were obtained through screening.

[0235] In the reducing sugar test reaction, the conversion system was an aqueous phase. The crude enzyme solution was used for biotransformation in a potassium phosphate buffer solution at pH 5-8, with a reaction temperature of 50-80 ℃ and a reaction time of 1-60 min. The substrate xylan was added at a concentration of 5-20 g / L, the total protein concentration of the enzyme solution was 0.5-10 mg / mL, the co-solvent dimethyl sulfoxide content was 5%-20%, and the enzyme addition amount was 0.1-1%.

[0236] Method for detecting 3,5-dinitrosalicylic acid (DNS) reducing sugar: Add 6.3 g of 3,5-dinitrosalicylic acid, 20.96 g of sodium hydroxide, 182 g of potassium sodium tartrate, 5 g of phenol, and 5 g of sodium sulfite to 0.8 L of hot water and stir to dissolve. After cooling, add distilled water to make up to 1 L.

[0237] Furthermore, the enzyme solution was used for biotransformation in a potassium phosphate buffer solution at pH 5.8 at a reaction temperature of 55 °C. The initial substrate concentration was 1 g / L, and the final protein concentration was 0.1 mg / mL. After reacting at 55 °C for 30 min, the reaction was terminated by boiling at 95 °C for 10 min. Centrifugation conditions: room temperature, 12000 r / min, 2 min. Enzyme activity was tested using the DNS method.

[0238] The xylanase solution was incubated at 55℃ for 2 h, and enzyme activity was tested using the above system. The reaction temperature was 55℃, the initial substrate concentration was 1 g / L, and the final protein concentration was 0.1 mg / mL. After reacting at 55℃ for 30 min, the reaction was terminated by boiling at 95℃ for 10 min. Centrifugation conditions: room temperature, 12000 r / min, 2 min. Enzyme activity was tested using the DNS method.

[0239] An enzyme activity unit is defined as the amount of enzyme that releases 1 μmol of reducing sugar per minute. One activity unit (U) is defined as the amount of enzyme that releases 1 μmol of reducing sugar per minute.

[0240] Compared with the original xylanase, the synthetic xylanase obtained by expressing the above system showed significantly improved stability. This novel xylanase maintained 100% enzyme activity at 55℃ for 2 h, and its sequence similarity was similar to... Bs The xyn xylanase content was only 40-50%, indicating that a multi-attribute-guided protein sequence generation method can generate novel, highly stable, and active xylanases for industrial production.

[0241] The activity test results are shown in Table 1: Table 1. Activity test of novel xylanase

[0242] 3. Target protein 2-ol dehydrogenase (ADH): Alcohol dehydrogenases (ADHs) are primarily used in synthetic biology catalytic pathways to produce optically active secondary alcohols. Few ADHs are suitable for reducing precursor ketones whose carbonyl groups are surrounded by a dibenzene ring and / or a hydrophobic group. Alcohols derived from… Sphingobium yanoikuyae DSM 6900 Sy ADH (PDB: 4BMV) catalyzes the synthesis of (S)-ols from large substrate ketones, and its catalytic mechanism as an NADPH-dependent enzyme has been elucidated. Its domain is classified as 11β-hydroxysteroid dehydrogenase 1, which, in conjunction with NADP+ / NADPH, achieves cortisone reduction and oxidation in a reversible reaction. Based on the above case information, using the 255 aa protein sequence... Sy Using ADH as a template, a consensus locus dataset was constructed using NCBI. From a database of 5000 sequences, sequences with similarity between 30% and 90% were filtered, 95% of redundant sequences were removed, and sequences with length similarity <90% were also removed, resulting in a sequence set containing 453 sequences. A Python script module was built for rapid filtering of consensus loci, replacing the cumbersome steps of traditional consensus locus filtering, and combined with... Sy The ADH secondary structure information was used to generate 1000 sequences.

[0243] Sequence homology was screened, conforming to the family genus SDR_fam (IPR002347), GDH, and adh_short characteristics, and compared with phylogenetic tree, secondary structure similarity (79-83%), and sequence similarity (<70%) results. NADP+ exhibits strong hydrogen bonding with S13, S14, G15, D37, D62, L63, N88, Y153, K1547, T186, T188, and E189, forms salt bridges with R36 and R193, and forms π-σ bonds with L11, etc., hydrophobic interactions. Based on these structures, sequences SDR1 and SDR2 with identical structures were obtained. Their protein amino acid sequences are shown in SEQ ID NO. 9 and 11, and their nucleic acid sequences are shown in SEQ ID NO. 10 and 12 (corresponding to amino acids).

[0244] The novel short-chain dehydrogenase protein sequence was directly constructed into pRSFDuet-1. BamH I- Xho Between the I restriction sites, the recombinant plasmid pRSFDuet-1-6×his-tag-SDR was obtained (pRSFDuet-1 plasmid was obtained from General Electric). It was transformed into E. coli BL21(DE3) competent cells using the heat shock method, and positive clones were obtained through screening.

[0245] In the NADP+ assay, the conversion system was an aqueous phase. The crude enzyme solution was used for biotransformation in a potassium phosphate buffer solution at pH 7-10 at a temperature of 20-50 °C for 1-10 min. Ethanol was used as the model substrate at 5%-20% (v / v), the total protein concentration of the enzyme solution was 0.5-10 mg / mL, the co-solvent dimethyl sulfoxide content was 5%-20%, and the enzyme concentration was 0.1-1%.

[0246] Furthermore, the enzyme solution underwent biotransformation in a potassium phosphate buffer solution at pH 7.0, with the addition of Ca... 2+ The reaction temperature was 37 ℃, the initial substrate concentration was 1 g / L, and the final protein concentration was 0.1 mg / mL. After reacting at 55 ℃ for 30 min, the reaction was terminated by boiling at 95 ℃ for 10 min. Centrifugation conditions: room temperature, 12000 r / min, 2 min. Enzyme activity was measured using the NADP+ method. One enzyme activity unit is defined as the reduction of 1 μmol of NADP+ per milligram of protein per minute.

[0247] Compared with the original short-chain dehydrogenase, the generative short-chain dehydrogenase obtained by expressing the above system showed a significant improvement in catalytic activity. The activity of this short-chain dehydrogenase is shown in Table 2, and its sequence similarity is similar to that of the original short-chain dehydrogenase. SyThe SDR reached only 50-60%, indicating that a protein sequence generation method guided by multiple attributes can generate novel highly active short-chain dehydrogenases for industrial production.

[0248] The activity test results are shown in Table 2: Table 2. Activities of novel short-chain dehydrogenases

[0249] refer to Figure 8 In this application embodiment, a protein sequence generation apparatus is provided, comprising: The data acquisition module 10 is used to acquire the protein sequence to be analyzed and construct a sequence dataset including the protein sequence; The vector construction module 20 is used to construct a multi-attribute conditional vector with different functional attributes based on the protein sequence to be analyzed in the sequence dataset; wherein the functional attributes include at least one of solubility, enzyme activity and thermal stability; The model building module 30 is used to build a protein sequence generation model based on a deep learning model with an attention mechanism, and to obtain the trained protein sequence generation model through training. Data input module 40 is used to encode the protein sequence to be analyzed in the sequence dataset into a discrete representation and then input it into the protein sequence generation model; The generation module 50 is used to guide the generation process using multi-attribute conditional vectors to generate target protein sequences based on target attributes.

[0250] In this embodiment of the application, a system is provided, the system including a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the protein sequence generation method described in any of the foregoing embodiments.

[0251] In this embodiment of the application, a computer storage medium is provided, which stores a computer program. When the computer program is executed on a processor, it implements the protein sequence generation method according to any one of the foregoing embodiments.

[0252] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating a protein sequence, characterized in that, include: Obtain the protein sequence to be analyzed and construct a sequence dataset including the protein sequence; Based on the protein sequence to be analyzed in the sequence dataset, a multi-attribute conditional vector of different functional properties is constructed; wherein, the functional property includes at least one of solubility, enzyme activity and thermostability; A protein sequence generation model based on a deep learning model with an attention mechanism is constructed, and the trained protein sequence generation model is obtained through training. The protein sequences to be analyzed in the sequence dataset are encoded into discrete representations and then input into the protein sequence generation model; The generation process is guided by multi-attribute conditional vectors to generate target protein sequences based on target attributes.

2. The protein sequence generation method as described in claim 1, characterized in that, The process of obtaining the protein sequence to be analyzed includes: The original sequence data is obtained from a public database, and the original sequence data is mapped to integers. The sequence information after mapping to integers is used as the protein sequence to be analyzed corresponding to the original sequence data. Specifically, for the primary structure, the 20 amino acid information and unknown amino acid in the original sequence data are mapped to integers from 0 to 20; for the 8 structural elements in the secondary structure, they are mapped to integers from 0 to 7 respectively.

3. The protein sequence generation method as described in claim 1, characterized in that, The construction of a multi-attribute conditional vector with different functional attributes based on the protein sequence to be analyzed in the sequence dataset includes: Determine whether the protein sequence to be analyzed in the sequence dataset has corresponding attribute information; If so, the attribute information is used as a functional attribute of the protein sequence to be analyzed and converted into an attribute tag; If not, the trained attribute prediction model is used to predict the protein sequence to be analyzed in the sequence dataset to obtain attribute labels; The multi-attribute condition vector is generated based on all the attribute tags of the protein sequence to be analyzed.

4. The protein sequence generation method as described in claim 3, characterized in that, The step of using a trained attribute prediction model to predict the protein sequence to be analyzed in the sequence dataset and obtaining attribute labels includes: For the solubility in the attribute information, a solubility classifier is used based on the ESM-C large language model to classify solubility, obtain prediction results, and generate a solubility tag in the attribute tag of the protein sequence to be analyzed based on the prediction results. Regarding the thermal stability in the attribute information, the structural information of the protein sequence to be analyzed in the sequence dataset is used as input. By modeling the global relationship between molecular structure nodes and edges, a prediction result is obtained, and a thermal stability label in the attribute tag of the protein sequence to be analyzed is generated based on the prediction result. For the enzyme activity in the attribute information, the primary structure of the protein sequence to be analyzed in the sequence dataset is used as input. The interaction between molecules is simulated by quantum computing. Based on the Transformer architecture in deep learning and combined with the ESM-C large language model, the sequence information of the primary structure is parsed to obtain the prediction result. Based on the prediction result, the enzyme activity tag in the attribute tag of the protein sequence to be analyzed is generated.

5. The protein sequence generation method as described in claim 1, characterized in that, The trained protein sequence generation model obtained through training includes: Obtain sequence data from the training set, and calculate reconstruction loss and multi-attribute prediction loss based on the functional attributes, and calculate the total loss of the sequence data based on the reconstruction loss and the multi-attribute prediction loss; A multi-task loss combination with adaptive weights is constructed, including the total loss and the multi-attribute prediction loss; wherein the multi-attribute prediction loss includes at least one of solubility prediction loss, activity prediction loss and thermal stability prediction loss; The protein sequence generation model is optimized by combining the multi-task loss to obtain a trained protein sequence generation model.

6. The protein sequence generation method as described in claim 5, characterized in that, The method for calculating the reconstruction loss is as follows: ; in, Represents the reconstruction loss; Represents real noise; The noise represented by the protein sequence generation model prediction; The noisy sequence represents time step t; c represents the functional attribute; and / or, The calculation method for the multi-attribute prediction loss is as follows: ; in, This represents the multi-attribute prediction loss; This represents the loss of solubility; This represents the loss of enzyme activity; Represents the aforementioned thermal stability loss; and / or, The total loss is calculated as follows: ; in, α represents the total loss; α represents the weight of the reconstruction loss. represents the reconstruction loss; k represents the total number of types of functional attributes that need to be predicted; The prediction loss represents the functional attribute i; The weight represents the functional attribute i.

7. The protein sequence generation method as described in claim 1, characterized in that, The construction of the protein sequence generation model based on a deep learning model with an attention mechanism includes: A feature extraction module is constructed to build the protein sequence generation model; the feature extraction module includes a multi-layer Transformer encoder and a multi-head attention layer; Construct a multi-scale feature fusion module for the protein sequence generation model; During the feature extraction process, the multi-scale feature fusion module is used to perform multi-scale feature fusion processing. By combining features of different scales through the multi-head self-attention layer and the feedforward network, the protein sequence generation model's ability to capture features of different scales is optimized.

8. The protein sequence generation method as described in claim 7, characterized in that, The formula for the multi-scale feature fusion processing is as follows: ; Wherein, c represents the multi-attribute condition vector; Represents the hidden state of the l-th layer, indicating the feature representation after processing by the current layer; The hidden state of layer (l-1) represents the feature representation input to the current layer; MSA represents the multi-head attention layer; FEN represents the feedforward network; concat represents... The concatenation operation of c along the feature dimension.

9. A system, characterized in that, The system includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the protein sequence generation method according to any one of claims 1-8.

10. A computer storage medium, characterized in that, It stores a computer program that, when executed on a processor, implements the protein sequence generation method according to any one of claims 1-8.